# integration by parts question

$\frac {2}{L}(-i\hbar)\int_{0}^{n\pi}\sin(u)\cos(u) \, du$

I tried to solve this using integration by parts

and I got

$\frac {2}{L}(-i\hbar)(\sin^2 u +\cos u)|_{0}^{n\pi}$.

But the answer is zero, and according to the above equation, it is zero or some number.

What did I do wrong here?

($n$ is constant positive integer, but not defined.)

-
You might want to show how you got where you did if you want to see where you went wrong. By the looks of things, though, integration by parts isn't going to yield anything useful. – Mike Aug 3 '12 at 7:23

Just make a substitution $\sin u \cos u = \frac12 \sin 2u$ so that your integral is $$\frac1L(-\mathrm i\hbar)\int_0^{2n\pi}\sin t\mathrm dt$$ which is clearly zero due to the $2\pi$-periodicity of $\sin t$.

-

Notice that $(sin^2u)'=2\sin u \cos u$, therefore

$$\frac{2}{L}(-i\hbar)\int_0^{n\pi}\sin u\cos u du=\frac{-i\hbar}{L}\sin^2u|_0^{n\pi}=0.$$

-

You have $\sin x \cos y = \frac{1}{2} ( \sin (x-y) + \sin( x+y) )$, so the integral becomes $\int_0^{n \pi} \sin 2 u \, du$ which is zero since you are integrating over a multiple of the period.

-

Integration by parts should have worked too. If you want to see your mistake, here is how to do it your way :

Let $v=\sin{u} \Rightarrow dv=\cos{u}\ du$,

and $dw=\cos{u}\ du \Rightarrow w=\sin{u}$.

Then, $$\int_0^{n\pi}\sin{u}\cos{u}\ du = \sin^2{u} \big|_0^{n\pi}-\int_0^{n\pi}\sin{u}\cos{u}\ du$$ $$\Rightarrow\int_0^{n\pi}\sin{u}\cos{u}\ du=\frac{1}{2}\sin^2{n\pi}=0$$

-