How can I approximate a 2nd order ODE using 4th order Runge-Kutta?

  • Thread starter Thread starter scothoward
  • Start date Start date
  • Tags Tags
    2nd order Ode
Click For Summary
SUMMARY

The discussion focuses on approximating a second-order ordinary differential equation (ODE) using the 4th order Runge-Kutta method. The specific ODE presented is d²v/dt² + adv/dt + bv = 0, where a and b are constant coefficients. To convert this second-order ODE into a system of first-order ODEs, the user is advised to define u = dv/dt, leading to the equations du/dt = -au - bv and dv/dt = u. This transformation is essential for applying the Runge-Kutta method effectively.

PREREQUISITES
  • Understanding of second-order ordinary differential equations (ODEs)
  • Familiarity with the 4th order Runge-Kutta method
  • Basic knowledge of first-order ODEs and their transformations
  • Concept of characteristic equations and their roots
NEXT STEPS
  • Study the implementation of the 4th order Runge-Kutta method in Python using libraries like NumPy
  • Learn about the stability and convergence of numerical methods for ODEs
  • Explore the transformation of higher-order ODEs into first-order systems
  • Investigate applications of ODEs in electrical engineering, particularly in circuit analysis
USEFUL FOR

Students and professionals in mathematics, engineering, and physics who are working with differential equations, particularly those interested in numerical methods for solving ODEs.

scothoward
Messages
28
Reaction score
0

Homework Statement



Hey,

I am trying to approximate the solution to a second order ODE using the 4th order Runge-Kutta.

I was told that in order to do this, I have to write the second order ODE and a pair of 1st order ODEs.

Given that my differential equation is

d^2v/dt^2 + adv/dt + bv = 0, where a and b are constant coefficients, I am a little lost on how to do this.

Any advice on how to approach this?

Thanks


The Attempt at a Solution


The ODE I am trying to approximate involves voltage as a function of time. The examples that I have seen involve position, velocity and acceleration - so there is a relationship (x' = v)

I am unsure as how to do this in my case.
 
Physics news on Phys.org
General Method for Homogeneous Linear Equations:
av'' + bv'+ cv = 0 (a != 0)
Write down the characterisitc equation:
av^2 + bv+ c = 0 (a != 0)

Determine what type of response it gives by determining the roots. We just want to use b^2 - 4*a*c as it dictates the ODE's transient response.

1) If both roots are real and distinct (b^2 - 4*a*c > 0) (r1 and r2) then the solution can be written as:
v(t) = c1*e^(r1*t) + c2*e^(r2*t)

2) If both roots are real and identical (b^2 - 4*a*c = 0) (r1):
v(t) = c1*e^(r1*t) + c2*t*e^(r1*t)

2) If both roots are imaginary (b^2 - 4*a*c < 0) (r1 and r2 conjugate):
r1 = r2(conj) = x + iy
x = -b / (2 * a)
y = sqrt(4*a*c - b^2) / (2 * a)

v(t) = c1 * e^(x*t)cos(y*t) + c2 * e^(x*t)sin(y*t)
 
Dietrick, do you understand that what you did there has no relevance at all to the question?

Scothoward, with a differential equation of the form d^2v/dt^2 + adv/dt + bv = 0, let u= dv/dt. Then d^2v/dt^2= du/dt and the equation becomes du/dt+ adv/dt+ bv= du/dt+ au+ bv= 0 or du/dt= -au- bv. Of course, your second equation is dv/dt= u.
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 14 ·
Replies
14
Views
4K
Replies
2
Views
3K