Lagrangian for scalar field in terms of Klein Gordon equation I am studying Peskin and Schroeder, at page 287 , Lagrangian  for scalar field  is
$$L={1\over 2}(\partial _\mu \phi )^2-{1\over 2}m^2 \phi^2.$$
It can be rewritten  as
$$L={1\over 2} \phi (-\partial^2-m^2)\phi . $$
I don't understand  how  it is rewritten,
Your little  helps may save my lot of time.
 A: Let us look at the first term in your Lagrangian:
$$\partial_\mu \phi \partial^\mu \phi$$
Now, for a general derivative $ \partial_x $ we have:
$$\partial_x \left(y \partial_x y\right) = (\partial_x y)^2 + y \partial^2_x y$$
$$\Rightarrow (\partial_x y)^2 = \partial_x \left(y \partial_x y\right) - y \partial^2_x y$$
If you substitute the above for $\partial_\mu \phi \partial^\mu \phi$ in your Lagrangian, you get two terms, one of which is of the form $\partial_\mu (...)$. This term is a total derivative and does not contribute to the equations of motion. This is because in the action,
$$S = \int d\vec{x} dt L$$
the total derivative term will integrate out to give constant. And when we calculate equation of motion, that constant will be differentiated to zero.
A: The two Lagrangians are the same modulo total spacetime divergence terms. If you vary with respect to the scalar field the action constructed from the lagrangian you will obtain the Klein-Gordon equation. 
People usually write the kinetic term of the scalar field as $(\partial_{μ} \phi)^2$. You can write it as $\phi \partial^2 \phi$. Both these two expressions after variation will yield $\partial^{2}\phi$.
($\phi \partial^2 \phi$ contains second derivatives of the dynamical variable. Be careful with Euler Lagrange equations.)
