Open In App
Related Articles

Differential Equations

Like Article
Save Article
Report issue

Differential equations come into play in a variety of applications such as Physics, Chemistry, Biology, and Economics, etc. A differential equation is a mathematical equation that relates some function with its derivatives. In applications, the functions usually represent physical quantities, the derivatives represent their rates of change, and the equation defines a relationship between the two. Let’s formally define what is a differential equation? 

A differential equation is an equation involving the derivatives of the dependent variable with respect to the independent variable. For example 

\frac{d^{2}y}{dx} + x = 0

Here, x is the independent variable, and y is the dependent variable. 

A differential equation that includes derivatives with respect to only one independent variable is called an ordinary differential equation. There also exist some differential equations which have derivatives with respect to more than one independent variable, they are called partial differential equations. 

Example: 2\frac{d^{2}y}{dx} + 3\frac{dy}{dx} + 1 = 0   an ordinary differential Equation. 

Note: Following notations are also used for denoting higher order derivatives. 

  • y' = \frac{dy}{dx} = y_{1}
  • y''' = \frac{d^{3}y}{dx} = y_{3}

Order of a Differential Equation

The order of differential equations is the highest order of the derivative present in the equations. 

For example:

  • x + \frac{dy}{dx} = 3  . It has an order of 1.
  • \frac{d^{2}y}{dx} + sinxcosx = 10  . It has an order of 2.
  • \frac{d^{3}y}{dx} + \frac{d^{2}y}{dx} + x^{3} + 5 = 0  . It has an order of 3.

Degree of Differential Equation

The degree of a differential equation(when it is a polynomial equation in derivatives) is the highest power (positive integral index) of the highest order derivative involved in the given differential equation. 

Example: (\frac{dy}{dx})^{2}  +\frac{d^{2}y}{dx} + 5 = 0  . In this equation highest degree derivative has power of 1. So, the order of differential equation is 1. 

Note: It is not always necessary that degree and order of a differential equation are equal, but both of them must be positive. 

General And Particular Solution of Differential Equation

Consider a differential equation,

\frac{d^{2}y}{dx^{2}} + y = 0

The solution of this differential equation is a function \phi   that will satisfy it, i.e when a function \phi is substituted for the unknown “y”. L.H.S becomes equal to R.H.S. 

The curve y = \phi(x)   is called the solution of the differential equation. Let’s say, this function is, 

y = \phi(x) = a cos(x + b)     

When this function and its derivatives are substituted in the differential equation, the equation is satisfied. 

Let’s assume that we gave some values to “a” and “b”, where a = 2 and b = -1. Then the equation becomes, 

y = \phi_{1}(x) = 2 cos(x -1 )

This is called a particular solution and the solution which consisted of arbitrary values of a and b is called General Solution. 

Formation of a Differential Equation whose General Solution is Given

Let’s look at the steps/procedure to form a differential equation from a general solution:

  1. If a family of curves depends only on one parameter, then it is represented by an equation that can be written in the form, F(x, y, a) = 0. Differentiating this equation with x gives us an equation in y’, y, x and a which can be represented as g(x, a, y, y’) = 0. Now, the differential equation can be formed by eliminating the parameter “a” from both of the equations.
  2. If a family of curves depends on two parameters “a” and “b”, then it is represented by an equation that can be written in a form, F(x, y, a, b) = 0. Differentiating this equation with x gives us an equation in y’, y, x, a and b which can be represented as g(x, a, b, y, y’) = 0. We cannot eliminate “a” and “b” from those two equations. So, we will differentiate the equation again to get g(x, a, b, y, y’, y”) = 0. Now, the differential equation can be formed by eliminating the parameter “a” and “b” from all three of these equations.

Let’s see these steps through examples,

Question 1: Form the differential equation representing the family of curves y = mx, where, m is an arbitrary constant.


We have y = mx, 

Differentiating it both sides,

\\ \frac{dy}{dx} = m,

Substituting the value of m in the original equation, 

y = \frac{dy}{dx}x \\ y - \frac{dy}{dx}x = 0

Question 2: Form the differential equation representing the family of ellipses having foci on the x-axis and centre at the origin. 


Equation of ellipses with foci on x-axis and centre at origin,

 \\ \frac{x^2}{a^2} + \frac{y^2}{b^2} = 1

Differentiating equations w.r.t x,

\\ \frac{2x}{a^2} + \frac{2ydy}{b^2dx } = 0 \\ \frac{y}{x}(\frac{dy}{dx}) = \frac{-b^{2}}{a^{2}}

Differentiating both sides again we get,

\\ xy\frac{d^2y}{dx^2} + x(\frac{dy}{dx})^2 -y\frac{dy}{dx} = 0

This is the required differential equation. 

Homogeneous Differential Equations

A function f(x, y) is called a homogeneous function of degree n if, 

F(ax, ay) = anF(x, y)

for any constant “a”. 

A differential equation of the form \frac{dy}{dx} = F(x,y)   is called homogeneous if F(x, y) is a homogeneous function of degree zero. 

Question: Check whether the differential equation, (x-y)\frac{dy}{dx} = x + 2y   is homogeneous. 


\frac{dy}{dx} = \frac{x + 2y}{x - y}


\\ F(x,y) = \frac{x + 2y}{x-y}

Let a be a constant,

\\ F(ax,ay) = \frac{ax + 2ay}{ax - ay}\\         = \frac{x + 2y}{x - y}a^{0}\\         = a^{0}F(x,y)

Since this function is homogeneous, the differential equation is also homogeneous.

Variable Separable Differential Equation

Consider a first-order differential equation of the form, 

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

If F(x, y) can be expressed as h(x)g(y) where h(x) is a function of x and g(x) is a function of y. Then the equation is called a differential equation of variable separable type. The differential equation has the form,

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

Question: Find the general solution of the differential equation, 

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


\frac{dy}{dx} = \frac{x+1}{2-y} \\ (2 - y)dy = (x +1)dx \\ \int (2 - y)dy = \int (x + 1)dx \\ 2y - \frac{y^2}{2} = \frac{x^2}{2} + x + C \\ 4y - y^2 -x^2 -4x = C

Solution to a Linear Differential Equation

A linear differential equation is a differential equation that can be made to look like in this form: 

\frac{dy}{dx} + P(x)y = Q(x)

where P(x) and Q(x) are the functions of x. It is solved using a special approach: 

  • Make two new functions of x, call them u and v, and say that y = uv.
  • Then solve to find u, and then v.

Step-by-step procedure: 

Step 1: Substitute y = uv, and

\frac{dy}{dx}  = u\frac{dv}{dx} + v\frac{du}{dx}


\frac{dy}{dx} + P(x)y = Q(x)

Step 2: Now, one should factor the parts that have “v”. 

Step 3: Put the v term equal to zero (this gives a differential equation in u and x which can be solved in the next step)Put the v term equal to zero (this gives a differential equation in u and x which can be solved in the next step)

Step 4: Solve “u” and then put it back in the equation to find “v”. 

Step 5: Finally y = uv is the solution. 

Let’s look at an example to understand it better, 

Question: Solve \frac{dy}{dx} - \frac{y}{x} = 1


This is a linear equation. Let’s bring it in the form specified above. 

\frac{dy}{dx} + P(x)y = Q(x)

Here, P(x) = -1/x and Q(x) = 1. 

So, let’s follow the steps given above. Substitute y = uv in the equation. Then the equation becomes, 

u\frac{dv}{dx} + v\frac{du}{dx} - \frac{uv}{x} = 1 \\ = u\frac{dv}{dx}  + v(\frac{du}{dx} - \frac{u}{x}) = 1

Put the parts involving “v” equal to zero. 

\frac{du}{dx} - \frac{u}{x} = 0\\ = \frac{du}{u} = \frac{dx}{x} \\ = \int \frac{du}{u} = \int \frac{dx}{x} \\ = ln(u) = ln(x) + C \\ = ln(u) = ln(x)  + ln(k) \\ = ln(u) = ln(xk) \\ = u = xk

Substituting “u” back into the equation. 

kx\frac{dv}{dx} = 1

Now, let’s solve this to find “v”. 

kx\frac{dv}{dx} = 1 \\ = dv = \frac{1}{k}\frac{dx}{x}\\ = \int dv = \int \frac{1}{k}\frac{dx}{x} \\ = v = \frac{ln(x)}{k}  + ln(c) \\ = v= \frac{ln(xc)}{k}

Substitute both “u” and “v” into the equations y = uv. 

y = uv \\ = kx \frac{1}{k}ln(cx)\\ = xln(cx)

So, this is the solution for this differential equation. 

Writing a Differential Equation

Now let’s move on to modelling a differential equation. Modelling is the process of writing a differential equation that describes a physical situation. We will see how to model first-order differential equations, modelling more complex orders is out of scope at this level of study. 

Example: Savings Account Model

Write x(t) for the number of dollars in the account at time t. It accrues interest at an interest rate r. The interest rate has units of percent/year. The more money in the account the more interest you earn. At the end of an interest period of Δt years (e.g. Δt = 1/12, or Δt = 1/365) the bank adds “r.x(t)·Δt” dollars to your account. This means the change Δx in your account is

Δx = r.x(t).Δt

r has units of (years)−1. Mathematicians and some bankers like to take things to the limit. Rewrite our equation as  \frac{Δx}{\Delta t} = rx(t)  , and suppose that the interest period is made to get smaller and smaller. In the limit as Δt → 0, we get the differential equation 

\dot{x} = rx

Now suppose we make contributions to this savings account. We’ll record this by giving the rate of savings, q. This rate has units dollars per year, so if you contribute every month then the monthly payments will be q Δt with Δt = 1/12. This payment also adds to your account, so, when we divide by Δt and take the limit, we get 

\dot{x} = rx + q.

This is a linear differential equation.

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 08 Jun, 2021
Like Article
Save Article
Share your thoughts in the comments
Similar Reads
Complete Tutorials