8

I have these equations:

$$\dot p=ap+bq,$$ $$\dot q=cp+dq,$$

and I have to find the conditions such as the equations are canonical. Then, I have to find the Hamiltonian $H$.

To answer to the first question, I have imposed that $$\frac{\partial}{\partial q}(\frac{\partial H}{\partial p})+\frac{\partial }{\partial p}(-\frac{\partial H}{\partial q})=0$$

$$\frac{\partial}{\partial q}(cp+dq)+\frac{\partial }{\partial p}(ap+bq)=0$$ $$\Rightarrow d+a=0.$$

And so I have that the canonical equations are in the form:

$$\dot p=ap+bq,$$ $$\dot q=cp-aq.$$

But how can I find the Hamiltonian? The result must be $H=-apq-\frac{1}{2}bq^2+\frac{1}{2}cp^2$. The general expression $H=\sum p_i \dot q_i-L$ doesn't help me.

Qmechanic
  • 201,751
sunrise
  • 1,143
  • 2
    You yourself identify $\partial H/\partial p$ with $c\ p+d\ q$ etc. Why not just integrate that? Also, as your system reads $\dot\pi=A\pi$, with constant $A=((a,b),(c,d))$, I guess that the quadratic ansatz $H=x\ p^2/2+y\ q^2/2+z\ pq$ might be worth a try. – Nikolaj-K Feb 11 '13 at 14:40
  • @NickKidman: I'm sorry, but I haven't understand.. I have added (in the question) the result that I have to obtain.. In particular I haven't understand the reasoning about A: what's A? – sunrise Feb 11 '13 at 15:19
  • 2
    If $\pi = (p, q)$ is a (phase space) vector and $A=\left((a,b), (c,d)\right)$ is a $2\times2$ matrix then your equations of motion read $\dot{\pi}=A\pi$. If that doesn't help you don't worry about it. You can integrate a partial derivative: if you know $\partial H/\partial p = f(p,q)$ then $H = \int f \mathrm{d}p + g(q)$, where $g(q)$ is some function of $q$ you'll have to determine by using the other Hamilton equation. Check this result by taking the derivative $\partial/\partial p$ to make sure you understand it. – Michael Feb 11 '13 at 15:26
  • @MichaelBrown thanks for your help! but how can I find $g(q)$ using the first eq? – sunrise Feb 11 '13 at 15:42
  • No worries. Plug in what you get from the first step and see what you get! – Michael Feb 11 '13 at 15:47
  • @MichaelBrown mmh.. $\int \frac{\partial H}{\partial p} dp=1/2cp^2+dqp$ but d=-a -> $\int \frac{\partial H}{\partial p}=1/2cp^2-aqp$.. :) for the last part of the result, do I have to integer the ${\partial H}{\partial q}$ and get in $g$ only the terms that are only function of q? – sunrise Feb 11 '13 at 16:01
  • @sunrise Yep. So now you have $H = \frac{1}{2} c p^2 - a q p + g(q)$ for some $g(q)$. The other Hamilton's equation says $\dot{p}=-\partial H/\partial q=\cdots$. But from what you just found $-\partial H/\partial q = a p - g'(q)$ where $g'(q) = \mathrm{d}g/\mathrm{d}q$ with the full derivative, since $g$ is a function of $q$ only. So one more integration... – Michael Feb 11 '13 at 16:09
  • 1
    @MichaelBrown Oh, fantastic! I got it! :D Can I follow these steps everytime I have to make an exercise like this? (If you would write an answer, I'll mark your answer as accepted answer!!) – sunrise Feb 11 '13 at 16:29

1 Answers1

16

I) OP is given a problem of the form

$$\tag{1} \dot{q}~=~f(q,p), \qquad \dot{p}~=~g(q,p), $$

where $f$ and $g$ are two given smooth functions. OP is asked to derive the integrability condition for the eqs. (1) to be Hamilton's eqs.

$$\tag{2} \dot{q}~=~\frac{\partial H}{\partial p}, \qquad \dot{p}~=~-\frac{\partial H}{\partial q}.$$

OP correctly deduces that

$$\tag{3} f~=~\frac{\partial H}{\partial p}, \qquad g~=~-\frac{\partial H}{\partial q},$$

and that the integrability condition is the Maxwell-type relation

$$\tag{4} \frac{\partial f}{\partial q}+\frac{\partial g}{\partial p}~=~0.$$

Michael Brown in a comment then explains that if

$$\tag{5} F(q,p)~=~\int^{p}\!dp^{\prime}~f(q,p^{\prime})$$

is some antiderivative/primitive integral/indefinite integral of the given $f$ function, so that

$$\tag{6} \frac{\partial F}{\partial p}~=~f,$$

then eqs. (3a) and (6) imply that

$$\tag{7} \frac{\partial (H-F)}{\partial p}~=~0.$$

In other words, the difference $H-F$ cannot depend on the $p$ variable. It could be an arbitrary function $G(q)$ of the $q$ variable only. So the Hamiltonian is of the form

$$\tag{8} H(q,p)~=~F(q,p)+G(q). $$

Finally, one gets restrictions on the $G$ function by plugging eq. (8) into eq. (3b). This should answer OP's question (v4), and we are in principle done.

II) However, we cannot resist making the following general point about the existence of a Hamiltonian formulation. OP's title question is a bit academic if one a priori insists that the variables $q$ and $p$ should play the role of canonical variables. Why would one insist on that? The goal is, after all, just to get a Hamiltonian formulation, whatever it takes. So a more realistic question is the following more general problem.

Suppose that we are given a two-dimensional first-order problem $$\tag{9} \dot{x}~=~f(x,y), \qquad \dot{y}~=~g(x,y), $$ where $f$ and $g$ are two given smooth functions. Is eq. (9) a Hamiltonian system $$\tag{10} \dot{x}~=~\{x,H\}, \qquad \dot{y}~=~\{y,H\}, $$ with a symplectic structure $\{\cdot,\cdot\}$ and Hamiltonian $H(x,y)$?

The answer is, perhaps surprisingly: Yes, always, at least locally, cf. e.g. my Phys.SE answer here.

Qmechanic
  • 201,751
  • What a great answer! If it could be useful, a similar question was addressed by Giné et al. (https://ddd.uab.cat/pub/artpub/2011/gsduab_3020/GinLli2011_Preprint.pdf) and by Chavarriga et al. (https://ac.els-cdn.com/S002203969893621X/1-s2.0-S002203969893621X-main.pdf) – Lo Scrondo Oct 05 '18 at 08:17