\(\int (a+a \tan ^2(c+d x))^{5/2} \, dx\) [272]

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

Optimal result

Integrand size = 16, antiderivative size = 98 \[ \int \left (a+a \tan ^2(c+d x)\right )^{5/2} \, dx=\frac {3 a^{5/2} \text {arctanh}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec ^2(c+d x)}}\right )}{8 d}+\frac {3 a^2 \sqrt {a \sec ^2(c+d x)} \tan (c+d x)}{8 d}+\frac {a \left (a \sec ^2(c+d x)\right )^{3/2} \tan (c+d x)}{4 d} \] Output:

3/8*a^(5/2)*arctanh(a^(1/2)*tan(d*x+c)/(a*sec(d*x+c)^2)^(1/2))/d+3/8*a^2*( 
a*sec(d*x+c)^2)^(1/2)*tan(d*x+c)/d+1/4*a*(a*sec(d*x+c)^2)^(3/2)*tan(d*x+c) 
/d
 

Mathematica [A] (verified)

Time = 0.16 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.60 \[ \int \left (a+a \tan ^2(c+d x)\right )^{5/2} \, dx=\frac {a^2 \sqrt {a \sec ^2(c+d x)} \left (3 \text {arctanh}(\sin (c+d x)) \cos (c+d x)+\left (3+2 \sec ^2(c+d x)\right ) \tan (c+d x)\right )}{8 d} \] Input:

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

Output:

(a^2*Sqrt[a*Sec[c + d*x]^2]*(3*ArcTanh[Sin[c + d*x]]*Cos[c + d*x] + (3 + 2 
*Sec[c + d*x]^2)*Tan[c + d*x]))/(8*d)
 

Rubi [A] (verified)

Time = 0.46 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.04, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3042, 4140, 3042, 4610, 211, 211, 224, 219}

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

\(\Big \downarrow \) 3042

\(\displaystyle \int \left (a \tan (c+d x)^2+a\right )^{5/2}dx\)

\(\Big \downarrow \) 4140

\(\displaystyle \int \left (a \sec ^2(c+d x)\right )^{5/2}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \left (a \sec (c+d x)^2\right )^{5/2}dx\)

\(\Big \downarrow \) 4610

\(\displaystyle \frac {a \int \left (a \tan ^2(c+d x)+a\right )^{3/2}d\tan (c+d x)}{d}\)

\(\Big \downarrow \) 211

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

\(\Big \downarrow \) 211

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

\(\Big \downarrow \) 224

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

\(\Big \downarrow \) 219

\(\displaystyle \frac {a \left (\frac {3}{4} a \left (\frac {1}{2} \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \tan ^2(c+d x)+a}}\right )+\frac {1}{2} \tan (c+d x) \sqrt {a \tan ^2(c+d x)+a}\right )+\frac {1}{4} \tan (c+d x) \left (a \tan ^2(c+d x)+a\right )^{3/2}\right )}{d}\)

Input:

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

Output:

(a*((Tan[c + d*x]*(a + a*Tan[c + d*x]^2)^(3/2))/4 + (3*a*((Sqrt[a]*ArcTanh 
[(Sqrt[a]*Tan[c + d*x])/Sqrt[a + a*Tan[c + d*x]^2]])/2 + (Tan[c + d*x]*Sqr 
t[a + a*Tan[c + d*x]^2])/2))/4))/d
 

Defintions of rubi rules used

rule 211
Int[((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[x*((a + b*x^2)^p/(2*p + 1 
)), x] + Simp[2*a*(p/(2*p + 1))   Int[(a + b*x^2)^(p - 1), x], x] /; FreeQ[ 
{a, b}, x] && GtQ[p, 0] && (IntegerQ[4*p] || IntegerQ[6*p])
 

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 224
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], 
x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b}, x] &&  !GtQ[a, 0]
 

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

rule 4140
Int[(u_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[A 
ctivateTrig[u*(a*sec[e + f*x]^2)^p], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ 
[a, b]
 

rule 4610
Int[((b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFac 
tors[Tan[e + f*x], x]}, Simp[b*(ff/f)   Subst[Int[(b + b*ff^2*x^2)^(p - 1), 
 x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{b, e, f, p}, x] &&  !IntegerQ[p]
 
Maple [A] (verified)

Time = 0.75 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.92

method result size
derivativedivides \(\frac {a \tan \left (d x +c \right ) \left (a +a \tan \left (d x +c \right )^{2}\right )^{\frac {3}{2}}}{4 d}+\frac {3 a^{2} \tan \left (d x +c \right ) \sqrt {a +a \tan \left (d x +c \right )^{2}}}{8 d}+\frac {3 a^{\frac {5}{2}} \ln \left (\sqrt {a}\, \tan \left (d x +c \right )+\sqrt {a +a \tan \left (d x +c \right )^{2}}\right )}{8 d}\) \(90\)
default \(\frac {a \tan \left (d x +c \right ) \left (a +a \tan \left (d x +c \right )^{2}\right )^{\frac {3}{2}}}{4 d}+\frac {3 a^{2} \tan \left (d x +c \right ) \sqrt {a +a \tan \left (d x +c \right )^{2}}}{8 d}+\frac {3 a^{\frac {5}{2}} \ln \left (\sqrt {a}\, \tan \left (d x +c \right )+\sqrt {a +a \tan \left (d x +c \right )^{2}}\right )}{8 d}\) \(90\)
risch \(-\frac {i a^{2} \sqrt {\frac {a \,{\mathrm e}^{2 i \left (d x +c \right )}}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}}\, \left (3 \,{\mathrm e}^{6 i \left (d x +c \right )}+11 \,{\mathrm e}^{4 i \left (d x +c \right )}-11 \,{\mathrm e}^{2 i \left (d x +c \right )}-3\right )}{4 \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3} d}-\frac {3 \ln \left ({\mathrm e}^{i d x}-i {\mathrm e}^{-i c}\right ) \sqrt {\frac {a \,{\mathrm e}^{2 i \left (d x +c \right )}}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}}\, a^{2} \cos \left (d x +c \right )}{4 d}+\frac {3 \ln \left ({\mathrm e}^{i d x}+i {\mathrm e}^{-i c}\right ) \sqrt {\frac {a \,{\mathrm e}^{2 i \left (d x +c \right )}}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}}\, a^{2} \cos \left (d x +c \right )}{4 d}\) \(197\)

Input:

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

Output:

1/4/d*a*tan(d*x+c)*(a+a*tan(d*x+c)^2)^(3/2)+3/8/d*a^2*tan(d*x+c)*(a+a*tan( 
d*x+c)^2)^(1/2)+3/8/d*a^(5/2)*ln(a^(1/2)*tan(d*x+c)+(a+a*tan(d*x+c)^2)^(1/ 
2))
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.93 \[ \int \left (a+a \tan ^2(c+d x)\right )^{5/2} \, dx=\frac {3 \, a^{\frac {5}{2}} \log \left (2 \, a \tan \left (d x + c\right )^{2} + 2 \, \sqrt {a \tan \left (d x + c\right )^{2} + a} \sqrt {a} \tan \left (d x + c\right ) + a\right ) + 2 \, {\left (2 \, a^{2} \tan \left (d x + c\right )^{3} + 5 \, a^{2} \tan \left (d x + c\right )\right )} \sqrt {a \tan \left (d x + c\right )^{2} + a}}{16 \, d} \] Input:

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

Output:

1/16*(3*a^(5/2)*log(2*a*tan(d*x + c)^2 + 2*sqrt(a*tan(d*x + c)^2 + a)*sqrt 
(a)*tan(d*x + c) + a) + 2*(2*a^2*tan(d*x + c)^3 + 5*a^2*tan(d*x + c))*sqrt 
(a*tan(d*x + c)^2 + a))/d
 

Sympy [F]

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

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

Output:

Integral((a*tan(c + d*x)**2 + a)**(5/2), x)
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1769 vs. \(2 (82) = 164\).

Time = 0.31 (sec) , antiderivative size = 1769, normalized size of antiderivative = 18.05 \[ \int \left (a+a \tan ^2(c+d x)\right )^{5/2} \, dx=\text {Too large to display} \] Input:

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

Output:

1/16*(176*a^2*cos(3*d*x + 3*c)*sin(2*d*x + 2*c) + 48*a^2*cos(d*x + c)*sin( 
2*d*x + 2*c) - 48*a^2*cos(2*d*x + 2*c)*sin(d*x + c) - 12*a^2*sin(d*x + c) 
+ 4*(3*a^2*sin(7*d*x + 7*c) + 11*a^2*sin(5*d*x + 5*c) - 11*a^2*sin(3*d*x + 
 3*c) - 3*a^2*sin(d*x + c))*cos(8*d*x + 8*c) - 24*(2*a^2*sin(6*d*x + 6*c) 
+ 3*a^2*sin(4*d*x + 4*c) + 2*a^2*sin(2*d*x + 2*c))*cos(7*d*x + 7*c) + 16*( 
11*a^2*sin(5*d*x + 5*c) - 11*a^2*sin(3*d*x + 3*c) - 3*a^2*sin(d*x + c))*co 
s(6*d*x + 6*c) - 88*(3*a^2*sin(4*d*x + 4*c) + 2*a^2*sin(2*d*x + 2*c))*cos( 
5*d*x + 5*c) - 24*(11*a^2*sin(3*d*x + 3*c) + 3*a^2*sin(d*x + c))*cos(4*d*x 
 + 4*c) + 3*(a^2*cos(8*d*x + 8*c)^2 + 16*a^2*cos(6*d*x + 6*c)^2 + 36*a^2*c 
os(4*d*x + 4*c)^2 + 16*a^2*cos(2*d*x + 2*c)^2 + a^2*sin(8*d*x + 8*c)^2 + 1 
6*a^2*sin(6*d*x + 6*c)^2 + 36*a^2*sin(4*d*x + 4*c)^2 + 48*a^2*sin(4*d*x + 
4*c)*sin(2*d*x + 2*c) + 16*a^2*sin(2*d*x + 2*c)^2 + 8*a^2*cos(2*d*x + 2*c) 
 + a^2 + 2*(4*a^2*cos(6*d*x + 6*c) + 6*a^2*cos(4*d*x + 4*c) + 4*a^2*cos(2* 
d*x + 2*c) + a^2)*cos(8*d*x + 8*c) + 8*(6*a^2*cos(4*d*x + 4*c) + 4*a^2*cos 
(2*d*x + 2*c) + a^2)*cos(6*d*x + 6*c) + 12*(4*a^2*cos(2*d*x + 2*c) + a^2)* 
cos(4*d*x + 4*c) + 4*(2*a^2*sin(6*d*x + 6*c) + 3*a^2*sin(4*d*x + 4*c) + 2* 
a^2*sin(2*d*x + 2*c))*sin(8*d*x + 8*c) + 16*(3*a^2*sin(4*d*x + 4*c) + 2*a^ 
2*sin(2*d*x + 2*c))*sin(6*d*x + 6*c))*log(cos(d*x + c)^2 + sin(d*x + c)^2 
+ 2*sin(d*x + c) + 1) - 3*(a^2*cos(8*d*x + 8*c)^2 + 16*a^2*cos(6*d*x + 6*c 
)^2 + 36*a^2*cos(4*d*x + 4*c)^2 + 16*a^2*cos(2*d*x + 2*c)^2 + a^2*sin(8...
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1153 vs. \(2 (82) = 164\).

Time = 1.55 (sec) , antiderivative size = 1153, normalized size of antiderivative = 11.77 \[ \int \left (a+a \tan ^2(c+d x)\right )^{5/2} \, dx=\text {Too large to display} \] Input:

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

Output:

1/4*(3*(a^3*tan(c)^2 + a^3)*arctan(-((sqrt(a*tan(c)^2 + a)*tan(d*x) - sqrt 
(a*tan(d*x)^2*tan(c)^2 + a*tan(d*x)^2 + a*tan(c)^2 + a))*tan(c) - sqrt(a*t 
an(c)^2 + a))/(sqrt(-a)*tan(c)^2 + sqrt(-a)))*sgn(tan(d*x)*tan(c) - 1)/((t 
an(c)^2 + 1)*sqrt(-a)) + ((5*a^3*tan(c)^9 + 21*a^3*tan(c)^7 + 24*a^3*tan(c 
)^5 + 8*a^3*tan(c)^3)*(sqrt(a*tan(c)^2 + a)*tan(d*x) - sqrt(a*tan(d*x)^2*t 
an(c)^2 + a*tan(d*x)^2 + a*tan(c)^2 + a))^7*sgn(tan(d*x)*tan(c) - 1) - 3*( 
a^3*tan(c)^8 + 17*a^3*tan(c)^6 + 24*a^3*tan(c)^4 + 8*a^3*tan(c)^2)*sqrt(a* 
tan(c)^2 + a)*(sqrt(a*tan(c)^2 + a)*tan(d*x) - sqrt(a*tan(d*x)^2*tan(c)^2 
+ a*tan(d*x)^2 + a*tan(c)^2 + a))^6*sgn(tan(d*x)*tan(c) - 1) + (3*a^4*tan( 
c)^11 - 30*a^4*tan(c)^9 - 13*a^4*tan(c)^7 + 108*a^4*tan(c)^5 + 120*a^4*tan 
(c)^3 + 32*a^4*tan(c))*(sqrt(a*tan(c)^2 + a)*tan(d*x) - sqrt(a*tan(d*x)^2* 
tan(c)^2 + a*tan(d*x)^2 + a*tan(c)^2 + a))^5*sgn(tan(d*x)*tan(c) - 1) - (1 
5*a^4*tan(c)^10 - 84*a^4*tan(c)^8 - 221*a^4*tan(c)^6 - 114*a^4*tan(c)^4 + 
24*a^4*tan(c)^2 + 16*a^4)*sqrt(a*tan(c)^2 + a)*(sqrt(a*tan(c)^2 + a)*tan(d 
*x) - sqrt(a*tan(d*x)^2*tan(c)^2 + a*tan(d*x)^2 + a*tan(c)^2 + a))^4*sgn(t 
an(d*x)*tan(c) - 1) + (3*a^5*tan(c)^13 + 93*a^5*tan(c)^11 + 205*a^5*tan(c) 
^9 + 55*a^5*tan(c)^7 - 180*a^5*tan(c)^5 - 152*a^5*tan(c)^3 - 32*a^5*tan(c) 
)*(sqrt(a*tan(c)^2 + a)*tan(d*x) - sqrt(a*tan(d*x)^2*tan(c)^2 + a*tan(d*x) 
^2 + a*tan(c)^2 + a))^3*sgn(tan(d*x)*tan(c) - 1) + (23*a^5*tan(c)^12 + 5*a 
^5*tan(c)^10 - 147*a^5*tan(c)^8 - 241*a^5*tan(c)^6 - 136*a^5*tan(c)^4 -...
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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