Question #131377

Solve the differential equation dy/dx=(x-y)/(x+y),with y(0)=1 numerically for x=0.1 by Eular's method(five step)

1
Expert's answer
2020-09-03T18:02:22-0400
SolutionSolution

Let's solve the differential equation by Eular's method. We had the initial value problem:


dydx=xyx+yy(0)=1\frac{dy}{dx}=\frac{x-y}{x+y}\\ y(0)=1

Step 1

We'll start at the point (x0,y0)=(0,1)(x_0,y_0)=(0,1) and use step size of h=0.01h=0.01 and proceed for 10 steps. That is, we'll approximate the solution from t=0 to t=0.1t=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=0x_0=0 which is y0=1y_0=1 (initial value)


We now calculate the value of the derivative at this initial point. (This tells us the direction to move.)


dydx=f(0,1)=11=1\frac{dy}{dx}=f(0,1)=\frac{-1}{1}=-1


This means the slope of the line from t=0 to t=0.1 is approximately -1


Step 2

Now, for the second step, ( Since h=0.01h=0.01, the next point is x+h=0+0.01=0.01x+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)y1y0+hf(x0,y0)y1=y(0.01)1+0.01(1)=0.99y(x+h) \approx y(x)+hf(x,y)\\ y_1 \approx y_0+hf(x_0,y_0)\\ y_1=y(0.01) \approx 1+0.01(-1)=0.99\\

This means the approximate value of the solution when x=0.01 is 0.99x=0.01\ is\ 0.99

We'll need the new slope at this point, so we'll know where to head next.


dydx=f(0.01,0.99)=0.981=0.98\frac{dy}{dx}=f(0.01,0.99)=\frac{-0.98}{1}=-0.98


This means the slope of the approximation line from x=0.01 to x=0.02 is 0.98x=0.01\ to\ x=0.02\ is\ -0.98. So it's a little bit steeper than the first slope we found.


Step 3

Now we are trying to find the solution value when x=0.02x=0.02. We substitute our known values:

y(x+h)y(x)+hf(x,y)y2y1+hf(x1,y1)y2=y(0.02)0.99+0.01(0.98)=0.9802y(x+h) \approx y(x)+hf(x,y)\\ y_2 \approx y_1+hf(x_1,y_1)\\ y_2=y(0.02) \approx 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.


dydx=f(0.02,0.9802)=0.96021.0002=0.96\frac{dy}{dx}=f(0.02,0.9802)=\frac{-0.9602}{1.0002}=-0.96


This means the slope of the approximation line from x=0.02 to x=0.03 is 0.96x=0.02\ to\ x=0.03\ is\ -0.96. So it's a little bit steep than the first 2 slopes we found.


Step 4

Now we are trying to find the solution value when x=0.03x=0.03. We substitute our known values:


y(x+h)y(x)+hf(x,y)y3y2+hf(x2,y2)y3=y(0.03)0.9802+0.01(0.96)=0.9706y(x+h) \approx y(x)+hf(x,y)\\ y_3 \approx y_2+hf(x_2,y_2)\\ y_3=y(0.03) \approx 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.


dydx=f(0.03,0.9706)=0.94061.0006=0.94\frac{dy}{dx}=f(0.03,0.9706)=\frac{-0.9406}{1.0006}=-0.94


This means the slope of the approximation line from x=0.03 to x=0.04 is 0.94x=0.03\ to\ x=0.04\ is\ -0.94. So it's a little bit steep than the first 3 slopes we found.


Step 5

We continue to calculate the subsequent steps to x=0.1x=0.1

We present all the values up to x=0.1x=0.1 in the following table.





(There's no final dydx\frac{dy}{dx} ​ value because we don't need it. We've found all the required yy values.)


We have obtained that the approximation at x=0.1, y=0.909x=0.1, \ y=0.909

The differential equation dydx=xyx+y\frac{dy}{dx}=\frac{x-y}{x+y} at x=0.1x=0.1 is 0.909>Answer0.909--->Answer




Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS