- +1-530-264-8006
- info@tutorsglobe.com

18,76,764

Questions

Asked

21,311

Experts

9,67,568

Questions

Answered

Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!

Submit Assignment
## Higher Order Methods and Differential Equations

Higher Order Methods::The order of a methodFor numerical solutions of a preliminary value problem there are two ways to measure the error. The first is the error of every step. This is called a Local Truncation Error or LTE. The other is the entirety error for the whole interval [a, b]. We describe this Global Truncation Error or GTE.

For the Euler method the LTE is of order O(h

^{2}) that is the error is comparable to h^{2}. We are able to show this directly using Taylor’s Theoremy(t + h) = y(t) + hy? (t) + (h

^{2}/2)y¨ (c)for a few c flanked by t and t + h. In this equation we are able to replace y? (t) by f(t, y(t)), which makes the first two terms of the right hand side be exactly the Euler method. The error is then (h

^{2}/2) y¨ (c) or O(h^{2}). It would be somewhat more difficult to show that the LTE of the modified Euler method is O(h^{3}), an enhancement of one power of h.We are able to roughly get the GTE from the LTE by considering the number of steps times the LTE. For any method if [a, b] is the interval as well as h is the step size then n = (b−a)/h is the number of steps. Therefore for any method the GTE is one power lower in h than the LTE. Therefore the GTE for Euler is (h) and for modified Euler it is O(h

^{2}).By the order of a method we signify the power of h in the GTE. Therefore the Euler method is a 1st order method and modified Euler is a 2nd order method.

:Fourth Order Runge-KuttaThe largely famous of all IVP methods is the classic Runge-Kutta method of order 4:

k

_{1}= hf (t_{i}, y)k

_{2}= hf (t_{i}+ h/2, y_{i}+ k_{1}/2)k

_{3}= hf (t_{i}+ h/2, y_{i}+ k_{2}/2)k

_{4}= hf (t_{i}+ h, y_{i}+ k_{3})y

_{i+1}= y_{i}+{1/6(k_{1}+ 2k_{2}+ 2k_{3}+ k_{4})}Notice that this method utilizes values of f (t, y) at 4 different points. Generally a method needs n values of f to achieve order n. The constants utilized in this method and other methods are obtained from Taylor’s Theorem. They are accurately the values needed to make all error terms cancel up to hn+1f (n+1)(c)/(n + 1)!.

Variable Step Size and RK45If the order of a method is n, then the GTE is equal to hn, which signifies that it is approximately Ch

^{n}where C is some constant. Nevertheless for different differential equations the values of C may be very different. Therefore it is not easy beforehand to tell how small h should be to get the error within a given tolerence. For illustration if the true solution oscillates very rapidly we will evidently need a smaller step size than for a solution that is nearly constant.How can a program then choose h small sufficient to produce the required accuracy? We as well do not wish to make h much smaller than necessary since that would enlarge the number of steps. To finish this program tries an h and tests to see if that h is small enough. If not it tries once more with a smaller h. If it is too small it accepts that step however on the next step it tries a larger h. This procedure is called variable step size.

Deciding if a single step is precise enough could be accomplished in several ways however the most common are called embedded methods. The Runge-Kutta 45 method which is utilized in ode45 is an embedded method. In the RK45 the function f is estimate at 5 different points. These are utilized to make a 5th order estimate y

_{i+1}. At the same time 4 of the 5 values are utilized to also get a 4th order estimate. If the 4th order and 5th order estimations are close then we can conclude that they are accurate. If there is a large discrepancy then we can conclude that they are not accurate and a smaller h should be used.To perceive variable step size in action we will define and solve two different ODEs as well as solve them on the same interval

> f1 = inline(’[-y(2);y(1)]’,’t’,’y’)> f2 = inline(’[-5*y(2);5*y(1)]’,’t’,’y’)

> [T1 Y1] = ode45(f1,[0 20],[1;0]);

> [T2 Y2] = ode45(f2,[0 20],[1;0]);

> y1 = Y1(:,1);

> y2 = Y2(:,1);

>plot(T1,y1,’bx-’)

> hold on

>plot(T2,y2,’ro-’)

>size(T1)

>size(T2)

:Why order mattersNumerous people would conclude on first encounter that the advantage of a higher order method would be that you can get a more precise answer than for a lower order method. In reality this isn’t quite how things work. In engineering problems the accurateness needed is usually a given and it is typically not extremely high. Therefore getting more and more accurate solutions isn’t very useful. Therefore where is the advantage? Consider the following illustration.

Presume that you need to solve an IVP with an error of less than 10

^{−4}. If you utilize the Euler method which has GTE of order O(h) after that you would need h ≈ 10^{−4}. Therefore you would need about n ≈ (b − a) × 10^{4}steps to find the solution.Presume you use the second order, modified Euler method. In that case the GTE is O(h

^{2}) therefore you would need to use h^{2}≈ 10^{−4}, or h ≈ 10^{−2}. This would need about n ≈ (b − a) × 10^{2}steps.That is a hundred times lesser steps than you would need to get the same accuracy with the Euler method.

If you use the RK4 method after that h4 needs to be roughly 10

^{−4}and so h ≈ 10^{−1}. This means you require only about n ≈ (b −a) × 10 steps to solve the problem that is a thousand times fewer steps than for the Euler method.

Therefore the real advantage of higher order methods is that they can run a lot faster at the same accuracy. This can be especially significant in applications where one is trying to make real-time adjustments based on the calculations. Such is habitually the case in robots and other applications with dynamic controls.

Latest technology based Matlab Programming Online Tutoring AssistanceTutors, at the

www.tutorsglobe.com, take pledge to provide full satisfaction and assurance inMatlab Programming helpviaonline tutoring. Students are getting 100% satisfaction byonline tutorsacross the globe. Here you can get homework help for Matlab Programming, project ideas and tutorials. We provide email basedMatlab Programming help. You can join us to ask queries 24x7 with live, experienced and qualified online tutors specialized in Matlab Programming. ThroughOnline Tutoring, you would be able to complete your homework or assignments at your home. Tutors at theTutorsGlobeare committed to provide the best qualityonline tutoringassistance forMatlab Programming Homework helpandassignment helpservices. They use their experience, as they have solved thousands of the Matlab Programming assignments, which may help you to solve your complex issues of Matlab Programming.TutorsGlobeassure for the best quality compliance to your homework. Compromise with quality is not in our dictionary. If we feel that we are not able to provide thehomework helpas per the deadline or given instruction by the student, we refund the money of the student without any delay.