Value of momentum of a particle in 1D box prepared in a particular state? What is the value of momentum of particle in 1D box in state $\sin(10\pi x/a)$?
My understanding
Standing waves representing particle in 1D box is not an momentum eigenstate so if we measure the momentum of particle in this state we may get any value of momentum which gives a distribution whose expectation value tends to zero.
Answer key
In the answer key it's given that the value of momentum is 5h/a and -5h/a.If we measure the momentum for this state we may get any of these two values.But is this a wrong reasoning because if these was the case,these should mean that 5h/a and -5h/a are the eigenvalue of the following wavefunction which is clearly not.
What is the correct answer?
 A: Very good question! There are parts of your analysis which are correct: a stationary state for a particle in a box is indeed not a state of definite momentum, and therefore one cannot speak of the momentum of such a state. However, one can speak of the possible values of momentum one could obtain, even if such a measurement were made on a state which isn't a state of definite momentum. This is what the question is asking. You are also correct about the expectation value of the momentum: it will be zero. This is a general result for any real wavefunction. However, even if the possible momenta allowed are $+p_0$ and $-p_0$ with equal probability, the expectation value is clearly zero!
Let's see if I can motivate how the answer you were provided with was obtained. (There is, however, a subtlety here, which I will come back to in a bit.) Also as a side-node, I prefer to use $\hbar = h/2\pi$ instead of $h$, so my answers may look a little different from the answer key, but they are the same.
Essentially, the stationary state solution $\psi(x) = \sin(10\pi x/a)$ can be thought of as the superposition of two waves, one with momentum $10\pi\hbar/a$ and the other with momentum $-10\pi\hbar/a$ (just like standing waves on a string can be thought of as the superposition of two travelling waves, one moving right and the other moving left). Let's try to derive this explicitly by moving to the Momentum Space representation of the wavefunction. You should know that the position and momentum space wavefunctions are related by a Fourier transform: $$\varphi(p) = \frac{1}{\sqrt{2\pi\hbar}}\int_{-\infty}^\infty \text{d}x\,\,\psi(x) e^{-i p x/\hbar},$$ and if you plug in the wavefunction above, you can easily see that the solution is: $$\varphi(p) \propto \delta\left(p - \frac{10\pi \hbar}{a}\right) + \delta \left(p + \frac{10\pi \hbar}{a}\right).$$
In other words, the momentum space wavefunction is a sum of two "Dirac Delta functions": two sharp "spikes" at $\pm p_0 = \pm 10\pi \hbar /a = \pm 5 h /a$. This means that if the momentum of this state were measured, the only values that have a non-zero probability of being detected are $\pm 5h/a$.
You can easily show the above relation by using the definition of the $\delta-$function: $$\delta(p-p_0) = \frac{1}{\sqrt{2\pi \hbar}} \int_{-\infty}^\infty\text{d}x\,\, e^{-i (p-p_0) x/\hbar}.$$
(In fact, you don't even have to work this out explicitly: you could just write out the wavefunction as a sum of two complex exponentials, and this should immediately be clear.)
So, to summarise the above analysis: you don't need to be in a state of definite momentum in order to know which values of momentum will be measured. In the above case, the wavefunction is not a state of definite momentum, however we can say for certainty that the result of a momentum measurement will either be $+p_0$ or $-p_0$, with equal probability.
Right, so that's the justification for the "solution" that you've been provided. The only problem is that this analysis is wrong (or at least not strictly correct) for a particle in a box! In the above analysis, we have assumed (as most people do) that $\psi(x) = \sqrt{2/a} \sin(n \pi x/a)$. However, this is incomplete. The actual wavefunction is: $$\psi(x) = \begin{cases}\sqrt{\frac{2}{a}} \sin(n \pi x/a) \quad \quad &0<x<a,\\ 0 & \text{otherwise.} \end{cases}$$
Plugging this function into the Fourier Transform formula, we get something a little more complicated (note the different limits):
\begin{aligned}\varphi(p) = \sqrt{\frac{2}{a}}\int_{0}^a \sin(n \pi x/a) e^{ipx/\hbar} &= \sqrt{\frac{2}{a}}\frac{\pi  a n \hbar^2 \left((-1)^{n}e^{-i a p/\hbar}-1\right)}{a^2 p^2 - \pi ^2 n^2 \hbar^2}\\~\\ &= \sqrt{\frac{2}{a}}\frac{p_0 \hbar}{p^2 - p_0^2} \left((-1)^n e^{-iap/\hbar}-1 \right), \end{aligned}
where I've defined $p_0 = n\pi \hbar/a$. This no longer represents two infinitely sharp spikes in momentum space. If I set $n=10$ (as in your question), and choose $a=1=\hbar$, the probability distribution $|\varphi(p)|^2$ looks like: 
As you can see, there are indeed two spikes, each centred at $\pm p_0 = \pm 10 \pi$ respectively, however unlike our earlier analysis, these spikes have some width, and there is also a small (but non-zero) probability that the particle may be measured having other momenta, as can be seen by the little "bumps" in the probability distribution.
So why does the first analysis work? Well, that analysis assumes the wavefunction to be a sine over all space, and therefore can be written as the superposition of two complex exponentials (i.e., two "plane waves") with equal and opposite momenta. This could be an acceptable wavefunction for a free particle, for example. However, the minute we confine the particle to a box, we require the wavefunction to be zero outside the box, and achieving this requires many more plane waves of different momenta. Of course, the momenta that contribute the most are still the ones you'd naively assume, but there are important contributions from nearby values as well.
A: Measuring the energy is not the same as measuring the momentum. The best you can do is infer a momentum value from the energy as a classical calculation ($p=\sqrt{2mE}$), but that is not the measurement. Measuring the momentum of a particle in an energy eigenstate will disturb the state. The matrix element
$$\langle\psi_{10}|p|\psi_{10}\rangle = 0.$$
(Aside: a matrix element of the momentum operator for your infinite square well is simply $\int_0^a \psi_f^*p\psi_i~\mathrm{d}x.$
On the other hand, the adjacent state matrix elements are not zero.  These elements show the probability that a measurement of momentum will shift the initial state to that final state is not zero:
$$\langle\psi_{9}|p|\psi_{10}\rangle = -i\hbar\frac{360}{19a}$$
$$\langle\psi_{11}|p|\psi_{10}\rangle = i\hbar\frac{440}{21a}$$
This means that there is a probability that measuring the momentum of a particle in the n=10 energy eigenstate could cause the system to change to the n=9 or n=11 state. Other non-zero probabilities are to $\Delta n=\pm 3, \pm 5,$etc. Changes of $\Delta n=\pm 2, \pm 4$, etc yield zero probabilities.
So measuring the momentum (not the energy), there is no telling what you will get, not what the final state will be. If you do many measurements on states which are all the same energy eigenstate, the average of the values must be zero.
A: $-(h^2/2m)(d^2\psi/dx^2)$ should give you the energy of the particle for a particle in an infinite box of $1D$. The momentum operator, $-i\hbar(d\psi/dx)$ should give you the momentum,
