It would be great if someone would help me check that I have done this right.
I have an infinite square well, s.t. $V(x) = 0$ for $x\in(0,a)$ and $V(x) = \infty$ otherwise.
Given that $\psi(x,0) = \alpha x (a-x)$, where $\alpha\in\mathbb R$ I have found by normalization that $\alpha=\frac{a^3}{6}$.
If I have to write $\psi(x,0)$ as a Fourier series/a combination of normalized eigenstates, it would take the form $\psi(x,0)=\sum_{n=1}^{\infty} C_n u_n(x)$ where $u_n(x) = \sqrt{\frac{2}{a}}\sin\left(\frac{n\pi x}{a}\right)$. Therefore, $C_n =\int_0^a u_n^*(x)\psi(x,0) dx$ $= \frac{a^3}{6}\sqrt{\frac{2}{a}}\int_0^a\sin\left(\frac{n\pi x}{a}\right)x (a-x)dx$ $= \frac{a}{n\pi}\frac{a^3}{6}\sqrt{\frac{2}{a}} \int_0^a(2x-a)\cos\left(\frac{n\pi x}{a}\right)dx$ $=-2\left(\frac{a}{n\pi}\right)^2\frac{a^3}{6}\sqrt{\frac{2}{a}}\int_0^a\sin\left(\frac{n\pi x}{a}\right)dx$ Then for odd $n$, $C_n = 4\left(\frac{a}{n\pi}\right)^3\frac{a^3}{6}\sqrt{\frac{2}{a}}= \frac{2}{3}\frac{a^6}{n^3\pi^3}\sqrt{\frac{2}{a}}$; and $C_n = 0$ otherwise.
Hence $\psi(x,0)=\sum_{\text{odd n}} \frac{4}{3}\frac{a^5}{n^3\pi^3}\sin\left(\frac{n\pi x}{a}\right)$.
Then $\psi(x,t) = \sum_{\text{odd n}} \frac{4}{3}\frac{a^5}{n^3\pi^3}\sin\left(\frac{n\pi x}{a}\right) e^{-iE_nt/\hbar}$.
Thank you in advance!
Added: The model answer gives a probability for $E_n$ that is independent of $a$. What has gone wrong? Incidentally, the probability of getting $E_n$ is $\frac{960}{n^3\pi^3}$.
Comment: I think it's just down to my rubbish calculations. Thanks to @Eric's suggestion, I think this is resolved.