Академический Документы
Профессиональный Документы
Культура Документы
We can find the coefficient of the second term by substituting x=0 and y=1 in the
equation for the first derivative:
The error term of the Taylor series after the h4 term is:
Hence the series can be truncated when the contribution of the last term is
negligible to the number of the decimal places to which we are working.
The Taylor - Series Method
Euler and Modified Euler Methods
Suppose that we have small enough h value, the Taylor series of y:
According to the Euler method the next value of the function can be computed a
follows:
Note that this is the local error. The global error is O(h).
For example, we have the following differential equation with the initial value
given:
Euler and Modified Euler Methods
As seen, the error is large! The method requires an extremely small step size to get
accurate results
thus
Euler and Modified Euler Methods
By using the average of the slopes we can find an improved solution for yn+1
The above equation cannot be solved directly since it involves an unknown value.
Indeed the modified Euler method is a predictor - corrector method.
Euler and Modified Euler Methods
For a further improved accuracy, we can also recorrect the predicted value of the
next step:
Euler and Modified Euler Methods
The error of the modified Euler method can be find with Taylor series:
Note that this is the local error. The global error is O(h2).
Runge - Kutta Methods
Let us first consider the second order Runge Kutta method for simplicity.
Since
(*)
Runge - Kutta Methods
Substituting k1 and k2:
Since
After expanding the last term on right in Taylor series and retaining the first
derivatives we have:
Then:
b=0.5, = 1, = 1
Runge - Kutta Methods
This corresponds to the modified Euler method presented previously.
The modified Euler method is a special case of the Runge - Kutta method.
Fourth-order Runge - Kutta method is also derived in a similar fashion. This time
the comparison with Taylor series gives 11 equations and 13 unknowns. Two
values can be chosen arbitrarily and equations can be solved.
Runge - Kutta Methods
Let us evaluate the same problem:
Runge - Kutta Methods
The global error of the method is O(h4).
Runge - Kutta Methods
- Runge - Kutta - Fehlberg Method -
To check whether the step size is right we can repeat the calculation with the
step size h halve and compare the results.
Instead, the results of the fourth- and fifth-order Runge - Kutta methods can be
compared.
Runge - Kutta Methods
- Runge - Kutta - Fehlberg Method -
Since:
thus
Systems of Equations and Higher-Order Equations
For nth order differential equation: