Runge Kutta to solve higher order ODE

Click For Summary

Homework Help Overview

The discussion revolves around solving a higher order ordinary differential equation (ODE) using the Runge-Kutta method, specifically RK4, and the challenges associated with applying numerical methods to a system of equations derived from the ODE. The original poster seeks clarification on the requirements for a third-order ODE and how to implement a numerical solution in Excel.

Discussion Character

  • Exploratory, Assumption checking, Problem interpretation

Approaches and Questions Raised

  • Participants discuss the necessity of multiple equations for a third-order ODE and the implications of missing derivatives. There is an exploration of using the shooting method for boundary conditions and the feasibility of implementing numerical methods in Excel. Questions arise about how to handle boundary conditions compared to initial conditions.

Discussion Status

Some participants provide guidance on using the shooting method and suggest starting with simpler numerical methods like forward Euler. There is an ongoing exploration of how to adjust initial guesses to satisfy boundary conditions, indicating a productive direction in the discussion.

Contextual Notes

Participants note the challenge of dealing with boundary conditions, particularly in the context of previously learned initial conditions. There is an emphasis on the need for clarity regarding the setup of the problem and the numerical methods involved.

MechEngrStdnt
Messages
21
Reaction score
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
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)
 
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!
 
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 ?
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 65 ·
3
Replies
65
Views
9K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 7 ·
Replies
7
Views
4K
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
51K