Energy and time evolution of a particle in a potential well I have a particle in an infinite square well (the box is from 0 to $a$), in the state described by the function 
$$\psi (x) = \begin{cases}
Ax(a-x) & \mathrm{for }\;\;\;\;0<x<a,\qquad \\ 0 \qquad  &\text{otherwise}.
\end{cases}$$
I have to determine the most likely value of energy and the probability to obtain a value of $E = \frac{9\hbar^2 {\pi}^2}{2ma^2} $.
To solve the second question I thought that $E$ iss the classic solution for energy in a potential well with $n=3$. So I can calculate $\langle3| \psi\rangle$ $-$ in which $3$ is the solution wave function with $n=3$ $-$ and that is it? Right?
But what about first question?
Do I have to calculate $\langle H \rangle$ and compare it with a solution of the potential well?
I also have to determine the evolution of the wave function for $t>0$ when at $t=0$ we turn off the potential well, any hints?
 A: First normalize the state to find $A$.
Then you need to express the state as a superposition of the stationary states of the infinite square well:
$$
\psi\left(x\right) = A x \left(a-x\right) = \sum_{n=1}^\infty c_n \psi_n\left(x\right),
$$
where $\psi_n\left(x\right) = \sqrt{2/a} \sin\left(n \pi x / a\right)$ is the $n$-th stationary state. You can do this using the orthogonality of the stationary states,
$$
\int_0^a dx \ \psi^*_m\left(x\right) \psi_n\left(x\right) = \frac{2}{a} \int_0^a  dx \ \sin\left(\frac{m \pi x}{ a}\right)  \sin\left(\frac{n \pi x}{  a}\right) = \delta_{mn},
$$
by integrating the equation above:
$$
\begin{align}
\int_0^a dx \ \psi^*_m\left(x\right) \left[A x \left(a-x\right)\right] &= \int_0^a dx \ \psi^*_m\left(x\right) \left[ \sum_{n=1}^\infty c_n \psi_n\left(x\right) \right] \\
&= \sum_{n=1}^\infty c_n \left[ \int_0^a dx \ \psi^*_m\left(x\right)\psi_n\left(x\right) \right]\\
&= \sum_{n=1}^\infty c_n \delta_{m n} \\
&= c_m
\end{align}
$$
I'll leave the $c_n = A \sqrt{2/a} \int_0^a dx \ \sin\left(n \pi x / a\right) x \left(a-x\right)$ integral for you to work out.
Once you have the $c_n$'s, the most likely value of a measurement of the energy is the energy corresponding to the stationary state with maximum $c_n$.
To find the probability of measuring $9 \hbar^2 \pi^2 / 2 m a^2$ for the energy, determine the stationary state that this energy corresponds to, and compute $\left|c_n\right|^2$.
For the time evolution, since the potential is $0$ everywhere after $t=0$, it is a free particle, and the general solution is:
$$
\Psi\left(x,t\right) = \frac{1}{\sqrt{2 \pi}} \int_{-\infty}^\infty dk \ \phi\left(k\right) \exp\left[i\left(k x + \frac{\hbar k^2}{2 m} t\right)\right],
$$
where
$$
\phi\left(k\right) = \frac{1}{\sqrt{2 \pi}} \int_0^a dx \ \Psi\left(x,0\right) \exp\left(-i k x\right)  = \frac{A}{\sqrt{2 \pi}} \int_0^a dx \ x\left(a-x\right) \exp\left(-i k x\right) .
$$
So, now you just have to do this integral.
