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

In summary: This is a first order ODE. If you want to approximate a solution to a second order ODE, you need to solve for u. Let's use the 4th order Runge-Kutta to do this. First, write the second order ODE: du/dt+ au+ bv= 0Next, solve for u: u= -au- bvNow, you can approximate the solution to the second order ODE using the 4th order Runge-Kutta.
  • #1
scothoward
29
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
  • #2
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)
 
  • #3
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.
 

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

What is a 2nd order ODE?

A 2nd order ODE (ordinary differential equation) is a mathematical equation that involves a function, its first derivative, and its second derivative. It is used to describe the relationship between a quantity and its rate of change over time.

What is the purpose of approximating a 2nd order ODE?

The purpose of approximating a 2nd order ODE is to find an approximate solution to the original equation, as it is often difficult or impossible to find an exact solution. This allows us to make predictions and understand the behavior of systems described by these equations.

How do you approximate a 2nd order ODE?

To approximate a 2nd order ODE, we use numerical methods such as Euler's method, Runge-Kutta methods, or the finite difference method. These methods involve breaking down the equation into smaller, more manageable steps and using iterative calculations to find an approximate solution.

What are some real-world applications of approximating 2nd order ODEs?

Approximating 2nd order ODEs is used in a wide range of scientific and engineering fields, including physics, chemistry, biology, economics, and more. It is used to model and predict the behavior of complex systems such as population growth, chemical reactions, and particle motion.

Are there any limitations to approximating 2nd order ODEs?

Yes, there are limitations to approximating 2nd order ODEs. These methods can only give an approximate solution, which may not be accurate in all cases. Additionally, the accuracy of the approximation depends on the step size used and the complexity of the equation. In some cases, analytical solutions may be preferred over numerical approximations.

Similar threads

Replies
14
Views
2K
Replies
4
Views
2K
Replies
1
Views
3K
Replies
7
Views
3K
Replies
3
Views
2K
Replies
1
Views
4K
Replies
14
Views
3K
Back
Top