Runge Kutta to solve higher order ODE

In summary, the conversation discusses solving a system of equations for an ODE using numerical methods, specifically the shooting method and forward Euler integrator. The person asking the question has three equations and is unsure if they need a fourth equation since there is no F'. The expert suggests using a spreadsheet and adjusting the initial conditions until the boundary condition is satisfied. They also provide a link explaining the shooting method for further understanding.
  • #1
MechEngrStdnt
21
0

Homework Statement


RK4_sys.JPG


Edit* should say F'(0) = F(0) = 0

Homework Equations


I know that I typically need 3 equations for a 3rd order ODE, does this apply if the is no F'? In the picture above are the equations I came up with, am I on the right trail? Lastly I am familiar with RK4, however I have never used it to solve a system... how does one go about this? can it be done in excel? I took Diff Eq years ago and they really glossed over the numerical methods.

The Attempt at a Solution


The picture above is the question statement (at the top), and my attempt at breaking it into a system of equations.
 
Physics news on Phys.org
  • #2
MechEngrStdnt said:
I know that I typically need 3 equations for a 3rd order ODE, does this apply if there is no F'
Yes.
MechEngrStdnt said:
am I on the right trail
Yes. Looks good.
MechEngrStdnt said:
can it be done in excel
Yes. I have a proposal: start with a simple integrator: forward Euler
MechEngrStdnt said:
how does one go about this
You have two initial conditions and one boundary condition. The easiest approach is the shooting method : guess a value for F''(0) and integrate. Adjust until for ##x\rightarrow \infty## F'(x) is close enough to one. ##x\rightarrow \infty## is a bit bothersome, so if F'(x) ##\approx## 1 and doesn't change too much any more you should be satisfied.

So what you want to solve is F''' = ##-##F F'' / 2

Your spreadsheet has five columns:
x, F, F', F'', F''' and if your first guess for F''(0) is, e.g., 1, the first row looks like: 0, 0, 0, 1, '= ##-F * F'/ 2 ## ' (if you know what I mean).

Choose a step size d, e.g. 0.01 then your next row looks like (supposing x(0) is in cell A4 )
Code:
=A4+dx ##\quad## =B4+dx*C4 ##\quad## =C4+dx*D4 ##\quad## =D4+dx*E4 ##\quad## =(-1)*(B5*D5*2)
which you can copy/paste from A6 all the way down to infinity (for me 400).

Take some time to understand these formulas: Euler is simply F(x+dx) = F(x) + F' dx ##\quad ##.

Then fumble with F''(0) until the boundary condition appears to be met reasonably well.

It's handy to use a defined name for dx so you can vary it to check if your step size is reasonable. (dx 0.01 and then Formulas | Create from selection)
 
  • #3
Thanks for the reply! I am still a little hung up on accounting for the boundary condition of F'(Inf) = 1, how do I account for this? I've only dealt with initial conditions before, which are much more obvious. Thanks!
 
  • #4
So deal with guessed initial conditions and keep guessing until the boundary condition is satisfied. Do you understand the explanation in the shooting method link ?
 

1. What is the Runge Kutta method used for?

The Runge Kutta method is a numerical method used to solve differential equations. It is particularly useful for solving higher order ordinary differential equations (ODEs) that cannot be solved analytically.

2. How does the Runge Kutta method work?

The Runge Kutta method works by breaking down a higher order ODE into smaller, simpler steps. It uses a series of formulas to approximate the solution at each step, gradually getting closer to the actual solution.

3. What are the benefits of using the Runge Kutta method?

The Runge Kutta method is a highly accurate numerical method for solving ODEs. It is also very versatile and can be applied to a wide range of problems. Additionally, it can handle stiff equations, which are difficult to solve using other methods.

4. Are there any limitations to the Runge Kutta method?

One limitation of the Runge Kutta method is that it requires a significant amount of computational resources, particularly for higher order equations. It also may not be as accurate for certain types of ODEs, such as those with discontinuities or singularities.

5. Can the Runge Kutta method be applied to systems of ODEs?

Yes, the Runge Kutta method can be applied to systems of ODEs. In this case, the method is extended to solve multiple equations simultaneously, with each equation representing a different variable in the system.

Similar threads

  • Calculus and Beyond Homework Help
Replies
14
Views
2K
Replies
4
Views
506
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
Replies
52
Views
629
  • Calculus and Beyond Homework Help
Replies
5
Views
3K
  • Calculus and Beyond Homework Help
Replies
14
Views
3K
  • Calculus and Beyond Homework Help
Replies
1
Views
4K
  • Calculus and Beyond Homework Help
Replies
7
Views
3K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
Replies
9
Views
2K
Back
Top