# Integral of dx/a+b*tan^2 x =?

Mar 19, 2018

$\frac{1}{\left(\frac{a}{b} - 1\right) b} \left(x + \sqrt{\frac{b}{a}} \arctan \left(\tan x \sqrt{\frac{b}{a}}\right)\right) + C$

#### Explanation:

$\int \left(\frac{1}{a + b {\tan}^{2} x}\right) \mathrm{dx}$
put $\tan x = t$ $\implies {\sec}^{2} x \mathrm{dx} = \mathrm{dt}$ ${\sec}^{2} x = {\tan}^{2} x + 1$
$\implies {\sec}^{2} x = {t}^{2} + 1$
$\implies \mathrm{dx} = \frac{\mathrm{dt}}{{t}^{2} + 1}$
$\int \left(\frac{1}{a + b {t}^{2}}\right) \frac{\mathrm{dt}}{{t}^{2} + 1}$
$\int \left(\frac{1}{b \left(\frac{a}{b} + {t}^{2}\right)}\right) \frac{\mathrm{dt}}{{t}^{2} + 1}$
multiply numerator and denominator with $\frac{a}{b} - 1$ we get
int((a/b-1)/((a/b-1)(b(a/b+t^2)))dt/(t^2+1)

add and subtract ${t}^{2}$ in numerator we get
int((t^2+a/b-1-t^2)/((a/b-1)(b(a/b+t^2)))dt/(t^2+1)
$\frac{1}{\left(\frac{a}{b} - 1\right) b} \int \left(\frac{{t}^{2} + \frac{a}{b} - 1 - {t}^{2}}{\left(\frac{a}{b} + {t}^{2}\right) \left({t}^{2} + 1\right)}\right) \mathrm{dt}$
1/((a/b-1)b)int((-1)/((a/b+t^2))+1/(t^2+1)))dt
1/((a/b-1)b)(arctan(t)+sqrt(b/a)arctan(tsqrt(b/a)) + C
substituting $t = \tan x$
1/((a/b-1)b)(arctan(tanx)+sqrt(b/a)arctan(tanxsqrt(b/a)) + C
$\arctan \left(\tan x\right) = x$
$\frac{1}{\left(\frac{a}{b} - 1\right) b} \left(x + \sqrt{\frac{b}{a}} \arctan \left(\tan x \sqrt{\frac{b}{a}}\right)\right) + C$