Integrand size = 23, antiderivative size = 66 \[ \int \frac {\sec ^2(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\frac {\arctan \left (\frac {\sqrt {b} \tan (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} \sqrt {b} d}+\frac {\tan (c+d x)}{2 a d \left (a+b \tan ^2(c+d x)\right )} \] Output:
1/2*arctan(b^(1/2)*tan(d*x+c)/a^(1/2))/a^(3/2)/b^(1/2)/d+1/2*tan(d*x+c)/a/ d/(a+b*tan(d*x+c)^2)
Time = 0.52 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.95 \[ \int \frac {\sec ^2(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\frac {\frac {\arctan \left (\frac {\sqrt {b} \tan (c+d x)}{\sqrt {a}}\right )}{\sqrt {b}}+\frac {\sqrt {a} \tan (c+d x)}{a+b \tan ^2(c+d x)}}{2 a^{3/2} d} \] Input:
Integrate[Sec[c + d*x]^2/(a + b*Tan[c + d*x]^2)^2,x]
Output:
(ArcTan[(Sqrt[b]*Tan[c + d*x])/Sqrt[a]]/Sqrt[b] + (Sqrt[a]*Tan[c + d*x])/( a + b*Tan[c + d*x]^2))/(2*a^(3/2)*d)
Time = 0.24 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.97, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 4158, 215, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^2(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sec (c+d x)^2}{\left (a+b \tan (c+d x)^2\right )^2}dx\) |
\(\Big \downarrow \) 4158 |
\(\displaystyle \frac {\int \frac {1}{\left (b \tan ^2(c+d x)+a\right )^2}d\tan (c+d x)}{d}\) |
\(\Big \downarrow \) 215 |
\(\displaystyle \frac {\frac {\int \frac {1}{b \tan ^2(c+d x)+a}d\tan (c+d x)}{2 a}+\frac {\tan (c+d x)}{2 a \left (a+b \tan ^2(c+d x)\right )}}{d}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {\frac {\arctan \left (\frac {\sqrt {b} \tan (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} \sqrt {b}}+\frac {\tan (c+d x)}{2 a \left (a+b \tan ^2(c+d x)\right )}}{d}\) |
Input:
Int[Sec[c + d*x]^2/(a + b*Tan[c + d*x]^2)^2,x]
Output:
(ArcTan[(Sqrt[b]*Tan[c + d*x])/Sqrt[a]]/(2*a^(3/2)*Sqrt[b]) + Tan[c + d*x] /(2*a*(a + b*Tan[c + d*x]^2)))/d
Int[((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(-x)*((a + b*x^2)^(p + 1) /(2*a*(p + 1))), x] + Simp[(2*p + 3)/(2*a*(p + 1)) Int[(a + b*x^2)^(p + 1 ), x], x] /; FreeQ[{a, b}, x] && LtQ[p, -1] && (IntegerQ[4*p] || IntegerQ[6 *p])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_ )])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Sim p[ff/(c^(m - 1)*f) Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)^n)^ p, x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && I ntegerQ[m/2] && (IntegersQ[n, p] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])
Time = 4.65 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.83
method | result | size |
derivativedivides | \(\frac {\frac {\tan \left (d x +c \right )}{2 a \left (a +b \tan \left (d x +c \right )^{2}\right )}+\frac {\arctan \left (\frac {b \tan \left (d x +c \right )}{\sqrt {a b}}\right )}{2 a \sqrt {a b}}}{d}\) | \(55\) |
default | \(\frac {\frac {\tan \left (d x +c \right )}{2 a \left (a +b \tan \left (d x +c \right )^{2}\right )}+\frac {\arctan \left (\frac {b \tan \left (d x +c \right )}{\sqrt {a b}}\right )}{2 a \sqrt {a b}}}{d}\) | \(55\) |
risch | \(\frac {i \left (a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{2 i \left (d x +c \right )}+a -b \right )}{a \left (a -b \right ) d \left (a \,{\mathrm e}^{4 i \left (d x +c \right )}-b \,{\mathrm e}^{4 i \left (d x +c \right )}+2 a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{2 i \left (d x +c \right )}+a -b \right )}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a b +\sqrt {-a b}\, a +\sqrt {-a b}\, b}{\left (a -b \right ) \sqrt {-a b}}\right )}{4 \sqrt {-a b}\, d a}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i a b -\sqrt {-a b}\, a -\sqrt {-a b}\, b}{\left (a -b \right ) \sqrt {-a b}}\right )}{4 \sqrt {-a b}\, d a}\) | \(224\) |
Input:
int(sec(d*x+c)^2/(a+b*tan(d*x+c)^2)^2,x,method=_RETURNVERBOSE)
Output:
1/d*(1/2*tan(d*x+c)/a/(a+b*tan(d*x+c)^2)+1/2/a/(a*b)^(1/2)*arctan(b*tan(d* x+c)/(a*b)^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 123 vs. \(2 (54) = 108\).
Time = 0.12 (sec) , antiderivative size = 327, normalized size of antiderivative = 4.95 \[ \int \frac {\sec ^2(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\left [\frac {4 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) - {\left ({\left (a - b\right )} \cos \left (d x + c\right )^{2} + b\right )} \sqrt {-a b} \log \left (\frac {{\left (a^{2} + 6 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (3 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + 4 \, {\left ({\left (a + b\right )} \cos \left (d x + c\right )^{3} - b \cos \left (d x + c\right )\right )} \sqrt {-a b} \sin \left (d x + c\right ) + b^{2}}{{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} + 2 \, {\left (a b - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}}\right )}{8 \, {\left (a^{2} b^{2} d + {\left (a^{3} b - a^{2} b^{2}\right )} d \cos \left (d x + c\right )^{2}\right )}}, \frac {2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) - {\left ({\left (a - b\right )} \cos \left (d x + c\right )^{2} + b\right )} \sqrt {a b} \arctan \left (\frac {{\left ({\left (a + b\right )} \cos \left (d x + c\right )^{2} - b\right )} \sqrt {a b}}{2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right )}\right )}{4 \, {\left (a^{2} b^{2} d + {\left (a^{3} b - a^{2} b^{2}\right )} d \cos \left (d x + c\right )^{2}\right )}}\right ] \] Input:
integrate(sec(d*x+c)^2/(a+b*tan(d*x+c)^2)^2,x, algorithm="fricas")
Output:
[1/8*(4*a*b*cos(d*x + c)*sin(d*x + c) - ((a - b)*cos(d*x + c)^2 + b)*sqrt( -a*b)*log(((a^2 + 6*a*b + b^2)*cos(d*x + c)^4 - 2*(3*a*b + b^2)*cos(d*x + c)^2 + 4*((a + b)*cos(d*x + c)^3 - b*cos(d*x + c))*sqrt(-a*b)*sin(d*x + c) + b^2)/((a^2 - 2*a*b + b^2)*cos(d*x + c)^4 + 2*(a*b - b^2)*cos(d*x + c)^2 + b^2)))/(a^2*b^2*d + (a^3*b - a^2*b^2)*d*cos(d*x + c)^2), 1/4*(2*a*b*cos (d*x + c)*sin(d*x + c) - ((a - b)*cos(d*x + c)^2 + b)*sqrt(a*b)*arctan(1/2 *((a + b)*cos(d*x + c)^2 - b)*sqrt(a*b)/(a*b*cos(d*x + c)*sin(d*x + c))))/ (a^2*b^2*d + (a^3*b - a^2*b^2)*d*cos(d*x + c)^2)]
\[ \int \frac {\sec ^2(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\int \frac {\sec ^{2}{\left (c + d x \right )}}{\left (a + b \tan ^{2}{\left (c + d x \right )}\right )^{2}}\, dx \] Input:
integrate(sec(d*x+c)**2/(a+b*tan(d*x+c)**2)**2,x)
Output:
Integral(sec(c + d*x)**2/(a + b*tan(c + d*x)**2)**2, x)
Time = 0.11 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.80 \[ \int \frac {\sec ^2(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\frac {\frac {\tan \left (d x + c\right )}{a b \tan \left (d x + c\right )^{2} + a^{2}} + \frac {\arctan \left (\frac {b \tan \left (d x + c\right )}{\sqrt {a b}}\right )}{\sqrt {a b} a}}{2 \, d} \] Input:
integrate(sec(d*x+c)^2/(a+b*tan(d*x+c)^2)^2,x, algorithm="maxima")
Output:
1/2*(tan(d*x + c)/(a*b*tan(d*x + c)^2 + a^2) + arctan(b*tan(d*x + c)/sqrt( a*b))/(sqrt(a*b)*a))/d
Time = 0.74 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.85 \[ \int \frac {\sec ^2(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\frac {\arctan \left (\frac {b \tan \left (d x + c\right )}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a d} + \frac {\tan \left (d x + c\right )}{2 \, {\left (b \tan \left (d x + c\right )^{2} + a\right )} a d} \] Input:
integrate(sec(d*x+c)^2/(a+b*tan(d*x+c)^2)^2,x, algorithm="giac")
Output:
1/2*arctan(b*tan(d*x + c)/sqrt(a*b))/(sqrt(a*b)*a*d) + 1/2*tan(d*x + c)/(( b*tan(d*x + c)^2 + a)*a*d)
Time = 8.03 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.82 \[ \int \frac {\sec ^2(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\frac {\mathrm {tan}\left (c+d\,x\right )}{2\,a\,d\,\left (b\,{\mathrm {tan}\left (c+d\,x\right )}^2+a\right )}+\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,\mathrm {tan}\left (c+d\,x\right )}{\sqrt {a}}\right )}{2\,a^{3/2}\,\sqrt {b}\,d} \] Input:
int(1/(cos(c + d*x)^2*(a + b*tan(c + d*x)^2)^2),x)
Output:
tan(c + d*x)/(2*a*d*(a + b*tan(c + d*x)^2)) + atan((b^(1/2)*tan(c + d*x))/ a^(1/2))/(2*a^(3/2)*b^(1/2)*d)
Time = 0.25 (sec) , antiderivative size = 279, normalized size of antiderivative = 4.23 \[ \int \frac {\sec ^2(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\frac {-\sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {\sqrt {a -b}-\sqrt {a}\, \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {b}}\right ) \sin \left (d x +c \right )^{2} a +\sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {\sqrt {a -b}-\sqrt {a}\, \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {b}}\right ) \sin \left (d x +c \right )^{2} b +\sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {\sqrt {a -b}-\sqrt {a}\, \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {b}}\right ) a +\sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {\sqrt {a -b}+\sqrt {a}\, \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {b}}\right ) \sin \left (d x +c \right )^{2} a -\sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {\sqrt {a -b}+\sqrt {a}\, \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {b}}\right ) \sin \left (d x +c \right )^{2} b -\sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {\sqrt {a -b}+\sqrt {a}\, \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {b}}\right ) a -\cos \left (d x +c \right ) \sin \left (d x +c \right ) a b}{2 a^{2} b d \left (\sin \left (d x +c \right )^{2} a -\sin \left (d x +c \right )^{2} b -a \right )} \] Input:
int(sec(d*x+c)^2/(a+b*tan(d*x+c)^2)^2,x)
Output:
( - sqrt(b)*sqrt(a)*atan((sqrt(a - b) - sqrt(a)*tan((c + d*x)/2))/sqrt(b)) *sin(c + d*x)**2*a + sqrt(b)*sqrt(a)*atan((sqrt(a - b) - sqrt(a)*tan((c + d*x)/2))/sqrt(b))*sin(c + d*x)**2*b + sqrt(b)*sqrt(a)*atan((sqrt(a - b) - sqrt(a)*tan((c + d*x)/2))/sqrt(b))*a + sqrt(b)*sqrt(a)*atan((sqrt(a - b) + sqrt(a)*tan((c + d*x)/2))/sqrt(b))*sin(c + d*x)**2*a - sqrt(b)*sqrt(a)*at an((sqrt(a - b) + sqrt(a)*tan((c + d*x)/2))/sqrt(b))*sin(c + d*x)**2*b - s qrt(b)*sqrt(a)*atan((sqrt(a - b) + sqrt(a)*tan((c + d*x)/2))/sqrt(b))*a - cos(c + d*x)*sin(c + d*x)*a*b)/(2*a**2*b*d*(sin(c + d*x)**2*a - sin(c + d* x)**2*b - a))