2.I.5D2 . \mathrm{I} . 5 \mathrm{D}

Methods
Part IB, 2007

Show that a smooth function y(x)y(x) that satisfies y(0)=y(1)=0y(0)=y^{\prime}(1)=0 can be written as a Fourier series of the form

y(x)=n=0ansinλnx,0x1y(x)=\sum_{n=0}^{\infty} a_{n} \sin \lambda_{n} x, \quad 0 \leqslant x \leqslant 1

where the λn\lambda_{n} should be specified. Write down an integral expression for ana_{n}.

Hence solve the following differential equation

yα2y=xcosπxy^{\prime \prime}-\alpha^{2} y=x \cos \pi x

with boundary conditions y(0)=y(1)=0y(0)=y^{\prime}(1)=0, in the form of an infinite series.

 (i) f(x)=eax and (ii)g(x)={1,xb0,x>b.\begin{aligned} & \text { (i) } f(x)=e^{-a|x|} \text {, } \\ & \text { and }(i i) \quad g(x)= \begin{cases}1, & |x| \leqslant b \\ 0, & |x|>b .\end{cases} \end{aligned}