# I Can you check the solution for this second order ODE?

Tags:
1. Nov 8, 2016

### ecastro

The second order ODE is,

\begin{equation*}
\frac{d^2 x}{dt^2} = -\omega^2_g \frac{dx}{dt}
\end{equation*}

I tried solving this by substitution of the second order derivative into a variable and transforming the equation into a second order polynomial, and I get the solution involving an exponential. But, the solution includes a sinusoidal function, which I don't know how it got a sinusoidal function.

2. Nov 8, 2016

### Buzz Bloom

Hi ecastro:

Consider a substitution of y(t) = dx/dt to get a first order ODE, dy/dt = -ωg2 y

Hope this helps.

Regards,
Buzz

3. Nov 8, 2016

### Buzz Bloom

Hi @ecastro:

I was hoping my post would help you recognize that a sin or cos is NOT a solution. Did you get that? My guess is that the given sin or cos solution is a typo.

You are correct that an exponential is a solution, but there is also a second solution: x = t + const.

Regards,
Buzz

4. Nov 10, 2016

### ecastro

Mod note: Post referred to below is now deleted, as it contained a complete solution .
Thank you for your answer. It turns out I misunderstood the equation; I am sorry. The original equation is this,

\begin{equation*}
\ddot{v}_x = -\omega_g^2 v_x.
\end{equation*}

The $v_x$ is the velocity of the particle along the $x$ direction, and a dot above the function means a derivative with respect to time. So this equation should have a sinusoidal function as a solution. If I am not mistaken, the solution is

\begin{eqnarray*}
v\left(t\right) &=& C_1 e^{\pm i \omega_g t} \\
&=& C_1 \left(\cos \omega_g t \pm i \sin \omega_g t\right).
\end{eqnarray*}

From here, I can integrate the velocity component with respect to time to calculate the position of the particle; but it would seem that the position of the particle is real, how can I eliminate the imaginary component?

Last edited by a moderator: Nov 14, 2016
5. Nov 12, 2016

### eys_physics

The general solution is
$v(t)=C_1 e^{i\omega_g t}+C_2 e^{-i\omega_g t}=C_1(\cos \omega_g t+i\sin\omega_g t)+C_2(\cos \omega_g t-i\sin\omega_g t)$.
Alternatively, by defining the new constants $A_1=C_1+C_2$ and $A_2=i(C_1-C_2)$:
$v(t)=A_1\cos \omega_g t+A_2\sin\omega_g t$.
If $A_1$ and $A_2$ are chosen real, $v(t)$ will also be real.

6. Nov 14, 2016

### ecastro

Is this acceptable? The first constants, $C_1$ and $C_2$ can be calculated if initial conditions are given, right?

Here is the solution of the equation with respect to position,

\begin{equation*}
x - x_0 = r_g \sin \left(\omega_g t\right),
\end{equation*}

where $\omega_g = q B / m$, $r_g = m v_{\perp} / \left(|q| B\right)$, and $x_0$ is the initial position.

7. Nov 14, 2016

### eys_physics

The sets of constants, i.e. $(C_1,C_2)$ and $(A_1,A_2)$ are connected by a linear transformations. For given initial conditions you can either determine $C_1$ and $C_2$, or $A_1$ and $A_2$. I only introduced the constants $A_1$ and $A_2$ for convenience. As I said in my previous post $A_1$ and $A_2$ will be real if $v(t)$ is real. However, $C_2$ will not be. But, if you prefer you can keep using $C_1$ and $C_2$.

$$x(0)=x_0$$,
and
$$v(0)=r_g\omega_g$$.

By integrating the expression for $v(t')$ from 0 to to $t$ on both sides we have
$$x(t)-x_0=(A_1/\omega_g)\sin\omega_g t -(A_2/\omega_g )(\cos\omega_g t -1)$$

So, the solution you posted is satisfied if
$$A_1=r_g \omega_g$$,
and
$$A_2=0$$.

You can also use the set $(C_1,C_2)$ but the solution becomes slight more cumbersome, I guess.