Question #76732

Q. How to control size of h in Runge Kutta Fehlberg Method?
1

Expert's answer

2018-05-02T08:24:08-0400

Answer on Question #76732 – Math – Quantitative Methods

Question

How to control size of hh in Runge Kutta Fehlberg Method?

Solution

To approximate the solution to the 1st order IVP:


y=f(x,y),y(x0)=y0y' = f(x, y), \qquad y(x_0) = y_0


we seek:


yn+1=yn+hi=1sbiki+O(hs+1)y_{n+1} = y_n + h \sum_{i=1}^{s} b_i k_i + O(h^{s+1})


The adaptive method is designed to produce an estimate of the local truncation error of a single Runge-Kutta step. Let yn+1py_{n+1}^p and yn+1p+1y_{n+1}^{p+1} be the approximations of yn+1y_{n+1} computed using the methods of order pp and p+1p+1 respectively. The local truncation error in these two methods is given by


εn+1p=yn+1yn+1ph,εn+1p+1=yn+1yn+1p+1h\varepsilon_{n+1}^p = \frac{y_{n+1} - y_{n+1}^p}{h}, \qquad \varepsilon_{n+1}^{p+1} = \frac{y_{n+1} - y_{n+1}^{p+1}}{h}


The error between two solutions is


εn+1=yn+1p+1yn+1ph\varepsilon_{n+1} = \frac{|y_{n+1}^{p+1} - y_{n+1}^p|}{h}


If the two answers are in close agreement (εn+1ε\varepsilon_{n+1} \leq \varepsilon), the approximation is accepted. If the two answers do not agree to a specified accuracy (ε\varepsilon), the step size is reduced. If the answers agree to more significant digits than required, the step size is increased. Our goal is to determine how to modify hh. Because εn+1\varepsilon_{n+1} is the error of a method that is pp-th order accurate, then if we replace hh by δh\delta \cdot h, the error is multiplied by δp\delta^p. To calculate the new step, we must solve the inequality:


δpyn+1p+1yn+1ph<ε\left| \delta^p \frac{y_{n+1}^{p+1} - y_{n+1}^p}{h} \right| < \varepsilon


Solving for δ\delta:


δ<(εhyn+1p+1yn+1p)1/p=(εεn+1)1/p\delta < \left(\frac{\varepsilon \cdot h}{|y_{n+1}^{p+1} - y_{n+1}^p|}\right)^{1/p} = \left(\frac{\varepsilon}{\varepsilon_{n+1}}\right)^{1/p}


The Runge-Kutta-Fehlberg method is a one-step method with the approximations calculated using the Runge-Kutta method of order 4 and 5. For this method each step requires the use of the following six values:


k1=hf(xk,yk)k_1 = h \cdot f(x_k, y_k)k2=hf(xk+14h,yk+14k1)k _ {2} = h \cdot f \left(x _ {k} + \frac {1}{4} h, y _ {k} + \frac {1}{4} k _ {1}\right)k3=hf(xk+38h,yk+332k1+932k2)k _ {3} = h \cdot f \left(x _ {k} + \frac {3}{8} h, y _ {k} + \frac {3}{32} k _ {1} + \frac {9}{32} k _ {2}\right)k4=hf(xk+1213h,yk+19322197k172002197k2+72962197k3)k _ {4} = h \cdot f \left(x _ {k} + \frac {12}{13} h, y _ {k} + \frac {1932}{2197} k _ {1} - \frac {7200}{2197} k _ {2} + \frac {7296}{2197} k _ {3}\right)k5=hf(xk+h,yk+439216k18k2+3680513k38454104k4)k _ {5} = h \cdot f \left(x _ {k} + h, y _ {k} + \frac {439}{216} k _ {1} - 8 k _ {2} + \frac {3680}{513} k _ {3} - \frac {845}{4104} k _ {4}\right)k6=hf(xk+12h,yk827k1+2k235442565k3+18594104k41140k5)k _ {6} = h \cdot f \left(x _ {k} + \frac {1}{2} h, y _ {k} - \frac {8}{27} k _ {1} + 2 k _ {2} - \frac {3544}{2565} k _ {3} + \frac {1859}{4104} k _ {4} - \frac {11}{40} k _ {5}\right)


Then we calculate the approximation to the solution with the help of the method of the fourth order:


yk+14=yk+25216k1+14082565k3+21974101k415k5,Error=O(h4)y _ {k + 1} ^ {4} = y _ {k} + \frac {25}{216} k _ {1} + \frac {1408}{2565} k _ {3} + \frac {2197}{4101} k _ {4} - \frac {1}{5} k _ {5}, \quad \text{Error} = O (h ^ {4})


And the approximation to the solution with the help of the method of the 5th order:


yk+15=yk+16135k1+665612825k3+2856156430k4950k5+255k6,Error=O(h5)y _ {k + 1} ^ {5} = y _ {k} + \frac {16}{135} k _ {1} + \frac {6656}{12825} k _ {3} + \frac {28561}{56430} k _ {4} - \frac {9}{50} k _ {5} + \frac {2}{55} k _ {6}, \quad \text{Error} = O (h ^ {5})


At each step, two different approximations for the solution are made and compared.


εn+1=1hyk+14yk+15\varepsilon_ {n + 1} = \frac {1}{h} \left| y _ {k + 1} ^ {4} - y _ {k + 1} ^ {5} \right|δ<(εεn+1)1/4\delta < \left(\frac {\varepsilon}{\varepsilon_ {n + 1}}\right) ^ {1 / 4}


Answer provided by https://www.AssignmentExpert.com

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS