# Solution of motion in hamiltonian formalism

I have these canonical equations: $$\dot p = - \alpha pq$$ $$\dot q =\frac{1}{2} \alpha q^2$$

I have to find $q(t)$ and p$(t)$, considering initial conditions $p_0$ and $q_0$.

I thought to simply integrate with respect time both members of the equations, but something must be wrong because the solutions are:$$q(t)=\frac{q_0}{1- \frac{1}{2} \alpha q_0 (t-t_0)}$$ $$p(t)=p_0[1-\frac{1}{2} \alpha q_0 (t-t_0)]$$ and I don't know how obtain them...

-

The $q$ equation is a separable ODE that can be directly integrated. To do this, note that it can be written as $$\frac{dq}{dt} = \frac{1}{2}\alpha q^2$$ so that multiplying both sides by $dt$ and integrating from $t_0$ to $t$ gives $$\frac{2}{\alpha}\int_{q_0}^{q(t)}\frac{1}{q^2}dq = \int_{t_0}^t dt'$$ which after integration implies $$-\frac{2}{\alpha}\left[\frac{1}{q(t)}-\frac{1}{q_0}\right] = t-t_0$$ next, solve for $q(t)$. Plug this back into the first equation, again separate variables and integrate to obtain $p(t)$.
Thank you!! I have a problem (the last problem! :D): I haven't understood what I have to plug back and where. If I consider that $H=E=\frac{1}{2}\alpha p q^2$ and that $2E=\alpha p q^2=\alpha p_0 q_0^2$ and I plug back q(t) in this relation, I obtain the correct result for p(t). But if I plug back it in $\dot p=..$, I obtain a wrong result (p(t) is a logarithmic function... ). What's wrong? –  sunrise Feb 12 '13 at 8:23
Plug back into your first equation for $p$. When you separate variables there, the integral over $t$ will also give a log, and the logs should drop out in the end. –  joshphysics Feb 12 '13 at 16:37