\(\int \frac {\tan ^3(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx\) [324]

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

Optimal result

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

2*arctanh((a+b*sec(d*x+c))^(1/2)/a^(1/2))/a^(1/2)/d-2*a*(a+b*sec(d*x+c))^( 
1/2)/b^2/d+2/3*(a+b*sec(d*x+c))^(3/2)/b^2/d
 

Mathematica [A] (verified)

Time = 0.39 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.84 \[ \int \frac {\tan ^3(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\frac {2 \left (\frac {3 \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a}}\right )}{\sqrt {a}}+\frac {(-2 a+b \sec (c+d x)) \sqrt {a+b \sec (c+d x)}}{b^2}\right )}{3 d} \] Input:

Integrate[Tan[c + d*x]^3/Sqrt[a + b*Sec[c + d*x]],x]
 

Output:

(2*((3*ArcTanh[Sqrt[a + b*Sec[c + d*x]]/Sqrt[a]])/Sqrt[a] + ((-2*a + b*Sec 
[c + d*x])*Sqrt[a + b*Sec[c + d*x]])/b^2))/(3*d)
 

Rubi [A] (warning: unable to verify)

Time = 0.31 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.90, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 25, 4373, 517, 1467, 2009}

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 4373

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

\(\Big \downarrow \) 517

\(\displaystyle -\frac {2 \int \frac {b^4 \sec ^4(c+d x)-2 a b^2 \sec ^2(c+d x)+a^2-b^2}{a-b^2 \sec ^2(c+d x)}d\sqrt {a+b \sec (c+d x)}}{b^2 d}\)

\(\Big \downarrow \) 1467

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

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {2 \left (-\frac {b^2 \text {arctanh}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a}}\right )}{\sqrt {a}}+a \sqrt {a+b \sec (c+d x)}-\frac {1}{3} b^3 \sec ^3(c+d x)\right )}{b^2 d}\)

Input:

Int[Tan[c + d*x]^3/Sqrt[a + b*Sec[c + d*x]],x]
 

Output:

(-2*(-((b^2*ArcTanh[Sqrt[a + b*Sec[c + d*x]]/Sqrt[a]])/Sqrt[a]) - (b^3*Sec 
[c + d*x]^3)/3 + a*Sqrt[a + b*Sec[c + d*x]]))/(b^2*d)
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 517
Int[((e_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_.), 
 x_Symbol] :> Simp[2*(e^m/d^(m + 2*p + 1))   Subst[Int[x^(2*n + 1)*(-c + x^ 
2)^m*(b*c^2 + a*d^2 - 2*b*c*x^2 + b*x^4)^p, x], x, Sqrt[c + d*x]], x] /; Fr 
eeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && ILtQ[m, 0] && IntegerQ[n + 1/2]
 

rule 1467
Int[((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), 
 x_Symbol] :> Int[ExpandIntegrand[(d + e*x^2)^q*(a + b*x^2 + c*x^4)^p, x], 
x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e 
 + a*e^2, 0] && IGtQ[p, 0] && IGtQ[q, -2]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

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

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

Leaf count of result is larger than twice the leaf count of optimal. \(250\) vs. \(2(67)=134\).

Time = 10.10 (sec) , antiderivative size = 251, normalized size of antiderivative = 3.18

method result size
default \(\frac {\sqrt {a +b \sec \left (d x +c \right )}\, \left (3 \cos \left (d x +c \right ) \ln \left (4 \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right )^{2}}}\, \sqrt {a}\, \cos \left (d x +c \right )+4 \sqrt {a}\, \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right )^{2}}}+4 a \cos \left (d x +c \right )+2 b \right ) \sqrt {a}\, b^{2}+\left (-4 \cos \left (d x +c \right )-4\right ) \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right )^{2}}}\, a^{2}+\sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right )^{2}}}\, a b \left (2+2 \sec \left (d x +c \right )\right )\right )}{3 d \,b^{2} a \left (1+\cos \left (d x +c \right )\right ) \sqrt {\frac {\left (b +a \cos \left (d x +c \right )\right ) \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right )^{2}}}}\) \(251\)

Input:

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

Output:

1/3/d/b^2/a*(a+b*sec(d*x+c))^(1/2)/(1+cos(d*x+c))/((b+a*cos(d*x+c))*cos(d* 
x+c)/(1+cos(d*x+c))^2)^(1/2)*(3*cos(d*x+c)*ln(4*((b+a*cos(d*x+c))*cos(d*x+ 
c)/(1+cos(d*x+c))^2)^(1/2)*a^(1/2)*cos(d*x+c)+4*a^(1/2)*((b+a*cos(d*x+c))* 
cos(d*x+c)/(1+cos(d*x+c))^2)^(1/2)+4*a*cos(d*x+c)+2*b)*a^(1/2)*b^2+(-4*cos 
(d*x+c)-4)*((b+a*cos(d*x+c))*cos(d*x+c)/(1+cos(d*x+c))^2)^(1/2)*a^2+((b+a* 
cos(d*x+c))*cos(d*x+c)/(1+cos(d*x+c))^2)^(1/2)*a*b*(2+2*sec(d*x+c)))
 

Fricas [A] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 273, normalized size of antiderivative = 3.46 \[ \int \frac {\tan ^3(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\left [\frac {3 \, \sqrt {a} b^{2} \cos \left (d x + c\right ) \log \left (-8 \, a^{2} \cos \left (d x + c\right )^{2} - 8 \, a b \cos \left (d x + c\right ) - b^{2} - 4 \, {\left (2 \, a \cos \left (d x + c\right )^{2} + b \cos \left (d x + c\right )\right )} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + b}{\cos \left (d x + c\right )}}\right ) - 4 \, {\left (2 \, a^{2} \cos \left (d x + c\right ) - a b\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + b}{\cos \left (d x + c\right )}}}{6 \, a b^{2} d \cos \left (d x + c\right )}, -\frac {3 \, \sqrt {-a} b^{2} \arctan \left (\frac {2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + b}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{2 \, a \cos \left (d x + c\right ) + b}\right ) \cos \left (d x + c\right ) + 2 \, {\left (2 \, a^{2} \cos \left (d x + c\right ) - a b\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + b}{\cos \left (d x + c\right )}}}{3 \, a b^{2} d \cos \left (d x + c\right )}\right ] \] Input:

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

Output:

[1/6*(3*sqrt(a)*b^2*cos(d*x + c)*log(-8*a^2*cos(d*x + c)^2 - 8*a*b*cos(d*x 
 + c) - b^2 - 4*(2*a*cos(d*x + c)^2 + b*cos(d*x + c))*sqrt(a)*sqrt((a*cos( 
d*x + c) + b)/cos(d*x + c))) - 4*(2*a^2*cos(d*x + c) - a*b)*sqrt((a*cos(d* 
x + c) + b)/cos(d*x + c)))/(a*b^2*d*cos(d*x + c)), -1/3*(3*sqrt(-a)*b^2*ar 
ctan(2*sqrt(-a)*sqrt((a*cos(d*x + c) + b)/cos(d*x + c))*cos(d*x + c)/(2*a* 
cos(d*x + c) + b))*cos(d*x + c) + 2*(2*a^2*cos(d*x + c) - a*b)*sqrt((a*cos 
(d*x + c) + b)/cos(d*x + c)))/(a*b^2*d*cos(d*x + c))]
 

Sympy [F]

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

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

Output:

Integral(tan(c + d*x)**3/sqrt(a + b*sec(c + d*x)), x)
 

Maxima [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.16 \[ \int \frac {\tan ^3(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=-\frac {\frac {3 \, \log \left (\frac {\sqrt {a + \frac {b}{\cos \left (d x + c\right )}} - \sqrt {a}}{\sqrt {a + \frac {b}{\cos \left (d x + c\right )}} + \sqrt {a}}\right )}{\sqrt {a}} - \frac {2 \, {\left (a + \frac {b}{\cos \left (d x + c\right )}\right )}^{\frac {3}{2}}}{b^{2}} + \frac {6 \, \sqrt {a + \frac {b}{\cos \left (d x + c\right )}} a}{b^{2}}}{3 \, d} \] Input:

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

Output:

-1/3*(3*log((sqrt(a + b/cos(d*x + c)) - sqrt(a))/(sqrt(a + b/cos(d*x + c)) 
 + sqrt(a)))/sqrt(a) - 2*(a + b/cos(d*x + c))^(3/2)/b^2 + 6*sqrt(a + b/cos 
(d*x + c))*a/b^2)/d
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 265 vs. \(2 (67) = 134\).

Time = 0.44 (sec) , antiderivative size = 265, normalized size of antiderivative = 3.35 \[ \int \frac {\tan ^3(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=-\frac {2 \, {\left (\frac {3 \, \arctan \left (-\frac {\sqrt {a - b} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b} + \sqrt {a - b}}{2 \, \sqrt {-a}}\right )}{\sqrt {-a}} - \frac {2 \, {\left (3 \, {\left (\sqrt {a - b} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b}\right )}^{2} - 3 \, a - b\right )}}{{\left (\sqrt {a - b} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b} - \sqrt {a - b}\right )}^{3}}\right )}}{3 \, d \mathrm {sgn}\left (\cos \left (d x + c\right )\right )} \] Input:

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

Output:

-2/3*(3*arctan(-1/2*(sqrt(a - b)*tan(1/2*d*x + 1/2*c)^2 - sqrt(a*tan(1/2*d 
*x + 1/2*c)^4 - b*tan(1/2*d*x + 1/2*c)^4 - 2*a*tan(1/2*d*x + 1/2*c)^2 + a 
+ b) + sqrt(a - b))/sqrt(-a))/sqrt(-a) - 2*(3*(sqrt(a - b)*tan(1/2*d*x + 1 
/2*c)^2 - sqrt(a*tan(1/2*d*x + 1/2*c)^4 - b*tan(1/2*d*x + 1/2*c)^4 - 2*a*t 
an(1/2*d*x + 1/2*c)^2 + a + b))^2 - 3*a - b)/(sqrt(a - b)*tan(1/2*d*x + 1/ 
2*c)^2 - sqrt(a*tan(1/2*d*x + 1/2*c)^4 - b*tan(1/2*d*x + 1/2*c)^4 - 2*a*ta 
n(1/2*d*x + 1/2*c)^2 + a + b) - sqrt(a - b))^3)/(d*sgn(cos(d*x + c)))
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

int((sqrt(sec(c + d*x)*b + a)*tan(c + d*x)**3)/(sec(c + d*x)*b + a),x)