# Solving an ode using eigen function expantion

so I am trying to solve this problem using eigen function expansion. My problem is that I have never done this in one variable and am not sure how does it work. I wanted to show that I understand the overall problem and attempted to solved it more simplistically below, but I would really appreciate if someone can show me how to do it using eigen function expansions. Problem Solve $a\psi^{(4)}= k\pi \sin(k \pi x)$ such that $\psi(0)=0=\psi(1)$ and $\psi''(0)=0=\psi''(1)$

How I approach this problem was by substitution let $u= \psi''$. Then I have a second order ODE. Solving that using the method of undetermined coefficients we get the following characteristic polynomial

$$ar^2=0$$ Thus $r=0$ is double root giving the following solution the homogeneous solution is $u= c_0x+c_1$ thus $\psi''=c1+c0x$ integrating twice we get $\psi= c_3+c_2x+c_1x^2/2+c_0x^3/6$ using the similarly we guess solution $A\sin(k \pi x)+B\cos(k \pi x)$ for the particular solution. Using wolfram alpha it tells me it has to be $\sin(k \pi x)$.

Using the boundary conditions we get that the solution consists only of the particular part and the rest is zero. I have the answer from the book which says that we should get $x\sin(k \pi x)$. I hope someone can help me out, thank you.

You have $$a\frac{d^{4}\psi}{dx^{4}}=k\pi\sin(k\pi{x})$$ integrate onece to give $$a\frac{d^{3}\psi}{dx^{3}}=-\cos(k\pi{x})+c_{1}$$ integrate $2^{d}$ time to give $$a\frac{d^{2}\psi}{dx^{2}}=-\frac{\sin(k\pi{x})}{k\pi}+c_{1}x+c_{2}$$ integrate $3^{d}$ time to give $$a\frac{d\psi}{dx}=\frac{\cos(k\pi{x})}{(k\pi)^{2}}+c_{1}\frac{x^{2}}{2}+c_{2}x+c_{3}$$ integrate $4^{th}$ time to give $$a\psi=\frac{\sin(k\pi{x})}{(k\pi)^{3}}+c_{1}\frac{x^{3}}{6}+c_{2}\frac{x^{2}}{2}+c_{3}x+c_{4}$$ $$a\psi(0)=c_{4}=0$$ $$a\psi(1)=\frac{\sin(k\pi)}{(k\pi)^{3}}+c_{1}\frac{1}{6}+c_{2}\frac{1}{2}+c_{3}=0$$ $$a\psi''(0)=c_{2}=0$$ $$a\psi''(1)=-\frac{\sin(k\pi)}{k\pi}+c_{1}=0$$ Hence $$c_{1}=\frac{\sin(k\pi)}{k\pi}$$ $$c_{2}=0$$ $$c_{3}=-\frac{\sin(k\pi)}{(k\pi)^{3}}-c_{1}\frac{1}{6}=-\frac{\sin(k\pi)}{k\pi}\Big(\frac{1}{(k\pi)^{2}}+\frac{1}{6}\Big)$$ $$c_{4}=0$$ Or $$\psi(x)=\frac{1}{a}\Big[\frac{\sin(k\pi{x})}{(k\pi)^{3}}+\frac{\sin(k\pi)}{k\pi}\frac{x^{3}}{6}-\frac{\sin(k\pi)}{k\pi}\Big(\frac{1}{(k\pi)^{2}}+\frac{1}{6}\Big)x\Big]$$ And, if $k\in\mathbb{Z}$, then $$\psi(x)=\frac{\sin(k\pi{x})}{a(k\pi)^{3}}$$