If you chose the step size appropriately to ensure the exact same number of

# If you chose the step size appropriately to ensure

This preview shows page 7 - 9 out of 9 pages.

If you chose the step-size appropriately to ensure the exact same number of function evaluations, RK4 will quite likely give a far more accurate solution than Euler’s method for the same amount of “work”. So yes, high-order methods are worth it. Another important fact is that, for all methods, additional effort will tend to lead to dimin- ishing returns. This means that at some point performing additional function evaluations (making the step-size smaller) will not give a significant improvement in accuracy. Ian Jeffrey 20-7
Lecture 20: Higher-Order Runge-Kutta Methods March 26, 2019 20.5 Systems of Ordinary Differential Equations Many engineering problems involve solving systems of ordinary differential equations. We will consider systems of first-order ODEs. A general system of first-order ODEs is: dy 1 dx = f 1 ( x, y 1 , y 2 , . . . , y n ) dy 2 dx = f 2 ( x, y 1 , y 2 , . . . , y n ) . . . dy n dx = f n ( x, y 1 , y 2 , . . . , y n ) Here we must stress that the y j are not different sample values but are instead different dependent variables (we could have used u, v, w etc., but would have quickly run out of letters). Notice also that the right-hand-side function changes as denoted by the subscript. Key Concept : What is so important about systems of ODEs? Many engineering appli- cations require them directly (think of a circuit with multiple capacitors/inductors). Also, high-order ODEs can be reduced to systems of first-order ODEs which makes their numer- ical solution quite convenient. Example : Consider Newton’s Second Law in one dimension F = ma This is equivalent to the second-order linear ODE: d 2 x dt 2 = F m which can be decomposed into two first order ODEs: dv dt = F m dx dt = v where v is the velocity and x is the position of the mass. Solving for the positions of the planets in our solar system would extend these equations to two dimensions (assuming planets revolve in a common plane). Ian Jeffrey 20-8
Lecture 20: Higher-Order Runge-Kutta Methods March 26, 2019 Example : Consider the following third-order ODE d 3 y dx 3 = 2 x - 3 y + 4 dy dx + x d 2 y dx 2 To solve this ODE IVP we need 3 initial conditions, for example: y (0) = 3, dy dx x =0 = 2 and d 2 y dx 2 x =0 = 7 (the actual values aren’t important for our purposes). One way of solving this third-order ODE is to reduce it to a system of 3 first-order ODEs. We let: w 1 = dy dx , w 1 (0) = 2 w 2 = dw 1 dx = , d 2 y dx 2 w 2 (0) = 7 Substituting these relationships into the original ODE gives: dy dx = w 1 dw 1 dx = w 2 dw 2 dx = 2 x - 3 y + 4 w 1 + xw 2 where, in the last equation we have used the fact that dw 2 dx = d 3 y dx 3 . The result is just a system of first-order ODE IVPs which can be solved using standard RK methods. Key Concept : Runge-Kutta methods can be applied to systems of first-order ODEs in a straightforward manner that simply extends our usual application of RK methods for a single ODE.

#### You've reached the end of your free preview.

Want to read all 9 pages?

• Winter '16
• Ian Jeffery
• Numerical Analysis, Yi, Midpoint method, Runge–Kutta methods

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern