\(\int \sqrt {a+b \sec (c+d x)} \, dx\) [321]

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

Optimal result

Integrand size = 14, antiderivative size = 125 \[ \int \sqrt {a+b \sec (c+d x)} \, dx=-\frac {2 \cot (c+d x) \operatorname {EllipticPi}\left (\frac {a}{a+b},\arcsin \left (\frac {\sqrt {a+b}}{\sqrt {a+b \sec (c+d x)}}\right ),\frac {a-b}{a+b}\right ) \sqrt {-\frac {b (1-\sec (c+d x))}{a+b \sec (c+d x)}} \sqrt {\frac {b (1+\sec (c+d x))}{a+b \sec (c+d x)}} (a+b \sec (c+d x))}{\sqrt {a+b} d} \] Output:

-2*cot(d*x+c)*EllipticPi((a+b)^(1/2)/(a+b*sec(d*x+c))^(1/2),a/(a+b),((a-b) 
/(a+b))^(1/2))*(-b*(1-sec(d*x+c))/(a+b*sec(d*x+c)))^(1/2)*(b*(1+sec(d*x+c) 
)/(a+b*sec(d*x+c)))^(1/2)*(a+b*sec(d*x+c))/(a+b)^(1/2)/d
 

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.21 \[ \int \sqrt {a+b \sec (c+d x)} \, dx=\frac {4 \cos ^2\left (\frac {1}{2} (c+d x)\right ) \sqrt {\frac {\cos (c+d x)}{1+\cos (c+d x)}} \sqrt {\frac {b+a \cos (c+d x)}{(a+b) (1+\cos (c+d x))}} \left ((-a+b) \operatorname {EllipticF}\left (\arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right ),\frac {a-b}{a+b}\right )+2 a \operatorname {EllipticPi}\left (-1,\arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right ),\frac {a-b}{a+b}\right )\right ) \sqrt {a+b \sec (c+d x)}}{d (b+a \cos (c+d x))} \] Input:

Integrate[Sqrt[a + b*Sec[c + d*x]],x]
 

Output:

(4*Cos[(c + d*x)/2]^2*Sqrt[Cos[c + d*x]/(1 + Cos[c + d*x])]*Sqrt[(b + a*Co 
s[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*((-a + b)*EllipticF[ArcSin[Tan[( 
c + d*x)/2]], (a - b)/(a + b)] + 2*a*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2 
]], (a - b)/(a + b)])*Sqrt[a + b*Sec[c + d*x]])/(d*(b + a*Cos[c + d*x]))
 

Rubi [A] (verified)

Time = 0.24 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3042, 4267}

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 {a+b \sec (c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \sqrt {a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx\)

\(\Big \downarrow \) 4267

\(\displaystyle -\frac {2 \cot (c+d x) \sqrt {-\frac {b (1-\sec (c+d x))}{a+b \sec (c+d x)}} \sqrt {\frac {b (\sec (c+d x)+1)}{a+b \sec (c+d x)}} (a+b \sec (c+d x)) \operatorname {EllipticPi}\left (\frac {a}{a+b},\arcsin \left (\frac {\sqrt {a+b}}{\sqrt {a+b \sec (c+d x)}}\right ),\frac {a-b}{a+b}\right )}{d \sqrt {a+b}}\)

Input:

Int[Sqrt[a + b*Sec[c + d*x]],x]
 

Output:

(-2*Cot[c + d*x]*EllipticPi[a/(a + b), ArcSin[Sqrt[a + b]/Sqrt[a + b*Sec[c 
 + d*x]]], (a - b)/(a + b)]*Sqrt[-((b*(1 - Sec[c + d*x]))/(a + b*Sec[c + d 
*x]))]*Sqrt[(b*(1 + Sec[c + d*x]))/(a + b*Sec[c + d*x])]*(a + b*Sec[c + d* 
x]))/(Sqrt[a + b]*d)
 

Defintions of rubi rules used

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

rule 4267
Int[Sqrt[csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Simp[2*((a + b 
*Csc[c + d*x])/(d*Rt[a + b, 2]*Cot[c + d*x]))*Sqrt[b*((1 + Csc[c + d*x])/(a 
 + b*Csc[c + d*x]))]*Sqrt[(-b)*((1 - Csc[c + d*x])/(a + b*Csc[c + d*x]))]*E 
llipticPi[a/(a + b), ArcSin[Rt[a + b, 2]/Sqrt[a + b*Csc[c + d*x]]], (a - b) 
/(a + b)], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]
 
Maple [A] (verified)

Time = 4.64 (sec) , antiderivative size = 182, normalized size of antiderivative = 1.46

method result size
default \(\frac {2 \left (\operatorname {EllipticF}\left (-\csc \left (d x +c \right )+\cot \left (d x +c \right ), \sqrt {\frac {a -b}{a +b}}\right ) a -\operatorname {EllipticF}\left (-\csc \left (d x +c \right )+\cot \left (d x +c \right ), \sqrt {\frac {a -b}{a +b}}\right ) b -2 a \operatorname {EllipticPi}\left (-\csc \left (d x +c \right )+\cot \left (d x +c \right ), -1, \sqrt {\frac {a -b}{a +b}}\right )\right ) \left (1+\cos \left (d x +c \right )\right ) \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {b +a \cos \left (d x +c \right )}{\left (a +b \right ) \left (1+\cos \left (d x +c \right )\right )}}\, \sqrt {a +b \sec \left (d x +c \right )}}{d \left (b +a \cos \left (d x +c \right )\right )}\) \(182\)

Input:

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

Output:

2/d*(EllipticF(-csc(d*x+c)+cot(d*x+c),((a-b)/(a+b))^(1/2))*a-EllipticF(-cs 
c(d*x+c)+cot(d*x+c),((a-b)/(a+b))^(1/2))*b-2*a*EllipticPi(-csc(d*x+c)+cot( 
d*x+c),-1,((a-b)/(a+b))^(1/2)))*(1+cos(d*x+c))*(cos(d*x+c)/(1+cos(d*x+c))) 
^(1/2)*(1/(a+b)*(b+a*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*(a+b*sec(d*x+c))^(1 
/2)/(b+a*cos(d*x+c))
 

Fricas [F]

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

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

Output:

integral(sqrt(b*sec(d*x + c) + a), x)
 

Sympy [F]

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

integrate((a+b*sec(d*x+c))**(1/2),x)
 

Output:

Integral(sqrt(a + b*sec(c + d*x)), x)
 

Maxima [F]

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

integrate((a+b*sec(d*x+c))^(1/2),x, algorithm="maxima")
 

Output:

integrate(sqrt(b*sec(d*x + c) + a), x)
 

Giac [F]

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

integrate((a+b*sec(d*x+c))^(1/2),x, algorithm="giac")
 

Output:

integrate(sqrt(b*sec(d*x + c) + a), x)
 

Mupad [F(-1)]

Timed out. \[ \int \sqrt {a+b \sec (c+d x)} \, dx=\int \sqrt {a+\frac {b}{\cos \left (c+d\,x\right )}} \,d x \] Input:

int((a + b/cos(c + d*x))^(1/2),x)
 

Output:

int((a + b/cos(c + d*x))^(1/2), x)
 

Reduce [F]

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

int((a+b*sec(d*x+c))^(1/2),x)
 

Output:

int(sqrt(sec(c + d*x)*b + a),x)