computational error analyses for euler's method, runge-kutta 4 th and 6 th methods
DESCRIPTION
Computational Error Analyses for Euler's Method, Runge-Kutta 4 th and 6 th Methods. Euler's Method. Uses the first derivative to obtain slope of tangent a tangent line Then uses the slope to approximate the value of the solution. Error for Euler’s method. Runge-Kutta Method 1. - PowerPoint PPT PresentationTRANSCRIPT
Hirophysics.com
Computational Error Analyses for Euler's Method, Runge-Kutta
4th and 6th Methods
Brenton K. Jones
Hirophysics.com
Euler's Method
Uses the first derivative to obtain slope of tangent a tangent line
Then uses the slope to approximate the value of the solution
Hirophysics.com
Error for Euler’s method
Hirophysics.com
Runge-Kutta Method 1
k1 is the slope at the beginning of the interval;
k2 is the slope at the midpoint of the interval, using slope k1 to determine the value of y at the point tn + h / 2 using Euler's method;
k3 is again the slope at the midpoint, but now using the slope k2 to determine the y-value;
k4 is the slope at the end of the interval, with its y-value determined using k3.
Hirophysics.com
Runge-Kutta Method 2Uses trial step at midpoint of an interval to cancel out lower order error termsEstimate is determined by weighted averages of slope at midpointsUsed to give numerical solutions to differential equations (approximations)Generally very accurate
Hirophysics.com
Differential Equation: y''+y=0Initial conditions: y(0)=1, y'(0)=0Exact Solution: y=cos t
The Solution of Harmonic Oscillator
Hirophysics.com
Errors from the theoretical solutionswith Euler’s, Runge-Kutta 4th, and Runge-Kutta 6th order.
Hirophysics.com
Error Comparisons
Euler’s vs Runge-Kutta 4th order Runge-Kutta 4th vs Runge-Kutta 6th order
Hirophysics.com
Step sizes .005, .05, .2
Hirophysics.com
Differential Equation: y''-2y'-3y=0Initial conditions: y(0)=1, y'(0)=2Exact Solution: 0.25 exp[-t]+0.75exp[3t]
The other example 1
Hirophysics.com
Errors from the theoretical solutionswith Euler’s, Runge-Kutta 4th, and Runge-Kutta 6th order.
Hirophysics.com
Interesting Results (For this exponential solution, the 4th and 6th have similar properties in terms
of the error.)
Hirophysics.com
Differential Equation: u''+16u'+192u=0Initial conditions: u(0)=0.5, u'(0)=0Exact Solution: ))28sin(2)28cos(2(
4
1)( 8 ttetu t
The other example 2
Hirophysics.com
Step size .005
Errors from the theoretical solutionswith Euler’s, Runge-Kutta 4th, and Runge-Kutta 6th order.
Hirophysics.com
Differential Equation: y*y''-(y')^2=1Initial conditions: y(0)=1, y'(0)=0Exact Solution: y=cosh(t)
The other example 3
Hirophysics.com
Step size .005
Errors from the theoretical solutionswith Euler’s, Runge-Kutta 4th, and Runge-Kutta 6th order.
Hirophysics.com
Conclusions
Euler's Method (the 1st order) is the least accurate.
Runge-Kutta methods are generally very accurate.
Higher orders provide greater accuracy. The step size greatly effects results. Unless the solution converges to a stable
solution, larger t causes larger error.