Open In App

How to solve Differential Equations?

Improve
Improve
Like Article
Like
Save
Share
Report

Equations that have an independent variable, as well as the dependent variable and the derivative of the dependent variable with respect to the independent variable, are known as differential equations. Those differential equations which contain a single independent variable are called ordinary differential equations and which have more than one independent variable and their partial derivative are called partial differential equations.

\frac{dy}{dx} + x = 0.          In this equation, X is the independent variable and Y is the dependent variable of x, where derivative of dependent one with independent variable X.

Forms of Differential Equations  

  1. xdy + ydx = 0
  2. \frac{d^2y}{dx^2}  + 4y = 0
  3. y = x\frac{dy}{dx } + \frac{a}{\frac{dy}{dx}}
  4. \frac{dy}{dx} + cos(\frac{dy}{dx}) = 0

Solving differential equations

There are different ways of solving differential equations. They are the variable separation methods, homogeneous differential equations, linear differential equations, etc. Let’s learn each of the methods in detail,

By variable separation method

In the equation, if it is possible to get all the same functions on one side mean function of x and dx on one side same for y and dy on the other side, then we can say separation of a variable.

  • Type 1

Let \frac{dy}{dx}          = f(x)

Now separate all function of x and dx on one side,

dy = f(x)dx

Now, integrating both sides,

∫dy =∫f(x)dx

y = ∫f(x)

Which is the required solution, where c is an arbitrary constant.

  • Type 2

\frac{dy}{dx} = f(x)g(x)

Separate same functions on one side,

\int\frac{dy}{g(y)} =\int{f(x) dx} +c

Where c is arbitrary constant.  

By Homogeneous differential equations

A differential equation in x and y is said to be a homogeneous equation if it can be put in form of \frac{dy}{dx} = \frac{f_1(x,y)}{f_2(x,y)}          , where f1(x, y) and f2(x, y) are of same in degree in x and y. Hence, both the functions are homogeneous in degrees of x and y.

To solve differential equations,

  1. Put y = vx. 
  2. Then \frac{dy}{dx} = v + x\frac{dv}{dx}
  3. Separate the variables v and x, and integrate.
  4. Substitute v from y = vx.

The required solution was obtained.

By linear differential equations 

A differential equation is said to be linear if the dependent variable and its differential coefficients occur only in the first degree and are not multiplied together.

\frac{dy}{dx} + Py=Q           , where P and Q are constants or functions of x only, is called a differential equation of first order. Similarly, \frac{dx}{dy}+Px =Q          , where P and Q are constants or functions of y only, is called a linear differential equation of first order.

Working Rule 

Let linear differential equation \frac{dy}{dx}           + Py = Q

  1. Identify the P and Q from given equations
  2. Find integrating factor (IF) i.e. e∫pdx
  3. Solution is given by y(IF) =∫ Q(IF)dx + c
  • Special case: Bernoulli’s Equation

An equation of the form \frac{dy}{dx} +Py = Qyn,           where P and Q are functions of x only and n ≠ 0, 1 is known as Bernoulli’s differential equation. It is easy to reduce the equation into linear form as below by dividing both sides by yn

y – n\frac{dy}{dx}           + Py1 – n = Q

let y1 – n = z

z = (1 – n)y-n\frac{dy}{dx} = \frac{dz}{dx}

Given equation becomes \frac{dz}{dx}           + (1 – n)Q

Which is linear equations in z.

Here, If = e∫(1-n)Pdx

Required solution is, 

z(IF) = ∫(1 – n) Q e∫(1 – n)Pdx

Sample Problems

Problem 1: Solve the differential equation \frac{dy}{dx} = \frac{y-x}{x+y}

Solution:    

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

Which is a homogeneous differential equation as function y – x and x + y is of degree of 1.

Put y = vx ⇢ (2)

Differentiate eq(2), we get

\frac{dy}{dx} = v+x\frac{dv}{dx}          ʉࢠ(3)

From eq. (3) to eq. (1), we have

v+x\frac{dv}{dx} = \frac{vx-x}{x+vx} = \frac{v-1}{1+v}   x\frac{dv}{dx} =\frac{v-1}{1+v} -v = \frac{v-1-v^2-v}{v+1} = -\frac{1+v^2}{1+v}   \frac{1+v}{1+v^2} dv=-\frac{dx}{x} ∫ \frac{1+v}{1+v^2} dv=-∫\frac{dx}{x} ∫\frac{1}{1+v^2} + \frac{1}{2} ∫\frac{2v}{1+v^2} =- ∫\frac{dx}{x}

After further classification, we get

tan^-1\frac{y}{x} + log(x^2+y^2) =c

Problem 2: Solve (x tan \frac{y}{x}-ysec^2 \frac{y}{x})dx-xsec^{2} \frac{y}{x}dy=0

Solution:  

(x tan \frac{y}{x}-ysec^2 \frac{y}{x})dx-xsec^2 \frac{y}{x}dy=0           ⇢ (1)

After differentiating, we can write above equations as,

\frac{dy}{dx} = (\frac{y}{x}sec^2\frac{y}{x}-tan\frac{y}{x})cos^2\frac{y}{x}

Above equations is  homogeneous. Putting y = vx

v+x\frac{dv}{dx}=(vsec^2v-tanv)cos^2v

x dv/dx = v – tanv cos2v – v

Separating the variables \frac{sec^2v}{tanv}dv=-dx/x

Integrating both sides log tanv = -logx + logc

xtanv = C

From y = vx, we get

xtany/x = C

Problem 3: Solve the differential equation \frac{dy}{dx}        +y = sinx

Solution:

\frac{dy}{dx}       + y = sinx (Given)

By comparing it with \frac{dy}{dx}        + Py = Q, we get: p = 1 and Q = sinx

IF =∫ e(pdx) = ex

As we know, y(IF) = ∫Q(IF)dx + c

yex =  âˆ« sinx ex

After integration we get

yex\frac{e^x}{2} (sinx-cosx) +c

 y = 1/2 (sinx-cosx) + c  

Problem 4: Solve, x(\frac{dy}{dx}) + y =y^{2logx}

Solution: 

The given equation can be written as, 

\frac{dy}{dx}+\frac{y}{x} = \frac{y^2}{x}logx           (Dividing by x)

\frac{dy}{dx}+\frac{y}{x}=\frac{y^2}{x}logx

Now, divide thought y2

\frac{dy}{dx}\frac{1}{y^2}+\frac{1}{xy}=\frac{logx}{x}           ⇢ (A)

Put 1/y = v ⇢ (1)

After differentiating equation (1), we get

(\frac{-1}{y^2})\frac{dy}{dx}=(\frac{dv}{dx})

By substitution equation (A)

\frac{dv}{dx}-\frac{v}{x}=-\frac{logx}{x}

This is linear with v as the dependent variables.

Here, P=-\frac{1}{x}       , Q=-\frac{logx}{x}

IF = e∫Pdx =e∫(-1/x)dx =e-logx 1/x   

Hence, 

1/xy = (1\x)logx + 1\x + C

Problem 5: Solve the differential equation: \frac{dy}{dx} = (e^x + 1)y

Solution:  

dy/dx = (ex + 1)y ⇢ (given)

dy/y = (ex + 1) dx

Integrating both sides,

∫dy/y = ∫(ex + 1) dx

log|y| =ex + x + c

Problem 6: Solve The following differential equations,

  • dy/y = ytan2x
  • dy/dx = (1 + x2)(1 + y2)

Solution:

  • dy/y = ytan2x ⇢ (given)

∫1/ydy = tan2x . dx ⇢ (separating variables)

Integrating both sides,

∫1/ydy = ∫tan2x dx

log|y| = 1/2log|sec2x| + c

  • \frac{dy}{dx}           = (1 + x2)(1 + y2) ⇢ (given)

Integrating both sides, we get;

∫\frac{dy}{1+y^2}           = ∫(1 + x2)dx

tan-1y = x + x3/3 + c,



Last Updated : 17 Nov, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads