Step 1: the expansion of tanx. As x→0,
tanx=cosxsinx=1−2x2+o(x2)x−6x3+o(x3)=(x−6x3)(1+2x2)+o(x3)=x+3x3+o(x3).
Step 2: combine.
x21−tan2x1=x2tan2xtan2x−x2=x2tan2x(tanx−x)(tanx+x).
Step 3: orders of magnitude. From Step 1:
- tanx−x=3x3+o(x3),
- tanx+x=2x+o(x),
- x2tan2x=x4+o(x4).
So the numerator is 32x4+o(x4) and the quotient is
x4+o(x4)32x4+o(x4)⟶32.
Remark. The naive attempt "tanx≈x, so the difference is 0" gives the wrong answer: the information is hidden in the x3 term of tanx.