How to Solve Linear Differential Equations

Collegedunia Team logo

Collegedunia Team

Content Curator

A linear differential equation is an equation that contains a variable, and its derivative, along with a few more functions of degree one.  A linear differential equation is generally represented as

dy/dx + Py = Q

In the above equation, x is an independent variable and y is a dependent variable.

  • The derivatives of dependent variables can be found only with respect to an independent variable.
  • Every linear differential equation has a specific formula for its solution.

Here are some examples of linear differential equations:

  • \(\frac{dy}{dx}+2y=cos\: x\)
  • \(\frac{dy}{dx} + y =e^{2x}\)

Key Terms: Differential Equation, Linear differential equation, IDE, First-order differential equation, Differential coefficient, Functions, Dependent and independent variables


Linear Differential Equation Definition

[Click Here for Sample Questions]

The linear differential equation consists of derivatives of several variables, which form the linear polynomial equation. When the function is dependent on variables and the derivatives are partial, it is also referred to as a Linear Partial Differential Equation.

The linear differential equation is of the form

dy/dx + Py = Q

Where

  • y is a dependent variable
  • x is an independent variable
  • P and Q are either constants or functions of the independent variable (in this case, x) only.

The above-mentioned differential is a first-order differentiation.

  • The equation is referred to as a first-order linear differential equation.
  • This linear differential equation is in y.

A few examples of linear differential equations in y are

  • dy/dx + y = Sin x
  • dy/dx + (-3y)/x = x3.e-x

Similarly, the linear differential equation in x can be written as

dx/dy + P1y = Q1

Where

  • x is a dependent variable
  • y is an independent variable
  • P1 and Q1 are either constants or functions of the independent variable (in this case, y) only.

A few examples of linear different equations in x are

  • dx/dy + x = Cos y
  • dx/dy + x/y = ey
  • dx/dy + x/(ylogy) = 1/y.

x. dx/dy + P 1 x = Q 1 is the linear differential equation in x.

Linear Differential Equation
Linear Differential Equation

Non-Linear Differential Equation

A nonlinear differential equation is one that is not linear in the unknown function and its derivatives. It provides diverse solutions that can be observed for chaos. 

Also check: 


Solving Linear Differential Equations

[Click Here for Sample Questions]

The sequence of steps to be followed for the derivation of the general solution for the linear differential equation is given below.

Step 1

The first-order differential equation has the following form:

dy/dx + P = Q   ...(i)

To solve such linear differential equations, we derive a function of the independent variable, say K(x), known as the Integrating factor (I.F).

Step 2

Multiplying equation (i) on both sides by integrating factor K(x) we get

K(x) dy/dx + K(x)Py = QK(x)  …..(ii)

Step 3

K(x) is now chosen in such a way that the L.H.S of equation (ii) becomes the derivative of y.K(x).

⇒ d(yK(x))/dx = [K(x)]dy/dx + y [d(K(x)]dx     …..(Using d(uv)/dx   = v(du/dx)   + u(dv/dx)

⇒ K(x) /(dy/dx) + K(x)Py = K (x) dy/dx + y d(K(x))/dx

⇒ K(x)Py = y dK(x)/dx

⇒ 1/K'(x) = P.dx 

Step 4

Integrating both sides with respect to x, we get

\(logK(x) = \int Pdx \:\:\:\:\:\:\:\: .....[As\: \int {f'(x)}{f(x)=log \: f(x)}]\)

\(\Rightarrow K(x) = e^{\int Pdx}=IF\)

Step 5

We can now solve our first-order linear differential equation using this value of the integrating factor. We get this by multiplying both sides of equation (i) by the I.F.

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

Step 6

Now integrating both sides with respect to x, we get

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

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

Where C is an arbitrary constant.


Methods for Solving Linear First-Order Differential Equations

[Click Here for Sample Questions]

The following steps help to solve the first-order differential equation

Step: 1

Rearrange the terms of the equation to obtain

dy/dx + Py = Q

Where P and Q are constants or functions of the independent variable x alone.

Step: 2

To find the integrating factor, integrate P with respect to x and express this integral as a power of e.

\(e^{\int Pdx} = IF\)

Step: 3

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

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

Step: 4

The Left Hand Side of the equation is always a derivative of y × K (x)

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

⇒ d(y × I.F)dx = Q × I.F

Step: 5

To obtain the solution, we simply integrate both sides with respect to x and obtain a constant term C.

\(y \times I.F = \int Q \times I.F \: dx +C\)

Where C is an arbitrary constant.

Similarly, we can apply the same procedures to solve the different forms of the linear first-order differential equation dx/dy +Px = Q. P and Q are functions of y in this case. The integrating factor (I.F) is found and we use it to determine the solution.

\((x) \times (I.F) = \int Q \times I.F \: dy +C\)


Formula for General Solution of Linear Differential Equations

[Click Here for Sample Questions]

There are mainly two important formulas that are utilized to find the general solution of the linear differential equations and they are as follows:

  • The general solution of the differential equation in the form \(\frac{dy}{x}\) + Py = Q is as follows

\(y.(I.F)=\int(Q \cdot(I \cdot F) \cdot d x)+C\).

Here, the Integrating Factor which is denoted by (I.F) is = \(e^{\int p.d x}\)

  • Also, the general solution of the differential equation in the form \(\frac{dx}{y}\) + Px = Q is as follows 

\(x. (I.F)=\int(Q \cdot(I \cdot F) \cdot d y)+C\).

Here, the Integrating Factor which is denoted by (I.F) is = \(e^{\int p.d y}\)


Solved Examples

[Click Here for Sample Questions]

Ques. Solve the differential equation: \(\frac{d y}{d x}+\frac{y}{x}=x^{3}\).

Ans. Given, The linear differential equation = \(\frac{d y}{d x}+\frac{y}{x}=x^{3}\)

Now, comparing this with the linear differential equation form:

dy/dx + Py = Q

We get,  P = \(\frac{1}{x}\) and Q = x3

The integration factor is given by

I.F. = \(e^{\int p.d x}\)

⇒ I.F  \(=e^{\int \frac{1}{x}.d x}\)

I.F. \(=e^{\log x}\)

I.F. \(=x\)

The solution of the given differential equation will be as follows:

\(y(I . F)=\int Q(I . F) d x+C\)

\(\Rightarrow y x=\int x^{3} \cdot x \cdot d x+C\)

\(\Rightarrow xy=\frac{x^5}{5}+ C\)

Now, dividing by x on both sides, we get:

\(y=\frac{x^5}{5}+ C\)

Therefore, the solution is: \(y=\frac{x^5}{5}+ C\)

Ques. Find the general solution of the differential equation: \(x \frac{d y}{d x}+3 y=x^{2}\).

Ans. Given, that the differential equation is  \(x \frac{d y}{d x}+3 y=x^{2}\)

This equation can now be simplified to represent the following linear differential equation.

\(\frac{d y}{d x}+y\cdot \frac{3}{x}=x\)

Now, comparing this with the linear differential equation form

dy/dx+ Py = Q

We have the values of P = \(\frac{3}{x}\) and Q = x

The integration factor is given by

I.F. = \(e^{\int p.d x}\)

⇒ I.F  \(=e^{\int \frac{2}{x}.d x}\)

I.F. \(=e^{2\log x}\)

I.F. \(=(e^{\log x})^2\)

I.F. \(=x^2\)

The solution of the given differential equation will be as follows:

\(y(I . F)=\int Q(I . F) d x+C\)

\(\Rightarrow y .x^2=\int x \cdot x^2 \cdot d x+C\)

\(\Rightarrow y \cdot x^{2}=\int x^{3} \cdot d x+C \)

\(\Rightarrow y \cdot x^{2}=\frac{x^{4}}{4}+C\)

\(\Rightarrow x^{4}-4 x^{2} y+C=0\)

Therefore, the solution is: \(x^{4}-4 x^{2} y+C=0\)

Also check: 


Things to Remember

  •  A linear differential equation is typically represented as dy/dx + Py = Q
  • A linear differential equation is an equation that contains a variable, and its derivative, along with a few more functions of degree one.
  • When the function is dependent on variables and the derivatives are partial, it is referred to as Linear Partial Differential Equation.
  • A nonlinear differential equation is one that is not linear in the unknown function and its derivatives.
  • Differential Equation establishes a relation between functions and the derivatives of these functions.
  • The Integrating factor method to solve the equation is given by I. F. = \(e^{\int p.d x}\).

Sample Questions

Ques. What is a linear differential equation? (2 Marks)

Ans. A linear differential equation is 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.

Ques. What is the difference between linear and nonlinear equations? (2 Marks)

Ans. A linear equation will always have a solution for all x and y values, but nonlinear equations may or may not have a solution for all x and y values.

Ques. What is the difference between linear and nonlinear differential equations? (2 Marks)

Ans. Linear differential equations have constant coefficients and involve the unknown function and its derivatives in a linear way. Nonlinear differential equations do not have these properties, making them more complex to solve.

Ques. Solve the differential equation: \(\frac{d y}{d x}+3 y=e^{-2 x}\). (4 Marks)

Ans. Given, The linear differential equation = \(\frac{d y}{d x}+3 y=e^{-2 x}\)

Now, comparing this with the linear differential equation form: \(\frac{dy}{dx}\) + Py = Q , we have the values of P = 3 and Q = -2x

Hence, we have the Integration factor as I.F which is = \(e^{\int p.d x}\)

\(=e^{\int 3.d x}\)

Further, the solution of the given differential equation will be as follows:

\(y(I . F)=\int Q(I . F) d x+C\)

\(y e^{3 x}=\int e^{-2 x} e^{3 x} d x+C\)

\(y e^{3 x}=\int e^{x} d x+C\)

\(y e^{3 x}=e x+C\)

Now, dividing e3x on both sides, we get:

\(y=\frac{e^{x}}{e^{3 x}}+\frac{C}{e^{3 x}}\)

\(y=e^{-2 x}+C e^{-3 x}\)

Therefore, the solution is: \(y=e^{-2 x}+C e^{-3 x}\)

Ques. Solve the differential equation: \(\frac{d y}{d x}+\frac{y}{x}=x^{2}\). (4 Marks)

Ans. Given, The linear differential equation = \(\frac{d y}{d x}+\frac{y}{x}=x^{2}\)

Now, comparing this with the linear differential equation form: \(\frac{dy}{dx}\) + Py = Q , we have the values of P = \(\frac{1}{x}\) and Q = x2

Hence, we have the Integration factor as I.F which is = \(e^{\int p.d x}\)

\(=e^{\int \frac{1}{x}.d x}\)

\(=e^{\log x}\)

\(=x\)

Further, the solution of the given differential equation will be as follows:

\(y(I . F)=\int Q(I . F) d x+C\)

\(y x=\int x^{2} \cdot x \cdot d x+C\)

\(xy=\frac{x^4}{4}+ C\)

Now, dividing by x on both sides, we get:

\(y=\frac{x^3}{4}+ C\)

Therefore, the solution is: \(y=\frac{x^3}{4}+ C\)

Ques. Find the general solution of the differential equation: \(x \frac{d y}{d x}+2 y=x^{2}\)(4 Marks)

Ans. Given, the differential equation = \(x \frac{d y}{d x}+2 y=x^{2}\)

This equation can now be simplified to represent the following linear differential equation.

\(\frac{d y}{d x}+y\cdot \frac{2}{x}=x\)

Now, comparing this with the linear differential equation form: \(\frac{dy}{dx}\) + Py = Q , we have the values of P = \(\frac{2}{x}\) and Q = x

Hence, we have the Integration factor as I.F which is = \(e^{\int p.d x}\)

\(=e^{\int \frac{2}{x}.d x}\)

\(=e^{2\log x}\)

\(=(e^{\log x})^2\)

\(=x^2\)

Further, the solution of the given differential equation will be as follows:

\(y(I . F)=\int Q(I . F) d x+C\)

\(y \cdot x^{2}=\int x \cdot x^{2} \cdot d x+C \)

\(y \cdot x^{2}=\int x^{3} \cdot d x+C \)

\(y \cdot x^{2}=\frac{x^{4}}{4}+C\)

\(x^{4}-4 x^{2} y+C=0\)

Therefore, the solution is: \(x^{4}-4 x^{2} y+C=0\)

Ques. Solve the linear differential equation: \(\frac{d y}{d x}=\left[\frac{1}{1+x^{3}}\right]-\left[\frac{3 x^{2}}{\left(1+x^{2}\right)}\right] y\). (4 Marks)

Ans. Given, the LDE = \(\frac{d y}{d x}=\left[\frac{1}{1+x^{3}}\right]-\left[\frac{3 x^{2}}{\left(1+x^{2}\right)}\right] y\)

This equation can be rewritten as:

\(\frac{d y}{d x}+\left[\frac{3 x^{2}}{\left(1+x^{3}\right)}\right] y=\frac{1}{\left(1+x^{3}\right)}\)

Now, comparing this with the linear differential equation form: \(\frac{dy}{dx}\) + Py = Q , we have the values of P = \(\frac{3x^2}{1+x^3}\) and Q = \(\frac{1}{1+x^3}\)

Hence, we have the Integration factor as I.F which is = \(e^{\int p.d x}\)

\(=e^{\int {\frac{3 x^{2}}{1+x^{3}}}} d x\)

\(=e^{\int\left(1+x^{3}\right)}\)

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

Again here, we can rewrite the L.H.S as: \(\frac{d(y.I.F)}{dx}\)

\(d\left[y \cdot\left(1+x^{3}\right)\right] d x=\left[\frac{1}{1+x^{3}}\right] \cdot\left(1+x^{3}\right)\)

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

\(y .(1+x^3)= x\)

\(y=\frac{x}{\left(1+x^{3}\right)}+C\)

Therefore, the solution is: \(y=\frac{x}{\left(1+x^{3}\right)}+C\)

Ques. Solve the linear differential equation: \(\cos ^{2} x \cdot \frac{d y}{d x}+y=\tan x\)  \((0 ? x < \pi /2)\)(4 Marks)

Ans. Given, the LDE = \(\cos ^{2} x \cdot \frac{d y}{d x}+y=\tan x\)

The equation can be rewritten as: 

\(\frac{d y}{d x}+\frac{y}{\cos ^{2} x}=\tan x / \cos ^{2} x\)

\(\frac{d y}{d x}+\left(\sec ^{2} x\right) y=\tan x \cdot \sec ^{2} x\)

Now, comparing this with the linear differential equation form: \(\frac{dy}{dx}\) + Py = Q , we have the values of P = sec2x and Q = tan x.sec2x

Hence, we have the Integration factor as I.F which is = \(e^{\int p.d x}\)

\(=e^{\int sec^2x.d x}\)

\(=e^{\int \tan x}\)

Further, the solution of the given differential equation will be as follows:

\(y(I . F)=\int Q(I . F) d x+C\)

\(y \cdot e^{\tan x}=\int \tan x \cdot \sec ^{2} x \cdot e^{\tan x} d x+C\)

Now, let’s put tan x = t

\(\sec ^{2} x \frac{d x}{d t}=1\)

\(d x=\frac{d t}{\sec ^{2} x}\)

\(y e^{t}=\int t \cdot \sec ^{2} x\ e^{t} \cdot d t / \sec ^{2} x\)

\(y e^{t}=\int t \cdot e^{t} \cdot d t\)

\(y e^{t}=t \int e^{t} \cdot d t-\int\left\{\frac{d}{d t}(t) \int e^{t} \cdot d t\right\} d t\)

\(y e^{t}=t e^{t}-\int e^{t} \cdot d t\)

\(y e^{t}=t e^{t}-e^{t}+C\)

Now, dividing by et on both sides, we get:

\(y=\tan x-1+C e^{-\tan x}\)

Therefore the solution is: \(y=\tan x-1+C e^{-\tan x}\)

Ques. Find the general solution of the differential equation: \(x d y-\left(y+2 x^{2}\right) \cdot d x=0\). (4 Marks)

Ans. Given, the differential equation = \(x d y-\left(y+2 x^{2}\right) \cdot d x=0\)

This equation can now be simplified to represent the following linear differential equation.

\(\frac{d y}{d x}=\frac{y}{x}=2 x\)

Now, comparing this with the differential equation form: \(\frac{dy}{dx}\) + Py = Q , we have the values of P = \(-\frac{1}{x}\) and Q = 2x .

Hence, we got the Integration factor as I.F which is = \(=e^{\int -\frac{1}{x}.d x}\)

\(=e^{-\log x}\)

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

Further, the solution of the given differential equation will be as follows:

\(y(I . F)=\int Q(I . F) d x+C\)

\(y \cdot \frac{1}{x}=\int 2 x \cdot \frac{1}{y} \cdot d x+C\)

\(\frac{y}{x}=\int 2 \cdot d x+C\)

\(\frac{y}{x}=2 x+C\)

\(y=2 x^{2}+x C\)

Therefore, the solution is: \(y=2 x^{2}+x C\)

Ques. Find the equation of a curve passing through the origin given that the slope of the tangent to the curve at any point (x , y) is equal to the sum of the coordinates of the point. (4 Marks)

Ans. Given the slope of the tangent = dy/dx

Sum of coordinates = x + y

Therefore, \(\frac{dy}{dx}\) = x + y

\(\frac{dy}{dx}\) - 1y = x

Now, comparing this with the differential equation form: \(\frac{dy}{dx}\) + Py = Q , we have the values of P = -1 and Q = x

Hence, we got the Integration factor as I.F which is = \(e^{\int p.d x}\)

\(e^{\int -1.d x}\)

\(e^{-x}\)

Further, the solution of the given differential equation will be as follows:

\(y(I . F)=\int Q(I . F) d x+C\)

\(y e^{-x}=\int x e^{-x} d x+C\)

\(y e^{-x}=x \int e^{-x} d x-\left\{\int \frac{d}{d x}(x) \int e^{-x} d x\right\} d x+C\)

\(y e^{-x}=-x e^{-x} \int-e^{-x} d x+C\)

\(y e^{-x}=-x e^{-x}+\int\left(-e^{-x}\right)+C\)

\(y e^{-x}=-x e^{-x}-e^{-x}+C\)

Now, dividing by e-x on both sides, we get:

\(y=-x-1+Ce^x\)

Again, for origin (0, 0) as given in the question, we get:

\(0=0-1+Ce^0\)

\(C=1\)

Therefore, \(y=-x-1+e^x\) [from \(y=-x-1+Ce^x\)]

The solution is: \(x+y+1= e^x\)

For Latest Updates on Upcoming Board Exams, Click Here: https://t.me/class_10_12_board_updates


Also Read:

CBSE CLASS XII Related Questions

  • 1.
    Find: \[ \int \frac{x^2}{(x^2-1)(x^2+4)}\,dx \]


      • 2.
        Differentiate \( \tan^{-1}\left( \frac{\sqrt{1 + x^2} + \sqrt{1 - x^2}}{\sqrt{1 + x^2} - \sqrt{1 - x^2}} \right) \) with respect to \( \cos^{-1}(x^2) \).


          • 3.
            Which of the following equations is NOT a Linear Differential Equation?

              • \((1 + x^2) \, dy + 2xy \, dx = \cot x \, dx\)
              • \(y + \frac{d}{dx}(xy) = x(\sin x + \log x)\)
              • \(x(1 + y^2) \, dx - y(1 + x^2) \, dy = 0\)
              • \(y \, dx - (x + 3y^2) \, dy = 0\)

            • 4.

              At a birthday party, children are being served orange juice in conical cups, as shown in the figure. 


              Each cup is 15 cm deep and has a radius 5 cm. The juice is being poured into this cup at a rate of 0·1 cm3/s.
              On the basis of the above information, answer the following questions :


                • 5.
                  Find:

                  If \[ (3\hat{i}-2\hat{j}+5\hat{k})\times(4\hat{i}+p\hat{j}+q\hat{k})=\vec{0} \] then find the values of \(p\) and \(q\).

                    • \(p = -\frac{2}{3}, \, q = \frac{5}{3}\)
                    • \(p = -\frac{8}{3}, \, q = \frac{20}{3}\)
                    • \(p = \frac{20}{3}, \, q = -\frac{8}{3}\)
                    • \(p = 0, \, q = 0\)

                  • 6.
                    Find:

                    If the function \[ f(x)= \begin{cases} \frac{\sin x}{x}+\cos x, & x\neq0\\ k, & x=0 \end{cases} \] is continuous at \(x=0\), then find the value of \(k\).

                      • \(0\)
                      • \(-2\)
                      • \(-1\)
                      • \(2\)
                    CBSE CLASS XII Previous Year Papers

                    Comments


                    No Comments To Show