Yes! That's the amazing thing about it! Take the particle in a box, or infinite square well, with
V=0,~~0<x<a; V= \infty,~~x<0,~x>a
Now plug
\psi(x)= \sin\bigg(\frac{ \pi x}{a}\bigg)
into both methods. With straight-forward way, you'd get
-\hbar^2 \int^a_0 dx\, \sin\bigg(\frac{ \pi...