**Euler method is used to solve the differential equation**. Euler method **yields solutions** in the form of **numerical values of y for discrete values of x at specified intervals**. It is based on the idea of linear approximation in which small tangent lines on a short distance are used to get the approximate solution to the initial-value problem.

__DERIVATION__

In order to solve the first-order differential equation:

The solution starts from the initial value $\mathrm{y}={\mathrm{y}}_{0}$ at $\mathrm{x}={\mathrm{x}}_{0}$ and in the first step it is taken as $\mathrm{x}={\mathrm{x}}_{0}+\mathrm{h}$ and then the value of ${\mathrm{y}}_{1}$ of the solution is computed. Using this value of ${\mathrm{y}}_{1}$the next value ${\mathrm{y}}_{2}$ is computed at $\mathrm{x}={\mathrm{x}}_{0}+2\mathrm{h}$.

In a similar way, the value of y is carried out at the discrete values of x

Each step of the **Euler method** is performed using a formula which is derived from **Taylor’s series** as follows:

Now we take p = 1, which gives

Therefore,

So, in general, we can say that:

These successive values are calculated using recursion relation.

__GRAPHICAL REPRESENTATION__

__INPUT: __

A function f(x)

__OUTPUT: __

The value after differentiating f(x)

__PROCESS:__

```
Step 1: [Defining f(x,y)]
return x × y
Step 2: [Euler Method]
Read the values of x0, y0 i.e. the initial values to calculate the differentiation.
Read h(the step length)
Read xn(the ending value to terminate the calculation)
While x0 ≤ xn repeat
Set y1 ← y0 + h × f(x0,y0)
Print x0, y0
Set x0 = x0 + h
Set y0 = y1
[End of ‘while’]
[End of ‘Euler’ method]
```

__ADVANTAGES__

**1.** It is the easiest method to solve the differential equation in numerical.

**2.** It can be used for any nonlinear IVPs.

__DISADVANTAGES__

**1.** It is less accurate.

**2.** This method is numerically unstable.

**3.** In this case the approximation is proportional to the step size h. so h is to be taken as very small.

__APPLICATION__

**1.** It is helpful in estimating the force-deformation in the non-linear range.

**2.** It is used in solving ODEs.

Contributed by