Question
Question: Use Euler's method to solve the equation $\frac{dy}{dx}=1+xy$ with $y(0) = 1$ and tabulate the solut...
Use Euler's method to solve the equation dxdy=1+xy with y(0)=1 and tabulate the solution for x=0 to x=0.4. Take h=0.1 and correct the solution upto fourth decimal place.

The tabulated solution using Euler's method is:
x | y |
---|---|
0.0 | 1.0000 |
0.1 | 1.1000 |
0.2 | 1.2110 |
0.3 | 1.3352 |
0.4 | 1.4753 |
Solution
The given differential equation is dxdy=f(x,y)=1+xy, with the initial condition y(0)=1. The step size is h=0.1. We use Euler's method formula: yn+1=yn+hf(xn,yn). We start with (x0,y0)=(0,1) and iterate to find y values for x=0.1,0.2,0.3,0.4.
-
For n=0: x0=0, y0=1.0000 f(x0,y0)=1+(0)(1)=1.0000 y1=y0+hf(x0,y0)=1.0000+0.1×1.0000=1.1000 x1=x0+h=0.1
-
For n=1: x1=0.1, y1=1.1000 f(x1,y1)=1+(0.1)(1.1000)=1+0.1100=1.1100 y2=y1+hf(x1,y1)=1.1000+0.1×1.1100=1.1000+0.1110=1.2110 x2=x1+h=0.2
-
For n=2: x2=0.2, y2=1.2110 f(x2,y2)=1+(0.2)(1.2110)=1+0.2422=1.2422 y3=y2+hf(x2,y2)=1.2110+0.1×1.2422=1.2110+0.12422=1.33522 Rounding to four decimal places: y3≈1.3352 x3=x2+h=0.3
-
For n=3: x3=0.3, y3=1.3352 f(x3,y3)=1+(0.3)(1.3352)=1+0.40056=1.40056 y4=y3+hf(x3,y3)=1.3352+0.1×1.40056=1.3352+0.140056=1.475256 Rounding to four decimal places: y4≈1.4753 x4=x3+h=0.4