Let $u$ be a solution to: $$ \begin{cases} u_t - u_{xx} \leq 1& t>0, x\in(0,1)\\ u(t,0) = u(t,1) = 0 & t>0 \\ u(0,x) = 0 \end{cases}$$
Prove that $u(t,x) \leq \frac{x^2 + x}{2}$ at any time $t>0$. I'm not sure how to prove this. I was thinking of constructing some periodic fourier series expansion for $u$, but didn't get anywhere with that. Does anyone have any suggestions?
The function $v(x,t) = u(x,t) -\frac{x^2+x}{2}$ satisfies
$$ \begin{cases} v_t - v_{xx} \leq 0& t>0, x\in(0,1)\\ v(t,0) = 0, v(t,1) = -1 & t>0 \\ v(0,x) = -\frac{x^2+x}{2}. \end{cases}$$
Note that $v\le 0$ on the parabolic boundary, so the weak maximum principle for heat equation implies that $v\le 0$ for all $t$.