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

In summary, to set up the Runge Kutta for the given equation, one must first set up the substitution variables a and v, and then introduce a new variable for dx/dt. The system of ode's can then be set up using these variables, with three additional equations needed. It does not matter if B(v) is non-linear and values can be obtained from a look-up table instead of being calculated.
  • #1
someguy23
3
0
How does one set up the Runge Kutta for

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

Set up the substitution variables:

[tex] a = \frac {d^2y}{dt}[/tex]

[tex] v = \frac{dy} {dt} [/tex]

Then what ?

Is there a way to get [tex] \frac{dx} {dt}[/tex] 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
  • #2
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.
 
  • #3
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.

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

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

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

[tex] \frac {dy}{dt} = v [/tex]
[tex] \frac {dv}{dt} = \frac {b}{m} (v- \frac {dx}{dt}) + \frac {K}{m}(y - x)[/tex]
 
  • #6
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.
 

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

1. What is the Runge Kutta method?

The Runge Kutta method is a numerical technique used to solve ordinary differential equations (ODEs). It is a popular method due to its accuracy and ability to handle a wide range of ODEs, including those with non-linear terms.

2. How does the Runge Kutta method work?

The Runge Kutta method works by breaking down the differential equation into smaller steps and using a weighted average of these steps to approximate the solution. This involves evaluating the derivative at multiple points within each step, resulting in a more accurate approximation than other numerical methods.

3. What is the significance of the dx/dt term in the equation?

The dx/dt term represents the rate of change of the dependent variable x with respect to time. This is a crucial component in differential equations as it describes how the system changes over time and is used in the Runge Kutta method to determine the next step in the solution.

4. Can the Runge Kutta method handle non-linear terms?

Yes, the Runge Kutta method can handle non-linear terms in the differential equation. This is one of its strengths as it can accurately solve a wide range of ODEs, including those with non-linear terms, which can be difficult to solve analytically.

5. What are the advantages of using the Runge Kutta method?

The Runge Kutta method has several advantages, including its accuracy, versatility, and ability to handle non-linear terms. It is also relatively easy to implement and can handle stiff differential equations, making it a popular choice for numerical solutions to ODEs.

Similar threads

Replies
61
Views
1K
  • Differential Equations
Replies
3
Views
521
Replies
7
Views
2K
  • Differential Equations
Replies
9
Views
2K
  • Differential Equations
Replies
4
Views
6K
Replies
3
Views
843
  • Differential Equations
Replies
18
Views
2K
Replies
2
Views
2K
  • Differential Equations
Replies
16
Views
941
  • Differential Equations
Replies
4
Views
1K
Back
Top