Proof of energy inequality in PDE. We have: $$y_t+y_{xx} + cosy =0 , \quad y=y(x,t),\quad (x,t)\in (0,l)\times(0,\infty) \qquad (1)$$
$$y(0,t)=y(l,t)=0, \quad t\in [0,+\infty) \qquad (2)$$
$$y(x,0)=f(x) , \quad x\in [0,l] \qquad (3)$$
Let $y_1$ , $y_2$ solutions of (1),(2),(3) and $b=y_1-y_2$ $$A(t)=\int^{l}_{0}b^2 dx \qquad (4)$$
prove that $$A'(t)\leq 2 \int^{l}_{0}|b|^2 dx $$
My work so far is: By abstracting by parts the (1) for the solutions $y_1$,$y_2$ we get:
$$y_{1t}-y_{2t}-y_{1xx}+y_{2xx}+cosy_1 - cosy_2 =0$$
$$\Rightarrow cosy_1-cosy_2=b_{xx}-b_{t}$$
$$(4)\Rightarrow A'(t)=\int^{l}_{0}2 b\cdot b_t dx=\int^{l}_{0}2b(b_{xx}-cosy_1 +cosy_2)dx \leq 2\int^{l}_{0}2|b|(|b_{xx}|+2)dx$$
But I dont know how to proceed. Any ideas ?
(I know how to solve the PDE: $$y_t + y_{xx}=0$$)

As you have calculated: $$A'(t) = 2\int_0^\ell b b_{xx} \, dx - 2\int_0^\ell b(\cos y_1 - \cos y_2) \, dx  .$$ For the first integral, $b(0)=b(\ell)=0$, so integrating by parts gives $$2\int_0^\ell b b_{xx} \, dx=-2\int_0^\ell b_x^2 \, dx  \leqslant 0.$$ For the second integral, we use that $\vert \cos y_1-\cos y_2\vert \leqslant \vert y_1-y_2\vert = \vert b\vert$ to obtain $$- 2\int_0^\ell b(\cos y_1 - \cos y_2) \, dx \leqslant  2\int_0^\ell \vert b \vert \vert \cos y_1 - \cos y_2\vert \, dx \leqslant2\int_0^\ell \vert b \vert^2 \, dx. $$ Combining these estimates gives $$A'(t) \leqslant 2\int_0^\ell \vert b \vert^2 \, dx$$ as required.
