How To Solve Linear Differential Equation

Before we get to know how to solve linear differential equations, let us know what a linear differential equation is. An equation with one or more terms, consisting of the derivatives of the dependent variable with respect to one or more independent variables is known as a differential equation.

Solve Linear Differential Equation

\( \frac {dy}{dx} + Py = Q \) ……….(1)

A differential equation having the above form is known as first order linear differential equation where P and Q are either constants or functions of the independent variable (in this case x) only.

Also the differential equation of the form,

\( \frac {dy}{dx} + Py = Q \) , is a first order linear differential equation where P and Q are either constants or functions of y (independent variable) only.

Solution to Linear Differential Equation:

For finding the solution of such equations, we determine a function of the independent variable let us say M(x), which is known as the Integrating factor(I.F).

Multiplying both sides of equation (1) with the integrating factor M(x) we get;

\( M(x)\frac {dy}{dx} + M(x)Py = QM(x) \) …..(2)

Now we chose M(x) in such a way that the L.H.S of equation (2) becomes the derivative of y.M(x)

i.e.   \( \frac {d(yM(x))}{dx} = \frac {(M(x)dy}{dx} + y \frac{(d(M(x)))}{dx}                        (Using \frac{d(uv)}{dx}   = v\frac{du}{dx}   + u\frac{dv}{dx}   ) \)

\( M(x) \frac {dy}{dx} + M(x)Py = M (x) \frac {dy}{dx} + y \frac{d(M(x))}{dx} \)

\( M(x)Py = y \frac {dM(x)}{dx} \)

\( \frac{1}{M'(x)} = P.dx \)

Integrating both sides with respect to x, we get;

log M (x) = \( \int Pdx (As \int \frac {f'(x)}{f(x)} ) = log f(x) \)

⇒ M(x) = \( e^{\int Pdx} \) I.F

Now, using this value of the integrating factor, we can find out the solution of our first order linear differential equation.

Multiplying both the sides of equation (1) by the I.F. we get

\( e^{\int Pdx}\frac{dy}{dx} + yPe^{\int Pdx} = Qe^{\int Pdx} \)

This could be easily rewritten as:

\( \frac {d(y.e^{\int Pdx}}{dx} = Qe^{\int Pdx} (Using \frac{d(uv)}{dx} = v \frac{du}{dx} + u\frac{dv}{dx} ) \)

Now integrating both the sides with respect to x, we get:

\( \int d(y.e^{\int Pdx }) = \int Qe^{\int Pdx}dx + c \)

\( y = \frac {1}{e^{\int Pdx}} (\int Qe^{\int Pdx}dx + c )\)

where C is some arbitrary constant.

Step by step procedure to solve linear first order differential equation

  1. Rearrange the terms of the given equation in the form \( \frac{dy}{dx} + Py = Q \)

where P and Q are constants or functions of the independent variable x only.

  1. To obtain the integrating factor, integrate P (obtained in step 1) with respect to x and put this integral as a power to e.

\( e^{\int Pdx} \) = I.F

  1. Multiply both the sides of the linear first order differential equation with the I.F.

\( e^{\int Pdx} \frac{dy}{dx} + yPe^{\int Pdx} = Qe^{\int Pdx} \)

  1. The L.H.S of the equation is always a derivative of y × M (x)

i.e. L.H.S = \( \frac {d(y × I.F)}{dx} \)

\( \Rightarrow \frac{d(y × I.F)}{dx} = Q × I.F \)

  1. In the last step,we simply integrate both the sides with respect to x and get a constant term c to get the solution.

∴ y × I.F = \( \int Q × I.F dx + c \) , where C is some arbitrary constant

Similarly, we can also solve the other form of linear first order differential equation \( \frac {dx}{dy} +Px = Q \) using the same steps. In this form P and Q are the functions of y. The integrating factor (I.F) comes out to be  and using this we find out the solution which will be

(x) × (I.F) = \( \int Q × I.F dy + c \)

Now, to get a better insight into linear differential equation, let us try solving some questions.where C is some arbitrary constant.

Solved examples

Question: Solve the  LDE =  \( \frac{dy}{dx} = \frac {1}{1+x^8} – \frac {3x^2}{1 + x^2} \)

Solution: The above mentioned equation can be rewritten as  \( \frac {dy}{dx} + \frac {3x^2}{1 + x^2} y = \frac{1}{1+x^3} \)

Comparing it with \( \frac {dy}{dx} + Py = O \), we get

P= \(\frac {3x^2}{1+x^3}\)

Q= \(\frac {1}{1 + x^3}\)

Let’s figure out the integrating factor(I.F.) which is \( e^{\int Pdx} \)

⇒I.F  =  \( e^{\int \frac {3x^2}{1 + x^3}} dx = e^{ln (1 + x^3)} \)

⇒I.F. = 1 + x3

Now, we can also rewrite the L.H.S as:

\( \frac{d(y × I.F)}{dx}, \)

\( \frac{d(y × I.F.)}{dx}, \)

\( \frac{d(y × (1 + x^3))}{dx} = \frac {1}{1 +x^3} × (1 + x^3) \)

Integrating both the sides w. r. t. x, we get,

⇒ y × \( ( 1 + x^3) =  \int 1dx \)

⇒ y = \( \frac {x}{1 + x^3} = x \)

⇒ y = \( \frac {x}{1 + x^3} + c \)

Question: Solve the following differential equation  \( \frac {dy}{dx} + (sec x)y = 7 \)

Solution: Comparing the given equation with \( \frac {dy}{dx} + Py = Q \)

We see,  P = sec  x, Q = 7

Now lets find out the integrating factor using the formula

\( e^{\int Pdx} \)= I.F

\( e^{\int secdx} \)  = I.F.

⇒I.F. =  \( e^{ln |sec x + tan x |} = sec x + tan x  \)

Now we can also rewrite the L.H.S as

\( \frac {d(y × I.F)}{dx}, \),

\( i.e . \frac {d(y × (sec x + tan x ))}{dx}  \)

⇒ \( \frac {d(y × (sec x + tan x ))}{dx} = 7(sec x + tan x) \)

Integrating both the sides w. r. t. x, we get,

\(  \int d ( y × (sec x + tan x )) = \int 7(sec x + tan x) dx \)

\( \Rightarrow y × (sec x + tan x) = 7 (ln|sec x + tan x| + log |sec x| ) \)

⇒  y = \( \frac {7(ln|sec x + tan x| + log|sec x| }{(sec x + tan x)} + c \)

Question: A curve is passing through origin and the slope of the tangent at a point R(x,y) where -1<x<1 is given as \( \frac {x^4 + 2xy + 1}{1 – x^2} \). What will be the equation of the curve?

Solution: We know that the slope of the tangent at (x,y) is,

tanƟ= \( \frac {dy}{dx} = \frac {x^4 + 2xy + 1}{1 – x^2} \)

Reframing the equation in the form  \( \frac {dy}{dx}  + Py = Q \) , we get

\( \frac{dy}{dx} = \frac {2xy}{1 – x^2} + \frac {x^4 + 1}{1 – x^2 } \)

\( \frac{dy}{dx} – \frac{2xy}{1 – x^2} = \frac {x^4 + 1}{1 – x^2 } \)

Comparing we get P = \( \frac{-2x}{1 – x^2} \)

Q =\( \frac {x^4 + 1}{1 – x^2} \)

Now, let’s find out the integrating factor using the formula.

\( e^{\int Pdx} \)= I.F

\( e^{\int \frac{-2x}{1-x^2}}dx = e^{ln (1 – x^2)} = 1 – x^2 \) I.F

 Now we can also rewrite the L.H.S as

\( \frac {d(y × I.F)}{dx}, \)

i.e \( \frac{d(y × (1 – x^2))}{dx} = \frac{x^4 + 1}{1 – x^2} × 1 – x^2 \)

Integrating both the sides w. r. t. x, we get,

\( \int d(y × (1 – x^2)) = \int \frac{x^4 + 1}{1 – x^2} × (1 – x^2 )dx \)

\( \Rightarrow y × (1 – x^2) = \int x^4 + 1 dx  \)   ……(1)

\( \Rightarrow x (1 – x^2) = \frac {x^5}{5} + x + c \)

\( ⇒ y =  \frac {\frac {x^5}{5} + x}{1 – x^2}+C \)

It is the required equation of the curve. Also as the curve passes through origin; substitute the values as x=0, y=0 in the above equation. Thus,C=0.

Hence, equation of the curve is: \( ⇒ y =  \frac {\frac {x^5}{5} + x}{1 – x^2} \)


Practise This Question

Equation of curve through point(1,0) which satisfies the differential equation (1+y2)dxxydy=0, is