∫dx2+tanx
Let u=tanx⇒du=sec2xdx
⇒du=(1+tan2x)dx
⇒du=(1+u2)dx
⇒du(1+u2)=dx
Now, ∫dx2+tanx=∫du(1+u2)(2+u)
Consider 1(1+u2)(2+u)=A2+u+Bu+c1+u2 by the method of partial fractions
⇒1=A(1+u2)+(Bu+c)(2+u)
Put u=−2
⇒1=A(1+4)
⇒5A=1
∴A=15
Put u=0
⇒1=A+2C
⇒2C=1−A=1−15=5−15=45 since A=15
∴C=25
Put u=1
⇒1=2A+3B+3C
⇒1=2×15+3B+3×25
⇒1=3B+85
⇒3B=1−85=5−85=−35
∴B=−15
Hence the equation 1(1+u2)(2+u)=A2+u+Bu+c1+u2 becomes
1(1+u2)(2+u)=15(2+u)+−35u+251+u2
Integrating both sides, we get
∫du(1+u2)(2+u)=∫du5(2+u)+∫(−35u+25)du1+u2
=15∫duu+2−15[−32∫2udu1+u2+2∫du1+u2]
=15log|u+2|+310log∣∣1+u2∣∣+25tan−1u+c
=15log|tanx+2|+310log∣∣1+tan2x∣∣+25tan−1(tanx)+c