Runge Kutta method to solve second order ODE

Click For Summary
SUMMARY

The discussion focuses on solving the second order ordinary differential equation (ODE) xy'' + y' + xy = 0 using the Runge-Kutta method on the interval x[1,3]. The user successfully transforms the second order ODE into two first order ODEs by defining v(x) = y'(x) and v'(x) = y''(x). The equations are then expressed as y' = v (f1) and v' = -v/x - y (f2). The solution involves applying the standard Runge-Kutta method while treating the k1, k2, k3, k4 as vectors to compute the next values of y and v.

PREREQUISITES
  • Understanding of second order ordinary differential equations (ODEs)
  • Familiarity with the Runge-Kutta method for numerical solutions
  • Knowledge of vector calculus and systems of first order ODEs
  • Basic proficiency in mathematical notation and manipulation
NEXT STEPS
  • Study the implementation of the Runge-Kutta method for systems of equations
  • Learn about numerical stability and error analysis in ODE solutions
  • Explore advanced techniques for solving higher order ODEs
  • Investigate software tools like MATLAB or Python libraries for numerical ODE solving
USEFUL FOR

Students and professionals in mathematics, engineering, and physics who are working with numerical methods for solving ordinary differential equations, particularly those interested in the Runge-Kutta method.

maciejj
Messages
6
Reaction score
0

Homework Statement


Need to solve
xy''+y'+xy=0 using Runge Kutta on x[1,3]
Couldn't find algorythm to solve second order ODE using this method
I know how to do 1st order


Homework Equations






The Attempt at a Solution


I know I have to make this equation into 2 first order ODE
xy''+y'+xy=0
Let v(x)=y'(x)
v'(x)=y''(x)
y'=v
xv'+v+xy=0

y'=v f1(x,y,v)
v'=-v/x-y f2(x,y,v)

now what I need to do next?
 
Physics news on Phys.org
Well firstly write v'= -(xy+v)/x = f2(x,y,v) instead of what you wrote.
Your usual k1,k2,k3,k4 for first order RK now became vectors of dimension 2 ie (k1, j1), (k2,j2)...
Then just apply the standard RK method for working them out, being careful as you will need the j's to work out the k's and vice versa. You can then use the formulae to work out the y_n+1 and v_n+1 from y_n and v_n, using the (k,j) vectors as usual.
 

Similar threads

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