\(\int \frac {A+B \sec (c+d x)}{\sqrt {b \sec (c+d x)}} \, dx\) [4]

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

Optimal result

Integrand size = 23, antiderivative size = 82 \[ \int \frac {A+B \sec (c+d x)}{\sqrt {b \sec (c+d x)}} \, dx=\frac {2 A E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {2 B \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {b \sec (c+d x)}}{b d} \] Output:

2*A*EllipticE(sin(1/2*d*x+1/2*c),2^(1/2))/d/cos(d*x+c)^(1/2)/(b*sec(d*x+c) 
)^(1/2)+2*B*cos(d*x+c)^(1/2)*InverseJacobiAM(1/2*d*x+1/2*c,2^(1/2))*(b*sec 
(d*x+c))^(1/2)/b/d
 

Mathematica [A] (verified)

Time = 0.29 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.66 \[ \int \frac {A+B \sec (c+d x)}{\sqrt {b \sec (c+d x)}} \, dx=\frac {2 \left (A E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+B \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )\right )}{d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}} \] Input:

Integrate[(A + B*Sec[c + d*x])/Sqrt[b*Sec[c + d*x]],x]
 

Output:

(2*(A*EllipticE[(c + d*x)/2, 2] + B*EllipticF[(c + d*x)/2, 2]))/(d*Sqrt[Co 
s[c + d*x]]*Sqrt[b*Sec[c + d*x]])
 

Rubi [A] (verified)

Time = 0.40 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3042, 4274, 3042, 4258, 3042, 3119, 3120}

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4274

\(\displaystyle A \int \frac {1}{\sqrt {b \sec (c+d x)}}dx+\frac {B \int \sqrt {b \sec (c+d x)}dx}{b}\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4258

\(\displaystyle \frac {A \int \sqrt {\cos (c+d x)}dx}{\sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {B \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)} \int \frac {1}{\sqrt {\cos (c+d x)}}dx}{b}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {A \int \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}dx}{\sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {B \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)} \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{b}\)

\(\Big \downarrow \) 3119

\(\displaystyle \frac {B \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)} \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{b}+\frac {2 A E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}\)

\(\Big \downarrow \) 3120

\(\displaystyle \frac {2 A E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {2 B \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {b \sec (c+d x)}}{b d}\)

Input:

Int[(A + B*Sec[c + d*x])/Sqrt[b*Sec[c + d*x]],x]
 

Output:

(2*A*EllipticE[(c + d*x)/2, 2])/(d*Sqrt[Cos[c + d*x]]*Sqrt[b*Sec[c + d*x]] 
) + (2*B*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[b*Sec[c + d*x]] 
)/(b*d)
 

Defintions of rubi rules used

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

rule 3119
Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)* 
(c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
 

rule 3120
Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2 
)*(c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
 

rule 4258
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x] 
)^n*Sin[c + d*x]^n   Int[1/Sin[c + d*x]^n, x], x] /; FreeQ[{b, c, d}, x] && 
 EqQ[n^2, 1/4]
 

rule 4274
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + 
(a_)), x_Symbol] :> Simp[a   Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d   In 
t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
 
Maple [C] (verified)

Result contains complex when optimal does not.

Time = 3.67 (sec) , antiderivative size = 246, normalized size of antiderivative = 3.00

method result size
parts \(\frac {2 A \left (i \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \operatorname {EllipticF}\left (i \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ), i\right ) \left (-\cos \left (d x +c \right )-2-\sec \left (d x +c \right )\right )+i \operatorname {EllipticE}\left (i \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ), i\right ) \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \left (\cos \left (d x +c \right )+2+\sec \left (d x +c \right )\right )+\sin \left (d x +c \right )\right )}{d \left (1+\cos \left (d x +c \right )\right ) \sqrt {b \sec \left (d x +c \right )}}-\frac {2 i B \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \operatorname {EllipticF}\left (i \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ), i\right )}{d \sqrt {b \sec \left (d x +c \right )}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\) \(246\)
default \(\frac {2 \left (\left (1-\cos \left (d x +c \right )\right )^{3} \csc \left (d x +c \right )^{3}+\cot \left (d x +c \right )-\csc \left (d x +c \right )\right ) A +4 i A \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \operatorname {EllipticF}\left (i \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ), i\right )-4 i A \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \operatorname {EllipticE}\left (i \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ), i\right )+4 i B \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \operatorname {EllipticF}\left (i \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ), i\right )}{d \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right ) \sqrt {b \sec \left (d x +c \right )}}\) \(248\)
risch \(-\frac {i A \sqrt {2}}{d \sqrt {\frac {b \,{\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}}}-\frac {i \left (\frac {i B \sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}\, \sqrt {2}\, \sqrt {i \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}\, \sqrt {i {\mathrm e}^{i \left (d x +c \right )}}\, \operatorname {EllipticF}\left (\sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}, \frac {\sqrt {2}}{2}\right )}{\sqrt {b \,{\mathrm e}^{3 i \left (d x +c \right )}+b \,{\mathrm e}^{i \left (d x +c \right )}}}+A \left (-\frac {2 \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+b \right )}{b \sqrt {{\mathrm e}^{i \left (d x +c \right )} \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+b \right )}}+\frac {i \sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}\, \sqrt {2}\, \sqrt {i \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}\, \sqrt {i {\mathrm e}^{i \left (d x +c \right )}}\, \left (-2 i \operatorname {EllipticE}\left (\sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}, \frac {\sqrt {2}}{2}\right )+i \operatorname {EllipticF}\left (\sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}, \frac {\sqrt {2}}{2}\right )\right )}{\sqrt {b \,{\mathrm e}^{3 i \left (d x +c \right )}+b \,{\mathrm e}^{i \left (d x +c \right )}}}\right )\right ) \sqrt {2}\, \sqrt {b \,{\mathrm e}^{i \left (d x +c \right )} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}}{d \sqrt {\frac {b \,{\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}}\, \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}\) \(408\)

Input:

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

Output:

2*A/d/(1+cos(d*x+c))/(b*sec(d*x+c))^(1/2)*(I*(1/(1+cos(d*x+c)))^(1/2)*(cos 
(d*x+c)/(1+cos(d*x+c)))^(1/2)*EllipticF(I*(csc(d*x+c)-cot(d*x+c)),I)*(-cos 
(d*x+c)-2-sec(d*x+c))+I*EllipticE(I*(csc(d*x+c)-cot(d*x+c)),I)*(1/(1+cos(d 
*x+c)))^(1/2)*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(cos(d*x+c)+2+sec(d*x+c))+ 
sin(d*x+c))-2*I*B/d*(1/(1+cos(d*x+c)))^(1/2)*EllipticF(I*(csc(d*x+c)-cot(d 
*x+c)),I)/(b*sec(d*x+c))^(1/2)/(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)
 

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.08 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.49 \[ \int \frac {A+B \sec (c+d x)}{\sqrt {b \sec (c+d x)}} \, dx=\frac {-i \, \sqrt {2} B \sqrt {b} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + i \, \sqrt {2} B \sqrt {b} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + i \, \sqrt {2} A \sqrt {b} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - i \, \sqrt {2} A \sqrt {b} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right )}{b d} \] Input:

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

Output:

(-I*sqrt(2)*B*sqrt(b)*weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x 
+ c)) + I*sqrt(2)*B*sqrt(b)*weierstrassPInverse(-4, 0, cos(d*x + c) - I*si 
n(d*x + c)) + I*sqrt(2)*A*sqrt(b)*weierstrassZeta(-4, 0, weierstrassPInver 
se(-4, 0, cos(d*x + c) + I*sin(d*x + c))) - I*sqrt(2)*A*sqrt(b)*weierstras 
sZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c))))/( 
b*d)
 

Sympy [F]

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

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

Output:

Integral((A + B*sec(c + d*x))/sqrt(b*sec(c + d*x)), x)
 

Maxima [F]

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

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

Output:

integrate((B*sec(d*x + c) + A)/sqrt(b*sec(d*x + c)), x)
 

Giac [F]

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

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

Output:

integrate((B*sec(d*x + c) + A)/sqrt(b*sec(d*x + c)), x)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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