# How to solve this System of Second Order Differential Equations (DE) with Initial Value Problem (IVP)

Hello, I'm trying to figure out how solve the below for varying time and/or corresponding theta. I'm stumped.. any insight is greatly appreciated. Thank you

$\ddot{R} = −\alpha|v|\dot{R}−\beta_{s}\frac{|v|}{R}\dot{R}-\beta_{c}\frac{g}{|v|}\dot{R} + [R\dot{\theta}^2-\frac{5}{7}g(tan\delta cos\varepsilon -sin\varepsilon cos\theta)]cos^2\delta$

$\ddot{\theta} = −\alpha|v|\dot{\theta}−\beta_{s}\frac{|v|}{R}\dot{\theta}-\beta_{c}\frac{g}{|v|}\dot{\theta}- \frac{2\dot{R}\dot{\theta}}{R} - \frac{5}{7}\frac{g}{R}sin\varepsilon sin\theta$

with $|v|=\sqrt{\dot{R}^2/cos^2\delta + R^2\dot{\theta}^2}$

where
$\alpha = 0.00900350489819847$
$\beta_{s} = 0.0022919958783044724$
$\beta{c}=0.0062192039382357378$
$\delta=0.2574$
$R=0.242$
$g=9.807$

with the 'initial conditions' at t = 0:

$R(0) = R$
$\dot{R}(0) = 0$
$\theta(0) = 57.899552605659885$
$\dot{\theta}(0) = 2.7371516764119637$

Per PaPiro's suggestion, I've converted the above to first order ODE's and got the following:

Let $x1=\dot{R}$ and $\dot{x1}=\ddot{R}$ .

$x1=\dot{R}$
$\dot{x1} = −\alpha(\sqrt{x1^2/cos^2\delta + R^2\dot{\theta}^2} ) x1−\beta_{s}\frac{\sqrt{x1^2/cos^2\delta + R^2\dot{\theta}^2}}{R}x1-\beta_{c}\frac{g}{\sqrt{x1^2/cos^2\delta + R^2\dot{\theta}^2}}x1 +$
$[R\dot{\theta}^2-\frac{5}{7}g(tan\delta cos\varepsilon -sin\varepsilon cos\theta)]cos^2\delta = \ddot{R}$

Let $x2=\dot{\theta}$ and $\dot{x2}=\ddot{\theta}$ .

$x2=\dot{\theta}$
$\dot{x2} = −\alpha(\sqrt{\dot{R}^2/cos^2\delta + R^2 x2^2} )x2−\beta_{s}\frac{\sqrt{\dot{R}^2/cos^2\delta + R^2 x2^2}}{R}x2-\beta_{c}\frac{g}{\sqrt{\dot{R}^2/cos^2\delta + R^2 x2^2}}x2-$
$\frac{2\dot{R}x2}{R} - \frac{5}{7}\frac{g}{R}sin\varepsilon sin\theta$

Per PaPiro's suggestion, I've rewritten the above $\dot{x1}$ as a function of x2 and the equation for $\dot{x2}$ as a function of x1:

$x1=\dot{R}$
$\dot{x1} = −\alpha(\sqrt{x1^2/cos^2\delta + R^2x2^2} ) x1−\beta_{s}\frac{\sqrt{x1^2/cos^2\delta + R^2x2^2}}{R}x1-\beta_{c}\frac{g}{\sqrt{x1^2/cos^2\delta + R^2x2^2}}x1 +$
$[Rx2^2-\frac{5}{7}g(tan\delta cos\varepsilon -sin\varepsilon cos\theta)]cos^2\delta = \ddot{R}$

$x2=\dot{\theta}$
$\dot{x2} = −\alpha(\sqrt{x1^2/cos^2\delta + R^2 x2^2} )x2−\beta_{s}\frac{\sqrt{x1^2/cos^2\delta + R^2 x2^2}}{R}x2-\beta_{c}\frac{g}{\sqrt{x1^2/cos^2\delta + R^2 x2^2}}x2-$
$\frac{2 \cdot x1 \cdot x2}{R} - \frac{5}{7}\frac{g}{R}sin\varepsilon sin\theta = \ddot{\theta}$

Please let me know if this is correct and if I'm on the right track. I'll try plugging this into 4th Order Runge-Kutta next.

-
Could you please provide the background context for this question (how you came to it, etc?) mathoverflow.net/howtoask –  Captain Oates Jun 16 '12 at 4:53
this is modeling a ball rolling inside of a cone with the tip of the cone facing down. So the ball starts off at the rim of the cone and spins around inside the cone going further and further towards the tip. A good example of this is to think about a roulete ball which is spinning around the rim of the roulette table and then slowly approachs the spinning numbers in the middle. As the ball slows down, gravity takes over and it approachs the center (tip) of the cone faster and faster. –  Kashyap Patel Jun 16 '12 at 5:40

Suggestions: write your second order differential equations as a system of first order differential equations and use the 4th order Runge-Kutta method to solve the resultant system of ODEs.

I think you are in the correct direction. Remember that you have coupled differential equation. The equation for $\dot{x1}$ should be written in function of $x2$ and the equation for $\dot{x2}$ should be written in function of $x1$. –  Papiro Jun 16 '12 at 17:12
Thank you PaPiro, one question, is t (time) in the program supposed to be $\theta$ in this example? –  Kashyap Patel Jun 17 '12 at 19:49