Consider the initial value problem y' = 0.4xy + y s.t y(1) = 1 Use Euler's method to obtain an approximation of y(2) using the step values h = 0.1 h = 0.05 a. b. Compare the approximate and actual values by finding the error at each step (include both Absolute and % relative errors in your table) then Sketch the solution. (You can use any computer software)
Check my data and sketch the graph
a). h = 0.01
Step(n) |
Y(n) |
Approximation |
Exact solution |
Absolute Error |
Relative Error % |
0 |
1 |
1 |
1 |
0 |
0 |
1 |
1.1 |
1.14 |
1.1526 |
0.0126 |
1.0912 |
2 |
1.2 |
1.3042 |
1.3338 |
0.0296 |
2.2191 |
3 |
1.3 |
1.4972 |
1.5496 |
0.0524 |
3.3834 |
4 |
1.4 |
1.7247 |
1.8076 |
0.0829 |
4.5836 |
5 |
1.5 |
1.9938 |
2.1170 |
0.1232 |
5.8192 |
6 |
1.6 |
2.3128 |
2.4893 |
0.1765 |
7.0896 |
7 |
1.7 |
2.6921 |
2.9388 |
0.2467 |
8.3939 |
8 |
1.8 |
3.1444 |
3.4834 |
0.3390 |
9.7313 |
9 |
1.9 |
3.6852 |
4.1454 |
0.4602 |
11.101 |
10 |
2.0 |
4.3338 |
4.9530 |
0.6192 |
12.501 |
b). h = 0.05
Step(n) |
Y(n) |
Approximation |
Exact solution |
Absolute Error |
Relative Error % |
0 |
1 |
1 |
1 |
0 |
0 |
1 |
1.05 |
1.07 |
1.073 |
0.0030 |
0.2837 |
2 |
1.1 |
1.146 |
1.1526 |
0.0066 |
0.5732 |
3 |
1.15 |
1.2285 |
1.2392 |
0.0108 |
0.8685 |
4 |
1.2 |
1.3182 |
1.3338 |
0.0156 |
1.1695 |
5 |
1.25 |
1.4157 |
1.4369 |
0.0212 |
1.4764 |
6 |
1.3 |
1.5219 |
1.5496 |
0.0277 |
1.7891 |
7 |
1.35 |
1.6375 |
1.6728 |
0.0353 |
2.1078 |
8 |
1.4 |
1.7636 |
1.8076 |
0.0440 |
2.4323 |
9 |
1.45 |
1.9012 |
1.9552 |
0.0540 |
2.7627 |
10 |
1.5 |
2.0514 |
2.1170 |
0.0656 |
3.0991 |
11 |
1.55 |
2.2155 |
2.2945 |
0.0790 |
3.4414 |
12 |
1.6 |
2.3950 |
2.4893 |
0.0943 |
3.7897 |
13 |
1.65 |
2.5913 |
2.7034 |
0.1120 |
4.1440 |
14 |
1.7 |
2.8064 |
2.9388 |
0.1324 |
4.5042 |
15 |
1.75 |
3.0422 |
3.1979 |
0.1558 |
4.8704 |
16 |
1.8 |
3.3008 |
3.4834 |
0.1826 |
5.2426 |
17 |
1.85 |
3.5846 |
3.7981 |
0.2135 |
5.6207 |
18 |
1.9 |
3.8965 |
4.1454 |
0.2489 |
6.0049 |
19 |
1.95 |
4.2394 |
4.529 |
0.2896 |
6.3949 |
20 |
2 |
4.6167 |
4.953 |
0.3364 |
6.7910 |
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images