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

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.
 
Thread 'Direction Fields and Isoclines'
I sketched the isoclines for $$ m=-1,0,1,2 $$. Since both $$ \frac{dy}{dx} $$ and $$ D_{y} \frac{dy}{dx} $$ are continuous on the square region R defined by $$ -4\leq x \leq 4, -4 \leq y \leq 4 $$ the existence and uniqueness theorem guarantees that if we pick a point in the interior that lies on an isocline there will be a unique differentiable function (solution) passing through that point. I understand that a solution exists but I unsure how to actually sketch it. For example, consider a...
Back
Top