How would I go about solving questions 1a and 3b?
- 1.(a): $-\dfrac{d^2u}{dx^2}=1$, $u(0)=u(1)=0$;
- 3.(c): $-\dfrac{d^2u}{dx^2}+2u=1$, $u(0)=u(1)=0$;
For (1a) do we assume a solution of the form $u(x) = \sum_{n=-\infty}^{\infty} u_ne^{inx}$ and substitute this into the differential equation to get $u_n = \frac{1}{n^2}$?How would we apply the boundary condition? Thanks for the help.

For (a) assume a solution of the form $\sum_{n=1}^{\infty} a_n \sin(n\pi x)$.
For (b) assume a solution of the same form.