- Rewrite the integrand
We need to evaluate
∫tanx−25tanxdx.
Use tanx=cosxsinx:
tanx−25tanx=cosxsinx−25cosxsinx=sinx−2cosx5sinx.
So the integral becomes
I=∫sinx−2cosx5sinxdx.
- Match with the given form
We are told
I=x+aln∣sinx−2cosx∣+k.
Differentiate the right-hand side:
dxd(x+aln∣sinx−2cosx∣)=1+asinx−2cosxcosx+2sinx.
This must equal the integrand:
1+asinx−2cosxcosx+2sinx=sinx−2cosx5sinx.
- Combine into a single fraction
Write 1 over the same denominator:
1=sinx−2cosxsinx−2cosx.
Hence
sinx−2cosxsinx−2cosx+a(cosx+2sinx)=sinx−2cosx5sinx.
So the numerators must be equal:
sinx−2cosx+acosx+2asinx=5sinx.
Group terms:
(1+2a)sinx+(−2+a)cosx=5sinx+0cosx.
- Compare coefficients
For sinx:
1+2a=5⟹2a=4⟹a=2.
For cosx:
−2+a=0⟹a=2.
Both agree.
- Final answer
a=2
So the correct option is D.