# Introduction to ordinary differential equations (ODE): Explained with examples.

Publish Date:

In calculus, Ordinary differential equations (ODEs) are used to change the state of the equations.

## Definition of the ordinary differential equation (ODE)?

In calculus, a differential equation that contains one or more functions of one independent variable & the derivative of those functions is known as an ordinary differential equation (ODE).

In an ordinary differential equation (ODE), there must be at least one derivative either ordinary derivative or partial derivative of the dependent variable w.r.t independent variable or unknown function.

The notation of the differential equations depends on the order of the functions such as first-order ODE has a notation dy/dx or y’(x), the second order ODE has a notation d2y/dx2 or y’’(x), and so on.

## Types of ODE

There are two types of ordinary differential equations.

1. Homogeneous ODE
2. Non-homogeneous ODE

Let us discuss the types of ODEs briefly.

### Homogeneous ODE

The homogenous differential equation is a type of ordinary differential equation in which the degree of each variable is the same. For example, x2 + y2dy/dx = 0 is an example of this type of ODE.

4x5 + x5(dy/dx)5 = 0 is another example of homogeneous differential equation as the degree of all the variables is 5.

### Non-homogeneous ODE

This is the second type of differential equation. It is an equation that has a different number of degrees in an ODE. For example, x2y2(dy/dx) + y4 + 4x2 = 0 is an example of non-homogeneous ODE.

## Order of ODE

In mathematics, the order of ordinary differential equation is the order of highest power of the derivative of dependent variable w.r.t independent variable.

### 1st order ODE

The differential equations that are linear or have 1 as the highest degree are said to be the first-order differential equations. For example,
dy/dx + x = six(x)

In the above example, the order of the ordinary differential equation is 1 because the differential of the dependent variable “y” with respect to the independent variable “x” has 1 as the highest power.

### 2nd order ODE

The differential equations that have 2 as the highest power or degree of the derivative of independent variable w.r.t independent variable are known as the second order ODEs.

d2y/dx2 + 48x3 = e3

In the above example, the highest power of the derivative of the dependent variable “y” with respect to the independent variable “x” is 2 and it is said to be the second order differential equation.

Similarly, the order of the ODE increases as the power of the differential of the dependent variable increases. Such as

x + 4d5y/dx5 = 5

The order of the above differential equation is 5 because the derivative of “y” has power 5.

## Degree of ODE

The degree of the ordinary differential equation is the power of the highest order derivative of the dependent variable. In simple words, the power of the highest order derivative present in the equation is said to be the degree of the differential equation.

For example

1. 2x + d2y/dx2 + (dy/dx)3 = sin(x)
2. Cos(x) + (d3y/dx3)4 + 47 = dy/dx

In the above examples, the degree of the differential equations is 1 & 4 respectively because, in the first example, 1 is the power of the second order ODE. Similarly, the power of the highest order derivative of the third order ODE is 4 in the second example.

## How to solve the ODE?

Let us take some examples to learn how to calculate ordinary differential equations.

Example I

Find the ordinary differential equation (ODE) of 4dy/dx = x3y + 4y.

Solution

Step I: First of all, take “y” common from the right-hand side of the equation.

4dy/dx = (x3 + 4) y

dy/dx = (x3 + 4) y/4

Step II: Arrange the above equation.

1/y dy = (x3 + 4)/4 dx

Step III: Take the integral notation on both sides of the equation and integrate them.

ʃ (1/y)dy = 1/4 ʃ (x3 + 4)dx

ʃ (1/y) dy = 1/4 [ʃ (x3)dx + ʃ(4)dx]

ln(y) = 1/4 [(x3+1/3 + 1) + (4x)] + C

ln(y) = 1/4 [(x4 / 4) + (4x)] + C

ln(y) = (x4 / 16) + 4x/4 + C

ln(y) = x4/16 + x + C

Step IV: Take exponential “e” on the both sides of the equation.

eln(y) = ex^4/16 + x + C

y(x) = ex^4/16 + x +C

Example II

Find the ordinary differential equation (ODE) of 8dy/dx = 1/ey (3x – 6).

Solution

Step I: Write the given ODE equation.

8dy/dx = 1/ey (3x – 6)

dy/dx = 1/4ey (3x – 6)

Step II: Arrange the above equation.

ey dy/dx = 1/4 (3x – 6)

ey dy = 1/4 (3x – 6) dx

Step III: Take the integral equation on both sides of the equation and integrate them.

ʃ ey dy = ¼ ʃ (3x – 6) dx

ʃ ey dy = ¼ ʃ (3x) dx – ¼ ʃ (6) dx

ʃ ey dy = 3/4 ʃ (x) dx – 6/4 ʃ dx

ey = 3/4 [x1+1/ 1 + 1] – 6/4 [x] + C

ey = 3/4 [x2/ 2] – 6/4 [x] + C

e= 3x2/8 – 6x/4 + C

Step IV: Take log on the both sides of the equation.

ln ey = ln (3x2/8 – 6x/4 + C)

y(x) = ln (3x2/8 – 6x/4 + C)