Suggested languages for you:
|
|

## All-in-one learning app

• Flashcards
• NotesNotes
• ExplanationsExplanations
• Study Planner
• Textbook solutions

# Linear Differential Equation

What do electronics and springs have in common? Nothing, you might think. They are two completely different things!

Well, it turns out that they do have something in common: both are described by the same sort of mathematics.

Differential equations are very useful in describing the world around us. In particular, electronics and springs are both described by what are known as Linear Differential Equations. Here you will learn how to identify them, and how to solve some of them.

## What are Linear Differential Equations?

A differential equation is an equation for an unknown function, where its derivatives are involved. But what does it make it linear?

You can say that a differential equation is linear if each dependent variable appears in linear fashion. This means that the dependent variable and/or its derivatives are all raised to the power of $$1$$, they are not multiplied together, and they are not part of a special function, like a trigonometric function or the exponential function.

Despite the above considerations, the independent variable can be non-linear. That is, the independent variable can be squared, as part of the sine function, and so on.

Below are some examples of linear differential equations.

$\frac{\mathrm{d}y}{\mathrm{d}x}+2y=0$

$x^2\frac{\mathrm{d}^2y}{\mathrm{d}x^2} +x\frac{\mathrm{d}y}{\mathrm{d}x}+4y=e^x$

$\frac{\mathrm{d}y}{\mathrm{d}x}+\left(\cos{x}\right)y=x^2$

## Linear vs Nonlinear Differential Equations

Just like there are linear differential equations, there are also nonlinear differential equations.

A nonlinear differential equation is a differential equation that is not a linear differential equation.

Simple, right? This means that the dependent variable and/or its derivatives are either:

• Being multiplied by each other

• Are raised to a power other than $$1$$

• Are part of a special function, like a trigonometric function or exponential function

Here are some examples of nonlinear differential equations.

$\frac{\mathrm{d}y}{\mathrm{d}x}+xy^2=0$

$y\frac{\mathrm{d}^2y}{\mathrm{d}x^2}+xy=\ln{x}$

$\frac{\mathrm{d}y}{\mathrm{d}x}+\sin{y}=\cos{x}$

Linear differential equations can be used to describe some natural phenomena, including but not limited to:

• Electromagnetic waves.

• The diffusion of heat.

• Electronic circuits.

• Oscillatory movement, like springs and pendulums.

Meanwhile, nonlinear differential equations can describe things like:

• Weather.

• Fluid dynamics.

• Population dynamics.

## First Order Linear Differential Equations

Differential equations are usually classified based on their order. A first order linear differential equation is a linear differential equation where the highest derivative involved is a first derivative. A first order linear differential equation can always be written in the form

$\frac{\mathrm{d}y}{\mathrm{d}x} + P(x)y=Q(x).$

This is known as the standard form of a first order linear differential equation.

You might also come across differential equations written in prime notation, so the above differential equation can also be written as

$y'+P(x)y=Q(x),$

where the dependence of $$y$$ is not explicitly stated, but has to be assumed according to the context.

Note that you might be given a linear differential equation that is not written in either way. In these cases you need to do some algebra to rewrite it.

Consider the following differential equation

$x^2y\frac{\mathrm{d}y}{\mathrm{d}x} +y^2=ye^x.$

Is it a linear differential equation? If so, determine $$P(x)$$ and $$Q(x).$$

At first glance the above differential equation might not look linear, so you will need to do some algebra to find out. In order to do so, you need to rewrite the differential equation so the term containing the derivative is not being multiplied by any number other than $$1$$.

For the above example, you can achieve this by dividing the whole differential equation by $$x^2y,$$ giving you

$\frac{x^2y \frac{\mathrm{d}y}{\mathrm{d}x} +y^2 }{x^2y} = \frac{ye^x}{x^2y},$

which can be simplified with some algebra, obtaining

$\frac{\mathrm{d}y}{\mathrm{d}x}+\frac{y}{x^2} = \frac{e^x}{x^2}.$

This means that the given differential equation is linear. The function multiplying $$y$$ is $$P(x)$$, and in this case it is given by

$P(x) = \frac{1}{x^2},$

while the function on the right-hand side of the equation is $$Q(x),$$ that is

$Q(x)= \frac{e^x}{x^2}.$

## Linear Differential Equations with Constant Coefficients

You have seen that a first order linear differential equation can always be written as

$\frac{\mathrm{d}y}{\mathrm{d}x}+P(x)y=Q(x).$

This means that, in general, $$P$$ and $$Q$$ are functions of $$x.$$ However, in the special case that the functions $$P(x)$$ and $$Q(x)$$ are constant functions, you have a linear differential equation with constant coefficients.

The following differential equations are all linear differential equations with constant coefficients.

$\frac{\mathrm{d}y}{\mathrm{d}x}+3y=0$

$\frac{\mathrm{d}y}{\mathrm{d}x}-\pi y=4$

$\frac{\mathrm{d}^2y}{\mathrm{d}x^2}-5\frac{\mathrm{d}y}{\mathrm{d}x}-y=e$

You can identify a linear differential equation with constant coefficients by noting that the independent variable does not appear explicitly.

Solving first order linear differential equations with constant coefficients is a straightforward task as they are Separable Equations. Consider the differential equation

$\frac{\mathrm{d}y}{\mathrm{d}x}+ay=b.$

The above equation can be separated. First isolate the term containing the derivative, so

$\frac{\mathrm{d}y}{\mathrm{d}x} = b-ay.$

The right-hand side of the equation can be seen as a function of $$y,$$ that is

$g(y) = b-ay,$

so

$\frac{\mathrm{d}y}{\mathrm{d}x} = g(y).$

This tells you that the differential equation can be solved by separation of variables. Begin by rewriting the differential equation in terms of the differentials of $$x$$ and $$y,$$ that is

$\mathrm{d}y = (b-ay)\,\mathrm{d}x,$

and then divide both sides of the equation by $$b-ay,$$ obtaining

$\frac{1}{b-ay} \, \mathrm{d}y = \mathrm{d}x.$

From here you can integrate both sides. The left-hand side is one of the Integrals Involving Logarithmic functions, so

$-\frac{1}{a} \ln{(b-ay)} = \int \mathrm{d}x,$

and the integral of a differential is just the variable of integration, this way you can write

$-\frac{1}{a} \ln{(b-ay)} = x+C.$

Next, you need to isolate $$y,$$ so

\begin{align} \ln{(b-ay)} &= -ax-aC \\ b-ay &= e^{-ax-aC} \\ ay &= b-e^{-ax-aC} \\ y &= \frac{b}{a}-\frac{1}{a}e^{-ax-aC}. \end{align}

This will nook nicer by using properties of exponents and some algebra to write

$-\frac{1}{a}e^{-ax-aC} = e^{-ax}\left(-\frac{1}{a}e^{-aC}\right),$

where $$-\frac{1}{a}e^{-aC}$$ is still a constant as a whole, so you can rename it, lets say as $$A.$$ This way

$y=Ae^{-ax}+\frac{b}{a}$

is the general solution for a first order linear differential equation with constant coefficients.

## Formula for Solving Linear Differential Equations

Usually, there are no formulas for solving differential equations. Luckily, in the case of first order linear differential equations, you can obtain a formula by using what is known as an integrating factor.

Consider a first order linear differential equation written in standard form, that is

$\frac{\mathrm{d}y}{\mathrm{d}x}+P(x)y=Q(x).$

The general solution to the above differential equation is

$y = \frac{1}{\alpha (x)} \left( \int \alpha(x) \, Q(x) \, \mathrm{d}x + C \right),$

where

$\alpha(x)=e^{\int P(x)\,\mathrm{d}x}$

is known as an integrating factor.

Just like indefinite integrals, differential equations have families of solutions. By plugging different values of the integration constant, $$C,$$ you get different solutions to the differential equation.

You can follow these steps in order to use the formula for solving first order linear differential equations that are written in standard form:

1. Calculate $$\int P(x) \, \mathrm{d}x.$$ There is no need to add an integration constant in this step!

2. Find the integrating factor $$\alpha(x).$$ This can be done by plugging in $$\int P(x) \, \mathrm{d}x$$ into the exponential, that is,

$\alpha(x) = e^{\int P(x) \, \mathrm{d}x}.$

3. Calculate $$\int \alpha(x)\,Q(x)\,\mathrm{d}x.$$

4. Use the formula for the general solution of a first order linear differential equation.

You can look at some examples in the following section.

## Linear Differential Equation Examples

The steps for solving a linear differential equation are better understood with examples. Let's dig in!

Solve the following first order linear differential equation:

$\frac{\mathrm{d}y}{\mathrm{d}x} + 3x^2y=6x^2.$

You should always begin by verifying if the differential equation is written in standard form,

$\frac{\mathrm{d}y}{\mathrm{d}x}+P(x)y=Q(x).$

If it is the case, you also need to identify $$P(x)$$ and $$Q(x).$$ In this case the differential equation is already written in standard form, and you can find that

$P(x)=3x^2,$

and

$Q(x)=6x^2.$

Now, you can follow the steps introduced in the previous section.

1. Calculate $$\int P(x) \, \mathrm{d}x.$$

Since $$P(x)=3x^2,$$ you can find its integral with the help of the Power Rule, that is

\begin{align} \int P(x)\,\mathrm{d}x &= \int 3x^2 \, \mathrm{d}x \\ &= x^3. \end{align}

2. Find the integrating factor $$\alpha(x).$$

To find the integrating factor you need to plug in the integral you got in the last step into an exponential function, that is

\begin{align} \alpha(x) &= e^{\int P(x) \, \mathrm{d}x} \\ &= e^{x^3}. \end{align}

3. Calculate $$\int \alpha(x)\,Q(x)\,\mathrm{d}x.$$

Now that you found $$\alpha(x),$$ you need to find

\begin{align} \int \alpha(x)\,Q(x)\,\mathrm{d}x &= \int e^{x^3}(6x^2)\,\mathrm{d}x \\ &= 2\int e^{x^3} (3x^2) \mathrm{d}x. \end{align}

Luckily, since $$3x^2$$ is the derivative of $$x^3,$$ you can use Integration by Substitution! Let

$u= x^3,$

so

$\mathrm{d}u = 3x^2\mathrm{d}x.$

This way you can rewrite the integral

\begin{align} \int \alpha(x)\,Q(x) \, \mathrm{d}x &= 2\int e^u \, \mathrm{d}u \\ &= 2e^u. \end{align}

Do not forget to undo the substitution, that is

$\int \alpha(x) \, Q(x) \, \mathrm{d}x = 2e^{x^3}.$

4. Use the formula for the general solution of a first order linear differential equation.

Finally, substitute the expressions obtained in the previous steps to find the general solution to the differential equation, that is

\begin{align} y &= \frac{1}{\alpha(x)} \left( \int \alpha(x)\,Q(x) \, \mathrm{d}x + C \right) \\ &= \frac{1}{e^{x^3}} \left( 2e^{x^3} + C\right) \\ &= 2+ \frac{C}{e^{x^3}} \\ &= Ce^{-x^3}+2. \end{align}

The general solution to the differential equation is then

$y = Ce^{-x^3}+2.$

Unlike indefinite integrals, where the integration constant is added at the end, in differential equations you will frequently find them multiplying another function.

Calculus is all about practice! Here is another example.

Solve the following first order linear differential equation:

$x\frac{\mathrm{d}y}{\mathrm{d}x} + y = x^2.$

This time, the differential equation is not given standard form, so you can't use the formula. In order to get over this, begin by dividing the whole equation by $$x,$$ that is

\begin{align} \frac{x\frac{\mathrm{d}y}{\mathrm{d}x}+y}{x} &= \frac{x^2}{x} \\ \frac{\mathrm{d}y}{\mathrm{d}x}+\frac{y}{x} &= x. \end{align}

This way you can now follow the usual steps using

$P(x) = \frac{1}{x}$

and

$Q(x) = x.$

1. Calculate $$\int P(x) \, \mathrm{d}x.$$

Begin by finding

$\int P(x) \, \mathrm{d}x = \int \frac{1}{x} \, \mathrm{d}x,$

which is one of the Integrals Involving Logarithmic Functions, so

$\int P(x) \, \mathrm{d}x = \ln{x}.$

2. Find the integrating factor $$\alpha(x).$$

Now you can plug in the result obtained in the previous step to find the integrating factor, that is

\begin{align} \alpha(x) &= e^{\int P(x)\,\mathrm{d}x} \\ &= e^{\ln{x}}. \end{align}

Since the exponential function and the natural logarithmic function are inverses, they undo each other, obtaining

$\alpha(x) = x.$

3. Calculate $$\int \alpha(x)\,Q(x)\,\mathrm{d}x.$$

Now that you found the integrating factor, you can evaluate

\begin{align} \int \alpha(x) \, Q(x) \, \mathrm{d}x &= \int x(x) \, \mathrm{d}x \\ &= \int x^2 \, \mathrm{d}x, \end{align}

which can be done with the help of the Power Rule, obtaining

$\int \alpha(x) \, Q(x) \, \mathrm{d}x = \frac{1}{3}x^3.$

4. Use the formula for the general solution of a first order linear differential equation.

Finally, substitute the expressions you got in the previous steps into the formula, that is

\begin{align} y &= \frac{1}{\alpha(x)} \left( \int \alpha(x) \, Q(x) \, \mathrm{d}x + C \right) \\ &= \frac{1}{x}\left( \frac{1}{3}x^3+C \right) \\ &= \frac{1}{3}x^2+\frac{C}{x}. \end{align}

The general solution to the differential equation is then

$y = \frac{1}{3}x^2+\frac{C}{x}.$

How about one with constant coefficients?

Solve the following first order linear differential equation:

$\frac{\mathrm{d}y}{\mathrm{d}x} + 3y = 0.$

Begin by noting that the given differential equation is a first order linear differential equation with constant coefficients, so you can use the general solution for this type of equation, that is, if

$\frac{\mathrm{d}y}{\mathrm{d}x} +ay=b,$

then

$y=Ae^{-ax}+\frac{b}{a},$

where $$A$$ is an integration constant.

In this case $$a=3$$ and $$b=0,$$ so

$y=Ae^{-(3)x}+\frac{(0)}{(3)},$

which means that the solution to the given differential equation is

$y=Ae^{-3x}.$

Simple, right?

## Linear Differential Equation - Key takeaways

• A linear differential equation is a differential equation in where the dependent variable and/or its derivatives are all raised to the power of $$1$$, they are not multiplied together, and they are not part of a special function.
• If any of the above conditions is not met, then the differential equation is classified as a nonlinear differential equation.
• A first order linear differential equation is a linear differential equation whose highest derivative is a first order derivative.
• A first order linear differential equation can always be written as$\frac{\mathrm{d}y}{\mathrm{d}x} +P(x) y = Q(x),$ which is known as the standard form of a first order linear differential equation.It can also be written using prime notation as$y' + P(x) y = Q(x).$
• The formula for solving a first order linear differential equations written in standard form is given by$y = \frac{1}{\alpha(x)} \left( \int \alpha(x) \, Q(x) \, \mathrm{d}x + C \right),$ where $$\alpha(x)$$ is called an integrating factor, and it is given by$e^{\int P(x) \, \mathrm{d}x}.$
• If $$P(x)$$ and $$Q(x)$$ are constant functions then you have a first order linear differential equation with constant coefficients, which can be written as$\frac{\mathrm{d}y}{\mathrm{d}x}+ay=b.$In such a case, its general solution is given by$y=Ae^{-ax}+\frac{b}{a},$where $$A$$ is an integration constant.

A linear differential equation is a differential equation where each dependent variable appears in a linear fashion.

A differential equation is linear if each dependent variable appears in a linear fashion. This means that the dependent variable and/or its derivatives are all raised to the power of 1, they are not multiplied together, and they are not part of a special function, like a trigonometric function or the exponential function.

A first order linear differential equation is a linear differential equation whose highest derivative is a first order derivative.

A second order linear differential equation is a linear differential equation whose highest derivative is a second order derivative.

A linear differential equation should be written in standard form. This means that the coefficient multiplying the term with the highest derivative is equal to 1.

## Final Linear Differential Equation Quiz

Question

Consider the following first order linear differential equation written in standard form:
$y'+\sin{x}y=\cos{x}.$

Which function is $$P(x)$$?

$$P(x) = \sin{x}$$.

Show question

Question

What makes a differential equation linear?

A differential equation is linear if each dependent variable appears in linear fashion.

Show question

Question

Consider the following differential equation:

$\frac{\mathrm{d}y}{\mathrm{d}x}+x^3y=e^x.$

Is this differential equation linear or nonlinear?

linear.

Show question

Question

Consider the following differential equation:

$\frac{\mathrm{d}y}{\mathrm{d}x}-x^2y^2=5.$

Is this differential equation linear or nonlinear?

nonlinear.

Show question

Question

Consider the following differential equation:

$\left(\frac{\mathrm{d}y}{\mathrm{d}x}\right)^2-y=0.$

Is this differential equation linear or nonlinear?

linear.

Show question

Question

Consider the following differential equation:

$\frac{\mathrm{d}^2y}{\mathrm{d}x^2}+2x\frac{\mathrm{d}y}{\mathrm{d}x}-\frac{y}{x}=0.$

Is this differential equation linear or nonlinear?

linear.

Show question

Question

What is a first order linear differential equation?

A first order linear differential equation is a linear differential equation whose highest derivative is a first order derivative.

Show question

Question

Consider the following differential equation:

$y'' + \sin{y'}-xy=0$

Is this differential equation linear or nonlinear?

nonlinear.

Show question

Question

Consider the following differential equation:

$\frac{\mathrm{d}y}{\mathrm{d}x}-x^2y=x.$

Does this linear differential equation have constant coefficients?

No.

Show question

Question

Consider the following differential equation:

$3\frac{\mathrm{d}y}{\mathrm{d}x}-5y=1.$

Does this linear differential equation have constant coefficients?

Yes.

Show question

Question

What is the formula for solving a first order linear differential equation?

$y = \frac{1}{\alpha(x)} \left( \int \alpha(x) \, Q(x) \, \mathrm{d}x + C\right)$.

Show question

Question

What is the equation for the integrating factor $$\alpha(x)$$?

$\alpha(x) = e^{\int P(x) \, \mathrm{d}x}$.

Show question

Question

Consider the following first order linear differential equation written in standard form:

$y'+x^3y=\frac{\ln{x}}{x}+1.$

Which function is $$Q(x)$$?

$Q(x) = \frac{\ln{x}}{x}+1$.

Show question

Question

Consider the following differential equation:

$y'-2y-\ln{x}=0.$

Is this differential equation linear or nonlinear?

linear.

Show question

Question

Consider the following differential equation:
$\sin{y'}-y^3=0.$

Is this differential equation linear or nonlinear?

nonlinear.

Show question

Question

How can you tell a homogeneous differential equation from a nonhomogeneous differential equation?

Homogeneous differential equations can be written with all of the functions involving dependent variables on one side of the equation, and zero on the other side.  Nonhomogeneous differential equations have a function of the independent variable instead of zero on the other side of the equation, and functions of the dependent variables on the other side.

Show question

Question

Which of the following is a first order linear differential equation?

$$y'+y=2$$.

Show question

Question

Which of the following is a nonhomogeneous differential equation?

$$y''+y'+2y=\ln x$$.

Show question

Question

Which of the following is a first order linear constant coefficient nonhomogeneous differential equation?

$$2y'+3y = e^x$$.

Show question

Question

True or False: Differential equations are both linear and nonhomogeneous.

False.

Show question

Question

Which of the following is an integrating factor for the differential equation $$y' + ay = f(x)$$?

$$e^{ax}$$.

Show question

Question

Which of the following is a solution for the differential equation $$y'+ay=f(x)$$?

$$e^{-ax} \int e^{ax} f(x) \, \mathrm{d}x$$.

Show question

Question

True or False: You can always find an explicit solution to a first order linear constant coefficient nonhomogeneous differential equation.

False.

Show question

Question

Which of the following is an integrating factor for the first order linear nonhomogeneous differential equation $$y'+a(x)y=f(x)$$?

$$e^{\int a(x)\,\mathrm{d} x}$$.

Show question

Question

Which of the following is an integrating factor for the first order linear nonhomogeneous differential equation $$y'+a(x)y=f(x)$$?

$$e^{-\int a(x)\,\mathrm{d} x} \int e^{\int a(x)\,\mathrm{d} x} f(x) \, \mathrm{d}x$$.

Show question

Question

True or False:  Being able to find an explicit solution to a first order linear nonhomogeneous differential equation depends on whether or not the integral $$\int e^{\int a(x)\,\mathrm{d} x} f(x) \, \mathrm{d}x$$ has a closed form.

True.

Show question

Question

True or False:  All integrals have closed forms.

False.

Show question

Question

True or False: First order linear nonhomogeneous differential equations always have solutions on the whole real line.

False.

Show question

Question

When solving first order linear nonhomogeneous differential equations you should always be alert for ___.

Restrictions on the domain of the solution.

Show question

Question

Is the differential equation $$3y'-2xy = e^x$$ in standard form?

No.

Show question

60%

of the users don't pass the Linear Differential Equation quiz! Will you pass the quiz?

Start Quiz

## Study Plan

Be perfectly prepared on time with an individual plan.

## Quizzes

Test your knowledge with gamified quizzes.

## Flashcards

Create and find flashcards in record time.

## Notes

Create beautiful notes faster than ever before.

## Study Sets

Have all your study materials in one place.

## Documents

Upload unlimited documents and save them online.

## Study Analytics

Identify your study strength and weaknesses.

## Weekly Goals

Set individual study goals and earn points reaching them.

## Smart Reminders

Stop procrastinating with our study reminders.

## Rewards

Earn points, unlock badges and level up while studying.

## Magic Marker

Create flashcards in notes completely automatically.

## Smart Formatting

Create the most beautiful study materials using our templates.