Solution Let's solve the differential equation by Eular's method. We had the initial value problem:
dxdy=x+yx−yy(0)=1We'll start at the point (x0,y0)=(0,1) and use step size of h=0.01 and proceed for 10 steps. That is, we'll approximate the solution from t=0 to t=0.1 for our differential equation. We'll finish with a set of points that represent the solution, numerically.
We already know the first value, when x0=0 which is y0=1 (initial value)
We now calculate the value of the derivative at this initial point. (This tells us the direction to move.)
dxdy=f(0,1)=1−1=−1
This means the slope of the line from t=0 to t=0.1 is approximately -1
Now, for the second step, ( Since h=0.01, the next point is x+h=0+0.01=0.01 ), we substitute what we know into Euler's Method formula, and we have:
y(x+h)≈y(x)+hf(x,y)y1≈y0+hf(x0,y0)y1=y(0.01)≈1+0.01(−1)=0.99
This means the approximate value of the solution when x=0.01 is 0.99
We'll need the new slope at this point, so we'll know where to head next.
dxdy=f(0.01,0.99)=1−0.98=−0.98
This means the slope of the approximation line from x=0.01 to x=0.02 is −0.98. So it's a little bit steeper than the first slope we found.
Now we are trying to find the solution value when x=0.02. We substitute our known values:
y(x+h)≈y(x)+hf(x,y)y2≈y1+hf(x1,y1)y2=y(0.02)≈0.99+0.01(−0.98)=0.9802
We'll need the new slope at this point, so we'll know where to head next.
dxdy=f(0.02,0.9802)=1.0002−0.9602=−0.96
This means the slope of the approximation line from x=0.02 to x=0.03 is −0.96. So it's a little bit steep than the first 2 slopes we found.
Now we are trying to find the solution value when x=0.03. We substitute our known values:
y(x+h)≈y(x)+hf(x,y)y3≈y2+hf(x2,y2)y3=y(0.03)≈0.9802+0.01(−0.96)=0.9706
We'll need the new slope at this point, so we'll know where to head next.
dxdy=f(0.03,0.9706)=1.0006−0.9406=−0.94
This means the slope of the approximation line from x=0.03 to x=0.04 is −0.94. So it's a little bit steep than the first 3 slopes we found.
We continue to calculate the subsequent steps to x=0.1
We present all the values up to x=0.1 in the following table.
(There's no final dxdy value because we don't need it. We've found all the required y values.)
We have obtained that the approximation at x=0.1, y=0.909
The differential equation dxdy=x+yx−y at x=0.1 is 0.909−−−>Answer
Comments