Porisma

Worked solution

Integrate a polynomial times sine twice by parts

Find ∫0πx2sin⁡(nx) dx\displaystyle\int_0^\pi x^2\sin(nx)\,dx, where nn is an even integer. Leave the answer in the form kπ2/nk\pi^2/n and determine kk. marks

[2018/IJC/I/2]

CJC · Review problems · Question 4

Answer

−π2/n-\pi^2/n, k=−1k=-1 for nonzero even nn; the separate n=0n=0 integral is 00.

Use two integrations by parts

For n≠0n\ne0,

I=[−x2cos⁡nxn]0π+2n∫0πxcos⁡nx dx.\begin{aligned}&I\\ & =\left[-\frac{x^2\cos nx}{n}\right]_0^\pi\\ &{}+\frac2n\int_0^\pi x\cos nx\,dx.\end{aligned}

The remaining integral is [xsin⁡(nx)/n]0π−1n∫0πsin⁡nx dx[x\sin(nx)/n]_0^\pi-\tfrac1n\int_0^\pi\sin nx\,dx. Therefore I=−π2cos⁡(nπ)/n+2πsin⁡(nπ)/n2+2[cos⁡(nπ)−1]/n3I=-\pi^2\cos(n\pi)/n+2\pi\sin(n\pi)/n^2+2[\cos(n\pi)-1]/n^3.

How did this part go?

Apply the even-integer identities and qualify zero

For a nonzero even integer, cos⁡(nπ)=1\cos(n\pi)=1 and sin⁡(nπ)=0\sin(n\pi)=0, giving I=−π2/nI=-\pi^2/n, so k=−1k=-1. The printed statement does not exclude the even integer n=0n=0: its integral is 00, but the requested quotient is undefined there. The displayed quotient answer assumes n≠0n\ne0.

How did this part go?

Common mistakes

The requested expression divides by n, so the zero even integer needs separate treatment.

Read the hint