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

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 = 338 \[ \int \sqrt {3+4 \tan (e+f x)} (a+b \tan (e+f x))^4 \, dx=-\frac {2 \left (a^4-2 a^3 b-6 a^2 b^2+2 a b^3+b^4\right ) \arctan \left (\frac {a^4-2 a^3 b-6 a^2 b^2+2 a b^3+b^4-2 \left (a^4-2 a^3 b-6 a^2 b^2+2 a b^3+b^4\right ) \tan (e+f x)}{\left (a^4-2 a^3 b-6 a^2 b^2+2 a b^3+b^4\right ) \sqrt {3+4 \tan (e+f x)}}\right )}{f}-\frac {\left (a^4+8 a^3 b-6 a^2 b^2-8 a b^3+b^4\right ) \text {arctanh}\left (\frac {2+\tan (e+f x)}{\sqrt {3+4 \tan (e+f x)}}\right )}{f}+\frac {8 a b \left (a^2-b^2\right ) \sqrt {3+4 \tan (e+f x)}}{f}+\frac {b^2 \left (390 a^2-84 a b-61 b^2\right ) (3+4 \tan (e+f x))^{3/2}}{420 f}+\frac {3 (6 a-b) b^3 \tan (e+f x) (3+4 \tan (e+f x))^{3/2}}{70 f}+\frac {b^2 (3+4 \tan (e+f x))^{3/2} (a+b \tan (e+f x))^2}{14 f} \] Output:

-2*(a^4-2*a^3*b-6*a^2*b^2+2*a*b^3+b^4)*arctan((a^4-2*a^3*b-6*a^2*b^2+2*a*b 
^3+b^4-2*(a^4-2*a^3*b-6*a^2*b^2+2*a*b^3+b^4)*tan(f*x+e))/(a^4-2*a^3*b-6*a^ 
2*b^2+2*a*b^3+b^4)/(3+4*tan(f*x+e))^(1/2))/f-(a^4+8*a^3*b-6*a^2*b^2-8*a*b^ 
3+b^4)*arctanh((2+tan(f*x+e))/(3+4*tan(f*x+e))^(1/2))/f+8*a*b*(a^2-b^2)*(3 
+4*tan(f*x+e))^(1/2)/f+1/420*b^2*(390*a^2-84*a*b-61*b^2)*(3+4*tan(f*x+e))^ 
(3/2)/f+3/70*(6*a-b)*b^3*tan(f*x+e)*(3+4*tan(f*x+e))^(3/2)/f+1/14*b^2*(3+4 
*tan(f*x+e))^(3/2)*(a+b*tan(f*x+e))^2/f
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 1.42 (sec) , antiderivative size = 184, normalized size of antiderivative = 0.54 \[ \int \sqrt {3+4 \tan (e+f x)} (a+b \tan (e+f x))^4 \, dx=\frac {(2+i) (a+i b)^4 \arctan \left (\left (\frac {1}{5}+\frac {2 i}{5}\right ) \sqrt {3+4 \tan (e+f x)}\right )}{f}-\frac {(1+2 i) (a-i b)^4 \text {arctanh}\left (\left (\frac {2}{5}+\frac {i}{5}\right ) \sqrt {3+4 \tan (e+f x)}\right )}{f}+\frac {b \sqrt {3+4 \tan (e+f x)} \left (3 \left (1120 a^3+420 a^2 b-1204 a b^2-61 b^3\right )+2 b \left (840 a^2+84 a b-149 b^2\right ) \tan (e+f x)+6 b^2 (112 a+3 b) \tan ^2(e+f x)+120 b^3 \tan ^3(e+f x)\right )}{420 f} \] Input:

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

Output:

((2 + I)*(a + I*b)^4*ArcTan[(1/5 + (2*I)/5)*Sqrt[3 + 4*Tan[e + f*x]]])/f - 
 ((1 + 2*I)*(a - I*b)^4*ArcTanh[(2/5 + I/5)*Sqrt[3 + 4*Tan[e + f*x]]])/f + 
 (b*Sqrt[3 + 4*Tan[e + f*x]]*(3*(1120*a^3 + 420*a^2*b - 1204*a*b^2 - 61*b^ 
3) + 2*b*(840*a^2 + 84*a*b - 149*b^2)*Tan[e + f*x] + 6*b^2*(112*a + 3*b)*T 
an[e + f*x]^2 + 120*b^3*Tan[e + f*x]^3))/(420*f)
 

Rubi [A] (verified)

Time = 1.84 (sec) , antiderivative size = 433, normalized size of antiderivative = 1.28, number of steps used = 18, number of rules used = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.630, Rules used = {3042, 4049, 27, 3042, 4120, 25, 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))^4 \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4049

\(\displaystyle \frac {1}{14} \int 2 \sqrt {4 \tan (e+f x)+3} (a+b \tan (e+f x)) \left (7 a^3+3 (6 a-b) b^2 \tan ^2(e+f x)-3 b^2 (a+b)+7 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))^2}{14 f}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {1}{7} \int \sqrt {4 \tan (e+f x)+3} (a+b \tan (e+f x)) \left (7 a^3+3 (6 a-b) b^2 \tan ^2(e+f x)-3 b^2 (a+b)+7 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))^2}{14 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{7} \int \sqrt {4 \tan (e+f x)+3} (a+b \tan (e+f x)) \left (7 a^3+3 (6 a-b) b^2 \tan (e+f x)^2-3 b^2 (a+b)+7 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))^2}{14 f}\)

\(\Big \downarrow \) 4120

\(\displaystyle \frac {1}{7} \left (\frac {3 b^3 (6 a-b) \tan (e+f x) (4 \tan (e+f x)+3)^{3/2}}{10 f}-\frac {1}{10} \int -\sqrt {4 \tan (e+f x)+3} \left (70 a^4-30 b^2 a^2-84 b^3 a+280 b \left (a^2-b^2\right ) \tan (e+f x) a+9 b^4+b^2 \left (390 a^2-84 b a-61 b^2\right ) \tan ^2(e+f x)\right )dx\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))^2}{14 f}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {1}{7} \left (\frac {1}{10} \int \sqrt {4 \tan (e+f x)+3} \left (70 a^4-30 b^2 a^2-84 b^3 a+280 b \left (a^2-b^2\right ) \tan (e+f x) a+9 b^4+b^2 \left (390 a^2-84 b a-61 b^2\right ) \tan ^2(e+f x)\right )dx+\frac {3 b^3 (6 a-b) \tan (e+f x) (4 \tan (e+f x)+3)^{3/2}}{10 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))^2}{14 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{7} \left (\frac {1}{10} \int \sqrt {4 \tan (e+f x)+3} \left (70 a^4-30 b^2 a^2-84 b^3 a+280 b \left (a^2-b^2\right ) \tan (e+f x) a+9 b^4+b^2 \left (390 a^2-84 b a-61 b^2\right ) \tan (e+f x)^2\right )dx+\frac {3 b^3 (6 a-b) \tan (e+f x) (4 \tan (e+f x)+3)^{3/2}}{10 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))^2}{14 f}\)

\(\Big \downarrow \) 4113

\(\displaystyle \frac {1}{7} \left (\frac {1}{10} \left (\int \sqrt {4 \tan (e+f x)+3} \left (70 \left (a^4-6 b^2 a^2+b^4\right )+280 a b \left (a^2-b^2\right ) \tan (e+f x)\right )dx+\frac {b^2 \left (390 a^2-84 a b-61 b^2\right ) (4 \tan (e+f x)+3)^{3/2}}{6 f}\right )+\frac {3 b^3 (6 a-b) \tan (e+f x) (4 \tan (e+f x)+3)^{3/2}}{10 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))^2}{14 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{7} \left (\frac {1}{10} \left (\int \sqrt {4 \tan (e+f x)+3} \left (70 \left (a^4-6 b^2 a^2+b^4\right )+280 a b \left (a^2-b^2\right ) \tan (e+f x)\right )dx+\frac {b^2 \left (390 a^2-84 a b-61 b^2\right ) (4 \tan (e+f x)+3)^{3/2}}{6 f}\right )+\frac {3 b^3 (6 a-b) \tan (e+f x) (4 \tan (e+f x)+3)^{3/2}}{10 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))^2}{14 f}\)

\(\Big \downarrow \) 4011

\(\displaystyle \frac {1}{7} \left (\frac {1}{10} \left (\int \frac {70 \left (3 a^2+2 b a-3 b^2\right ) \left (a^2-6 b a-b^2\right )+280 \left (a^2-b a-b^2\right ) \left (a^2+4 b a-b^2\right ) \tan (e+f x)}{\sqrt {4 \tan (e+f x)+3}}dx+\frac {b^2 \left (390 a^2-84 a b-61 b^2\right ) (4 \tan (e+f x)+3)^{3/2}}{6 f}+\frac {560 a b \left (a^2-b^2\right ) \sqrt {4 \tan (e+f x)+3}}{f}\right )+\frac {3 b^3 (6 a-b) \tan (e+f x) (4 \tan (e+f x)+3)^{3/2}}{10 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))^2}{14 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{7} \left (\frac {1}{10} \left (\int \frac {70 \left (3 a^2+2 b a-3 b^2\right ) \left (a^2-6 b a-b^2\right )+280 \left (a^2-b a-b^2\right ) \left (a^2+4 b a-b^2\right ) \tan (e+f x)}{\sqrt {4 \tan (e+f x)+3}}dx+\frac {b^2 \left (390 a^2-84 a b-61 b^2\right ) (4 \tan (e+f x)+3)^{3/2}}{6 f}+\frac {560 a b \left (a^2-b^2\right ) \sqrt {4 \tan (e+f x)+3}}{f}\right )+\frac {3 b^3 (6 a-b) \tan (e+f x) (4 \tan (e+f x)+3)^{3/2}}{10 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))^2}{14 f}\)

\(\Big \downarrow \) 4019

\(\displaystyle \frac {1}{7} \left (\frac {1}{10} \left (-\frac {1}{10} \int \frac {700 \left (a^4+8 b a^3-6 b^2 a^2-8 b^3 a+b^4-2 \left (a^4+8 b a^3-6 b^2 a^2-8 b^3 a+b^4\right ) \tan (e+f x)\right )}{\sqrt {4 \tan (e+f x)+3}}dx+\frac {1}{10} \int \frac {1400 \left (\tan (e+f x) \left (a^4-2 b a^3-6 b^2 a^2+2 b^3 a+b^4\right )+2 \left (a^4-2 b a^3-6 b^2 a^2+2 b^3 a+b^4\right )\right )}{\sqrt {4 \tan (e+f x)+3}}dx+\frac {b^2 \left (390 a^2-84 a b-61 b^2\right ) (4 \tan (e+f x)+3)^{3/2}}{6 f}+\frac {560 a b \left (a^2-b^2\right ) \sqrt {4 \tan (e+f x)+3}}{f}\right )+\frac {3 b^3 (6 a-b) \tan (e+f x) (4 \tan (e+f x)+3)^{3/2}}{10 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))^2}{14 f}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {1}{7} \left (\frac {1}{10} \left (-70 \int \frac {a^4+8 b a^3-6 b^2 a^2-8 b^3 a+b^4-2 \left (a^4+8 b a^3-6 b^2 a^2-8 b^3 a+b^4\right ) \tan (e+f x)}{\sqrt {4 \tan (e+f x)+3}}dx+140 \int \frac {\tan (e+f x) \left (a^4-2 b a^3-6 b^2 a^2+2 b^3 a+b^4\right )+2 \left (a^4-2 b a^3-6 b^2 a^2+2 b^3 a+b^4\right )}{\sqrt {4 \tan (e+f x)+3}}dx+\frac {b^2 \left (390 a^2-84 a b-61 b^2\right ) (4 \tan (e+f x)+3)^{3/2}}{6 f}+\frac {560 a b \left (a^2-b^2\right ) \sqrt {4 \tan (e+f x)+3}}{f}\right )+\frac {3 b^3 (6 a-b) \tan (e+f x) (4 \tan (e+f x)+3)^{3/2}}{10 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))^2}{14 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{7} \left (\frac {1}{10} \left (-70 \int \frac {a^4+8 b a^3-6 b^2 a^2-8 b^3 a+b^4-2 \left (a^4+8 b a^3-6 b^2 a^2-8 b^3 a+b^4\right ) \tan (e+f x)}{\sqrt {4 \tan (e+f x)+3}}dx+140 \int \frac {\tan (e+f x) \left (a^4-2 b a^3-6 b^2 a^2+2 b^3 a+b^4\right )+2 \left (a^4-2 b a^3-6 b^2 a^2+2 b^3 a+b^4\right )}{\sqrt {4 \tan (e+f x)+3}}dx+\frac {b^2 \left (390 a^2-84 a b-61 b^2\right ) (4 \tan (e+f x)+3)^{3/2}}{6 f}+\frac {560 a b \left (a^2-b^2\right ) \sqrt {4 \tan (e+f x)+3}}{f}\right )+\frac {3 b^3 (6 a-b) \tan (e+f x) (4 \tan (e+f x)+3)^{3/2}}{10 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))^2}{14 f}\)

\(\Big \downarrow \) 4018

\(\displaystyle \frac {1}{7} \left (\frac {1}{10} \left (\frac {560 \left (a^4+8 a^3 b-6 a^2 b^2-8 a b^3+b^4\right )^2 \int \frac {1}{\frac {64 \left (\tan (e+f x) \left (a^4+8 b a^3-6 b^2 a^2-8 b^3 a+b^4\right )+2 \left (a^4+8 b a^3-6 b^2 a^2-8 b^3 a+b^4\right )\right )^2}{4 \tan (e+f x)+3}-64 \left (a^4+8 b a^3-6 b^2 a^2-8 b^3 a+b^4\right )^2}d\frac {8 \left (\tan (e+f x) \left (a^4+8 b a^3-6 b^2 a^2-8 b^3 a+b^4\right )+2 \left (a^4+8 b a^3-6 b^2 a^2-8 b^3 a+b^4\right )\right )}{\sqrt {4 \tan (e+f x)+3}}}{f}-\frac {280 \left (a^4-2 a^3 b-6 a^2 b^2+2 a b^3+b^4\right )^2 \int \frac {1}{4 \left (a^4-2 b a^3-6 b^2 a^2+2 b^3 a+b^4\right )^2+\frac {4 \left (a^4-2 b a^3-6 b^2 a^2+2 b^3 a+b^4-2 \left (a^4-2 b a^3-6 b^2 a^2+2 b^3 a+b^4\right ) \tan (e+f x)\right )^2}{4 \tan (e+f x)+3}}d\frac {2 \left (a^4-2 b a^3-6 b^2 a^2+2 b^3 a+b^4-2 \left (a^4-2 b a^3-6 b^2 a^2+2 b^3 a+b^4\right ) \tan (e+f x)\right )}{\sqrt {4 \tan (e+f x)+3}}}{f}+\frac {b^2 \left (390 a^2-84 a b-61 b^2\right ) (4 \tan (e+f x)+3)^{3/2}}{6 f}+\frac {560 a b \left (a^2-b^2\right ) \sqrt {4 \tan (e+f x)+3}}{f}\right )+\frac {3 b^3 (6 a-b) \tan (e+f x) (4 \tan (e+f x)+3)^{3/2}}{10 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))^2}{14 f}\)

\(\Big \downarrow \) 216

\(\displaystyle \frac {1}{7} \left (\frac {1}{10} \left (\frac {560 \left (a^4+8 a^3 b-6 a^2 b^2-8 a b^3+b^4\right )^2 \int \frac {1}{\frac {64 \left (\tan (e+f x) \left (a^4+8 b a^3-6 b^2 a^2-8 b^3 a+b^4\right )+2 \left (a^4+8 b a^3-6 b^2 a^2-8 b^3 a+b^4\right )\right )^2}{4 \tan (e+f x)+3}-64 \left (a^4+8 b a^3-6 b^2 a^2-8 b^3 a+b^4\right )^2}d\frac {8 \left (\tan (e+f x) \left (a^4+8 b a^3-6 b^2 a^2-8 b^3 a+b^4\right )+2 \left (a^4+8 b a^3-6 b^2 a^2-8 b^3 a+b^4\right )\right )}{\sqrt {4 \tan (e+f x)+3}}}{f}+\frac {b^2 \left (390 a^2-84 a b-61 b^2\right ) (4 \tan (e+f x)+3)^{3/2}}{6 f}+\frac {560 a b \left (a^2-b^2\right ) \sqrt {4 \tan (e+f x)+3}}{f}-\frac {140 \left (a^4-2 a^3 b-6 a^2 b^2+2 a b^3+b^4\right ) \arctan \left (\frac {a^4-2 a^3 b-6 a^2 b^2-2 \left (a^4-2 a^3 b-6 a^2 b^2+2 a b^3+b^4\right ) \tan (e+f x)+2 a b^3+b^4}{\left (a^4-2 a^3 b-6 a^2 b^2+2 a b^3+b^4\right ) \sqrt {4 \tan (e+f x)+3}}\right )}{f}\right )+\frac {3 b^3 (6 a-b) \tan (e+f x) (4 \tan (e+f x)+3)^{3/2}}{10 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))^2}{14 f}\)

\(\Big \downarrow \) 220

\(\displaystyle \frac {1}{7} \left (\frac {1}{10} \left (\frac {b^2 \left (390 a^2-84 a b-61 b^2\right ) (4 \tan (e+f x)+3)^{3/2}}{6 f}+\frac {560 a b \left (a^2-b^2\right ) \sqrt {4 \tan (e+f x)+3}}{f}-\frac {140 \left (a^4-2 a^3 b-6 a^2 b^2+2 a b^3+b^4\right ) \arctan \left (\frac {a^4-2 a^3 b-6 a^2 b^2-2 \left (a^4-2 a^3 b-6 a^2 b^2+2 a b^3+b^4\right ) \tan (e+f x)+2 a b^3+b^4}{\left (a^4-2 a^3 b-6 a^2 b^2+2 a b^3+b^4\right ) \sqrt {4 \tan (e+f x)+3}}\right )}{f}-\frac {70 \left (a^4+8 a^3 b-6 a^2 b^2-8 a b^3+b^4\right ) \text {arctanh}\left (\frac {\left (a^4+8 a^3 b-6 a^2 b^2-8 a b^3+b^4\right ) \tan (e+f x)+2 \left (a^4+8 a^3 b-6 a^2 b^2-8 a b^3+b^4\right )}{\left (a^4+8 a^3 b-6 a^2 b^2-8 a b^3+b^4\right ) \sqrt {4 \tan (e+f x)+3}}\right )}{f}\right )+\frac {3 b^3 (6 a-b) \tan (e+f x) (4 \tan (e+f x)+3)^{3/2}}{10 f}\right )+\frac {b^2 (4 \tan (e+f x)+3)^{3/2} (a+b \tan (e+f x))^2}{14 f}\)

Input:

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

Output:

(b^2*(3 + 4*Tan[e + f*x])^(3/2)*(a + b*Tan[e + f*x])^2)/(14*f) + ((3*(6*a 
- b)*b^3*Tan[e + f*x]*(3 + 4*Tan[e + f*x])^(3/2))/(10*f) + ((-140*(a^4 - 2 
*a^3*b - 6*a^2*b^2 + 2*a*b^3 + b^4)*ArcTan[(a^4 - 2*a^3*b - 6*a^2*b^2 + 2* 
a*b^3 + b^4 - 2*(a^4 - 2*a^3*b - 6*a^2*b^2 + 2*a*b^3 + b^4)*Tan[e + f*x])/ 
((a^4 - 2*a^3*b - 6*a^2*b^2 + 2*a*b^3 + b^4)*Sqrt[3 + 4*Tan[e + f*x]])])/f 
 - (70*(a^4 + 8*a^3*b - 6*a^2*b^2 - 8*a*b^3 + b^4)*ArcTanh[(2*(a^4 + 8*a^3 
*b - 6*a^2*b^2 - 8*a*b^3 + b^4) + (a^4 + 8*a^3*b - 6*a^2*b^2 - 8*a*b^3 + b 
^4)*Tan[e + f*x])/((a^4 + 8*a^3*b - 6*a^2*b^2 - 8*a*b^3 + b^4)*Sqrt[3 + 4* 
Tan[e + f*x]])])/f + (560*a*b*(a^2 - b^2)*Sqrt[3 + 4*Tan[e + f*x]])/f + (b 
^2*(390*a^2 - 84*a*b - 61*b^2)*(3 + 4*Tan[e + f*x])^(3/2))/(6*f))/10)/7
 

Defintions of rubi rules used

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

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]
 

rule 4120
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.) 
*(x_)])^(n_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f 
_.)*(x_)]^2), x_Symbol] :> Simp[b*C*Tan[e + f*x]*((c + d*Tan[e + f*x])^(n + 
 1)/(d*f*(n + 2))), x] - Simp[1/(d*(n + 2))   Int[(c + d*Tan[e + f*x])^n*Si 
mp[b*c*C - a*A*d*(n + 2) - (A*b + a*B - b*C)*d*(n + 2)*Tan[e + f*x] - (a*C* 
d*(n + 2) - b*(c*C - B*d*(n + 2)))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, 
b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[c^2 + d^2, 0] && 
  !LtQ[n, -1]
 
Maple [A] (verified)

Time = 0.46 (sec) , antiderivative size = 360, normalized size of antiderivative = 1.07

method result size
derivativedivides \(\frac {\frac {b^{4} \left (3+4 \tan \left (f x +e \right )\right )^{\frac {7}{2}}}{224}+\frac {a \,b^{3} \left (3+4 \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{10}-\frac {3 b^{4} \left (3+4 \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{80}+a^{2} b^{2} \left (3+4 \tan \left (f x +e \right )\right )^{\frac {3}{2}}-\frac {a \,b^{3} \left (3+4 \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{2}-\frac {7 b^{4} \left (3+4 \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{96}+8 \sqrt {3+4 \tan \left (f x +e \right )}\, a^{3} b -8 \sqrt {3+4 \tan \left (f x +e \right )}\, a \,b^{3}+\frac {\left (-32 a^{4}-256 a^{3} b +192 a^{2} b^{2}+256 a \,b^{3}-32 b^{4}\right ) \ln \left (8+4 \tan \left (f x +e \right )+4 \sqrt {3+4 \tan \left (f x +e \right )}\right )}{64}+\frac {\left (64 a^{4}-128 a^{3} b -384 a^{2} b^{2}+128 a \,b^{3}+64 b^{4}\right ) \arctan \left (2+\sqrt {3+4 \tan \left (f x +e \right )}\right )}{32}+\frac {\left (32 a^{4}+256 a^{3} b -192 a^{2} b^{2}-256 a \,b^{3}+32 b^{4}\right ) \ln \left (8+4 \tan \left (f x +e \right )-4 \sqrt {3+4 \tan \left (f x +e \right )}\right )}{64}+\frac {\left (64 a^{4}-128 a^{3} b -384 a^{2} b^{2}+128 a \,b^{3}+64 b^{4}\right ) \arctan \left (-2+\sqrt {3+4 \tan \left (f x +e \right )}\right )}{32}}{f}\) \(360\)
default \(\frac {\frac {b^{4} \left (3+4 \tan \left (f x +e \right )\right )^{\frac {7}{2}}}{224}+\frac {a \,b^{3} \left (3+4 \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{10}-\frac {3 b^{4} \left (3+4 \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{80}+a^{2} b^{2} \left (3+4 \tan \left (f x +e \right )\right )^{\frac {3}{2}}-\frac {a \,b^{3} \left (3+4 \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{2}-\frac {7 b^{4} \left (3+4 \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{96}+8 \sqrt {3+4 \tan \left (f x +e \right )}\, a^{3} b -8 \sqrt {3+4 \tan \left (f x +e \right )}\, a \,b^{3}+\frac {\left (-32 a^{4}-256 a^{3} b +192 a^{2} b^{2}+256 a \,b^{3}-32 b^{4}\right ) \ln \left (8+4 \tan \left (f x +e \right )+4 \sqrt {3+4 \tan \left (f x +e \right )}\right )}{64}+\frac {\left (64 a^{4}-128 a^{3} b -384 a^{2} b^{2}+128 a \,b^{3}+64 b^{4}\right ) \arctan \left (2+\sqrt {3+4 \tan \left (f x +e \right )}\right )}{32}+\frac {\left (32 a^{4}+256 a^{3} b -192 a^{2} b^{2}-256 a \,b^{3}+32 b^{4}\right ) \ln \left (8+4 \tan \left (f x +e \right )-4 \sqrt {3+4 \tan \left (f x +e \right )}\right )}{64}+\frac {\left (64 a^{4}-128 a^{3} b -384 a^{2} b^{2}+128 a \,b^{3}+64 b^{4}\right ) \arctan \left (-2+\sqrt {3+4 \tan \left (f x +e \right )}\right )}{32}}{f}\) \(360\)
parts \(\frac {a^{4} \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^{4} \left (\frac {\left (3+4 \tan \left (f x +e \right )\right )^{\frac {7}{2}}}{224}-\frac {3 \left (3+4 \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{80}-\frac {7 \left (3+4 \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{96}+\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 {4 a \,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 {6 a^{2} 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 {4 a^{3} 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}\) \(594\)

Input:

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

Output:

1/f*(1/224*b^4*(3+4*tan(f*x+e))^(7/2)+1/10*a*b^3*(3+4*tan(f*x+e))^(5/2)-3/ 
80*b^4*(3+4*tan(f*x+e))^(5/2)+a^2*b^2*(3+4*tan(f*x+e))^(3/2)-1/2*a*b^3*(3+ 
4*tan(f*x+e))^(3/2)-7/96*b^4*(3+4*tan(f*x+e))^(3/2)+8*(3+4*tan(f*x+e))^(1/ 
2)*a^3*b-8*(3+4*tan(f*x+e))^(1/2)*a*b^3+1/64*(-32*a^4-256*a^3*b+192*a^2*b^ 
2+256*a*b^3-32*b^4)*ln(8+4*tan(f*x+e)+4*(3+4*tan(f*x+e))^(1/2))+1/32*(64*a 
^4-128*a^3*b-384*a^2*b^2+128*a*b^3+64*b^4)*arctan(2+(3+4*tan(f*x+e))^(1/2) 
)+1/64*(32*a^4+256*a^3*b-192*a^2*b^2-256*a*b^3+32*b^4)*ln(8+4*tan(f*x+e)-4 
*(3+4*tan(f*x+e))^(1/2))+1/32*(64*a^4-128*a^3*b-384*a^2*b^2+128*a*b^3+64*b 
^4)*arctan(-2+(3+4*tan(f*x+e))^(1/2)))
 

Fricas [A] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 298, normalized size of antiderivative = 0.88 \[ \int \sqrt {3+4 \tan (e+f x)} (a+b \tan (e+f x))^4 \, dx=\frac {840 \, {\left (a^{4} - 2 \, a^{3} b - 6 \, a^{2} b^{2} + 2 \, a b^{3} + b^{4}\right )} \arctan \left (\sqrt {4 \, \tan \left (f x + e\right ) + 3} + 2\right ) + 840 \, {\left (a^{4} - 2 \, a^{3} b - 6 \, a^{2} b^{2} + 2 \, a b^{3} + b^{4}\right )} \arctan \left (\sqrt {4 \, \tan \left (f x + e\right ) + 3} - 2\right ) - 210 \, {\left (a^{4} + 8 \, a^{3} b - 6 \, a^{2} b^{2} - 8 \, a b^{3} + b^{4}\right )} \log \left (\sqrt {4 \, \tan \left (f x + e\right ) + 3} + \tan \left (f x + e\right ) + 2\right ) + 210 \, {\left (a^{4} + 8 \, a^{3} b - 6 \, a^{2} b^{2} - 8 \, a b^{3} + b^{4}\right )} \log \left (-\sqrt {4 \, \tan \left (f x + e\right ) + 3} + \tan \left (f x + e\right ) + 2\right ) + {\left (120 \, b^{4} \tan \left (f x + e\right )^{3} + 3360 \, a^{3} b + 1260 \, a^{2} b^{2} - 3612 \, a b^{3} - 183 \, b^{4} + 6 \, {\left (112 \, a b^{3} + 3 \, b^{4}\right )} \tan \left (f x + e\right )^{2} + 2 \, {\left (840 \, a^{2} b^{2} + 84 \, a b^{3} - 149 \, b^{4}\right )} \tan \left (f x + e\right )\right )} \sqrt {4 \, \tan \left (f x + e\right ) + 3}}{420 \, f} \] Input:

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

Output:

1/420*(840*(a^4 - 2*a^3*b - 6*a^2*b^2 + 2*a*b^3 + b^4)*arctan(sqrt(4*tan(f 
*x + e) + 3) + 2) + 840*(a^4 - 2*a^3*b - 6*a^2*b^2 + 2*a*b^3 + b^4)*arctan 
(sqrt(4*tan(f*x + e) + 3) - 2) - 210*(a^4 + 8*a^3*b - 6*a^2*b^2 - 8*a*b^3 
+ b^4)*log(sqrt(4*tan(f*x + e) + 3) + tan(f*x + e) + 2) + 210*(a^4 + 8*a^3 
*b - 6*a^2*b^2 - 8*a*b^3 + b^4)*log(-sqrt(4*tan(f*x + e) + 3) + tan(f*x + 
e) + 2) + (120*b^4*tan(f*x + e)^3 + 3360*a^3*b + 1260*a^2*b^2 - 3612*a*b^3 
 - 183*b^4 + 6*(112*a*b^3 + 3*b^4)*tan(f*x + e)^2 + 2*(840*a^2*b^2 + 84*a* 
b^3 - 149*b^4)*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))^4 \, dx=\int \left (a + b \tan {\left (e + f x \right )}\right )^{4} \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))**4,x)
 

Output:

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

Maxima [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 305, normalized size of antiderivative = 0.90 \[ \int \sqrt {3+4 \tan (e+f x)} (a+b \tan (e+f x))^4 \, dx=\frac {15 \, b^{4} {\left (4 \, \tan \left (f x + e\right ) + 3\right )}^{\frac {7}{2}} + 42 \, {\left (8 \, a b^{3} - 3 \, b^{4}\right )} {\left (4 \, \tan \left (f x + e\right ) + 3\right )}^{\frac {5}{2}} + 35 \, {\left (96 \, a^{2} b^{2} - 48 \, a b^{3} - 7 \, b^{4}\right )} {\left (4 \, \tan \left (f x + e\right ) + 3\right )}^{\frac {3}{2}} + 6720 \, {\left (a^{4} - 2 \, a^{3} b - 6 \, a^{2} b^{2} + 2 \, a b^{3} + b^{4}\right )} \arctan \left (\sqrt {4 \, \tan \left (f x + e\right ) + 3} + 2\right ) + 6720 \, {\left (a^{4} - 2 \, a^{3} b - 6 \, a^{2} b^{2} + 2 \, a b^{3} + b^{4}\right )} \arctan \left (\sqrt {4 \, \tan \left (f x + e\right ) + 3} - 2\right ) - 1680 \, {\left (a^{4} + 8 \, a^{3} b - 6 \, a^{2} b^{2} - 8 \, a b^{3} + b^{4}\right )} \log \left (4 \, \sqrt {4 \, \tan \left (f x + e\right ) + 3} + 4 \, \tan \left (f x + e\right ) + 8\right ) + 1680 \, {\left (a^{4} + 8 \, a^{3} b - 6 \, a^{2} b^{2} - 8 \, a b^{3} + b^{4}\right )} \log \left (-4 \, \sqrt {4 \, \tan \left (f x + e\right ) + 3} + 4 \, \tan \left (f x + e\right ) + 8\right ) + 26880 \, {\left (a^{3} b - a b^{3}\right )} \sqrt {4 \, \tan \left (f x + e\right ) + 3}}{3360 \, f} \] Input:

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

Output:

1/3360*(15*b^4*(4*tan(f*x + e) + 3)^(7/2) + 42*(8*a*b^3 - 3*b^4)*(4*tan(f* 
x + e) + 3)^(5/2) + 35*(96*a^2*b^2 - 48*a*b^3 - 7*b^4)*(4*tan(f*x + e) + 3 
)^(3/2) + 6720*(a^4 - 2*a^3*b - 6*a^2*b^2 + 2*a*b^3 + b^4)*arctan(sqrt(4*t 
an(f*x + e) + 3) + 2) + 6720*(a^4 - 2*a^3*b - 6*a^2*b^2 + 2*a*b^3 + b^4)*a 
rctan(sqrt(4*tan(f*x + e) + 3) - 2) - 1680*(a^4 + 8*a^3*b - 6*a^2*b^2 - 8* 
a*b^3 + b^4)*log(4*sqrt(4*tan(f*x + e) + 3) + 4*tan(f*x + e) + 8) + 1680*( 
a^4 + 8*a^3*b - 6*a^2*b^2 - 8*a*b^3 + b^4)*log(-4*sqrt(4*tan(f*x + e) + 3) 
 + 4*tan(f*x + e) + 8) + 26880*(a^3*b - a*b^3)*sqrt(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))^4 \, dx=\text {Exception raised: TypeError} \] Input:

integrate((3+4*tan(f*x+e))^(1/2)*(a+b*tan(f*x+e))^4,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%%%{%%%{1024,[24]%%%}+%%%{10240,[22]%%%}+%%%{46080,[20]%%%}+%% 
%{122880,
 

Mupad [B] (verification not implemented)

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

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

Output:

((3*b^4)/(80*f) + (b^3*(4*a - 3*b))/(40*f))*(4*tan(e + f*x) + 3)^(5/2) + ( 
4*tan(e + f*x) + 3)^(3/2)*((11*b^4)/(96*f) + (b^2*(4*a - 3*b)^2)/(16*f) + 
(b^3*(4*a - 3*b))/(4*f)) + (4*tan(e + f*x) + 3)^(1/2)*((9*b^2*(4*a - 3*b)^ 
2)/(8*f) - (21*b^4)/(8*f) + (b*(4*a - 3*b)^3)/(8*f) + (11*b^3*(4*a - 3*b)) 
/(8*f)) + (b^4*(4*tan(e + f*x) + 3)^(7/2))/(224*f) + (atan(((((((12800*(4* 
a*b^3*f^2 - 4*a^3*b*f^2))/f^3 - (3072*(4*tan(e + f*x) + 3)^(1/2)*(a^3*b*(4 
 + 2i) - a*b^3*(4 + 2i) + a^4*(1/2 - 1i) + b^4*(1/2 - 1i) - a^2*b^2*(3 - 6 
i)))/f)*(a^3*b*(4 + 2i) - a*b^3*(4 + 2i) + a^4*(1/2 - 1i) + b^4*(1/2 - 1i) 
 - a^2*b^2*(3 - 6i)))/f + (256*(4*tan(e + f*x) + 3)^(1/2)*(192*a^7*b - 192 
*a*b^7 + 7*a^8 + 7*b^8 - 196*a^2*b^6 + 1344*a^3*b^5 + 490*a^4*b^4 - 1344*a 
^5*b^3 - 196*a^6*b^2))/f^2)*(a^3*b*(4 + 2i) - a*b^3*(4 + 2i) + a^4*(1/2 - 
1i) + b^4*(1/2 - 1i) - a^2*b^2*(3 - 6i))*1i)/f - (((((12800*(4*a*b^3*f^2 - 
 4*a^3*b*f^2))/f^3 + (3072*(4*tan(e + f*x) + 3)^(1/2)*(a^3*b*(4 + 2i) - a* 
b^3*(4 + 2i) + a^4*(1/2 - 1i) + b^4*(1/2 - 1i) - a^2*b^2*(3 - 6i)))/f)*(a^ 
3*b*(4 + 2i) - a*b^3*(4 + 2i) + a^4*(1/2 - 1i) + b^4*(1/2 - 1i) - a^2*b^2* 
(3 - 6i)))/f - (256*(4*tan(e + f*x) + 3)^(1/2)*(192*a^7*b - 192*a*b^7 + 7* 
a^8 + 7*b^8 - 196*a^2*b^6 + 1344*a^3*b^5 + 490*a^4*b^4 - 1344*a^5*b^3 - 19 
6*a^6*b^2))/f^2)*(a^3*b*(4 + 2i) - a*b^3*(4 + 2i) + a^4*(1/2 - 1i) + b^4*( 
1/2 - 1i) - a^2*b^2*(3 - 6i))*1i)/f)/((((((12800*(4*a*b^3*f^2 - 4*a^3*b*f^ 
2))/f^3 - (3072*(4*tan(e + f*x) + 3)^(1/2)*(a^3*b*(4 + 2i) - a*b^3*(4 +...
 

Reduce [F]

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

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

Output:

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