Suppose we have been provided the form of some wavefunction on a graph, but not the exact mathematical expression of the wavefunction $\langle x|\psi\rangle $. Now I'm asked to find the average kinetic energy or the expectation value of the momentum by analyzing nothing except the figure that is given to me. How do I approach problems like this in general.
For example, suppose we have a symmetric wavefunction like this :
We have to find the expectation value of Kinetic energy, or rather the average kinetic energy.
Now my guess is that, since the wavefunction is a constant between $-a$ to $a$ , the first derivative there will be zero and between $[-(a+b),-a]$ and $[(a+b),a]$, it's $\psi(x)=mx$. Hence the second derivative must vanish as well, the kinetic energy which has the double derivative of the wavefunction inside the integral must therefore be zero. But I feel like I am missing something.
The given answer is $$T=\frac{3\hbar^2}{2mb(3a+b)}.$$
Any help on how to approach this problem would be highly appreciated.