\(\int \sqrt {3+4 \tan (e+f x)} (a+b \tan (e+f x))^3 \, dx\) [1242]

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

Optimal result

Integrand size = 27, antiderivative size = 262 \[ \int \sqrt {3+4 \tan (e+f x)} (a+b \tan (e+f x))^3 \, dx=-\frac {\left (2 a^3-3 a^2 b-6 a b^2+b^3\right ) \arctan \left (\frac {2 a^3-3 a^2 b-6 a b^2+b^3-2 \left (2 a^3-3 a^2 b-6 a b^2+b^3\right ) \tan (e+f x)}{\left (2 a^3-3 a^2 b-6 a b^2+b^3\right ) \sqrt {3+4 \tan (e+f x)}}\right )}{f}-\frac {\left (a^3+6 a^2 b-3 a b^2-2 b^3\right ) \text {arctanh}\left (\frac {2+\tan (e+f x)}{\sqrt {3+4 \tan (e+f x)}}\right )}{f}+\frac {2 b \left (3 a^2-b^2\right ) \sqrt {3+4 \tan (e+f x)}}{f}+\frac {(8 a-b) b^2 (3+4 \tan (e+f x))^{3/2}}{20 f}+\frac {b^2 (3+4 \tan (e+f x))^{3/2} (a+b \tan (e+f x))}{10 f} \] Output:

-(2*a^3-3*a^2*b-6*a*b^2+b^3)*arctan((2*a^3-3*a^2*b-6*a*b^2+b^3-2*(2*a^3-3* 
a^2*b-6*a*b^2+b^3)*tan(f*x+e))/(2*a^3-3*a^2*b-6*a*b^2+b^3)/(3+4*tan(f*x+e) 
)^(1/2))/f-(a^3+6*a^2*b-3*a*b^2-2*b^3)*arctanh((2+tan(f*x+e))/(3+4*tan(f*x 
+e))^(1/2))/f+2*b*(3*a^2-b^2)*(3+4*tan(f*x+e))^(1/2)/f+1/20*(8*a-b)*b^2*(3 
+4*tan(f*x+e))^(3/2)/f+1/10*b^2*(3+4*tan(f*x+e))^(3/2)*(a+b*tan(f*x+e))/f
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.57 (sec) , antiderivative size = 138, normalized size of antiderivative = 0.53 \[ \int \sqrt {3+4 \tan (e+f x)} (a+b \tan (e+f x))^3 \, dx=\frac {(40+20 i) (a+i b)^3 \arctan \left (\left (\frac {1}{5}+\frac {2 i}{5}\right ) \sqrt {3+4 \tan (e+f x)}\right )-(20+40 i) (a-i b)^3 \text {arctanh}\left (\left (\frac {2}{5}+\frac {i}{5}\right ) \sqrt {3+4 \tan (e+f x)}\right )+b \sqrt {3+4 \tan (e+f x)} \left (120 a^2+30 a b-43 b^2+2 b (20 a+b) \tan (e+f x)+8 b^2 \tan ^2(e+f x)\right )}{20 f} \] Input:

Integrate[Sqrt[3 + 4*Tan[e + f*x]]*(a + b*Tan[e + f*x])^3,x]
 

Output:

((40 + 20*I)*(a + I*b)^3*ArcTan[(1/5 + (2*I)/5)*Sqrt[3 + 4*Tan[e + f*x]]] 
- (20 + 40*I)*(a - I*b)^3*ArcTanh[(2/5 + I/5)*Sqrt[3 + 4*Tan[e + f*x]]] + 
b*Sqrt[3 + 4*Tan[e + f*x]]*(120*a^2 + 30*a*b - 43*b^2 + 2*b*(20*a + b)*Tan 
[e + f*x] + 8*b^2*Tan[e + f*x]^2))/(20*f)
 

Rubi [A] (verified)

Time = 1.27 (sec) , antiderivative size = 334, normalized size of antiderivative = 1.27, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.481, Rules used = {3042, 4049, 3042, 4113, 3042, 4011, 3042, 4019, 27, 3042, 4018, 216, 220}

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 \sqrt {4 \tan (e+f x)+3} (a+b \tan (e+f x))^3 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \sqrt {4 \tan (e+f x)+3} (a+b \tan (e+f x))^3dx\)

\(\Big \downarrow \) 4049

\(\displaystyle \frac {1}{10} \int \sqrt {4 \tan (e+f x)+3} \left (10 a^3-6 b^2 a-3 b^3+3 (8 a-b) b^2 \tan ^2(e+f x)+10 b \left (3 a^2-b^2\right ) \tan (e+f x)\right )dx+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))}{10 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{10} \int \sqrt {4 \tan (e+f x)+3} \left (10 a^3-6 b^2 a-3 b^3+3 (8 a-b) b^2 \tan (e+f x)^2+10 b \left (3 a^2-b^2\right ) \tan (e+f x)\right )dx+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))}{10 f}\)

\(\Big \downarrow \) 4113

\(\displaystyle \frac {1}{10} \left (\int \sqrt {4 \tan (e+f x)+3} \left (10 a \left (a^2-3 b^2\right )+10 b \left (3 a^2-b^2\right ) \tan (e+f x)\right )dx+\frac {b^2 (8 a-b) (4 \tan (e+f x)+3)^{3/2}}{2 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))}{10 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{10} \left (\int \sqrt {4 \tan (e+f x)+3} \left (10 a \left (a^2-3 b^2\right )+10 b \left (3 a^2-b^2\right ) \tan (e+f x)\right )dx+\frac {b^2 (8 a-b) (4 \tan (e+f x)+3)^{3/2}}{2 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))}{10 f}\)

\(\Big \downarrow \) 4011

\(\displaystyle \frac {1}{10} \left (\int \frac {10 \left (3 a^3-12 b a^2-9 b^2 a+4 b^3\right )+10 \left (4 a^3+9 b a^2-12 b^2 a-3 b^3\right ) \tan (e+f x)}{\sqrt {4 \tan (e+f x)+3}}dx+\frac {20 b \left (3 a^2-b^2\right ) \sqrt {4 \tan (e+f x)+3}}{f}+\frac {b^2 (8 a-b) (4 \tan (e+f x)+3)^{3/2}}{2 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))}{10 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{10} \left (\int \frac {10 \left (3 a^3-12 b a^2-9 b^2 a+4 b^3\right )+10 \left (4 a^3+9 b a^2-12 b^2 a-3 b^3\right ) \tan (e+f x)}{\sqrt {4 \tan (e+f x)+3}}dx+\frac {20 b \left (3 a^2-b^2\right ) \sqrt {4 \tan (e+f x)+3}}{f}+\frac {b^2 (8 a-b) (4 \tan (e+f x)+3)^{3/2}}{2 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))}{10 f}\)

\(\Big \downarrow \) 4019

\(\displaystyle \frac {1}{10} \left (-\frac {1}{10} \int \frac {100 \left (a^3+6 b a^2-3 b^2 a-2 b^3-2 \left (a^3+6 b a^2-3 b^2 a-2 b^3\right ) \tan (e+f x)\right )}{\sqrt {4 \tan (e+f x)+3}}dx+\frac {1}{10} \int \frac {100 \left (\tan (e+f x) \left (2 a^3-3 b a^2-6 b^2 a+b^3\right )+2 \left (2 a^3-3 b a^2-6 b^2 a+b^3\right )\right )}{\sqrt {4 \tan (e+f x)+3}}dx+\frac {20 b \left (3 a^2-b^2\right ) \sqrt {4 \tan (e+f x)+3}}{f}+\frac {b^2 (8 a-b) (4 \tan (e+f x)+3)^{3/2}}{2 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))}{10 f}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {1}{10} \left (-10 \int \frac {a^3+6 b a^2-3 b^2 a-2 b^3-2 \left (a^3+6 b a^2-3 b^2 a-2 b^3\right ) \tan (e+f x)}{\sqrt {4 \tan (e+f x)+3}}dx+10 \int \frac {\tan (e+f x) \left (2 a^3-3 b a^2-6 b^2 a+b^3\right )+2 \left (2 a^3-3 b a^2-6 b^2 a+b^3\right )}{\sqrt {4 \tan (e+f x)+3}}dx+\frac {20 b \left (3 a^2-b^2\right ) \sqrt {4 \tan (e+f x)+3}}{f}+\frac {b^2 (8 a-b) (4 \tan (e+f x)+3)^{3/2}}{2 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))}{10 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{10} \left (-10 \int \frac {a^3+6 b a^2-3 b^2 a-2 b^3-2 \left (a^3+6 b a^2-3 b^2 a-2 b^3\right ) \tan (e+f x)}{\sqrt {4 \tan (e+f x)+3}}dx+10 \int \frac {\tan (e+f x) \left (2 a^3-3 b a^2-6 b^2 a+b^3\right )+2 \left (2 a^3-3 b a^2-6 b^2 a+b^3\right )}{\sqrt {4 \tan (e+f x)+3}}dx+\frac {20 b \left (3 a^2-b^2\right ) \sqrt {4 \tan (e+f x)+3}}{f}+\frac {b^2 (8 a-b) (4 \tan (e+f x)+3)^{3/2}}{2 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))}{10 f}\)

\(\Big \downarrow \) 4018

\(\displaystyle \frac {1}{10} \left (\frac {80 \left (a^3+6 a^2 b-3 a b^2-2 b^3\right )^2 \int \frac {1}{\frac {64 \left (\tan (e+f x) \left (a^3+6 b a^2-3 b^2 a-2 b^3\right )+2 \left (a^3+6 b a^2-3 b^2 a-2 b^3\right )\right )^2}{4 \tan (e+f x)+3}-64 \left (a^3+6 b a^2-3 b^2 a-2 b^3\right )^2}d\frac {8 \left (\tan (e+f x) \left (a^3+6 b a^2-3 b^2 a-2 b^3\right )+2 \left (a^3+6 b a^2-3 b^2 a-2 b^3\right )\right )}{\sqrt {4 \tan (e+f x)+3}}}{f}-\frac {20 \left (2 a^3-3 a^2 b-6 a b^2+b^3\right )^2 \int \frac {1}{4 \left (2 a^3-3 b a^2-6 b^2 a+b^3\right )^2+\frac {4 \left (2 a^3-3 b a^2-6 b^2 a+b^3-2 \left (2 a^3-3 b a^2-6 b^2 a+b^3\right ) \tan (e+f x)\right )^2}{4 \tan (e+f x)+3}}d\frac {2 \left (2 a^3-3 b a^2-6 b^2 a+b^3-2 \left (2 a^3-3 b a^2-6 b^2 a+b^3\right ) \tan (e+f x)\right )}{\sqrt {4 \tan (e+f x)+3}}}{f}+\frac {20 b \left (3 a^2-b^2\right ) \sqrt {4 \tan (e+f x)+3}}{f}+\frac {b^2 (8 a-b) (4 \tan (e+f x)+3)^{3/2}}{2 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))}{10 f}\)

\(\Big \downarrow \) 216

\(\displaystyle \frac {1}{10} \left (\frac {80 \left (a^3+6 a^2 b-3 a b^2-2 b^3\right )^2 \int \frac {1}{\frac {64 \left (\tan (e+f x) \left (a^3+6 b a^2-3 b^2 a-2 b^3\right )+2 \left (a^3+6 b a^2-3 b^2 a-2 b^3\right )\right )^2}{4 \tan (e+f x)+3}-64 \left (a^3+6 b a^2-3 b^2 a-2 b^3\right )^2}d\frac {8 \left (\tan (e+f x) \left (a^3+6 b a^2-3 b^2 a-2 b^3\right )+2 \left (a^3+6 b a^2-3 b^2 a-2 b^3\right )\right )}{\sqrt {4 \tan (e+f x)+3}}}{f}+\frac {20 b \left (3 a^2-b^2\right ) \sqrt {4 \tan (e+f x)+3}}{f}-\frac {10 \left (2 a^3-3 a^2 b-6 a b^2+b^3\right ) \arctan \left (\frac {2 a^3-3 a^2 b-2 \left (2 a^3-3 a^2 b-6 a b^2+b^3\right ) \tan (e+f x)-6 a b^2+b^3}{\left (2 a^3-3 a^2 b-6 a b^2+b^3\right ) \sqrt {4 \tan (e+f x)+3}}\right )}{f}+\frac {b^2 (8 a-b) (4 \tan (e+f x)+3)^{3/2}}{2 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))}{10 f}\)

\(\Big \downarrow \) 220

\(\displaystyle \frac {1}{10} \left (\frac {20 b \left (3 a^2-b^2\right ) \sqrt {4 \tan (e+f x)+3}}{f}-\frac {10 \left (2 a^3-3 a^2 b-6 a b^2+b^3\right ) \arctan \left (\frac {2 a^3-3 a^2 b-2 \left (2 a^3-3 a^2 b-6 a b^2+b^3\right ) \tan (e+f x)-6 a b^2+b^3}{\left (2 a^3-3 a^2 b-6 a b^2+b^3\right ) \sqrt {4 \tan (e+f x)+3}}\right )}{f}-\frac {10 \left (a^3+6 a^2 b-3 a b^2-2 b^3\right ) \text {arctanh}\left (\frac {\left (a^3+6 a^2 b-3 a b^2-2 b^3\right ) \tan (e+f x)+2 \left (a^3+6 a^2 b-3 a b^2-2 b^3\right )}{\left (a^3+6 a^2 b-3 a b^2-2 b^3\right ) \sqrt {4 \tan (e+f x)+3}}\right )}{f}+\frac {b^2 (8 a-b) (4 \tan (e+f x)+3)^{3/2}}{2 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))}{10 f}\)

Input:

Int[Sqrt[3 + 4*Tan[e + f*x]]*(a + b*Tan[e + f*x])^3,x]
 

Output:

(b^2*(3 + 4*Tan[e + f*x])^(3/2)*(a + b*Tan[e + f*x]))/(10*f) + ((-10*(2*a^ 
3 - 3*a^2*b - 6*a*b^2 + b^3)*ArcTan[(2*a^3 - 3*a^2*b - 6*a*b^2 + b^3 - 2*( 
2*a^3 - 3*a^2*b - 6*a*b^2 + b^3)*Tan[e + f*x])/((2*a^3 - 3*a^2*b - 6*a*b^2 
 + b^3)*Sqrt[3 + 4*Tan[e + f*x]])])/f - (10*(a^3 + 6*a^2*b - 3*a*b^2 - 2*b 
^3)*ArcTanh[(2*(a^3 + 6*a^2*b - 3*a*b^2 - 2*b^3) + (a^3 + 6*a^2*b - 3*a*b^ 
2 - 2*b^3)*Tan[e + f*x])/((a^3 + 6*a^2*b - 3*a*b^2 - 2*b^3)*Sqrt[3 + 4*Tan 
[e + f*x]])])/f + (20*b*(3*a^2 - b^2)*Sqrt[3 + 4*Tan[e + f*x]])/f + ((8*a 
- b)*b^2*(3 + 4*Tan[e + f*x])^(3/2))/(2*f))/10
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

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 220
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(- 
1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && 
 (LtQ[a, 0] || GtQ[b, 0])
 

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

rule 4011
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
 (f_.)*(x_)]), x_Symbol] :> Simp[d*((a + b*Tan[e + f*x])^m/(f*m)), x] + Int 
[(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x], x] 
, x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 
 0] && GtQ[m, 0]
 

rule 4018
Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(a_) + (b_.)*tan[(e_.) + ( 
f_.)*(x_)]], x_Symbol] :> Simp[-2*(d^2/f)   Subst[Int[1/(2*b*c*d - 4*a*d^2 
+ x^2), x], x, (b*c - 2*a*d - b*d*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]]], 
x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0 
] && NeQ[c^2 + d^2, 0] && EqQ[2*a*c*d - b*(c^2 - d^2), 0]
 

rule 4019
Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(a_) + (b_.)*tan[(e_.) + ( 
f_.)*(x_)]], x_Symbol] :> With[{q = Rt[a^2 + b^2, 2]}, Simp[1/(2*q)   Int[( 
a*c + b*d + c*q + (b*c - a*d + d*q)*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]], 
 x], x] - Simp[1/(2*q)   Int[(a*c + b*d - c*q + (b*c - a*d - d*q)*Tan[e + f 
*x])/Sqrt[a + b*Tan[e + f*x]], x], x]] /; FreeQ[{a, b, c, d, e, f}, x] && N 
eQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && NeQ[2*a*c*d - 
 b*(c^2 - d^2), 0] && NiceSqrtQ[a^2 + b^2]
 

rule 4049
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
 (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b^2*(a + b*Tan[e + f*x])^(m - 2)*((c 
+ d*Tan[e + f*x])^(n + 1)/(d*f*(m + n - 1))), x] + Simp[1/(d*(m + n - 1)) 
 Int[(a + b*Tan[e + f*x])^(m - 3)*(c + d*Tan[e + f*x])^n*Simp[a^3*d*(m + n 
- 1) - b^2*(b*c*(m - 2) + a*d*(1 + n)) + b*d*(m + n - 1)*(3*a^2 - b^2)*Tan[ 
e + f*x] - b^2*(b*c*(m - 2) - a*d*(3*m + 2*n - 4))*Tan[e + f*x]^2, x], x], 
x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2 
, 0] && NeQ[c^2 + d^2, 0] && IntegerQ[2*m] && GtQ[m, 2] && (GeQ[n, -1] || I 
ntegerQ[m]) &&  !(IGtQ[n, 2] && ( !IntegerQ[m] || (EqQ[c, 0] && NeQ[a, 0])) 
)
 

rule 4113
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) 
+ (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[C*((a + 
 b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Int[(a + b*Tan[e + f*x])^m*Si 
mp[A - C + B*Tan[e + f*x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && 
NeQ[A*b^2 - a*b*B + a^2*C, 0] &&  !LeQ[m, -1]
 
Maple [A] (verified)

Time = 0.30 (sec) , antiderivative size = 273, normalized size of antiderivative = 1.04

method result size
derivativedivides \(\frac {\frac {b^{3} \left (3+4 \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{40}+\frac {a \,b^{2} \left (3+4 \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{2}-\frac {b^{3} \left (3+4 \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{8}+6 \sqrt {3+4 \tan \left (f x +e \right )}\, a^{2} b -2 \sqrt {3+4 \tan \left (f x +e \right )}\, b^{3}+\frac {\left (8 a^{3}+48 a^{2} b -24 a \,b^{2}-16 b^{3}\right ) \ln \left (8+4 \tan \left (f x +e \right )-4 \sqrt {3+4 \tan \left (f x +e \right )}\right )}{16}+\frac {\left (16 a^{3}-24 a^{2} b -48 a \,b^{2}+8 b^{3}\right ) \arctan \left (-2+\sqrt {3+4 \tan \left (f x +e \right )}\right )}{8}+\frac {\left (-8 a^{3}-48 a^{2} b +24 a \,b^{2}+16 b^{3}\right ) \ln \left (8+4 \tan \left (f x +e \right )+4 \sqrt {3+4 \tan \left (f x +e \right )}\right )}{16}+\frac {\left (16 a^{3}-24 a^{2} b -48 a \,b^{2}+8 b^{3}\right ) \arctan \left (2+\sqrt {3+4 \tan \left (f x +e \right )}\right )}{8}}{f}\) \(273\)
default \(\frac {\frac {b^{3} \left (3+4 \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{40}+\frac {a \,b^{2} \left (3+4 \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{2}-\frac {b^{3} \left (3+4 \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{8}+6 \sqrt {3+4 \tan \left (f x +e \right )}\, a^{2} b -2 \sqrt {3+4 \tan \left (f x +e \right )}\, b^{3}+\frac {\left (8 a^{3}+48 a^{2} b -24 a \,b^{2}-16 b^{3}\right ) \ln \left (8+4 \tan \left (f x +e \right )-4 \sqrt {3+4 \tan \left (f x +e \right )}\right )}{16}+\frac {\left (16 a^{3}-24 a^{2} b -48 a \,b^{2}+8 b^{3}\right ) \arctan \left (-2+\sqrt {3+4 \tan \left (f x +e \right )}\right )}{8}+\frac {\left (-8 a^{3}-48 a^{2} b +24 a \,b^{2}+16 b^{3}\right ) \ln \left (8+4 \tan \left (f x +e \right )+4 \sqrt {3+4 \tan \left (f x +e \right )}\right )}{16}+\frac {\left (16 a^{3}-24 a^{2} b -48 a \,b^{2}+8 b^{3}\right ) \arctan \left (2+\sqrt {3+4 \tan \left (f x +e \right )}\right )}{8}}{f}\) \(273\)
parts \(\frac {a^{3} \left (\frac {\ln \left (8+4 \tan \left (f x +e \right )-4 \sqrt {3+4 \tan \left (f x +e \right )}\right )}{2}+2 \arctan \left (-2+\sqrt {3+4 \tan \left (f x +e \right )}\right )-\frac {\ln \left (8+4 \tan \left (f x +e \right )+4 \sqrt {3+4 \tan \left (f x +e \right )}\right )}{2}+2 \arctan \left (2+\sqrt {3+4 \tan \left (f x +e \right )}\right )\right )}{f}+\frac {b^{3} \left (\frac {\left (3+4 \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{40}-\frac {\left (3+4 \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{8}-2 \sqrt {3+4 \tan \left (f x +e \right )}-\ln \left (8+4 \tan \left (f x +e \right )-4 \sqrt {3+4 \tan \left (f x +e \right )}\right )+\arctan \left (-2+\sqrt {3+4 \tan \left (f x +e \right )}\right )+\ln \left (8+4 \tan \left (f x +e \right )+4 \sqrt {3+4 \tan \left (f x +e \right )}\right )+\arctan \left (2+\sqrt {3+4 \tan \left (f x +e \right )}\right )\right )}{f}+\frac {3 a \,b^{2} \left (\frac {\left (3+4 \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{6}-\frac {\ln \left (8+4 \tan \left (f x +e \right )-4 \sqrt {3+4 \tan \left (f x +e \right )}\right )}{2}-2 \arctan \left (-2+\sqrt {3+4 \tan \left (f x +e \right )}\right )+\frac {\ln \left (8+4 \tan \left (f x +e \right )+4 \sqrt {3+4 \tan \left (f x +e \right )}\right )}{2}-2 \arctan \left (2+\sqrt {3+4 \tan \left (f x +e \right )}\right )\right )}{f}+\frac {3 a^{2} b \left (2 \sqrt {3+4 \tan \left (f x +e \right )}+\ln \left (8+4 \tan \left (f x +e \right )-4 \sqrt {3+4 \tan \left (f x +e \right )}\right )-\arctan \left (-2+\sqrt {3+4 \tan \left (f x +e \right )}\right )-\ln \left (8+4 \tan \left (f x +e \right )+4 \sqrt {3+4 \tan \left (f x +e \right )}\right )-\arctan \left (2+\sqrt {3+4 \tan \left (f x +e \right )}\right )\right )}{f}\) \(452\)

Input:

int((3+4*tan(f*x+e))^(1/2)*(a+b*tan(f*x+e))^3,x,method=_RETURNVERBOSE)
 

Output:

1/f*(1/40*b^3*(3+4*tan(f*x+e))^(5/2)+1/2*a*b^2*(3+4*tan(f*x+e))^(3/2)-1/8* 
b^3*(3+4*tan(f*x+e))^(3/2)+6*(3+4*tan(f*x+e))^(1/2)*a^2*b-2*(3+4*tan(f*x+e 
))^(1/2)*b^3+1/16*(8*a^3+48*a^2*b-24*a*b^2-16*b^3)*ln(8+4*tan(f*x+e)-4*(3+ 
4*tan(f*x+e))^(1/2))+1/8*(16*a^3-24*a^2*b-48*a*b^2+8*b^3)*arctan(-2+(3+4*t 
an(f*x+e))^(1/2))+1/16*(-8*a^3-48*a^2*b+24*a*b^2+16*b^3)*ln(8+4*tan(f*x+e) 
+4*(3+4*tan(f*x+e))^(1/2))+1/8*(16*a^3-24*a^2*b-48*a*b^2+8*b^3)*arctan(2+( 
3+4*tan(f*x+e))^(1/2)))
 

Fricas [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 234, normalized size of antiderivative = 0.89 \[ \int \sqrt {3+4 \tan (e+f x)} (a+b \tan (e+f x))^3 \, dx=\frac {20 \, {\left (2 \, a^{3} - 3 \, a^{2} b - 6 \, a b^{2} + b^{3}\right )} \arctan \left (\sqrt {4 \, \tan \left (f x + e\right ) + 3} + 2\right ) + 20 \, {\left (2 \, a^{3} - 3 \, a^{2} b - 6 \, a b^{2} + b^{3}\right )} \arctan \left (\sqrt {4 \, \tan \left (f x + e\right ) + 3} - 2\right ) - 10 \, {\left (a^{3} + 6 \, a^{2} b - 3 \, a b^{2} - 2 \, b^{3}\right )} \log \left (\sqrt {4 \, \tan \left (f x + e\right ) + 3} + \tan \left (f x + e\right ) + 2\right ) + 10 \, {\left (a^{3} + 6 \, a^{2} b - 3 \, a b^{2} - 2 \, b^{3}\right )} \log \left (-\sqrt {4 \, \tan \left (f x + e\right ) + 3} + \tan \left (f x + e\right ) + 2\right ) + {\left (8 \, b^{3} \tan \left (f x + e\right )^{2} + 120 \, a^{2} b + 30 \, a b^{2} - 43 \, b^{3} + 2 \, {\left (20 \, a b^{2} + b^{3}\right )} \tan \left (f x + e\right )\right )} \sqrt {4 \, \tan \left (f x + e\right ) + 3}}{20 \, f} \] Input:

integrate((3+4*tan(f*x+e))^(1/2)*(a+b*tan(f*x+e))^3,x, algorithm="fricas")
 

Output:

1/20*(20*(2*a^3 - 3*a^2*b - 6*a*b^2 + b^3)*arctan(sqrt(4*tan(f*x + e) + 3) 
 + 2) + 20*(2*a^3 - 3*a^2*b - 6*a*b^2 + b^3)*arctan(sqrt(4*tan(f*x + e) + 
3) - 2) - 10*(a^3 + 6*a^2*b - 3*a*b^2 - 2*b^3)*log(sqrt(4*tan(f*x + e) + 3 
) + tan(f*x + e) + 2) + 10*(a^3 + 6*a^2*b - 3*a*b^2 - 2*b^3)*log(-sqrt(4*t 
an(f*x + e) + 3) + tan(f*x + e) + 2) + (8*b^3*tan(f*x + e)^2 + 120*a^2*b + 
 30*a*b^2 - 43*b^3 + 2*(20*a*b^2 + b^3)*tan(f*x + e))*sqrt(4*tan(f*x + e) 
+ 3))/f
 

Sympy [F]

\[ \int \sqrt {3+4 \tan (e+f x)} (a+b \tan (e+f x))^3 \, dx=\int \left (a + b \tan {\left (e + f x \right )}\right )^{3} \sqrt {4 \tan {\left (e + f x \right )} + 3}\, dx \] Input:

integrate((3+4*tan(f*x+e))**(1/2)*(a+b*tan(f*x+e))**3,x)
 

Output:

Integral((a + b*tan(e + f*x))**3*sqrt(4*tan(e + f*x) + 3), x)
 

Maxima [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 246, normalized size of antiderivative = 0.94 \[ \int \sqrt {3+4 \tan (e+f x)} (a+b \tan (e+f x))^3 \, dx=\frac {b^{3} {\left (4 \, \tan \left (f x + e\right ) + 3\right )}^{\frac {5}{2}} + 5 \, {\left (4 \, a b^{2} - b^{3}\right )} {\left (4 \, \tan \left (f x + e\right ) + 3\right )}^{\frac {3}{2}} + 40 \, {\left (2 \, a^{3} - 3 \, a^{2} b - 6 \, a b^{2} + b^{3}\right )} \arctan \left (\sqrt {4 \, \tan \left (f x + e\right ) + 3} + 2\right ) + 40 \, {\left (2 \, a^{3} - 3 \, a^{2} b - 6 \, a b^{2} + b^{3}\right )} \arctan \left (\sqrt {4 \, \tan \left (f x + e\right ) + 3} - 2\right ) - 20 \, {\left (a^{3} + 6 \, a^{2} b - 3 \, a b^{2} - 2 \, b^{3}\right )} \log \left (4 \, \sqrt {4 \, \tan \left (f x + e\right ) + 3} + 4 \, \tan \left (f x + e\right ) + 8\right ) + 20 \, {\left (a^{3} + 6 \, a^{2} b - 3 \, a b^{2} - 2 \, b^{3}\right )} \log \left (-4 \, \sqrt {4 \, \tan \left (f x + e\right ) + 3} + 4 \, \tan \left (f x + e\right ) + 8\right ) + 80 \, {\left (3 \, a^{2} b - b^{3}\right )} \sqrt {4 \, \tan \left (f x + e\right ) + 3}}{40 \, f} \] Input:

integrate((3+4*tan(f*x+e))^(1/2)*(a+b*tan(f*x+e))^3,x, algorithm="maxima")
 

Output:

1/40*(b^3*(4*tan(f*x + e) + 3)^(5/2) + 5*(4*a*b^2 - b^3)*(4*tan(f*x + e) + 
 3)^(3/2) + 40*(2*a^3 - 3*a^2*b - 6*a*b^2 + b^3)*arctan(sqrt(4*tan(f*x + e 
) + 3) + 2) + 40*(2*a^3 - 3*a^2*b - 6*a*b^2 + b^3)*arctan(sqrt(4*tan(f*x + 
 e) + 3) - 2) - 20*(a^3 + 6*a^2*b - 3*a*b^2 - 2*b^3)*log(4*sqrt(4*tan(f*x 
+ e) + 3) + 4*tan(f*x + e) + 8) + 20*(a^3 + 6*a^2*b - 3*a*b^2 - 2*b^3)*log 
(-4*sqrt(4*tan(f*x + e) + 3) + 4*tan(f*x + e) + 8) + 80*(3*a^2*b - b^3)*sq 
rt(4*tan(f*x + e) + 3))/f
 

Giac [F(-2)]

Exception generated. \[ \int \sqrt {3+4 \tan (e+f x)} (a+b \tan (e+f x))^3 \, dx=\text {Exception raised: TypeError} \] Input:

integrate((3+4*tan(f*x+e))^(1/2)*(a+b*tan(f*x+e))^3,x, algorithm="giac")
 

Output:

Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Unable to divide, perhaps due to ro 
unding error%%%{%%%{256,[19]%%%}+%%%{2048,[17]%%%}+%%%{7168,[15]%%%}+%%%{1 
4336,[13]
 

Mupad [B] (verification not implemented)

Time = 6.88 (sec) , antiderivative size = 1994, normalized size of antiderivative = 7.61 \[ \int \sqrt {3+4 \tan (e+f x)} (a+b \tan (e+f x))^3 \, dx=\text {Too large to display} \] Input:

int((4*tan(e + f*x) + 3)^(1/2)*(a + b*tan(e + f*x))^3,x)
 

Output:

(b^3/(4*f) + (b^2*(4*a - 3*b))/(8*f))*(4*tan(e + f*x) + 3)^(3/2) + (4*tan( 
e + f*x) + 3)^(1/2)*((11*b^3)/(8*f) + (3*b*(4*a - 3*b)^2)/(8*f) + (9*b^2*( 
4*a - 3*b))/(4*f)) + (atan(-((((256*(4*tan(e + f*x) + 3)^(1/2)*(144*a*b^5 
+ 144*a^5*b + 7*a^6 - 7*b^6 + 105*a^2*b^4 - 480*a^3*b^3 - 105*a^4*b^2))/f^ 
2 + (((3200*(4*b^3*f^2 - 12*a^2*b*f^2))/f^3 - (1536*(4*tan(e + f*x) + 3)^( 
1/2)*(a*b^2*(3 - 6i) - a^2*b*(6 + 3i) - a^3*(1 - 2i) + b^3*(2 + 1i)))/f)*( 
a*b^2*(3 - 6i) - a^2*b*(6 + 3i) - a^3*(1 - 2i) + b^3*(2 + 1i)))/(2*f))*(a* 
b^2*(3 - 6i) - a^2*b*(6 + 3i) - a^3*(1 - 2i) + b^3*(2 + 1i))*1i)/(2*f) + ( 
((256*(4*tan(e + f*x) + 3)^(1/2)*(144*a*b^5 + 144*a^5*b + 7*a^6 - 7*b^6 + 
105*a^2*b^4 - 480*a^3*b^3 - 105*a^4*b^2))/f^2 - (((3200*(4*b^3*f^2 - 12*a^ 
2*b*f^2))/f^3 + (1536*(4*tan(e + f*x) + 3)^(1/2)*(a*b^2*(3 - 6i) - a^2*b*( 
6 + 3i) - a^3*(1 - 2i) + b^3*(2 + 1i)))/f)*(a*b^2*(3 - 6i) - a^2*b*(6 + 3i 
) - a^3*(1 - 2i) + b^3*(2 + 1i)))/(2*f))*(a*b^2*(3 - 6i) - a^2*b*(6 + 3i) 
- a^3*(1 - 2i) + b^3*(2 + 1i))*1i)/(2*f))/((6400*(12*a*b^8 - 9*a^8*b - 4*a 
^9 + 3*b^9 + 32*a^3*b^6 - 18*a^4*b^5 + 24*a^5*b^4 - 24*a^6*b^3))/f^3 - ((( 
256*(4*tan(e + f*x) + 3)^(1/2)*(144*a*b^5 + 144*a^5*b + 7*a^6 - 7*b^6 + 10 
5*a^2*b^4 - 480*a^3*b^3 - 105*a^4*b^2))/f^2 + (((3200*(4*b^3*f^2 - 12*a^2* 
b*f^2))/f^3 - (1536*(4*tan(e + f*x) + 3)^(1/2)*(a*b^2*(3 - 6i) - a^2*b*(6 
+ 3i) - a^3*(1 - 2i) + b^3*(2 + 1i)))/f)*(a*b^2*(3 - 6i) - a^2*b*(6 + 3i) 
- a^3*(1 - 2i) + b^3*(2 + 1i)))/(2*f))*(a*b^2*(3 - 6i) - a^2*b*(6 + 3i)...
 

Reduce [F]

\[ \int \sqrt {3+4 \tan (e+f x)} (a+b \tan (e+f x))^3 \, dx=\left (\int \sqrt {4 \tan \left (f x +e \right )+3}d x \right ) a^{3}+\left (\int \sqrt {4 \tan \left (f x +e \right )+3}\, \tan \left (f x +e \right )^{3}d x \right ) b^{3}+3 \left (\int \sqrt {4 \tan \left (f x +e \right )+3}\, \tan \left (f x +e \right )^{2}d x \right ) a \,b^{2}+3 \left (\int \sqrt {4 \tan \left (f x +e \right )+3}\, \tan \left (f x +e \right )d x \right ) a^{2} b \] Input:

int((3+4*tan(f*x+e))^(1/2)*(a+b*tan(f*x+e))^3,x)
 

Output:

int(sqrt(4*tan(e + f*x) + 3),x)*a**3 + int(sqrt(4*tan(e + f*x) + 3)*tan(e 
+ f*x)**3,x)*b**3 + 3*int(sqrt(4*tan(e + f*x) + 3)*tan(e + f*x)**2,x)*a*b* 
*2 + 3*int(sqrt(4*tan(e + f*x) + 3)*tan(e + f*x),x)*a**2*b