In: Advanced Math
Euler’s Method Let’s get our hands dirty and actually use Euler’s method to estimate the value of y(2) where y is the solution to the initial value problem
y′=y−2x y(0) = 1
Recall that Euler’s method says: Approximate values for the solution of the initial value problem
y′=F(x, y),y(x0) =y0 with step size h, at xn=xn−1+h, are
yn=yn−1+hF(xn−1, yn−1)
Fill in the table for steps of size h= 0.2.
n | xn | yn=yn-1+0.2F(xn-1,Yn-1 | y'=F(xn,yn) |
0 | 0 | 1 | |
1 |
.2 |
||
2 | .4 | ||
3 | |||
4 | |||
5 | |||
6 | |||
7 | |||
8 | |||
9 | |||
10 |
Graph the portion of the approximate solution curve you found above. It should look like a lot of line segments. The first segment has been given on the grid below:
(c) Suppose f(x) is an exact solution to the initial value problem above. Describe, with justification, the behavior off(x) as x→∞. Hint: Graphing a slope field may be helpful for this.
h =
0.200000000000000
---------------------------------------------------------------------------------------------------------------
n
tn
y_Euler
dy/dx
----------------------------------------------------------------------------------------------------------------
0 0.000000
1.000000
1.000000
1 0.200000
1.200000
0.800000
2 0.400000
1.360000
0.560000
3 0.600000
1.472000
0.272000
4 0.800000
1.526400
-0.073600
5 1.000000
1.511680
-0.488320
6 1.200000
1.414016
-0.985984
7 1.400000
1.216819
-1.583181
8 1.600000
0.900183
-2.299817
9 1.800000
0.440220
-3.159780
10 2.000000
-0.191736
-4.191736
Direction filreld plot
After solve ode we get solution y(x)=2(x+1)=e^x
so x tends to infinity y is infinity