1
$\begingroup$

I have a differential equation like

$$\frac{d^2x}{dt^2}=C+C'\frac{dx}{dt}$$ where $C$ and $C'$ are constants

How can I solve this problem using the Runge-Kutta method?

I thought first thinking this problem as first order diff equation which in this case it would be like, $$\frac{dw}{dt}=C+C' w$$

where $$w=\frac{dx}{dt}$$

now I can find the values of $w$. After this, I am not sure how should I proceed.

$\endgroup$
1
$\begingroup$

A second order differential equation such as this is equivalent to a first order system: in this case $$ \eqalign{\dfrac{dx}{dt} &= v\cr \dfrac{dv}{dt} &= C + C' v\cr}$$ The Runge-Kutta method for a system is exactly the same as for a single equation, except that the "dependent variable" is a vector instead of a single variable.

$\endgroup$
0
$\begingroup$

You need initial values of $x_0$ and $\omega_0$ at a $t = t_0$ $$\\$$ Then you decide on a step size $h$ $$\\$$ Using expressions at wiki page, calculate values of $w$ $$\\$$ Your last equation can be written as $x = \int\omega dt + x_0$; $$\\$$ You can estimate $x$ as $x=\sum\omega h + x_0$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.