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

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

Optimal result

Integrand size = 27, antiderivative size = 342 \[ \int \frac {\sqrt {c+d \tan (e+f x)}}{(a+b \tan (e+f x))^3} \, dx=-\frac {\sqrt {c-i d} \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{(i a+b)^3 f}+\frac {\sqrt {c+i d} \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{(i a-b)^3 f}+\frac {\sqrt {b} \left (40 a^3 b c d-24 a b^3 c d-15 a^4 d^2-6 a^2 b^2 \left (4 c^2-3 d^2\right )+b^4 \left (8 c^2+d^2\right )\right ) \text {arctanh}\left (\frac {\sqrt {b} \sqrt {c+d \tan (e+f x)}}{\sqrt {b c-a d}}\right )}{4 \left (a^2+b^2\right )^3 (b c-a d)^{3/2} f}-\frac {b \sqrt {c+d \tan (e+f x)}}{2 \left (a^2+b^2\right ) f (a+b \tan (e+f x))^2}-\frac {b \left (8 a b c-7 a^2 d+b^2 d\right ) \sqrt {c+d \tan (e+f x)}}{4 \left (a^2+b^2\right )^2 (b c-a d) f (a+b \tan (e+f x))} \] Output:

-(c-I*d)^(1/2)*arctanh((c+d*tan(f*x+e))^(1/2)/(c-I*d)^(1/2))/(I*a+b)^3/f+( 
c+I*d)^(1/2)*arctanh((c+d*tan(f*x+e))^(1/2)/(c+I*d)^(1/2))/(I*a-b)^3/f+1/4 
*b^(1/2)*(40*a^3*b*c*d-24*a*b^3*c*d-15*a^4*d^2-6*a^2*b^2*(4*c^2-3*d^2)+b^4 
*(8*c^2+d^2))*arctanh(b^(1/2)*(c+d*tan(f*x+e))^(1/2)/(-a*d+b*c)^(1/2))/(a^ 
2+b^2)^3/(-a*d+b*c)^(3/2)/f-1/2*b*(c+d*tan(f*x+e))^(1/2)/(a^2+b^2)/f/(a+b* 
tan(f*x+e))^2-1/4*b*(-7*a^2*d+8*a*b*c+b^2*d)*(c+d*tan(f*x+e))^(1/2)/(a^2+b 
^2)^2/(-a*d+b*c)/f/(a+b*tan(f*x+e))
 

Mathematica [B] (verified)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(747\) vs. \(2(342)=684\).

Time = 6.27 (sec) , antiderivative size = 747, normalized size of antiderivative = 2.18 \[ \int \frac {\sqrt {c+d \tan (e+f x)}}{(a+b \tan (e+f x))^3} \, dx=-\frac {b^2 (c+d \tan (e+f x))^{3/2}}{2 \left (a^2+b^2\right ) (b c-a d) f (a+b \tan (e+f x))^2}-\frac {-\frac {b d \sqrt {c+d \tan (e+f x)}}{f (a+b \tan (e+f x))}-\frac {2 \left (-\frac {\frac {\frac {i \sqrt {c-i d} \left (-i b (b c-a d)^2 \left (3 a^2 b c-b^3 c-a^3 d+3 a b^2 d\right )-b (b c-a d)^2 \left (a^3 c-3 a b^2 c+3 a^2 b d-b^3 d\right )\right ) \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{(-c+i d) f}-\frac {i \sqrt {c+i d} \left (i b (b c-a d)^2 \left (3 a^2 b c-b^3 c-a^3 d+3 a b^2 d\right )-b (b c-a d)^2 \left (a^3 c-3 a b^2 c+3 a^2 b d-b^3 d\right )\right ) \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{(-c-i d) f}}{a^2+b^2}+\frac {2 \sqrt {b c-a d} \left (\frac {1}{8} a^2 b^2 d (b c-a d) \left (8 a b c-7 a^2 d+b^2 d\right )-a b^2 (b c-a d)^2 \left (2 a b c-a^2 d+b^2 d\right )-\frac {1}{8} b^3 (b c-a d) \left (8 a^2 b c^2-8 b^3 c^2-8 a^3 c d+16 a b^2 c d-9 a^2 b d^2-b^3 d^2\right )\right ) \text {arctanh}\left (\frac {\sqrt {b} \sqrt {c+d \tan (e+f x)}}{\sqrt {b c-a d}}\right )}{\sqrt {b} \left (a^2+b^2\right ) (-b c+a d) f}}{\left (a^2+b^2\right ) (b c-a d)}-\frac {\left (\frac {1}{4} b^3 (b c-a d) (4 a c+b d)-a \left (\frac {3}{4} a b^2 d (b c-a d)-b^2 (b c-a d)^2\right )\right ) \sqrt {c+d \tan (e+f x)}}{\left (a^2+b^2\right ) (b c-a d) f (a+b \tan (e+f x))}\right )}{b}}{2 \left (a^2+b^2\right ) (b c-a d)} \] Input:

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

Output:

-1/2*(b^2*(c + d*Tan[e + f*x])^(3/2))/((a^2 + b^2)*(b*c - a*d)*f*(a + b*Ta 
n[e + f*x])^2) - (-((b*d*Sqrt[c + d*Tan[e + f*x]])/(f*(a + b*Tan[e + f*x]) 
)) - (2*(-((((I*Sqrt[c - I*d]*((-I)*b*(b*c - a*d)^2*(3*a^2*b*c - b^3*c - a 
^3*d + 3*a*b^2*d) - b*(b*c - a*d)^2*(a^3*c - 3*a*b^2*c + 3*a^2*b*d - b^3*d 
))*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c - I*d]])/((-c + I*d)*f) - (I*Sq 
rt[c + I*d]*(I*b*(b*c - a*d)^2*(3*a^2*b*c - b^3*c - a^3*d + 3*a*b^2*d) - b 
*(b*c - a*d)^2*(a^3*c - 3*a*b^2*c + 3*a^2*b*d - b^3*d))*ArcTanh[Sqrt[c + d 
*Tan[e + f*x]]/Sqrt[c + I*d]])/((-c - I*d)*f))/(a^2 + b^2) + (2*Sqrt[b*c - 
 a*d]*((a^2*b^2*d*(b*c - a*d)*(8*a*b*c - 7*a^2*d + b^2*d))/8 - a*b^2*(b*c 
- a*d)^2*(2*a*b*c - a^2*d + b^2*d) - (b^3*(b*c - a*d)*(8*a^2*b*c^2 - 8*b^3 
*c^2 - 8*a^3*c*d + 16*a*b^2*c*d - 9*a^2*b*d^2 - b^3*d^2))/8)*ArcTanh[(Sqrt 
[b]*Sqrt[c + d*Tan[e + f*x]])/Sqrt[b*c - a*d]])/(Sqrt[b]*(a^2 + b^2)*(-(b* 
c) + a*d)*f))/((a^2 + b^2)*(b*c - a*d))) - (((b^3*(b*c - a*d)*(4*a*c + b*d 
))/4 - a*((3*a*b^2*d*(b*c - a*d))/4 - b^2*(b*c - a*d)^2))*Sqrt[c + d*Tan[e 
 + f*x]])/((a^2 + b^2)*(b*c - a*d)*f*(a + b*Tan[e + f*x]))))/b)/(2*(a^2 + 
b^2)*(b*c - a*d))
 

Rubi [A] (warning: unable to verify)

Time = 2.77 (sec) , antiderivative size = 385, normalized size of antiderivative = 1.13, number of steps used = 20, number of rules used = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.704, Rules used = {3042, 4051, 27, 3042, 4132, 27, 3042, 4136, 27, 3042, 4022, 3042, 4020, 25, 73, 221, 4117, 73, 221}

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4051

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4132

\(\displaystyle \frac {-\frac {\int \frac {8 c d a^3-b \left (8 c^2-9 d^2\right ) a^2-16 b^2 c d a+b d \left (-7 d a^2+8 b c a+b^2 d\right ) \tan ^2(e+f x)+b^3 \left (8 c^2+d^2\right )+8 (b c-a d) \left (-d a^2+2 b c a+b^2 d\right ) \tan (e+f x)}{2 (a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}dx}{\left (a^2+b^2\right ) (b c-a d)}-\frac {b \left (-7 a^2 d+8 a b c+b^2 d\right ) \sqrt {c+d \tan (e+f x)}}{f \left (a^2+b^2\right ) (b c-a d) (a+b \tan (e+f x))}}{4 \left (a^2+b^2\right )}-\frac {b \sqrt {c+d \tan (e+f x)}}{2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {-\frac {\int \frac {8 c d a^3-b \left (8 c^2-9 d^2\right ) a^2-16 b^2 c d a+b d \left (-7 d a^2+8 b c a+b^2 d\right ) \tan ^2(e+f x)+b^3 \left (8 c^2+d^2\right )+8 (b c-a d) \left (-d a^2+2 b c a+b^2 d\right ) \tan (e+f x)}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}dx}{2 \left (a^2+b^2\right ) (b c-a d)}-\frac {b \left (-7 a^2 d+8 a b c+b^2 d\right ) \sqrt {c+d \tan (e+f x)}}{f \left (a^2+b^2\right ) (b c-a d) (a+b \tan (e+f x))}}{4 \left (a^2+b^2\right )}-\frac {b \sqrt {c+d \tan (e+f x)}}{2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {-\frac {\int \frac {8 c d a^3-b \left (8 c^2-9 d^2\right ) a^2-16 b^2 c d a+b d \left (-7 d a^2+8 b c a+b^2 d\right ) \tan (e+f x)^2+b^3 \left (8 c^2+d^2\right )+8 (b c-a d) \left (-d a^2+2 b c a+b^2 d\right ) \tan (e+f x)}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}dx}{2 \left (a^2+b^2\right ) (b c-a d)}-\frac {b \left (-7 a^2 d+8 a b c+b^2 d\right ) \sqrt {c+d \tan (e+f x)}}{f \left (a^2+b^2\right ) (b c-a d) (a+b \tan (e+f x))}}{4 \left (a^2+b^2\right )}-\frac {b \sqrt {c+d \tan (e+f x)}}{2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}\)

\(\Big \downarrow \) 4136

\(\displaystyle \frac {-\frac {\frac {\int -\frac {8 \left ((b c-a d) \left (c a^3+3 b d a^2-3 b^2 c a-b^3 d\right )-(b c-a d) \left (-d a^3+3 b c a^2+3 b^2 d a-b^3 c\right ) \tan (e+f x)\right )}{\sqrt {c+d \tan (e+f x)}}dx}{a^2+b^2}+\frac {b \left (-15 a^4 d^2+40 a^3 b c d-6 a^2 b^2 \left (4 c^2-3 d^2\right )-24 a b^3 c d+b^4 \left (8 c^2+d^2\right )\right ) \int \frac {\tan ^2(e+f x)+1}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}dx}{a^2+b^2}}{2 \left (a^2+b^2\right ) (b c-a d)}-\frac {b \left (-7 a^2 d+8 a b c+b^2 d\right ) \sqrt {c+d \tan (e+f x)}}{f \left (a^2+b^2\right ) (b c-a d) (a+b \tan (e+f x))}}{4 \left (a^2+b^2\right )}-\frac {b \sqrt {c+d \tan (e+f x)}}{2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {-\frac {\frac {b \left (-15 a^4 d^2+40 a^3 b c d-6 a^2 b^2 \left (4 c^2-3 d^2\right )-24 a b^3 c d+b^4 \left (8 c^2+d^2\right )\right ) \int \frac {\tan ^2(e+f x)+1}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}dx}{a^2+b^2}-\frac {8 \int \frac {(b c-a d) \left (c a^3+3 b d a^2-3 b^2 c a-b^3 d\right )-(b c-a d) \left (-d a^3+3 b c a^2+3 b^2 d a-b^3 c\right ) \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}}dx}{a^2+b^2}}{2 \left (a^2+b^2\right ) (b c-a d)}-\frac {b \left (-7 a^2 d+8 a b c+b^2 d\right ) \sqrt {c+d \tan (e+f x)}}{f \left (a^2+b^2\right ) (b c-a d) (a+b \tan (e+f x))}}{4 \left (a^2+b^2\right )}-\frac {b \sqrt {c+d \tan (e+f x)}}{2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {-\frac {\frac {b \left (-15 a^4 d^2+40 a^3 b c d-6 a^2 b^2 \left (4 c^2-3 d^2\right )-24 a b^3 c d+b^4 \left (8 c^2+d^2\right )\right ) \int \frac {\tan (e+f x)^2+1}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}dx}{a^2+b^2}-\frac {8 \int \frac {(b c-a d) \left (c a^3+3 b d a^2-3 b^2 c a-b^3 d\right )-(b c-a d) \left (-d a^3+3 b c a^2+3 b^2 d a-b^3 c\right ) \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}}dx}{a^2+b^2}}{2 \left (a^2+b^2\right ) (b c-a d)}-\frac {b \left (-7 a^2 d+8 a b c+b^2 d\right ) \sqrt {c+d \tan (e+f x)}}{f \left (a^2+b^2\right ) (b c-a d) (a+b \tan (e+f x))}}{4 \left (a^2+b^2\right )}-\frac {b \sqrt {c+d \tan (e+f x)}}{2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}\)

\(\Big \downarrow \) 4022

\(\displaystyle -\frac {b \sqrt {c+d \tan (e+f x)}}{2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}+\frac {-\frac {b \left (-7 a^2 d+8 a b c+b^2 d\right ) \sqrt {c+d \tan (e+f x)}}{f \left (a^2+b^2\right ) (b c-a d) (a+b \tan (e+f x))}-\frac {\frac {b \left (-15 a^4 d^2+40 a^3 b c d-6 a^2 b^2 \left (4 c^2-3 d^2\right )-24 a b^3 c d+b^4 \left (8 c^2+d^2\right )\right ) \int \frac {\tan (e+f x)^2+1}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}dx}{a^2+b^2}-\frac {8 \left (\frac {1}{2} (a-i b)^3 (c+i d) (b c-a d) \int \frac {1-i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}}dx+\frac {1}{2} (a+i b)^3 (c-i d) (b c-a d) \int \frac {i \tan (e+f x)+1}{\sqrt {c+d \tan (e+f x)}}dx\right )}{a^2+b^2}}{2 \left (a^2+b^2\right ) (b c-a d)}}{4 \left (a^2+b^2\right )}\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {b \sqrt {c+d \tan (e+f x)}}{2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}+\frac {-\frac {b \left (-7 a^2 d+8 a b c+b^2 d\right ) \sqrt {c+d \tan (e+f x)}}{f \left (a^2+b^2\right ) (b c-a d) (a+b \tan (e+f x))}-\frac {\frac {b \left (-15 a^4 d^2+40 a^3 b c d-6 a^2 b^2 \left (4 c^2-3 d^2\right )-24 a b^3 c d+b^4 \left (8 c^2+d^2\right )\right ) \int \frac {\tan (e+f x)^2+1}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}dx}{a^2+b^2}-\frac {8 \left (\frac {1}{2} (a-i b)^3 (c+i d) (b c-a d) \int \frac {1-i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}}dx+\frac {1}{2} (a+i b)^3 (c-i d) (b c-a d) \int \frac {i \tan (e+f x)+1}{\sqrt {c+d \tan (e+f x)}}dx\right )}{a^2+b^2}}{2 \left (a^2+b^2\right ) (b c-a d)}}{4 \left (a^2+b^2\right )}\)

\(\Big \downarrow \) 4020

\(\displaystyle -\frac {b \sqrt {c+d \tan (e+f x)}}{2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}+\frac {-\frac {b \left (-7 a^2 d+8 a b c+b^2 d\right ) \sqrt {c+d \tan (e+f x)}}{f \left (a^2+b^2\right ) (b c-a d) (a+b \tan (e+f x))}-\frac {\frac {b \left (-15 a^4 d^2+40 a^3 b c d-6 a^2 b^2 \left (4 c^2-3 d^2\right )-24 a b^3 c d+b^4 \left (8 c^2+d^2\right )\right ) \int \frac {\tan (e+f x)^2+1}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}dx}{a^2+b^2}-\frac {8 \left (\frac {i (a+i b)^3 (c-i d) (b c-a d) \int -\frac {1}{(1-i \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}d(i \tan (e+f x))}{2 f}-\frac {i (a-i b)^3 (c+i d) (b c-a d) \int -\frac {1}{(i \tan (e+f x)+1) \sqrt {c+d \tan (e+f x)}}d(-i \tan (e+f x))}{2 f}\right )}{a^2+b^2}}{2 \left (a^2+b^2\right ) (b c-a d)}}{4 \left (a^2+b^2\right )}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {b \sqrt {c+d \tan (e+f x)}}{2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}+\frac {-\frac {b \left (-7 a^2 d+8 a b c+b^2 d\right ) \sqrt {c+d \tan (e+f x)}}{f \left (a^2+b^2\right ) (b c-a d) (a+b \tan (e+f x))}-\frac {\frac {b \left (-15 a^4 d^2+40 a^3 b c d-6 a^2 b^2 \left (4 c^2-3 d^2\right )-24 a b^3 c d+b^4 \left (8 c^2+d^2\right )\right ) \int \frac {\tan (e+f x)^2+1}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}dx}{a^2+b^2}-\frac {8 \left (\frac {i (a-i b)^3 (c+i d) (b c-a d) \int \frac {1}{(i \tan (e+f x)+1) \sqrt {c+d \tan (e+f x)}}d(-i \tan (e+f x))}{2 f}-\frac {i (a+i b)^3 (c-i d) (b c-a d) \int \frac {1}{(1-i \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}d(i \tan (e+f x))}{2 f}\right )}{a^2+b^2}}{2 \left (a^2+b^2\right ) (b c-a d)}}{4 \left (a^2+b^2\right )}\)

\(\Big \downarrow \) 73

\(\displaystyle -\frac {b \sqrt {c+d \tan (e+f x)}}{2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}+\frac {-\frac {b \left (-7 a^2 d+8 a b c+b^2 d\right ) \sqrt {c+d \tan (e+f x)}}{f \left (a^2+b^2\right ) (b c-a d) (a+b \tan (e+f x))}-\frac {\frac {b \left (-15 a^4 d^2+40 a^3 b c d-6 a^2 b^2 \left (4 c^2-3 d^2\right )-24 a b^3 c d+b^4 \left (8 c^2+d^2\right )\right ) \int \frac {\tan (e+f x)^2+1}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}dx}{a^2+b^2}-\frac {8 \left (\frac {(a-i b)^3 (c+i d) (b c-a d) \int \frac {1}{-\frac {i \tan ^2(e+f x)}{d}-\frac {i c}{d}+1}d\sqrt {c+d \tan (e+f x)}}{d f}+\frac {(a+i b)^3 (c-i d) (b c-a d) \int \frac {1}{\frac {i \tan ^2(e+f x)}{d}+\frac {i c}{d}+1}d\sqrt {c+d \tan (e+f x)}}{d f}\right )}{a^2+b^2}}{2 \left (a^2+b^2\right ) (b c-a d)}}{4 \left (a^2+b^2\right )}\)

\(\Big \downarrow \) 221

\(\displaystyle -\frac {b \sqrt {c+d \tan (e+f x)}}{2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}+\frac {-\frac {b \left (-7 a^2 d+8 a b c+b^2 d\right ) \sqrt {c+d \tan (e+f x)}}{f \left (a^2+b^2\right ) (b c-a d) (a+b \tan (e+f x))}-\frac {\frac {b \left (-15 a^4 d^2+40 a^3 b c d-6 a^2 b^2 \left (4 c^2-3 d^2\right )-24 a b^3 c d+b^4 \left (8 c^2+d^2\right )\right ) \int \frac {\tan (e+f x)^2+1}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}dx}{a^2+b^2}-\frac {8 \left (\frac {(a-i b)^3 \sqrt {c+i d} (b c-a d) \arctan \left (\frac {\tan (e+f x)}{\sqrt {c+i d}}\right )}{f}+\frac {(a+i b)^3 \sqrt {c-i d} (b c-a d) \arctan \left (\frac {\tan (e+f x)}{\sqrt {c-i d}}\right )}{f}\right )}{a^2+b^2}}{2 \left (a^2+b^2\right ) (b c-a d)}}{4 \left (a^2+b^2\right )}\)

\(\Big \downarrow \) 4117

\(\displaystyle -\frac {b \sqrt {c+d \tan (e+f x)}}{2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}+\frac {-\frac {b \left (-7 a^2 d+8 a b c+b^2 d\right ) \sqrt {c+d \tan (e+f x)}}{f \left (a^2+b^2\right ) (b c-a d) (a+b \tan (e+f x))}-\frac {\frac {b \left (-15 a^4 d^2+40 a^3 b c d-6 a^2 b^2 \left (4 c^2-3 d^2\right )-24 a b^3 c d+b^4 \left (8 c^2+d^2\right )\right ) \int \frac {1}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}d\tan (e+f x)}{f \left (a^2+b^2\right )}-\frac {8 \left (\frac {(a-i b)^3 \sqrt {c+i d} (b c-a d) \arctan \left (\frac {\tan (e+f x)}{\sqrt {c+i d}}\right )}{f}+\frac {(a+i b)^3 \sqrt {c-i d} (b c-a d) \arctan \left (\frac {\tan (e+f x)}{\sqrt {c-i d}}\right )}{f}\right )}{a^2+b^2}}{2 \left (a^2+b^2\right ) (b c-a d)}}{4 \left (a^2+b^2\right )}\)

\(\Big \downarrow \) 73

\(\displaystyle -\frac {b \sqrt {c+d \tan (e+f x)}}{2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}+\frac {-\frac {b \left (-7 a^2 d+8 a b c+b^2 d\right ) \sqrt {c+d \tan (e+f x)}}{f \left (a^2+b^2\right ) (b c-a d) (a+b \tan (e+f x))}-\frac {\frac {2 b \left (-15 a^4 d^2+40 a^3 b c d-6 a^2 b^2 \left (4 c^2-3 d^2\right )-24 a b^3 c d+b^4 \left (8 c^2+d^2\right )\right ) \int \frac {1}{a+\frac {b (c+d \tan (e+f x))}{d}-\frac {b c}{d}}d\sqrt {c+d \tan (e+f x)}}{d f \left (a^2+b^2\right )}-\frac {8 \left (\frac {(a-i b)^3 \sqrt {c+i d} (b c-a d) \arctan \left (\frac {\tan (e+f x)}{\sqrt {c+i d}}\right )}{f}+\frac {(a+i b)^3 \sqrt {c-i d} (b c-a d) \arctan \left (\frac {\tan (e+f x)}{\sqrt {c-i d}}\right )}{f}\right )}{a^2+b^2}}{2 \left (a^2+b^2\right ) (b c-a d)}}{4 \left (a^2+b^2\right )}\)

\(\Big \downarrow \) 221

\(\displaystyle -\frac {b \sqrt {c+d \tan (e+f x)}}{2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}+\frac {-\frac {b \left (-7 a^2 d+8 a b c+b^2 d\right ) \sqrt {c+d \tan (e+f x)}}{f \left (a^2+b^2\right ) (b c-a d) (a+b \tan (e+f x))}-\frac {-\frac {2 \sqrt {b} \left (-15 a^4 d^2+40 a^3 b c d-6 a^2 b^2 \left (4 c^2-3 d^2\right )-24 a b^3 c d+b^4 \left (8 c^2+d^2\right )\right ) \text {arctanh}\left (\frac {\sqrt {b} \sqrt {c+d \tan (e+f x)}}{\sqrt {b c-a d}}\right )}{f \left (a^2+b^2\right ) \sqrt {b c-a d}}-\frac {8 \left (\frac {(a-i b)^3 \sqrt {c+i d} (b c-a d) \arctan \left (\frac {\tan (e+f x)}{\sqrt {c+i d}}\right )}{f}+\frac {(a+i b)^3 \sqrt {c-i d} (b c-a d) \arctan \left (\frac {\tan (e+f x)}{\sqrt {c-i d}}\right )}{f}\right )}{a^2+b^2}}{2 \left (a^2+b^2\right ) (b c-a d)}}{4 \left (a^2+b^2\right )}\)

Input:

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

Output:

-1/2*(b*Sqrt[c + d*Tan[e + f*x]])/((a^2 + b^2)*f*(a + b*Tan[e + f*x])^2) + 
 (-1/2*((-8*(((a + I*b)^3*Sqrt[c - I*d]*(b*c - a*d)*ArcTan[Tan[e + f*x]/Sq 
rt[c - I*d]])/f + ((a - I*b)^3*Sqrt[c + I*d]*(b*c - a*d)*ArcTan[Tan[e + f* 
x]/Sqrt[c + I*d]])/f))/(a^2 + b^2) - (2*Sqrt[b]*(40*a^3*b*c*d - 24*a*b^3*c 
*d - 15*a^4*d^2 - 6*a^2*b^2*(4*c^2 - 3*d^2) + b^4*(8*c^2 + d^2))*ArcTanh[( 
Sqrt[b]*Sqrt[c + d*Tan[e + f*x]])/Sqrt[b*c - a*d]])/((a^2 + b^2)*Sqrt[b*c 
- a*d]*f))/((a^2 + b^2)*(b*c - a*d)) - (b*(8*a*b*c - 7*a^2*d + b^2*d)*Sqrt 
[c + d*Tan[e + f*x]])/((a^2 + b^2)*(b*c - a*d)*f*(a + b*Tan[e + f*x])))/(4 
*(a^2 + b^2))
 

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 73
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ 
{p = Denominator[m]}, Simp[p/b   Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + 
 d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt 
Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL 
inearQ[a, b, c, d, m, n, x]
 

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

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

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

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

rule 4051
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
 (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b*(a + b*Tan[e + f*x])^(m + 1)*((c + 
d*Tan[e + f*x])^n/(f*(m + 1)*(a^2 + b^2))), x] + Simp[1/((m + 1)*(a^2 + b^2 
))   Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^(n - 1)*Simp[a*c 
*(m + 1) - b*d*n - (b*c - a*d)*(m + 1)*Tan[e + f*x] - b*d*(m + n + 1)*Tan[e 
 + f*x]^2, x], 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] && LtQ[m, -1] && GtQ[n, 0] && Int 
egerQ[2*m]
 

rule 4117
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*tan[(e_.) 
+ (f_.)*(x_)])^(n_.)*((A_) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> 
 Simp[A/f   Subst[Int[(a + b*x)^m*(c + d*x)^n, x], x, Tan[e + f*x]], x] /; 
FreeQ[{a, b, c, d, e, f, A, C, m, n}, x] && EqQ[A, C]
 

rule 4132
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
 (f_.)*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) 
 + (f_.)*(x_)]^2), x_Symbol] :> Simp[(A*b^2 - a*(b*B - a*C))*(a + b*Tan[e + 
 f*x])^(m + 1)*((c + d*Tan[e + f*x])^(n + 1)/(f*(m + 1)*(b*c - a*d)*(a^2 + 
b^2))), x] + Simp[1/((m + 1)*(b*c - a*d)*(a^2 + b^2))   Int[(a + b*Tan[e + 
f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Simp[A*(a*(b*c - a*d)*(m + 1) - b^2*d* 
(m + n + 2)) + (b*B - a*C)*(b*c*(m + 1) + a*d*(n + 1)) - (m + 1)*(b*c - a*d 
)*(A*b - a*B - b*C)*Tan[e + f*x] - d*(A*b^2 - a*(b*B - a*C))*(m + n + 2)*Ta 
n[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[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && LtQ[m, -1] && 
!(ILtQ[n, -1] && ( !IntegerQ[m] || (EqQ[c, 0] && NeQ[a, 0])))
 

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

Leaf count of result is larger than twice the leaf count of optimal. \(3202\) vs. \(2(304)=608\).

Time = 0.40 (sec) , antiderivative size = 3203, normalized size of antiderivative = 9.37

method result size
derivativedivides \(\text {Expression too large to display}\) \(3203\)
default \(\text {Expression too large to display}\) \(3203\)

Input:

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

Output:

-1/f*d/(a^2+b^2)^3/(2*(c^2+d^2)^(1/2)-2*c)^(1/2)*arctan(((2*(c^2+d^2)^(1/2 
)+2*c)^(1/2)-2*(c+d*tan(f*x+e))^(1/2))/(2*(c^2+d^2)^(1/2)-2*c)^(1/2))*a^3- 
1/f/(a^2+b^2)^3/(2*(c^2+d^2)^(1/2)-2*c)^(1/2)*arctan(((2*(c^2+d^2)^(1/2)+2 
*c)^(1/2)-2*(c+d*tan(f*x+e))^(1/2))/(2*(c^2+d^2)^(1/2)-2*c)^(1/2))*b^3*c-1 
/4/f*d^2*b^5/(a^2+b^2)^3/(tan(f*x+e)*b*d+a*d)^2*(c+d*tan(f*x+e))^(1/2)+1/f 
*d/(a^2+b^2)^3/(2*(c^2+d^2)^(1/2)-2*c)^(1/2)*arctan((2*(c+d*tan(f*x+e))^(1 
/2)+(2*(c^2+d^2)^(1/2)+2*c)^(1/2))/(2*(c^2+d^2)^(1/2)-2*c)^(1/2))*a^3+3/4/ 
f/(a^2+b^2)^3*ln(d*tan(f*x+e)+c+(c+d*tan(f*x+e))^(1/2)*(2*(c^2+d^2)^(1/2)+ 
2*c)^(1/2)+(c^2+d^2)^(1/2))*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*a^2*b-1/f/(a^2+b 
^2)^3/(2*(c^2+d^2)^(1/2)-2*c)^(1/2)*arctan((2*(c+d*tan(f*x+e))^(1/2)+(2*(c 
^2+d^2)^(1/2)+2*c)^(1/2))/(2*(c^2+d^2)^(1/2)-2*c)^(1/2))*(c^2+d^2)^(1/2)*b 
^3+1/4/f/(a^2+b^2)^3*ln((c+d*tan(f*x+e))^(1/2)*(2*(c^2+d^2)^(1/2)+2*c)^(1/ 
2)-d*tan(f*x+e)-c-(c^2+d^2)^(1/2))*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*b^3-1/4/f 
/(a^2+b^2)^3*ln(d*tan(f*x+e)+c+(c+d*tan(f*x+e))^(1/2)*(2*(c^2+d^2)^(1/2)+2 
*c)^(1/2)+(c^2+d^2)^(1/2))*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*b^3+10/f*d*b^2/(a 
^2+b^2)^3/(a*d-b*c)/((a*d-b*c)*b)^(1/2)*arctan(b*(c+d*tan(f*x+e))^(1/2)/(( 
a*d-b*c)*b)^(1/2))*a^3*c+2/f*d*b^5/(a^2+b^2)^3/(tan(f*x+e)*b*d+a*d)^2/(a*d 
-b*c)*(c+d*tan(f*x+e))^(3/2)*a*c-6/f*d*b^4/(a^2+b^2)^3/(a*d-b*c)/((a*d-b*c 
)*b)^(1/2)*arctan(b*(c+d*tan(f*x+e))^(1/2)/((a*d-b*c)*b)^(1/2))*a*c+2/f*d* 
b^3/(a^2+b^2)^3/(tan(f*x+e)*b*d+a*d)^2/(a*d-b*c)*(c+d*tan(f*x+e))^(3/2)...
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 6547 vs. \(2 (298) = 596\).

Time = 97.07 (sec) , antiderivative size = 13133, normalized size of antiderivative = 38.40 \[ \int \frac {\sqrt {c+d \tan (e+f x)}}{(a+b \tan (e+f x))^3} \, dx=\text {Too large to display} \] Input:

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

Output:

Too large to include
 

Sympy [F]

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

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

Output:

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

Maxima [F(-2)]

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

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

Output:

Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(a*d-b*c>0)', see `assume?` for m 
ore detail
 

Giac [F(-2)]

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

integrate((c+d*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%%%{%%%{1,[0,19,8]%%%}+%%%{8,[0,17,8]%%%}+%%%{28,[0,15,8]%%%}+ 
%%%{56,[0
 

Mupad [B] (verification not implemented)

Time = 33.54 (sec) , antiderivative size = 99939, normalized size of antiderivative = 292.22 \[ \int \frac {\sqrt {c+d \tan (e+f x)}}{(a+b \tan (e+f x))^3} \, dx=\text {Too large to display} \] Input:

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

Output:

(atan((((((c + d*tan(e + f*x))^(1/2)*(2*a^2*b^13*d^14 - b^15*d^14 + 49*a^4 
*b^11*d^14 + 2460*a^6*b^9*d^14 - 3631*a^8*b^7*d^14 + 1922*a^10*b^5*d^14 - 
225*a^12*b^3*d^14 + 17*b^15*c^2*d^12 + 16*b^15*c^4*d^10 + 96*b^15*c^6*d^8 
+ 80*a*b^14*c^3*d^11 - 960*a*b^14*c^5*d^9 - 40*a^3*b^12*c*d^13 - 9264*a^5* 
b^10*c*d^13 + 21360*a^7*b^8*c*d^13 - 15544*a^9*b^6*c*d^13 + 3000*a^11*b^4* 
c*d^13 - 114*a^2*b^13*c^2*d^12 + 4848*a^2*b^13*c^4*d^10 - 640*a^2*b^13*c^6 
*d^8 - 11504*a^3*b^12*c^3*d^11 + 7424*a^3*b^12*c^5*d^9 + 14319*a^4*b^11*c^ 
2*d^12 - 27744*a^4*b^11*c^4*d^10 + 3136*a^4*b^11*c^6*d^8 + 49824*a^5*b^10* 
c^3*d^11 - 21120*a^5*b^10*c^5*d^9 - 46588*a^6*b^9*c^2*d^12 + 55264*a^6*b^9 
*c^4*d^10 - 3712*a^6*b^9*c^6*d^8 - 71520*a^7*b^8*c^3*d^11 + 17664*a^7*b^8* 
c^5*d^9 + 47871*a^8*b^7*c^2*d^12 - 32688*a^8*b^7*c^4*d^10 + 608*a^8*b^7*c^ 
6*d^8 + 29712*a^9*b^6*c^3*d^11 - 1984*a^9*b^6*c^5*d^9 - 13746*a^10*b^5*c^2 
*d^12 + 2352*a^10*b^5*c^4*d^10 - 1200*a^11*b^4*c^3*d^11 + 225*a^12*b^3*c^2 
*d^12 - 24*a*b^14*c*d^13))/(a^18*d^2*f^4 + b^18*c^2*f^4 + 8*a^2*b^16*c^2*f 
^4 + 28*a^4*b^14*c^2*f^4 + 56*a^6*b^12*c^2*f^4 + 70*a^8*b^10*c^2*f^4 + 56* 
a^10*b^8*c^2*f^4 + 28*a^12*b^6*c^2*f^4 + 8*a^14*b^4*c^2*f^4 + a^16*b^2*c^2 
*f^4 + a^2*b^16*d^2*f^4 + 8*a^4*b^14*d^2*f^4 + 28*a^6*b^12*d^2*f^4 + 56*a^ 
8*b^10*d^2*f^4 + 70*a^10*b^8*d^2*f^4 + 56*a^12*b^6*d^2*f^4 + 28*a^14*b^4*d 
^2*f^4 + 8*a^16*b^2*d^2*f^4 - 2*a*b^17*c*d*f^4 - 2*a^17*b*c*d*f^4 - 16*a^3 
*b^15*c*d*f^4 - 56*a^5*b^13*c*d*f^4 - 112*a^7*b^11*c*d*f^4 - 140*a^9*b^...
 

Reduce [F]

\[ \int \frac {\sqrt {c+d \tan (e+f x)}}{(a+b \tan (e+f x))^3} \, dx=\text {too large to display} \] Input:

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

Output:

(2*sqrt(tan(e + f*x)*d + c)*a*d - 2*sqrt(tan(e + f*x)*d + c)*b*c - int(sqr 
t(tan(e + f*x)*d + c)/(tan(e + f*x)**4*a*b**3*d**2 - 4*tan(e + f*x)**4*b** 
4*c*d + 3*tan(e + f*x)**3*a**2*b**2*d**2 - 11*tan(e + f*x)**3*a*b**3*c*d - 
 4*tan(e + f*x)**3*b**4*c**2 + 3*tan(e + f*x)**2*a**3*b*d**2 - 9*tan(e + f 
*x)**2*a**2*b**2*c*d - 12*tan(e + f*x)**2*a*b**3*c**2 + tan(e + f*x)*a**4* 
d**2 - tan(e + f*x)*a**3*b*c*d - 12*tan(e + f*x)*a**2*b**2*c**2 + a**4*c*d 
 - 4*a**3*b*c**2),x)*tan(e + f*x)**2*a**3*b**2*d**3*f + 12*int(sqrt(tan(e 
+ f*x)*d + c)/(tan(e + f*x)**4*a*b**3*d**2 - 4*tan(e + f*x)**4*b**4*c*d + 
3*tan(e + f*x)**3*a**2*b**2*d**2 - 11*tan(e + f*x)**3*a*b**3*c*d - 4*tan(e 
 + f*x)**3*b**4*c**2 + 3*tan(e + f*x)**2*a**3*b*d**2 - 9*tan(e + f*x)**2*a 
**2*b**2*c*d - 12*tan(e + f*x)**2*a*b**3*c**2 + tan(e + f*x)*a**4*d**2 - t 
an(e + f*x)*a**3*b*c*d - 12*tan(e + f*x)*a**2*b**2*c**2 + a**4*c*d - 4*a** 
3*b*c**2),x)*tan(e + f*x)**2*a**2*b**3*c*d**2*f - 48*int(sqrt(tan(e + f*x) 
*d + c)/(tan(e + f*x)**4*a*b**3*d**2 - 4*tan(e + f*x)**4*b**4*c*d + 3*tan( 
e + f*x)**3*a**2*b**2*d**2 - 11*tan(e + f*x)**3*a*b**3*c*d - 4*tan(e + f*x 
)**3*b**4*c**2 + 3*tan(e + f*x)**2*a**3*b*d**2 - 9*tan(e + f*x)**2*a**2*b* 
*2*c*d - 12*tan(e + f*x)**2*a*b**3*c**2 + tan(e + f*x)*a**4*d**2 - tan(e + 
 f*x)*a**3*b*c*d - 12*tan(e + f*x)*a**2*b**2*c**2 + a**4*c*d - 4*a**3*b*c* 
*2),x)*tan(e + f*x)**2*a*b**4*c**2*d*f + 64*int(sqrt(tan(e + f*x)*d + c)/( 
tan(e + f*x)**4*a*b**3*d**2 - 4*tan(e + f*x)**4*b**4*c*d + 3*tan(e + f*...