Deriving a QM expectation value for a square of momentum $\langle p^2 \rangle$ I already derived a QM expectation value for ordinary momentum which is:
$$
\langle p \rangle=  \int\limits_{-\infty}^{\infty} \overline{\Psi}  \left(- i\hbar\frac{d}{dx}\right) \Psi \, d x
$$
And I can read clearly that operator for momentum equals $\widehat{p}=- i\hbar\frac{d}{dx}$. Is there an easy way to derive an expectation value for $\langle p^2 \rangle$ and its QM operator $\widehat{p^2}$?
 A: Well, $\widehat{p^2} = \hat{p}^2= \hat{p} \hat{p}$.
So, in the position basis it is $-\hbar^2 \frac{d^2}{dx^2}$, and $\langle p^2 \rangle = \int_{-\infty}^\infty \bar{\Psi}\left(-\hbar^2 \frac{d^2}{dx^2} \right)\Psi dx$.
Note: $\hat{p}$ is technically not equal to $-i\hbar d/dx$, but rather in the position basis $\langle x | \hat{p}| x' \rangle = -i\hbar d/dx \delta(x-x')$.
A: The expectation value for some operator $A$ is given by
$$\langle A\rangle = \int \Psi^*A\Psi.$$ 
If we set $A=p$ then we get the expression you've written above. Now just set $A = p^2$ to get what you want.
A: Between any two vectors $| \psi_1 \rangle$, $| \psi_2 \rangle \in \mathcal H$ $$\langle \psi_1 | \hat p^2 | \psi_2 \rangle = \langle \psi_1 | \hat p | \psi_2' \rangle = \langle \hat p \psi_1 | \psi_2' \rangle = \langle \hat p  \psi_1 | \hat p \psi_2 \rangle.$$
In the first equality, $|\psi_2'\rangle = \hat p | \psi_2 \rangle \in \mathcal H$ by definition of a linear operator acting on a vector space. In the second, we used that $\hat p$ is hermitian. In particular, for an expectation, $$\langle \psi | \hat p^2 | \psi \rangle = \langle \hat p  \psi | \hat p \psi \rangle = \int_{\mathcal D} ( \hat p \psi)^* (\hat p \psi)\,\mathrm{d}x,$$ so one need only really compute $\hat p \psi(x)$.
