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

Optimal result
Mathematica [A] (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 = 25, antiderivative size = 122 \[ \int (a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)} \, dx=-\frac {(i a+b) \sqrt {c-i d} \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{f}+\frac {(i a-b) \sqrt {c+i d} \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{f}+\frac {2 b \sqrt {c+d \tan (e+f x)}}{f} \] Output:

-(I*a+b)*(c-I*d)^(1/2)*arctanh((c+d*tan(f*x+e))^(1/2)/(c-I*d)^(1/2))/f+(I* 
a-b)*(c+I*d)^(1/2)*arctanh((c+d*tan(f*x+e))^(1/2)/(c+I*d)^(1/2))/f+2*b*(c+ 
d*tan(f*x+e))^(1/2)/f
 

Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.98 \[ \int (a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)} \, dx=\frac {-i (a-i b) \sqrt {c-i d} \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )+i (a+i b) \sqrt {c+i d} \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )+2 b \sqrt {c+d \tan (e+f x)}}{f} \] Input:

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

Output:

((-I)*(a - I*b)*Sqrt[c - I*d]*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c - I* 
d]] + I*(a + I*b)*Sqrt[c + I*d]*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c + 
I*d]] + 2*b*Sqrt[c + d*Tan[e + f*x]])/f
 

Rubi [A] (warning: unable to verify)

Time = 0.60 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.84, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.360, Rules used = {3042, 4011, 3042, 4022, 3042, 4020, 25, 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 (a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4011

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4022

\(\displaystyle \frac {1}{2} (a+i b) (c+i d) \int \frac {1-i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}}dx+\frac {1}{2} (a-i b) (c-i d) \int \frac {i \tan (e+f x)+1}{\sqrt {c+d \tan (e+f x)}}dx+\frac {2 b \sqrt {c+d \tan (e+f x)}}{f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{2} (a+i b) (c+i d) \int \frac {1-i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}}dx+\frac {1}{2} (a-i b) (c-i d) \int \frac {i \tan (e+f x)+1}{\sqrt {c+d \tan (e+f x)}}dx+\frac {2 b \sqrt {c+d \tan (e+f x)}}{f}\)

\(\Big \downarrow \) 4020

\(\displaystyle \frac {i (a-i b) (c-i 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) (c+i 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 {2 b \sqrt {c+d \tan (e+f x)}}{f}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {i (a-i b) (c-i 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) (c+i 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 {2 b \sqrt {c+d \tan (e+f x)}}{f}\)

\(\Big \downarrow \) 73

\(\displaystyle \frac {(a+i b) (c+i 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) (c-i 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 {2 b \sqrt {c+d \tan (e+f x)}}{f}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {(a-i b) \sqrt {c-i d} \arctan \left (\frac {\tan (e+f x)}{\sqrt {c-i d}}\right )}{f}+\frac {(a+i b) \sqrt {c+i d} \arctan \left (\frac {\tan (e+f x)}{\sqrt {c+i d}}\right )}{f}+\frac {2 b \sqrt {c+d \tan (e+f x)}}{f}\)

Input:

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

Output:

((a - I*b)*Sqrt[c - I*d]*ArcTan[Tan[e + f*x]/Sqrt[c - I*d]])/f + ((a + I*b 
)*Sqrt[c + I*d]*ArcTan[Tan[e + f*x]/Sqrt[c + I*d]])/f + (2*b*Sqrt[c + d*Ta 
n[e + f*x]])/f
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], 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 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 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]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(802\) vs. \(2(102)=204\).

Time = 0.38 (sec) , antiderivative size = 803, normalized size of antiderivative = 6.58

method result size
parts \(-\frac {a \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, \sqrt {c^{2}+d^{2}}\, \ln \left (d \tan \left (f x +e \right )+c +\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{4 f d}+\frac {a d \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}+\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{f \sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}+\frac {a \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c \ln \left (d \tan \left (f x +e \right )+c +\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{4 f d}+\frac {a \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, \sqrt {c^{2}+d^{2}}\, \ln \left (d \tan \left (f x +e \right )+c -\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{4 f d}+\frac {a d \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{f \sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}-\frac {a \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c \ln \left (d \tan \left (f x +e \right )+c -\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{4 f d}+\frac {b \left (2 \sqrt {c +d \tan \left (f x +e \right )}-\frac {\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, \ln \left (d \tan \left (f x +e \right )+c +\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{4}+\frac {\left (-\sqrt {c^{2}+d^{2}}+c \right ) \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}+\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}+\frac {\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, \ln \left (d \tan \left (f x +e \right )+c -\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{4}+\frac {\left (-\sqrt {c^{2}+d^{2}}+c \right ) \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{f}\) \(803\)
derivativedivides \(\frac {2 b \sqrt {c +d \tan \left (f x +e \right )}}{f}-\frac {a \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, \sqrt {c^{2}+d^{2}}\, \ln \left (d \tan \left (f x +e \right )+c +\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{4 f d}+\frac {a \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c \ln \left (d \tan \left (f x +e \right )+c +\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{4 f d}-\frac {\ln \left (d \tan \left (f x +e \right )+c +\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right ) \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, b}{4 f}-\frac {\arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}+\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right ) \sqrt {c^{2}+d^{2}}\, b}{f \sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}+\frac {a d \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}+\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{f \sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}+\frac {\arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}+\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right ) b c}{f \sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}+\frac {a \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, \sqrt {c^{2}+d^{2}}\, \ln \left (d \tan \left (f x +e \right )+c -\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{4 f d}-\frac {a \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c \ln \left (d \tan \left (f x +e \right )+c -\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{4 f d}+\frac {\ln \left (d \tan \left (f x +e \right )+c -\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right ) \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, b}{4 f}-\frac {\arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right ) \sqrt {c^{2}+d^{2}}\, b}{f \sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}+\frac {a d \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{f \sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}+\frac {\arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right ) b c}{f \sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\) \(961\)
default \(\frac {2 b \sqrt {c +d \tan \left (f x +e \right )}}{f}-\frac {a \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, \sqrt {c^{2}+d^{2}}\, \ln \left (d \tan \left (f x +e \right )+c +\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{4 f d}+\frac {a \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c \ln \left (d \tan \left (f x +e \right )+c +\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{4 f d}-\frac {\ln \left (d \tan \left (f x +e \right )+c +\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right ) \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, b}{4 f}-\frac {\arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}+\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right ) \sqrt {c^{2}+d^{2}}\, b}{f \sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}+\frac {a d \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}+\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{f \sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}+\frac {\arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}+\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right ) b c}{f \sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}+\frac {a \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, \sqrt {c^{2}+d^{2}}\, \ln \left (d \tan \left (f x +e \right )+c -\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{4 f d}-\frac {a \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c \ln \left (d \tan \left (f x +e \right )+c -\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{4 f d}+\frac {\ln \left (d \tan \left (f x +e \right )+c -\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right ) \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, b}{4 f}-\frac {\arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right ) \sqrt {c^{2}+d^{2}}\, b}{f \sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}+\frac {a d \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{f \sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}+\frac {\arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right ) b c}{f \sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\) \(961\)

Input:

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

Output:

-1/4*a/f/d*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*(c^2+d^2)^(1/2)*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))+a/f 
*d/(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))+1/4*a/f/d*(2*(c^2+d^ 
2)^(1/2)+2*c)^(1/2)*c*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))+1/4*a/f/d*(2*(c^2+d^2)^(1/2)+2*c)^(1/2 
)*(c^2+d^2)^(1/2)*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))+a/f*d/(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))-1/4*a/f/d*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*c*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))+b/f 
*(2*(c+d*tan(f*x+e))^(1/2)-1/4*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*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)) 
+(-(c^2+d^2)^(1/2)+c)/(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))+1 
/4*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*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))+(-(c^2+d^2)^(1/2)+c)/(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)))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1199 vs. \(2 (97) = 194\).

Time = 0.11 (sec) , antiderivative size = 1199, normalized size of antiderivative = 9.83 \[ \int (a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)} \, dx=\text {Too large to display} \] Input:

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

Output:

-1/2*(f*sqrt((2*a*b*d + f^2*sqrt(-(4*a^2*b^2*c^2 + 4*(a^3*b - a*b^3)*c*d + 
 (a^4 - 2*a^2*b^2 + b^4)*d^2)/f^4) - (a^2 - b^2)*c)/f^2)*log(-(2*(a^3*b + 
a*b^3)*c + (a^4 - b^4)*d)*sqrt(d*tan(f*x + e) + c) + (a*f^3*sqrt(-(4*a^2*b 
^2*c^2 + 4*(a^3*b - a*b^3)*c*d + (a^4 - 2*a^2*b^2 + b^4)*d^2)/f^4) - (2*a* 
b^2*c + (a^2*b - b^3)*d)*f)*sqrt((2*a*b*d + f^2*sqrt(-(4*a^2*b^2*c^2 + 4*( 
a^3*b - a*b^3)*c*d + (a^4 - 2*a^2*b^2 + b^4)*d^2)/f^4) - (a^2 - b^2)*c)/f^ 
2)) - f*sqrt((2*a*b*d + f^2*sqrt(-(4*a^2*b^2*c^2 + 4*(a^3*b - a*b^3)*c*d + 
 (a^4 - 2*a^2*b^2 + b^4)*d^2)/f^4) - (a^2 - b^2)*c)/f^2)*log(-(2*(a^3*b + 
a*b^3)*c + (a^4 - b^4)*d)*sqrt(d*tan(f*x + e) + c) - (a*f^3*sqrt(-(4*a^2*b 
^2*c^2 + 4*(a^3*b - a*b^3)*c*d + (a^4 - 2*a^2*b^2 + b^4)*d^2)/f^4) - (2*a* 
b^2*c + (a^2*b - b^3)*d)*f)*sqrt((2*a*b*d + f^2*sqrt(-(4*a^2*b^2*c^2 + 4*( 
a^3*b - a*b^3)*c*d + (a^4 - 2*a^2*b^2 + b^4)*d^2)/f^4) - (a^2 - b^2)*c)/f^ 
2)) - f*sqrt((2*a*b*d - f^2*sqrt(-(4*a^2*b^2*c^2 + 4*(a^3*b - a*b^3)*c*d + 
 (a^4 - 2*a^2*b^2 + b^4)*d^2)/f^4) - (a^2 - b^2)*c)/f^2)*log(-(2*(a^3*b + 
a*b^3)*c + (a^4 - b^4)*d)*sqrt(d*tan(f*x + e) + c) + (a*f^3*sqrt(-(4*a^2*b 
^2*c^2 + 4*(a^3*b - a*b^3)*c*d + (a^4 - 2*a^2*b^2 + b^4)*d^2)/f^4) + (2*a* 
b^2*c + (a^2*b - b^3)*d)*f)*sqrt((2*a*b*d - f^2*sqrt(-(4*a^2*b^2*c^2 + 4*( 
a^3*b - a*b^3)*c*d + (a^4 - 2*a^2*b^2 + b^4)*d^2)/f^4) - (a^2 - b^2)*c)/f^ 
2)) + f*sqrt((2*a*b*d - f^2*sqrt(-(4*a^2*b^2*c^2 + 4*(a^3*b - a*b^3)*c*d + 
 (a^4 - 2*a^2*b^2 + b^4)*d^2)/f^4) - (a^2 - b^2)*c)/f^2)*log(-(2*(a^3*b...
 

Sympy [F]

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

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

Output:

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

Maxima [F(-2)]

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

integrate((a+b*tan(f*x+e))*(c+d*tan(f*x+e))^(1/2),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(d-c>0)', see `assume?` for more 
details)Is
 

Giac [F(-2)]

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

integrate((a+b*tan(f*x+e))*(c+d*tan(f*x+e))^(1/2),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,9,3]%%%}+%%%{4,[0,7,3]%%%}+%%%{6,[0,5,3]%%%}+%%%{ 
4,[0,3,3]
 

Mupad [B] (verification not implemented)

Time = 4.87 (sec) , antiderivative size = 845, normalized size of antiderivative = 6.93 \[ \int (a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)} \, dx =\text {Too large to display} \] Input:

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

Output:

2*atanh((32*b^2*d^4*((b^2*c)/(4*f^2) - (-b^4*d^2*f^4)^(1/2)/(4*f^4))^(1/2) 
*(c + d*tan(e + f*x))^(1/2))/((16*b*d^4*(-b^4*d^2*f^4)^(1/2))/f^3 + (16*b* 
c^2*d^2*(-b^4*d^2*f^4)^(1/2))/f^3) - (32*c*d^2*((b^2*c)/(4*f^2) - (-b^4*d^ 
2*f^4)^(1/2)/(4*f^4))^(1/2)*(c + d*tan(e + f*x))^(1/2)*(-b^4*d^2*f^4)^(1/2 
))/((16*b*d^4*(-b^4*d^2*f^4)^(1/2))/f + (16*b*c^2*d^2*(-b^4*d^2*f^4)^(1/2) 
)/f))*(-((-b^4*d^2*f^4)^(1/2) - b^2*c*f^2)/(4*f^4))^(1/2) - 2*atanh((32*b^ 
2*d^4*((-b^4*d^2*f^4)^(1/2)/(4*f^4) + (b^2*c)/(4*f^2))^(1/2)*(c + d*tan(e 
+ f*x))^(1/2))/((16*b*d^4*(-b^4*d^2*f^4)^(1/2))/f^3 + (16*b*c^2*d^2*(-b^4* 
d^2*f^4)^(1/2))/f^3) + (32*c*d^2*((-b^4*d^2*f^4)^(1/2)/(4*f^4) + (b^2*c)/( 
4*f^2))^(1/2)*(c + d*tan(e + f*x))^(1/2)*(-b^4*d^2*f^4)^(1/2))/((16*b*d^4* 
(-b^4*d^2*f^4)^(1/2))/f + (16*b*c^2*d^2*(-b^4*d^2*f^4)^(1/2))/f))*(((-b^4* 
d^2*f^4)^(1/2) + b^2*c*f^2)/(4*f^4))^(1/2) - atanh((f^3*((16*(a^2*d^4 - a^ 
2*c^2*d^2)*(c + d*tan(e + f*x))^(1/2))/f^2 + (16*c*d^2*((-a^4*d^2*f^4)^(1/ 
2) + a^2*c*f^2)*(c + d*tan(e + f*x))^(1/2))/f^4)*(-((-a^4*d^2*f^4)^(1/2) + 
 a^2*c*f^2)/f^4)^(1/2))/(16*(a^3*d^5 + a^3*c^2*d^3)))*(-((-a^4*d^2*f^4)^(1 
/2) + a^2*c*f^2)/f^4)^(1/2) - atanh((f^3*((16*(a^2*d^4 - a^2*c^2*d^2)*(c + 
 d*tan(e + f*x))^(1/2))/f^2 - (16*c*d^2*((-a^4*d^2*f^4)^(1/2) - a^2*c*f^2) 
*(c + d*tan(e + f*x))^(1/2))/f^4)*(((-a^4*d^2*f^4)^(1/2) - a^2*c*f^2)/f^4) 
^(1/2))/(16*(a^3*d^5 + a^3*c^2*d^3)))*(((-a^4*d^2*f^4)^(1/2) - a^2*c*f^2)/ 
f^4)^(1/2) + (2*b*(c + d*tan(e + f*x))^(1/2))/f
 

Reduce [F]

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

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

Output:

int(sqrt(tan(e + f*x)*d + c),x)*a + int(sqrt(tan(e + f*x)*d + c)*tan(e + f 
*x),x)*b