# 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 **d ^{2}y/dx^{2} or y’’(x)**, and so on.

## Types of ODE

There are two types of ordinary differential equations.

- Homogeneous ODE
- 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,** x ^{2} + y^{2}dy/dx = 0** is an example of this type of ODE.

**4x ^{5} + x^{5}(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, **x ^{2}y^{2}(dy/dx) + y^{4} + 4x^{2} = 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.

d^{2}y/dx^{2} + 48x^{3} = e^{3}x

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 + 4d ^{5}y/dx^{5} = 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**

- 2x + d
^{2}y/dx^{2}+ (dy/dx)^{3}= sin(x) - Cos(x) + (d
^{3}y/dx^{3})^{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 = x^{3}y + 4y.

**Solution **

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

4dy/dx = (x^{3} + 4) y

dy/dx = (x^{3} + 4) y/4

**Step II: **Arrange the above equation.

1/y dy = (x^{3} + 4)/4 dx

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

ʃ (1/y)dy = 1/4 ʃ (x^{3} + 4)dx

ʃ (1/y) dy = 1/4 [ʃ (x^{3})dx + ʃ(4)dx]

ln(y) = 1/4 [(x^{3+1}/3 + 1) + (4x)] + C

ln(y) = 1/4 [(x^{4} / 4) + (4x)] + C

ln(y) = (x^{4 }/ 16) + 4x/4 + C

ln(y) = x^{4}/16 + x + C

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

e^{ln(y)} = e^{x^4/16 + x + C}

**y(x) = e ^{x^4/16 + x +C}**

**Example II**

Find the ordinary differential equation (ODE) of 8dy/dx = 1/e^{y} (3x – 6).

**Solution **

**Step I:** Write the given ODE equation.

8dy/dx = 1/e^{y} (3x – 6)

dy/dx = 1/4e^{y} (3x – 6)

**Step II:** Arrange the above equation.

e^{y} dy/dx = 1/4 (3x – 6)

e^{y} dy = 1/4 (3x – 6) dx

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

ʃ e^{y} dy = ¼ ʃ (3x – 6) dx

ʃ e^{y }dy = ¼ ʃ (3x) dx – ¼ ʃ (6) dx

ʃ e^{y} dy = 3/4 ʃ (x) dx – 6/4 ʃ dx

e^{y} = 3/4 [x^{1+1}/ 1 + 1] – 6/4 [x] + C

e^{y} = 3/4 [x^{2}/ 2] – 6/4 [x] + C

e^{y }= 3x^{2}/8 – 6x/4 + C

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

ln e^{y} = ln (3x^{2}/8 – 6x/4 + C)

y(x) = ln (3x^{2}/8 – 6x/4 + C)