Solution:
Key idea: We put x=2π∓h, so that sinx becomes cosh. Then we use the identity 1−cosh=2sin22h, the factorisation 1−c3=(1−c)(1+c+c2) and the standard limit θ→0limθsinθ=1.
Step 1 — Rewrite the left piece near π/2.
We put x=2π−h, so sinx=cosh and cosx=sinh. We also factorise sin2h as a difference of squares.
sin2h=1−cos2h=(1−cosh)(1+cosh)
LHL=h→0lim3sin2h1−cos3h=h→0lim3(1−cosh)(1+cosh)(1−cosh)(1+cosh+cos2h)
Step 2 — Cancel and find the left-hand limit.
The factor 1−cosh is not zero for small h=0, so we cancel it and then let h→0, where cosh→1.
LHL=h→0lim3(1+cosh)1+cosh+cos2h=3(1+1)1+1+1=21
Step 3 — Rewrite the right piece near π/2.
We put x=2π+h, so sinx=cosh and π−2x=−2h.
(π−2x)2=4h2
Then we use the identity 1−cosh=2sin22h.
RHL=h→0lim4h2q(1−cosh)=h→0lim4h22qsin22h
Step 4 — Find the right-hand limit.
We write 4h2=16(2h)2 so that the standard limit appears.
RHL=162qh→0lim(2hsin2h)2=8q×1=8q
Step 5 — Use the conditions for continuity.
The value at the point is p, and continuity needs LHL, RHL and p to be equal, which gives two equations.
8q=21
q=4
p=21
Therefore, p=21 and q=4.