Higher Order Methods:
The order of a method:
For 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(h2) that is the error is comparable to h2. We are able to show this directly using Taylor’s Theorem
y(t + h) = y(t) + hy? (t) + (h2/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 (h2/2) y¨ (c) or O(h2). It would be somewhat more difficult to show that the LTE of the modified Euler method is O(h3), 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(h2).
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-Kutta:
The largely famous of all IVP methods is the classic Runge-Kutta method of order 4:
k1 = hf (ti, y)k2 = hf (ti+ h/2, yi+ k1/2)k3 = hf (ti+ h/2, yi+ k2/2)k4 = hf (ti+ h, yi+ k3)
yi+1 = yi +{1/6(k1 + 2k2 + 2k3 + k4)}
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 RK45
If the order of a method is n, then the GTE is equal to hn, which signifies that it is approximately Chn 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 yi+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 matters:
Numerous 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) × 104 steps to find the solution.
Presume you use the second order, modified Euler method. In that case the GTE is O(h2) therefore you would need to use h2 ≈ 10−4, or h ≈ 10−2. This would need about n ≈ (b − a) × 102 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 Assistance
Tutors, at the www.tutorsglobe.com, take pledge to provide full satisfaction and assurance in Matlab Programming help via online tutoring. Students are getting 100% satisfaction by online tutors across the globe. Here you can get homework help for Matlab Programming, project ideas and tutorials. We provide email based Matlab Programming help. You can join us to ask queries 24x7 with live, experienced and qualified online tutors specialized in Matlab Programming. Through Online Tutoring, you would be able to complete your homework or assignments at your home. Tutors at the TutorsGlobe are committed to provide the best quality online tutoring assistance for Matlab Programming Homework help and assignment help services. 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. TutorsGlobe assure 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 the homework help as per the deadline or given instruction by the student, we refund the money of the student without any delay.
Habitat Studies tutorial all along with the key concepts of Animal Sampling Methods, Short vegetation and litters, Tall vegetation or grasses, Plant Sampling Methods and Soil Sampling Methods
tutorsglobe.com computed tomography assignment help-homework help by online medical lab methods tutors
Fertilization and gamete formation tutorial all along with the key concepts of Recognition of Egg and Sperm, Sperm attraction-Action at a distance, Acrosomal Reaction in Sea-urchin, sperm-binding protein of mouse zona pellucida, Translocation and Capacitation and Hyperactivation and chemotaxis
tutorsglobe.com enzyme action assignment help-homework help by online enzyme kinetics tutors
tutorsglobe.com potassium dichromate assignment help-homework help by online compound tutors
tutorsglobe.com medical bacteriology assignment help-homework help by online microbiology tutors
carbon and its compounds tutorial all along with the key concepts of allotropes of carbon, diamond, graphite, amorphous carbon, properties of carbon, chemical properties of carbon, oxides of carbon and carbon cycle in nature
tutorsglobe.com haemoglobin assignment help-homework help by online bio coordination compounds tutors
tutorsglobe.com karyotyping of human chromosomes assignment help-homework help by online modern genetics tutors
www.tutorsglobe.com offers Object oriented analysis Process homework help, assignment help, case study, writing homework help, online tutoring assistance by computer science tutors.
There appears to be a compelling logic for consolidating the results of subsidiaries controlled through a parent company, to imitate the fact that the shareholders of the parent company efficiently control all of the assets of all of the companies in the group.
Solubility Properties of Polymers tutorial all along with the key concepts of Solubility of gaseous substances, Rate of dissolution, Expressing solubility, Applications of solubility, Organic compounds and solubility, Solid solutions
Theory and lecture notes of One-Way Analysis of Variance all along with the key concepts of one-way analysis of variance, homework help, assignment help.Tutorsglobe offers homework help, assignment help and tutor’s assistance on One-Way Analysis of Variance.
tutorsglobe.com significance of cash budgeting assignment help-homework help by online cash budgeting tutors
tutorsglobe.com penicillin production assignment help-homework help by online industrial microbiology tutors
1953907
Questions Asked
3689
Tutors
1480504
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!