Expectation value of the position for $\psi(x,0)=Ax^2(x^2-L^2)$ in an infinite square well Consider a particle of mass $$ in an infinite square well of width $$. The wave function of the particle at $ = 0$ is $$ \psi (x,0)=Ax^2(x^2-L^2), \quad 0\leq x \leq L$$
a.) What is  $\psi(x,t)$ for $ t \geq 0 $?
b.) At some time $t >0$, what is the probability of measuring the particle to have energy $16\pi ^2\hbar ^2/(2mL^2)$? Does it depend on time?
c.) Calculate the expectation value of the position.
So for a the first thing I did was to find the normalization constant $A$ using the normalization condition $$ \langle\psi (x,0)|\psi (x,0)\rangle = \int_{-\infty}^{\infty} \psi^*(x,0) \psi (x,0)dx =1 $$
 which after evaluating gives me $$ A= \sqrt{\frac{105}{8L^7}}$$
then I find the expansion coefficients $$ C_n = \langle E_n|\psi (x,0)\rangle = \int_{-\infty}^{\infty} \varphi_n^*(x)\psi (x,0)dx $$ for which i got $$ C_n = \frac{3\sqrt{105}}{n^3\pi ^3}(-1)^n $$ now the time dependent wave function can be written down as $$ \psi (x,t) = \sum_n \frac{3\sqrt{105}}{n^3\pi ^3}(-1)^n exp({-\frac{in^2\pi ^2\hbar t}{2mL^2}}) \sqrt{\frac{2}{L}}sin(\frac{n\pi x}{L}) $$
I also did part b.) and got some really small probability that didnt depend on time. The part im confused about is part c.), I dont know what to do with the summations when you square the wave function in $$ \langle x \rangle = \int_{-\infty}^{\infty} x |\psi (x,t)|^2 dx $$
 A: We can factor out the summation operators in the following way:
$$\int_{-\infty}^{\infty} x \left|\sum_n f_n(x,t)\right|^2dx = \int_{-\infty}^{\infty} x \left(\sum_n f^*_n(x,t)\right)\left(\sum_m f_m(x,t)\right)dx$$
$$ = \int_{-\infty}^{\infty} x \sum_n \sum_m f^*_n(x,t) f_m(x,t)dx$$ 
Then, Fubini's theorem allows us to exchange summation and integration operators:
$$  = \sum_n \sum_m \int_{-\infty}^{\infty} x f^*_n(x,t) f_m(x,t)dx  $$
The calculation is not too difficult from here.
A: If you are looking for $\langle x\rangle$ at $t=0$:
$$
\langle x\rangle = \int_0^L dx x \psi(x,0)\psi^*(x,0) \tag{1}
$$
by definition.  No need to do any expansion in this case.  Using (1) directly with $\psi(x,0)$ is obviously much simpler that expanding in eigenstates.  
Otherwise you have to proceed as you have done.  It’s not clear there is a shortcut since $\psi(x,t)\psi^*(x,t)$ is explicitly time dependent and has no obvious symmetries for $t\ne 0$.  Integration of the type 
$$
\int_0^L x\sin(k_n x)\sin(k_mx)
$$
will be non-zero in general so you will have lots fo terms of the type 
$$
\sum_{m,n} c_m c_n e^{-iE_nt/\hbar} e^{iE_mt/\hbar} \int_0^L dx\,x\sin(k_n x) \sin(k_m x)
$$
to resum, and I don’t think this is doable analytically (but someone else might be able to do it.)
