How to Solve Linear Differential Equation

A linear equation or polynomial, 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 linear differential equation.

A general first-order differential equation is given by the expression:

dy/dx + Py = Q where y is a function and dy/dx is a derivative.

The solution of the linear differential equation produces the value of variable y.

Examples:

  • dy/dx + 2y = sin x
  • dy/dx + y = ex
Table of contents:

Linear Differential Equations Definition

A linear differential equation is defined by the linear polynomial equation, which consists of derivatives of several variables. It is also stated as Linear Partial Differential Equation when the function is dependent on variables and derivatives are partial.

A differential equation having the above form is known as the 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, 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.

To find linear differential equations solution, we have to derive the general form or representation of the solution.

Linear Differential Equation Solution

Non-Linear Differential Equation

When an equation is not linear in unknown function and its derivatives, then it is said to be a nonlinear differential equation. It gives diverse solutions which can be seen for chaos. 

Solving Linear Differential Equations

For finding the solution of such linear differential 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)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.   d(yM(x))/dx = (M(x))dy/dx + y (d(M(x)))dx … (Using d(uv)/dx   = v(du/dx)   + u(dv/dx)

M(x) /(dy/dx) + M(x)Py = M (x) dy/dx + y d(M(x))/dx

M(x)Py = y dM(x)/dx

1/M'(x) = P.dx 

Integrating both sides with respect to x, we get;

\(\begin{array}{l} log M (x) = \int Pdx (As \int \frac {f'(x)}{f(x)} ) = log f(x) \end{array} \)

\(\begin{array}{l} M(x) = e^{\int Pdx}= I.F\end{array} \)

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

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

This could be easily rewritten as:

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

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

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

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

where C is some arbitrary constant.

How to Solve First Order Linear Differential Equation

Learn to solve the first-order differential equation with the help of steps given below.

  1. Rearrange the terms of the given equation in the form 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.

\(\begin{array}{l} e^{\int Pdx} = I.F\end{array} \)

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

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

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

i.e. L.H.S = d(y × I.F)/dx

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.

\(\begin{array}{l}\therefore y \times I.F = \int Q \times I.F dx + C,\end{array} \)

where C is some arbitrary constant

Similarly, we can also solve the other form of linear first-order differential equation 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

\(\begin{array}{l}(x) \times (I.F) = \int Q \times I.F dy + c \end{array} \)

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

Related Links

Solve Separable Differential Equations

Differential Equations Applications

Differential Equations for Class 12

Differential Calculus

Formation Differential Equations Whose General Solution Given

Ordinary Differential Equations

Solved Examples

Example 1: Solve the  LDE =  dy/dx = [1/(1+x3)] – [3x2/(1 + x2)]y

Solution:

The above mentioned equation can be rewritten as  dy/dx + [3x2/(1 + x2)] y = 1/(1+x3)

Comparing it with dy/dx + Py = O, we get

P = 3x2/1+x3

Q= 1/1 + x3

Let’s figure out the integrating factor(I.F.) which is,

\(\begin{array}{l} e^{\int Pdx} \end{array} \)

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

⇒I.F. = 1 + x3

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

d(y × I.F)/dx, 

d(y × (1 + x3)) dx = [1/(1 +x3)] × (1 + x3)

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

⇒ y × ( 1 + x3) =  x

⇒ y = x/(1 + x3)

⇒ y = [x/(1 + x) +  C

Example 2:

Solve the following differential equation:  

dy/dx + (sec x)y = 7 

Solution:

Comparing the given equation with dy/dx + Py = Q 

We see,  P = sec  x, Q = 7

Now lets find out the integrating factor using the formula

\(\begin{array}{l} e^{\int Pdx}= I.F \end{array} \)

\(\begin{array}{l} e^{\int secdx}= I.F. \end{array} \)

\(\begin{array}{l} I.F. = e^{ln |sec x + tan x |} = sec x + tan x  \end{array} \)

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

d(y × I.F)/dx},

i.e . d(y × (sec x + tan x ))

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

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

\(\begin{array}{l}  \int d ( y × (sec x + tan x ))  = \int 7(sec x + tan x) dx \end{array} \)

\(\begin{array}{l} \Rightarrow y × (sec x + tan x) = 7 (ln|sec x + tan x| + log |sec x| ) \end{array} \)

\(\begin{array}{l} y =\frac {7(ln|sec x + tan x| + log|sec x| }{(sec x + tan x)} + c \end{array} \)

Example 3:

A curve is passing through the origin and the slope of the tangent at a point R(x,y) where -1<x<1 is given as (x4 + 2xy + 1)/(1 – x2). What will be the equation of the curve?

Solution:

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

tanƟ= dy/dx = (x4 + 2xy + 1)/1 – x2

Reframing the equation in the form dy/dx  + Py = Q  , we get

dy/dx = 2xy/(1 – x2) + (x4 + 1)/(1 – x2)

dy/dx – 2xy/(1 – x2) = (x4 + 1)/(1 – x2)

Comparing we get P = -2x/(1 – x2)

Q = (x4 + 1)/(1 – x2)

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

\(\begin{array}{l} e^{\int Pdx}= I.F \end{array} \)

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

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

\(\begin{array}{l} \frac {d(y × I.F)}{dx}, \end{array} \)

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

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

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

\(\begin{array}{l} \Rightarrow y × (1 – x^2) = \int x^4 + 1 dx …(1) \end{array} \)

 x (1 – x2) = x5/5 + x + C

⇒ y =  x5/5 + x/(1 – x2) + 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 =  x5/5 + x/(1 – x2)

Frequently Asked Questions – FAQs

Q1

What is a linear differential equation?

A linear equation or polynomial, 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 linear differential equation.
Q2

What is the example of a linear differential equation?

Examples of linear differential equations are:
xdy/dx+2y = x2
dx/dy – x/y = 2y
dy/dx + ycot x = 2x2
Q3

How to solve the first order differential equation?

First write the equation in the form of dy/dx+Py = Q, where P and Q are constants of x only
Find integrating factor, IF = e∫Pdx
Now write the solution in the form of y (I.F) = ∫Q × I.F C
Q4

What is the difference between linear and nonlinear equations?

A linear equation will always exist for all values of x and y but nonlinear equations may or may not have solutions for all values of x and y.
Q5

What is the difference between linear and nonlinear differential equations?

A linear differential equation is defined by a linear equation in unknown variables and their derivatives.
A nonlinear differential equation is not linear in unknown variables and their derivatives.

Comments

Leave a Comment

Your Mobile number and Email id will not be published.

*

*

close
close

Play

&

Win