\(\int \frac {\tan ^2(c+d x)}{(a+a \sec (c+d x))^{3/2}} \, dx\) [191]

Optimal result
Mathematica [A] (warning: unable to verify)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [F]
Maxima [F]
Giac [A] (verification not implemented)
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 23, antiderivative size = 85 \[ \int \frac {\tan ^2(c+d x)}{(a+a \sec (c+d x))^{3/2}} \, dx=-\frac {2 \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{a^{3/2} d}+\frac {2 \sqrt {2} \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{a^{3/2} d} \] Output:

-2*arctan(a^(1/2)*tan(d*x+c)/(a+a*sec(d*x+c))^(1/2))/a^(3/2)/d+2*2^(1/2)*a 
rctan(1/2*a^(1/2)*tan(d*x+c)*2^(1/2)/(a+a*sec(d*x+c))^(1/2))/a^(3/2)/d
 

Mathematica [A] (warning: unable to verify)

Time = 0.61 (sec) , antiderivative size = 132, normalized size of antiderivative = 1.55 \[ \int \frac {\tan ^2(c+d x)}{(a+a \sec (c+d x))^{3/2}} \, dx=\frac {4 \left (2 \arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right )-\sqrt {2} \arctan \left (\frac {\tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {\frac {\cos (c+d x)}{1+\cos (c+d x)}}}\right )\right ) \sqrt {\frac {\cos (c+d x)}{1+\cos (c+d x)}} \sec ^{\frac {3}{2}}(c+d x) \sqrt {1+\sec (c+d x)}}{d \sec ^2\left (\frac {1}{2} (c+d x)\right )^{3/2} (a (1+\sec (c+d x)))^{3/2}} \] Input:

Integrate[Tan[c + d*x]^2/(a + a*Sec[c + d*x])^(3/2),x]
 

Output:

(4*(2*ArcSin[Tan[(c + d*x)/2]] - Sqrt[2]*ArcTan[Tan[(c + d*x)/2]/Sqrt[Cos[ 
c + d*x]/(1 + Cos[c + d*x])]])*Sqrt[Cos[c + d*x]/(1 + Cos[c + d*x])]*Sec[c 
 + d*x]^(3/2)*Sqrt[1 + Sec[c + d*x]])/(d*(Sec[(c + d*x)/2]^2)^(3/2)*(a*(1 
+ Sec[c + d*x]))^(3/2))
 

Rubi [A] (verified)

Time = 0.27 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.98, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 4375, 383, 216}

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 {\tan ^2(c+d x)}{(a \sec (c+d x)+a)^{3/2}} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\cot \left (c+d x+\frac {\pi }{2}\right )^2}{\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^{3/2}}dx\)

\(\Big \downarrow \) 4375

\(\displaystyle -\frac {2 \int \frac {\tan ^2(c+d x)}{(\sec (c+d x) a+a) \left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right ) \left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2\right )}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )}{d}\)

\(\Big \downarrow \) 383

\(\displaystyle -\frac {2 \left (\frac {2 \int \frac {1}{\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )}{a}-\frac {\int \frac {1}{\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )}{a}\right )}{d}\)

\(\Big \downarrow \) 216

\(\displaystyle -\frac {2 \left (\frac {\arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{a^{3/2}}-\frac {\sqrt {2} \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{a^{3/2}}\right )}{d}\)

Input:

Int[Tan[c + d*x]^2/(a + a*Sec[c + d*x])^(3/2),x]
 

Output:

(-2*(ArcTan[(Sqrt[a]*Tan[c + d*x])/Sqrt[a + a*Sec[c + d*x]]]/a^(3/2) - (Sq 
rt[2]*ArcTan[(Sqrt[a]*Tan[c + d*x])/(Sqrt[2]*Sqrt[a + a*Sec[c + d*x]])])/a 
^(3/2)))/d
 

Defintions of rubi rules used

rule 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

rule 383
Int[((e_.)*(x_))^(m_.)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_Sym 
bol] :> Simp[(-a)*(e^2/(b*c - a*d))   Int[(e*x)^(m - 2)/(a + b*x^2), x], x] 
 + Simp[c*(e^2/(b*c - a*d))   Int[(e*x)^(m - 2)/(c + d*x^2), x], x] /; Free 
Q[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && LeQ[2, m, 3]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4375
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n 
_.), x_Symbol] :> Simp[-2*(a^(m/2 + n + 1/2)/d)   Subst[Int[x^m*((2 + a*x^2 
)^(m/2 + n - 1/2)/(1 + a*x^2)), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c + d*x] 
]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && I 
ntegerQ[n - 1/2]
 
Maple [A] (verified)

Time = 0.79 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.52

method result size
default \(\frac {\sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \left (-\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {2}\, \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{\sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}}\right )+2 \ln \left (\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )\right )}{d \,a^{2}}\) \(129\)

Input:

int(tan(d*x+c)^2/(a+a*sec(d*x+c))^(3/2),x,method=_RETURNVERBOSE)
 

Output:

1/d/a^2*(a*(1+sec(d*x+c)))^(1/2)*(-2*cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(-2^ 
(1/2)*arctanh(2^(1/2)/((1-cos(d*x+c))^2*csc(d*x+c)^2-1)^(1/2)*(csc(d*x+c)- 
cot(d*x+c)))+2*ln((-2*cos(d*x+c)/(1+cos(d*x+c)))^(1/2)-cot(d*x+c)+csc(d*x+ 
c)))
 

Fricas [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 295, normalized size of antiderivative = 3.47 \[ \int \frac {\tan ^2(c+d x)}{(a+a \sec (c+d x))^{3/2}} \, dx=\left [\frac {\sqrt {2} a \sqrt {-\frac {1}{a}} \log \left (-\frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 3 \, \cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) - \sqrt {-a} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right )}{a^{2} d}, -\frac {2 \, {\left (\sqrt {2} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) - \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right )\right )}}{a^{2} d}\right ] \] Input:

integrate(tan(d*x+c)^2/(a+a*sec(d*x+c))^(3/2),x, algorithm="fricas")
 

Output:

[(sqrt(2)*a*sqrt(-1/a)*log(-(2*sqrt(2)*sqrt((a*cos(d*x + c) + a)/cos(d*x + 
 c))*sqrt(-1/a)*cos(d*x + c)*sin(d*x + c) - 3*cos(d*x + c)^2 - 2*cos(d*x + 
 c) + 1)/(cos(d*x + c)^2 + 2*cos(d*x + c) + 1)) - sqrt(-a)*log((2*a*cos(d* 
x + c)^2 - 2*sqrt(-a)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c) 
*sin(d*x + c) + a*cos(d*x + c) - a)/(cos(d*x + c) + 1)))/(a^2*d), -2*(sqrt 
(2)*sqrt(a)*arctan(sqrt(2)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x 
 + c)/(sqrt(a)*sin(d*x + c))) - sqrt(a)*arctan(sqrt((a*cos(d*x + c) + a)/c 
os(d*x + c))*cos(d*x + c)/(sqrt(a)*sin(d*x + c))))/(a^2*d)]
 

Sympy [F]

\[ \int \frac {\tan ^2(c+d x)}{(a+a \sec (c+d x))^{3/2}} \, dx=\int \frac {\tan ^{2}{\left (c + d x \right )}}{\left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{\frac {3}{2}}}\, dx \] Input:

integrate(tan(d*x+c)**2/(a+a*sec(d*x+c))**(3/2),x)
 

Output:

Integral(tan(c + d*x)**2/(a*(sec(c + d*x) + 1))**(3/2), x)
 

Maxima [F]

\[ \int \frac {\tan ^2(c+d x)}{(a+a \sec (c+d x))^{3/2}} \, dx=\int { \frac {\tan \left (d x + c\right )^{2}}{{\left (a \sec \left (d x + c\right ) + a\right )}^{\frac {3}{2}}} \,d x } \] Input:

integrate(tan(d*x+c)^2/(a+a*sec(d*x+c))^(3/2),x, algorithm="maxima")
 

Output:

integrate(tan(d*x + c)^2/(a*sec(d*x + c) + a)^(3/2), x)
 

Giac [A] (verification not implemented)

Time = 0.65 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.82 \[ \int \frac {\tan ^2(c+d x)}{(a+a \sec (c+d x))^{3/2}} \, dx=-\frac {2 \, {\left (\frac {\sqrt {2} \arctan \left (\frac {\sqrt {-a + \frac {a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}}}{\sqrt {a}}\right )}{a^{\frac {3}{2}}} - \frac {\arctan \left (\frac {\sqrt {2} \sqrt {-a + \frac {a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}}}{2 \, \sqrt {a}}\right )}{a^{\frac {3}{2}}}\right )}}{d} \] Input:

integrate(tan(d*x+c)^2/(a+a*sec(d*x+c))^(3/2),x, algorithm="giac")
 

Output:

-2*(sqrt(2)*arctan(sqrt(-a + a/tan(1/2*d*x + 1/2*c)^2)/sqrt(a))/a^(3/2) - 
arctan(1/2*sqrt(2)*sqrt(-a + a/tan(1/2*d*x + 1/2*c)^2)/sqrt(a))/a^(3/2))/d
 

Mupad [F(-1)]

Timed out. \[ \int \frac {\tan ^2(c+d x)}{(a+a \sec (c+d x))^{3/2}} \, dx=\int \frac {{\mathrm {tan}\left (c+d\,x\right )}^2}{{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{3/2}} \,d x \] Input:

int(tan(c + d*x)^2/(a + a/cos(c + d*x))^(3/2),x)
 

Output:

int(tan(c + d*x)^2/(a + a/cos(c + d*x))^(3/2), x)
 

Reduce [F]

\[ \int \frac {\tan ^2(c+d x)}{(a+a \sec (c+d x))^{3/2}} \, dx=\frac {\sqrt {a}\, \left (\int \frac {\sqrt {\sec \left (d x +c \right )+1}\, \tan \left (d x +c \right )^{2}}{\sec \left (d x +c \right )^{2}+2 \sec \left (d x +c \right )+1}d x \right )}{a^{2}} \] Input:

int(tan(d*x+c)^2/(a+a*sec(d*x+c))^(3/2),x)
                                                                                    
                                                                                    
 

Output:

(sqrt(a)*int((sqrt(sec(c + d*x) + 1)*tan(c + d*x)**2)/(sec(c + d*x)**2 + 2 
*sec(c + d*x) + 1),x))/a**2