MTH3007B Weekly Problems 2
Original Documents: Problem Sheet
Vibes: Pretty chill, basically just the same as last week and scaling errors.
Used Techniques:
- Scaling errors.
- Implementing Euler methods.
2.1. Scaling Error in Different Methods
Question
Assume you solve a differential equation, , using the Explicit Euler method using a step size of . Also assume the (global) error is exactly as in the linear regime and the error in is .
- What would the error be if ?
- What would the error be if and Ralston is used, instead? Assume an error of for .
The global error scales with the timestep according to the order of the method…
- For Forward Euler, a first order method, then . Hence, halving the step size halves the error: .
- For Ralston, a second order method, then . Hence, halving the step size quarters the error: .
2.2. Numerical Solutions of an ODE
Question
Consider the ordinary differential equation, with , , and .
- By using a numerical algorithm, solve the ODE till , then compare with the analytical solution .
- What is for the Ralston method for ?
- Using the Explicit Euler method, the solution is . Analytically, the solution is approximately - a difference of about
- Instead, using the Ralston method, the solution is instead , giving a smaller max error of .
2.3. Finding Maximum Timestep for a Given Error in Euler
Question
Assume you want to have an accuracy in the final solution of , such that the numerical result of can deviate at most from the analytical solution.
What is the maximum timestep for the Explicit Euler method to achieve the accuracy in , with one significant figure accuracy?
Using the linear error scaling for Euler with the known error at …
2.4. Finding Maximum Timestep for a Given Error in Ralston
Question
What is the maximum timestep for Ralston’s method to achieve the accuracy in , with one significant figure accuracy?
Using the quadratic error scaling of Ralston with the known error at …
This is apparently incorrect - naive scaling?