Runge Kutta question, equation has dx/dt in it and non linear term ?

Click For Summary

Discussion Overview

The discussion revolves around setting up the Runge-Kutta method for a second-order differential equation involving non-linear terms and multiple derivatives. Participants explore how to handle the variables and substitutions necessary for implementing the numerical method, particularly focusing on the treatment of the term dx/dt.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant inquires about setting up the Runge-Kutta method for a specific equation and questions how to handle the term dx/dt.
  • Another participant suggests introducing a new variable for dx/dt and provides a set of substitutions for the variables involved in the equation.
  • A participant expresses understanding of the Runge-Kutta theory but struggles with the logic of substitutions and setting up the equations, referencing an external example that lacks the dx/dt term.
  • Further clarification is provided regarding the need for additional equations to fully define the system, emphasizing the requirement for one equation for each variable introduced.
  • There is a discussion about whether it matters if B(v) is non-linear and if values can be obtained from a lookup table instead of being calculated directly, with one participant asserting that it does not matter as long as a value can be provided.
  • Another participant points out that dx/dt still needs to be replaced by a variable, which would lead to an equation for a_1, and mentions the possibility of setting the second derivative of x to zero depending on the physical context.

Areas of Agreement / Disagreement

Participants generally agree on the need to introduce new variables for the derivatives and the requirement for additional equations. However, there is some uncertainty regarding the treatment of the non-linear term and the implications of using a lookup table for values.

Contextual Notes

Participants express varying levels of familiarity with the Runge-Kutta method and its application to this specific problem, indicating potential gaps in understanding the necessary substitutions and the implications of non-linear terms.

someguy23
Messages
3
Reaction score
0
How does one set up the Runge Kutta for

\frac {d^2y} {dt} m = b(\frac {dy} {dt} - \frac {dx} {dt}) + k (y-x) ?

Set up the substitution variables:

a = \frac {d^2y}{dt}

v = \frac{dy} {dt}

Then what ?

Is there a way to get \frac{dx} {dt} out of the equation ? If not, I have to differentiate my input function to provide values ? Can I do this by (x(t-1) + x(t+1))/ 2h or similar ?

Does it matter if B(v) is non linear and I get the value from a look up table instead of being able to calculate it ?

Thanks !
 
Physics news on Phys.org
You need to treat ##dx/dt## as you did ##dy/dt##, and introduce a new variable for it. Also, you do not make the substitution ##a = d^2y/dt^2##, as then you lose the derivative!

What you need to do is set
$$
\begin{align}
a_1 &= x \\
a_2 &= y \\
a_3 &= \frac{dx}{dt} \\
a_4 &= \frac{dy}{dt}
\end{align}
$$

I'll let you set up the system of ode's using that.

someguy23 said:
How does one set up the Runge Kutta for
Does it matter if B(v) is non linear and I get the value from a look up table instead of being able to calculate it ?
It doesn't matter, so long as you can provide a value whatever the input given.
 
I understand the theory behind RK, but I'm stuck trying to figure out the logic for doing the substitutions and how to set up the equations.

I'm trying to follow the example in this http://epublications.bond.edu.au/cgi/viewcontent.cgi?article=1130&context=ejsie

The author's example doesn't have the dx/dt term. He has one new variable be the derivative of the other.

Here is what I get with your suggestion.

\frac {da_4}{dt} - \frac {b}{m}(a_4-a_3) - \frac {K}{m}(a_2 - a_1) = 0
\frac {da_2}{dt} = a_4

I get it now. I can take it from here. Thanks for your help !
 
Last edited:
someguy23 said:
Here is what I get with your suggestion.

\frac {da_4}{dt} -b(a_4-a_3) -K(a_2 - a_1) = 0
You need three more equations, as you need one for each ##a##.
 
DrClaude said:
You need three more equations, as you need one for each ##a##.

\frac {dy}{dt} = v
\frac {dv}{dt} = \frac {b}{m} (v- \frac {dx}{dt}) + \frac {K}{m}(y - x)
 
You still have ##dx/dt## that needs to be replaced by a variable. That will give you an equation for ##a_1## (using my notation above). Then there is the question of ##da_3/dt = d^2x/dt^2##. You may set that to 0, depending on the actual physical problem you are considering.
 

Similar threads

  • · Replies 65 ·
3
Replies
65
Views
9K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K