0

Using 4th order RK-method the computed solution to an ODE at $ t=10 \ s $ computed from $ \ t=9.9 \ s \ $ with time step $ \ \Delta t=0.1 \ $ is $ \ 24.1 \ $.

But with half -step size $ \Delta t=\frac{0.1}{2}=0.05 \ $ the same value becomes $ \ \ 23.5 \ $ . Then the error is

(a) 0.533

(b) 0.667

(c) 0.571

(d) 0.640

Answer:

Here ,

$ 24.1-23.5 =0.600 \ $.

But that does not match with any options given .

How can I find the error ? Can I use Rechardson's formula ? Is there any help ?

MAS
  • 10,638

2 Answers2

1

Let $T$ denote your target value, $A_h$ the approximation computed using time step $h$ and let $E = T - A_h$ denote the error. The purpose of the problem is to estimate $E$ as accurately as possible. If Richardson's technique is applicable, then we can estimate the error as $$E_h = \frac{A_h - A_{2h}}{2^p - 1},$$ where $p$ is the order of the method. In the case of a 4th order Runge-Kutta method, the best we can hope for is $p=4$. We find that $$ E_h = \frac{23.5 - 24.1}{15} = -0.04 $$ which is not one of the four options given even allowing for a sign change in the definition of the error.

Moreover, there is not enough information to determine if Richardson's technique is applicable in the first place or if the function driving the ODE is smooth enough to allow $p=4$. To that end, we require additional approximations, i.e. $A_{4h}$, $A_{8h}$, etc.

I suspect that there is either an error in your text or that additional information is hidden in, say, a previous problem?

Carl Christian
  • 12,583
  • 1
  • 14
  • 37
  • The task was asking about $E_{2h}$ in your notation, with $h=0.05$. As $E_{2h}\approx 16E_h$ ... – Lutz Lehmann Jun 13 '20 at 08:49
  • @Lutz Lehmann. I am sorry, but I do not follow your reasoning. I have estimated the only error which I can estimate given the information available. I agree that the original text supports your interpretation as to which error is required. I find that the problem and the accepted solution promotes a dangerous approach to error estimation which completely overlooks the difficulty of recognizing the asymptotic region. That is why I deliberately wrote what I did. – Carl Christian Jun 13 '20 at 10:27
  • Yes, of course, this is just a text problem that ignores all these points that would be relevant in any practical situation. I do not understand that you find the estimate for $E_h$ more relevant than the estimate $E_{2h}=\frac{16}{15}(A_{2h}-A_h)$ for the error of $A_{2h}$. I find that the computation of $E_h$ involves more extrapolation than that of $E_{2h}$, so the latter is more reliable. But as a text problem that assumes sunshine on all the other points, the solution is d), $|E_{2h}|=0.64$. – Lutz Lehmann Jun 13 '20 at 11:21
  • @LutzLehmann. I am not certain that I have understood your question fully, so I fear that my answer is a bit off. It is not that I find one error estimate more relevant than another, but I have pedagogical reasons to focus on the "current" approximation $A_h$ and the error estimate $E_h = \frac{A_h - A_{2h}}{2^p-1}$. The key message to the students is that they can get an error estimate at a cost which is roughly half of the cost of $A_h$. If we focus on $A_{2h}$ and require an error estimate then it costs twice as much as $A_{2h}$ and students how focus on speed are less like to do this. – Carl Christian Jun 13 '20 at 12:58
  • Yes, that I understand. And with that focus on the best numerical solution your reasoning on the shortcoming of the text problem formulation (and selection) is reasonable. With a focus on a mostly reliable error estimate one would take the $2h$ iteration values. If the error estimate is only used as some guidance for a step size control, then one could take the Richardson extrapolant as next value, but then there is no sensible error estimate. – Lutz Lehmann Jun 13 '20 at 13:18
  • @LutzLehmann Thank you for explaining your point of view. It makes good sense to me now. – Carl Christian Jun 13 '20 at 13:33
1

Let $T$ be the true value and $E_{0.1}$ and $E_{0.05}$ denote the errors with step sizes $\Delta t = 0.1$ and $\Delta t = 0.05$ respectively. Since the method is fourth order accurate we expect the ratio of the errors to scale as $2^4$ i.e. $$ \frac{E_{0.1}}{E_{0.05}} = \frac{T - 24.1}{T - 23.5} = 2^4 = 16. $$ Solving for $T$ gives $$ T = 23.46, $$ from which we find that $$ E_{0.1} = 24.1 - 23.46 = 0.64 $$ (and $E_{0.05} = 0.04$), so the answer is (d).

ekkilop
  • 2,278