4. (a) Describe Euler?s Method for finding numerical solutions to equations of t
ID: 663123 • Letter: 4
Question
4. (a) Describe Euler?s Method for finding numerical solutions to equations of the kind y? = f(t, y) where y? is the slope of the function f(y, t) at a particular point and is a function of both y and t. (b) Euler?s method uses constant step sizes to find the next value from a starting value. This s a finite difference or initial value problem. What is the effect of choosing larger or smaller step sizes? How will the step size affect the accuracy of the results? (c) Describe how Euler?s method may be modified to use a better approximation to the slope between the finite steps and so improve the accuracy of the final result.Explanation / Answer
Answer 1:
Taking your problem of y`=f(t,y) to the form of y`=f(x,y).
In order to use Euler's Method to generate a numerical solution to an initial value problem of the form:
y? = f(x, y)
y(xo) = yo
we decide upon what interval, starting at the initial condition, we desire to find the solution. We chop this interval into small subdivisions of length h. Then, using the initial condition as our starting point, we generate the rest of the solution by using the iterative formulas:
xn+1 = xn + h
yn+1 = yn + h f(xn, yn)
to find the coordinates of the points in our numerical solution. We terminate this process when we have reached the right end of the desired interval.
A Preliminary Example
Just to get a feel for the method in action, let's work a preliminary example completely by hand. Say you were asked to solve the initial value problem:
y? = x + 2y
y(0) = 0
numerically, finding a value for the solution at x = 1, and using steps of sizeh = 0.25.
Applying the Method
Clearly, the description of the problem implies that the interval we'll be finding a solution on is [0,1]. The differential equation given tells us the formula for f(x, y) required by the Euler Method, namely:
f(x, y) = x + 2y
and the initial condition tells us the values of the coordinates of our starting point:
We now use the Euler method formulas to generate values for x1 and y1.
The x-iteration formula, with n = 0 gives us:
x1 = xo + h
or:
x1 = 0 + 0.25
So:
x1 = 0.25
And the y-iteration formula, with n = 0 gives us:
y1 = yo + h f(xo, yo)
or:
y1 = yo + h (xo + 2yo)
or:
y1 = 0 + 0.25 (0 + 2*0)
So:
y1 = 0
Summarizing, the second point in our numerical solution is:
We now move on to get the next point in the solution, (x2, y2).
The x-iteration formula, with n=1 gives us:
x2 = x1 + h
or:
x2 = 0.25 + 0.25
So:
x2 = 0.5
And the y-iteration formula, with n = 1 gives us:
y2 = y1 + h f(x1, y1)
or:
y2 = y1 + h (x1 + 2y1)
or:
y2 = 0 + 0.25 (0.25 + 2*0)
So:
y2 = 0.0625
Summarizing, the third point in our numerical solution is:
We now move on to get the fourth point in the solution, (x3, y3).
The x-iteration formula, with n = 2 gives us:
x3 = x2 + h
or:
x3 = 0.5 + 0.25
So:
x3 = 0.75
And the y-iteration formula, with n = 2 gives us:
y3 = y2 + h f(x2, y2)
or:
y3 = y2 + h (x2 + 2y2)
or:
y3 = 0.0625 + 0.25 (0.5 + 2*0.0625)
So:
y3 = 0.21875
Summarizing, the fourth point in our numerical solution is:
We now move on to get the fifth point in the solution, (x4, y4).
The x-iteration formula, with n = 3 gives us:
x4 = x3 + h
or:
x4 = 0.75 + 0.25
So:
x4 = 1
And the y-iteration formula, with n = 3 gives us:
y4 = y3 + h f(x3, y3)
or:
y4 = y3 + h (x3 + 2y3)
or:
y4 = 0.21875 + 0.25 (0.75 + 2*0.21875)
So:
y4 = 0.515625
Summarizing, the fourth point in our numerical solution is:
We could summarize the results of all of our calculations in a tabular form, as follows:
n
xn
yn
0
0.00
0.000000
1
0.25
0.000000
2
0.50
0.062500
3
0.75
0.218750
4
1.00
0.515625
Answer 2:
This problem can actually be solved without resorting to numerical methods (it's linear). The true solution turns out to be:
y = 0.25 e2x - 0.5 x - 0.25
If we use this formula to generate a table similar to the one above, we can see just how poorly our numerical solution did:
x
y
0.00
0.000000
0.25
0.037180
0.50
0.179570
0.75
0.495422
1.00
1.097264
The numerical solution gets worse and worse as we move further to the right. We might even be prompted to ask the question "What good is a solution that is this bad?" The answer is "Very little good at all!" So should we quit using this method? No! The reason our numerical solution is so inaccurate is because our step-size is so large. To improve the solution, shrink the step-size!
Anwers 3:
To improve the Method, make sure that the Step size is as small as possible. Because the smaller the size the smaller the deviation and the best and closer we are on our solution. To know better if the above example is down with an more less value of step size the resulting table would be accurate
n
xn
yn
0
0.00
0.000000
1
0.25
0.000000
2
0.50
0.062500
3
0.75
0.218750
4
1.00
0.515625
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.