Differential equation is any equation that involves derivatives or differential coefficient or differentials. In mathematics differential equation shows the relationships between physical quantities which appear in mathematical form.

One very common differential equation is Newton’s second law of Motion.
If an object of mass m moving with acceleration a is acted upon with a force F then Newton’s second law says:

$F = ma$
Acceleration can be written as a first derivative of velocity

F = $\frac{dv}{dt}$ or as a second derivative of displacement F = $\frac{d^2 s}{d^2 t}$

m$\frac{dv}{dt}$ = F(t, v)…………(1)

m$\frac{d^2 u}{dt^2}$ = F(t, u, $\frac{du}{dt}$)………(2)

Order of differential equation is the largest derivative present in the given equation. In the differential equation shown above (1) [with $\frac{dv}{dt}$] is first order differential equation., (2) is second order equation (with $\frac{d^2 s}{d^2 t}$).

Differential equations are ordinary and partial type.
In ordinary differential equation all the derivatives coefficient are differentiated with respect to single variable.

a y" + by' +cy = g(t)
ln (y)$\frac{d^2 y}{dx^2}$ = (3-y)$\frac{dy}{dx}$ + $y^3$

In partial differential equation has partial derivatives.
P$\frac{dy}{dx}$ = Q is said to be a homogeneous differential equation if P and Q are homogeneous functions of x and y with same degree.

Whereas non homogeneous differential equation means in given function the degree of X and Y are not same. Some common examples of non homogeneous function are exponential function, trigonometric function, high power of X, product of exponential and higher order of X functions, product of exponential and trigonometric function, and product of higher order of X and trigonometric functions.

If $\frac{dy}{dx}$ = f($\frac{y}{x}$)

To check if the equation is homogeneous substitute y = vx. If we get the result in the form of ƒ (v) which means all the x ‘cancelled then the equation is said to be homogeneous.

Example: Test if the given equation is homogeneous.

$\frac{dy}{dx}$ = $\frac{y^2 - x^2}{xy}$ .........................(1)

Substitute y = xv

=> dy = xdv + vdx

(1) => $\frac{dy}{dx}$ = $\frac{(xv)^2 - x^2}{x *(xv)}$

$\frac{x^2(v^2 - 1)}{x^2 v}$

= $\frac{v^2 - 1}{v}$

=> $\frac{dy}{dx}$ = $\frac{v^2 - 1}{v}$

$\rightarrow$ $\frac{xdv + vdx}{dx}$ = $\frac{v^2 - 1}{v}$ = v - $\frac{1}{v}$

=> xdv + vdx = vdx - $\frac{1}{v}$ dx

$\rightarrow$ dx + xvdv = 0

$\rightarrow$ vdv - $\frac{-1}{x}$ dx

$\rightarrow$ $\frac{v^2}{2}$ = -logx + logc

$\frac{1}{2}$$v^2$ = log|$\frac{c}{x}$|

To get the result in the form of x and y, again substitute v = $\frac{y}{x}$

=> $\frac{y^2}{2x^2}$ = log|$\frac{c}{x}$|
A first order differential equation defines the slope of at the point (x, y) of the certain curve of the function that passes through this point. For each point (x, y), the differential equation defines a line segment with slope f(x, y). Graph of the differential function gives the direction field of the function.

Here are some examples of graph of differential equations:

Graphing Differential Equations

Graph Differential Equations

Graph of Differential Equation

Graphing Differential Equation
Differential equation are widely used to model engineering systems, real life situations like exponential decay/growth, half life etc.

1.Exponential growth.

Let P(t) be the population that grows with time and its rate of increase is proportional to the same quantity P, then

$\frac{dP}{dt}$ $\propto$ P

$\frac{dP}{dt}$ = kP

Here $\frac{dP}{dt}$ is the first derivative of P and k > 0.

Solution for this first order differential equation is

P(t) = A $e^{kt}$

where A is a non zero constant and it equals $P_0$ at t=0.

t = 0, P(0) = A $e^0$ => A

The final form can be written as P(t) = P0 $e^{kt}$For exponential growth P0 and k are positive.

2. Exponential Decay: half- life of a radioactive material.
Let M(t) be the mass of a material that decreases with time and its rate of decrease is directly proportional to the quantity M. Since the rate is for decreasing it will be negative.

-$\frac{dM}{dt}$ $\propto$ M

$\frac{dM}{dt}$ = -kM

Here $\frac{dM}{dt}$ is the first derivative of M and k > 0.

Solution of this differential equation is

M(t) = A $e^{-kt}$

where A $\neq$ 0. At t = 0 if M(t) = M$_0$ then

M$_0$ = A $e^0$

M$_0$ = A
Finally, the equation becomes

M(t) = M$_0$ $e^{-kt}$
Since k is positive, M(t) is decreasing exponentially.

3. Falling object
When an object is dropped from a height. If h(t) is the height of the object at ant time t, a(t) is the acceleration and v(t) its velocity .We can show the relationship between h, v and a as

a(t) = $\frac{dv}{dt}$, v(t) = $\frac{dh}{dt}$

For a falling object a(t) is constant and equals gravitational acceleration = g = 9.8 m/s2

g = -$\frac{dv}{dt}$ = $\frac{-d^2 h}{dt^2}$

Integrating both sides of

g = -$\frac{d^2 h}{dt^2}$

$\frac{dh}{dt}$ = -gt + $v_0$

Integrate again to get h(t)
h(t) = -$\frac{1}{2}$g $t_2$ + $v_0t$ + $h_0$This equations gives height of a falling object falling from initial height h0 with initial velocity $v_0$

4. Newton’s law of cooling
The law states that the rate of change of the temperature is proportional to the difference between the temperature T of the object and surrounding temperature $T_e$

$\frac{dT}{dt}$ = -k (T - $T_e$)

if we plug in x = T - $T_e$, $\frac{dx}{dt}$ = $\frac{dT}{dt}$… since $T_e$ is constant.

$\frac{dx}{dt}$ = -k x

Solution to this differential equation will be

x = A $e^{-kt}$

T - $T_e$ = A $e^{-kt}$

at t = 0, T = $T_0$

$T_0$ – $T_e$ = A $e^0$
T(t) = $T_e$ + ($T_0 – T_e$)$e-^{kt}$ The equation gives the temperature of a cooling object.
Solving a differential equation means finding an equation with no derivatives that satisfies the given differential equation. Solving a differential equation always involves one or more integration steps.

The type of the differential equation must be identifying before solving the equation.

First order DE: Contains only first derivatives so needs integration only once.

Second order DE: Contains second derivatives (and possibly first derivatives also) so needs integration twice.

General solution of the equation has a constant. When initial condition is applied to the general solution to evaluate the constant , particular solution is obtained.

Solving by Separation of variable:

If the differential equation is

$\frac{dy}{dx}$ = $\frac{x^2}{2y}$

Step 1: Collect the like terms, have x and dx on one side and y and dy on another

2y dy = $x^2$ dx

Step 2: Integrate both sides

$\int$ 2y dy = $\int$ $x^2$ dx

$\frac{2y^2}{2}$ = $\frac{x^3}{3}$ + c

$y^2$ = $\frac{x^3}{3}$ + c

Such solution involving the integral constant is called as general solution.

In case initial condition is given say y(0) = 2, we can get the particular solution

$2^2$ = $\frac{0^3}{3}$ + c

so c = 4

and we have $y^2$ = $\frac{x^3}{3}$ + 4.

For linear differential equations

If the differential equation is given as

a(x)$\frac{dy}{dx}$ + b(x)y = c(x),

rewrite as $\frac{dy}{dx}$ + p(x)y = q(x) where p(x) = $\frac{a(x)}{b(x)}$ and q(x) = $\frac{c(x)}{b(x)}$

2. Find the integrating factor

u(x) = $e^{\int p(x)dx}$

3. Evaluate the integral $\int$u(x) q(x) dx

4. Write down the general solution

y = $\frac{\int u(x) q(x) dx + C}{v(x)}$
Solve the differential equation:

Solved Examples

Question 1: 3$\frac{dy}{dx}$ = 2($x^2$ - 3)
Separate the variables

$\frac{3dy}{2}$ = ($x^2$ - 3)dx

Integrate both sides
$\frac{3}{2}$$\int$dy = $\int$($x^2$ - 3)dx

$\frac{3}{2}$y = $\frac{x^3}{3}$ - 3x + c

 y = $\frac{2x^3}{9}$ - 2x + C

Question 2: Find the particular solution for the equation

 2x$\frac{dy}{dx}$ + y = x - 2 y(4) = -2
Let us first divide the equation by 2x

 $\frac{dy}{dx}$ + $\frac{y}{2x}$ = $\frac{(x - 2)}{2x}$
Here p(x) = $\frac{1}{2x}$, q(x) = $\frac{(x-2)}{2x}$ = $\frac{1}{2}$ - $\frac{2}{x}$

The integration factors are

u(x) = e$\int$p(x)dx
here p(x) = $\frac{1}{2x}$
 u(x) = $e^({\int \frac{1}{2x} dx})$
 = $e^{\frac{1}{2}}$ln x
 = $x^{\frac{1}{2}}$

The general solution is

y = $\frac{\int u(x) q(x) dx + C}{v(x)}$
y = $\frac{\int x^{\frac{1}{2}} (\frac{x - 2}{2x}) dx +C}{x^{\frac{1}{2}}}$

Since $\int x^{\frac{1}{2}} (\frac{x - 2}{2x})$ dx = $\int \frac{x^{\frac{1}{2}}}{2} - x^-{\frac{1}{2}}$ dx    {solving steps}

= $\frac{1}{3} x^{\frac{3}{2}} - 2x^{\frac{1}{2}}$

 = x$\frac{\sqrt x}{3}$ - 2$\sqrt x$

So y = $\frac{(x \frac{\sqrt x}{3} - 2 \sqrt x) + C}{\sqrt x}$ =   $\frac{x}{3}$ - 2 + $\frac{C}{\sqrt x}$

Put the initial condition y(4) = -2

-2  = $\frac{4}{3}$ -2 + $\frac{C}{\sqrt 4}$

 $\frac{C}{2}$ = $\frac{-4}{3}$
C = $\frac{8}{3}$

The final solution is

y(x) = $\frac{x}{3}$ -2 + $\frac{8}{3 \sqrt{x}}$

Practice Problems

Question 1: $\frac{dy}{dx}$ + 2y = sinx
Question 2: xdy = (2y + 2$x^4$ + $x^2$) dx
Question 3: x $\frac{dy}{dx}$ + y = $x^4$

Solve the equation (x + 2$y^2$) $\frac{dy}{dx}$ = y given that y(2) = 1
Question 4: Solve y’+y = $e^x$.y(0) = $\frac{1}{2}$