Solution:
Key idea: A power of x (or θ) times a trigonometric function is integrated by parts, ∫abudv=[uv]ab−∫abvdu, taking the power as u so that it becomes simpler each time it is differentiated.
Step 1 — Part (i): first integration by parts.
We take u=x2 and dv=sinxdx, so du=2xdx and v=−cosx.
∫0π/2x2sinxdx=[−x2cosx]0π/2+∫0π/22xcosxdx
Step 2 — Part (i): the boundary term.
At x=2π, cosx is 0, and at x=0 the factor x2 is 0. So the bracket is 0.
∫0π/2x2sinxdx=2∫0π/2xcosxdx
Step 3 — Part (i): second integration by parts.
We now take u=x and dv=cosxdx, so du=dx and v=sinx.
∫0π/2xcosxdx=[xsinx]0π/2−∫0π/2sinxdx
Step 4 — Part (i): evaluate both pieces.
The bracket is 2π⋅1−0, and the remaining integral is [−cosx]0π/2, whose value is 0+1.
∫0π/2xcosxdx=2π−1
Step 5 — Part (i): combine.
We multiply by the factor 2 from Step 2.
∫0π/2x2sinxdx=2(2π−1)=π−2
Step 6 — Part (ii): choose the parts.
We call the integral I and take u=θ, dv=sin2θcosθdθ. Since dθd(3sin3θ)=sin2θcosθ, we get v=3sin3θ.
I=[3θsin3θ]0π−31∫0πsin3θdθ
Step 7 — Part (ii): the boundary term.
Both sinπ and sin0 are 0, so the bracket is 0.
I=−31∫0πsin3θdθ
Step 8 — Part (ii): substitute in ∫0πsin3θdθ.
We write sin3θ=(1−cos2θ)sinθ and put t=cosθ, so dt=−sinθdθ. When θ=0, t=1; when θ=π, t=−1. The minus sign in dt is used to swap the limits.
∫0πsin3θdθ=∫1−1(1−t2)(−dt)=∫−11(1−t2)dt
Step 9 — Part (ii): integrate.
An antiderivative of 1−t2 is t−3t3.
∫−11(1−t2)dt=[t−3t3]−11=32−(−32)=34
Step 10 — Part (ii): combine.
We put this value into Step 7.
I=−31⋅34=−94
The answer is negative because cosθ<0 on (2π,π), where the factor θ is larger, so the negative part outweighs the positive part.
Therefore, (i) π−2; (ii) −94.