Deriving the Hamiltonian density for a free scalar field I'm working through my old notes on QFT (cf. Ref 1) and I'm not quite sure how to approach the derivation of the Hamiltonian density for a free scalar field (question 2.3 on page 19) and the subsequent derivation of the components of the energy-momentum four-vector in terms of the new field operators. Could you point me in the right direction? 
$${\mathcal{H}~=~\frac{1}{2}\left[\left(\partial_t\phi\right)^{2}+\left(\nabla\phi\right)^{2}+m^{2}\phi^{2}\right]\textrm{.}}$$
References:


*

*M Dasgupta, AN INTRODUCTION TO QUANTUM FIELD THEORY, Lecture presented at the School for Experimental High Energy Physics Students Somerville College, Oxford, September 2009.

 A: First question.
Let's have Lagrangian
$$
L = \frac{1}{2}\left( (\partial \varphi )^{2} - m^{2}\varphi^{2}\right) .
$$
Stress-energy tensor is equal to 
$$
T^{\alpha \beta} = \frac{\partial L}{\partial_{\alpha }\varphi }\partial^{\beta}\varphi - g^{\alpha \beta}L = \partial^{\alpha}\varphi \partial^{\beta}\varphi - \frac{g^{\alpha \beta }}{2}((\partial \varphi )^{2} - m^{2}\varphi^{2}).
$$
Then 
$$
H = \int T^{00}d^{3}\mathbf r = ..., \quad \mathbf P^{i} = \int T^{0i} d^{3}\mathbf r = ..., \qquad (.1)
$$
and you have an answer.
Second question.
Let's have the solution for scalar real field:
$$
\varphi (x) = \int \left( b_{\mathbf k}^{*}e^{ikx} + b_{\mathbf k}e^{-ikx}\right)\frac{d^{3}\mathbf k}{\sqrt{(2 \pi )^{3}2\epsilon_{\mathbf k}}}, \quad kx = \varepsilon_{\mathbf k}x^{0} - (\mathbf k \cdot \mathbf x). \qquad (.2)
$$
So you can rewrite $(.1)$ as
$$
\mathbf P = \int \mathbf k b_{\mathbf k}b_{\mathbf k}^{*}d^{3}\mathbf k , \quad H = \int \epsilon_{\mathbf k} b_{\mathbf k}b_{\mathbf k}^{*}d^{3}\mathbf k  \qquad (.3) 
$$
(where I ignored the infinite constant summand as we can do for the free field).
Then you want to rewrite operators of $(.3)$ expressions in terms of
$$
\hat {\varphi} , \quad \hat {\frac{\partial L}{\partial \dot {\varphi }}} = \hat {\dot {\varphi }} = \hat {\pi} .
$$
You can do next steps.


*

*To multiply $(.2)$ by $e^{-i(\mathbf q \cdot \mathbf x )}$ and then take an integration over $\frac{d^{3}\mathbf r}{\sqrt{(2 \pi )^{3}}}$. You'll get
$$
\int \varphi (\mathbf r , t) e^{-i (\mathbf q \cdot \mathbf r )}\frac{d^{3}\mathbf r }{\sqrt{(2 \pi )^{3}}} = ... = \frac{1}{\sqrt{2 \epsilon_{\mathbf q}}}\left( b_{-\mathbf q}^{*}e^{i \epsilon_{\mathbf q} t} + b_{\mathbf q}e^{-i \epsilon_{\mathbf q} t}\right) . \qquad (.4)
$$

*To take t-derivation of $(.4)$. You'll get 
$$
\int \pi (\mathbf r , t) e^{-i (\mathbf q \cdot \mathbf r )}\frac{d^{3}\mathbf r }{\sqrt{(2 \pi )^{3}}} = i\sqrt{\frac{\epsilon_{\mathbf q} }{2}}\left( -b_{\mathbf q}e^{- i\epsilon_{\mathbf q} t} + b_{-\mathbf q}^{*}e^{i \epsilon_{\mathbf q} t} \right) \qquad (.5)
$$

*Now you have from $(.4), (.5)$ a system of linear equations. You can express $b_{\mathbf q}$ from these equations as function of $\varphi , \pi$.

*You can use the hermitian nature of $\hat {b}_{\mathbf q}, \hat {b}^{+}_{\mathbf q}$. By assuming the $\hat {b}_{\mathbf q}$ expression you can get $\hat {b}^{+}_{\mathbf q}$ expression. Finally, you'll get
$$
    \hat {b}_{\mathbf q } = \int \left( \epsilon_{\mathbf q} \hat {\varphi} + i \hat {\pi} \right)e^{i q x}\frac{d^{3}\mathbf r }{\sqrt{2 \epsilon_{\mathbf q} (2 \pi )^{3}}} , \quad \hat {b}_{\mathbf q }^{+} = \int \left( \epsilon_{\mathbf q} \hat {\varphi} - i \hat {\pi} \right)e^{-i q x}\frac{d^{3}\mathbf r }{\sqrt{2 \epsilon_{\mathbf q} (2 \pi )^{3}}}.
 $$

*Use these expressions for the transformation of $(.3)$ expression.


If you want some details of derivations which were used in steps above, I'll help you.
