How to Apply Runge-Kutta to a 2nd Order ODE?

  • Context: Graduate 
  • Thread starter Thread starter hsong9
  • Start date Start date
  • Tags Tags
    Ode Runge-kutta
Click For Summary

Discussion Overview

The discussion revolves around applying the Runge-Kutta (RK4) integration method to solve a second-order ordinary differential equation (ODE) represented as (tw')' + tw = 0, with specified initial conditions. Participants explore the transformation of the second-order ODE into a system of first-order equations suitable for numerical integration.

Discussion Character

  • Technical explanation, Mathematical reasoning, Homework-related

Main Points Raised

  • One participant requests guidance on using the RK4 method for the given second-order ODE and expresses a desire to understand the application of the method.
  • Another participant suggests that introducing the variable v = tw' simplifies the problem to v' + v = 0 or v' = -v, questioning the original poster's understanding of Runge-Kutta.
  • A different participant corrects the previous claim, stating that the transformation leads to v' + tw = 0, clarifying that v is not simply tw.
  • One participant provides a detailed explanation of how to convert the second-order ODE into two first-order equations, suggesting the use of simultaneous Runge-Kutta solvers for both equations and specifying the initial conditions for w and u.

Areas of Agreement / Disagreement

There is no consensus on the correct transformation of the original equation, as participants present differing interpretations of the variable v and its implications for the problem. The discussion remains unresolved regarding the application of Runge-Kutta to the specific ODE.

Contextual Notes

Participants express varying interpretations of the transformation process and the resulting equations, indicating potential limitations in understanding the application of numerical methods to second-order ODEs.

hsong9
Messages
71
Reaction score
1
Hi,

Could someone please show me how to solve the following simple problem using the Runge-Kutta (RK4) integration method?

(tw')' + tw = 0 with w(0) = 1, w'(0) = 0 on the interval [0,1]
by introducing the new variable v=tw' and considering the resulting first order differential system involving w and v
computed solution (wh(1),vh(1)) for h=1/10.


I'm trying to understand how to apply Runge-Kutta to this problem.


Thanks for your attention.
 
Physics news on Phys.org
If you let v= tw' then your problem becomes v'+ v= 0 or v'= -v with v(0)= 0. Now, what exactly is your question? What do you know about "Runge-Kutta"?
 
HallsofIvy said:
If you let v= tw' then your problem becomes v'+ v= 0 or v'= -v with v(0)= 0.
Not quite. The problem become v'+tw=0. v is not tw. It is tw'.
 
Ah, I misread the problem!

hSong9, the standard way of applying Runge-Kutta, or any numerical method for first order de's to second order is to rewrite the problem as two first order problems.

The differential equation is tw''+ w'+ tw= 0. If you let u= w' then w''= u' so the equation becomes tu'+ u+ tw= 0 or tu'= -u- tw. We also, of course, have w'= u so we have two first order equations for u and w. Run two simultaneous Runge-Kutta solvers for the two first order equations, at each step using the currrent values you have for both u and w in the formulas.

Your initial values, of course, will be w(0)= 1, w'(0)= u(0)= 0.
 

Similar threads

  • · Replies 65 ·
3
Replies
65
Views
9K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
7K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 31 ·
2
Replies
31
Views
8K