\(\int \frac {\sec ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx\) [181]

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

Optimal result

Integrand size = 23, antiderivative size = 55 \[ \int \frac {\sec ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\text {arctanh}(\sin (e+f x))}{b f}-\frac {\sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{b \sqrt {a+b} f} \] Output:

arctanh(sin(f*x+e))/b/f-a^(1/2)*arctanh(a^(1/2)*sin(f*x+e)/(a+b)^(1/2))/b/ 
(a+b)^(1/2)/f
 

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.89 \[ \int \frac {\sec ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\text {arctanh}(\sin (e+f x))-\frac {\sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{\sqrt {a+b}}}{b f} \] Input:

Integrate[Sec[e + f*x]^3/(a + b*Sec[e + f*x]^2),x]
 

Output:

(ArcTanh[Sin[e + f*x]] - (Sqrt[a]*ArcTanh[(Sqrt[a]*Sin[e + f*x])/Sqrt[a + 
b]])/Sqrt[a + b])/(b*f)
 

Rubi [A] (verified)

Time = 0.25 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.96, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 4635, 303, 219, 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 {\sec ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sec (e+f x)^3}{a+b \sec (e+f x)^2}dx\)

\(\Big \downarrow \) 4635

\(\displaystyle \frac {\int \frac {1}{\left (1-\sin ^2(e+f x)\right ) \left (-a \sin ^2(e+f x)+a+b\right )}d\sin (e+f x)}{f}\)

\(\Big \downarrow \) 303

\(\displaystyle \frac {\frac {\int \frac {1}{1-\sin ^2(e+f x)}d\sin (e+f x)}{b}-\frac {a \int \frac {1}{-a \sin ^2(e+f x)+a+b}d\sin (e+f x)}{b}}{f}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {\frac {\text {arctanh}(\sin (e+f x))}{b}-\frac {a \int \frac {1}{-a \sin ^2(e+f x)+a+b}d\sin (e+f x)}{b}}{f}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {\frac {\text {arctanh}(\sin (e+f x))}{b}-\frac {\sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{b \sqrt {a+b}}}{f}\)

Input:

Int[Sec[e + f*x]^3/(a + b*Sec[e + f*x]^2),x]
 

Output:

(ArcTanh[Sin[e + f*x]]/b - (Sqrt[a]*ArcTanh[(Sqrt[a]*Sin[e + f*x])/Sqrt[a 
+ b]])/(b*Sqrt[a + b]))/f
 

Defintions of rubi rules used

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

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 303
Int[1/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Simp[b/(b 
*c - a*d)   Int[1/(a + b*x^2), x], x] - Simp[d/(b*c - a*d)   Int[1/(c + d*x 
^2), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]
 

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

rule 4635
Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_ 
))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f 
 Subst[Int[ExpandToSum[b + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 - ff^2*x^2)^((m 
+ n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && In 
tegerQ[(m - 1)/2] && IntegerQ[n/2] && IntegerQ[p]
 
Maple [A] (verified)

Time = 0.44 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.15

method result size
derivativedivides \(\frac {-\frac {\ln \left (\sin \left (f x +e \right )-1\right )}{2 b}+\frac {\ln \left (\sin \left (f x +e \right )+1\right )}{2 b}-\frac {a \,\operatorname {arctanh}\left (\frac {a \sin \left (f x +e \right )}{\sqrt {a \left (a +b \right )}}\right )}{b \sqrt {a \left (a +b \right )}}}{f}\) \(63\)
default \(\frac {-\frac {\ln \left (\sin \left (f x +e \right )-1\right )}{2 b}+\frac {\ln \left (\sin \left (f x +e \right )+1\right )}{2 b}-\frac {a \,\operatorname {arctanh}\left (\frac {a \sin \left (f x +e \right )}{\sqrt {a \left (a +b \right )}}\right )}{b \sqrt {a \left (a +b \right )}}}{f}\) \(63\)
risch \(\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{b f}-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{b f}+\frac {\sqrt {a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {a \left (a +b \right )}\, {\mathrm e}^{i \left (f x +e \right )}}{a}-1\right )}{2 \left (a +b \right ) f b}-\frac {\sqrt {a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {a \left (a +b \right )}\, {\mathrm e}^{i \left (f x +e \right )}}{a}-1\right )}{2 \left (a +b \right ) f b}\) \(151\)

Input:

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

Output:

1/f*(-1/2/b*ln(sin(f*x+e)-1)+1/2/b*ln(sin(f*x+e)+1)-a/b/(a*(a+b))^(1/2)*ar 
ctanh(a*sin(f*x+e)/(a*(a+b))^(1/2)))
 

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 157, normalized size of antiderivative = 2.85 \[ \int \frac {\sec ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\left [\frac {\sqrt {\frac {a}{a + b}} \log \left (-\frac {a \cos \left (f x + e\right )^{2} + 2 \, {\left (a + b\right )} \sqrt {\frac {a}{a + b}} \sin \left (f x + e\right ) - 2 \, a - b}{a \cos \left (f x + e\right )^{2} + b}\right ) + \log \left (\sin \left (f x + e\right ) + 1\right ) - \log \left (-\sin \left (f x + e\right ) + 1\right )}{2 \, b f}, \frac {2 \, \sqrt {-\frac {a}{a + b}} \arctan \left (\sqrt {-\frac {a}{a + b}} \sin \left (f x + e\right )\right ) + \log \left (\sin \left (f x + e\right ) + 1\right ) - \log \left (-\sin \left (f x + e\right ) + 1\right )}{2 \, b f}\right ] \] Input:

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

Output:

[1/2*(sqrt(a/(a + b))*log(-(a*cos(f*x + e)^2 + 2*(a + b)*sqrt(a/(a + b))*s 
in(f*x + e) - 2*a - b)/(a*cos(f*x + e)^2 + b)) + log(sin(f*x + e) + 1) - l 
og(-sin(f*x + e) + 1))/(b*f), 1/2*(2*sqrt(-a/(a + b))*arctan(sqrt(-a/(a + 
b))*sin(f*x + e)) + log(sin(f*x + e) + 1) - log(-sin(f*x + e) + 1))/(b*f)]
                                                                                    
                                                                                    
 

Sympy [F]

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

integrate(sec(f*x+e)**3/(a+b*sec(f*x+e)**2),x)
 

Output:

Integral(sec(e + f*x)**3/(a + b*sec(e + f*x)**2), x)
 

Maxima [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.51 \[ \int \frac {\sec ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\frac {a \log \left (\frac {a \sin \left (f x + e\right ) - \sqrt {{\left (a + b\right )} a}}{a \sin \left (f x + e\right ) + \sqrt {{\left (a + b\right )} a}}\right )}{\sqrt {{\left (a + b\right )} a} b} + \frac {\log \left (\sin \left (f x + e\right ) + 1\right )}{b} - \frac {\log \left (\sin \left (f x + e\right ) - 1\right )}{b}}{2 \, f} \] Input:

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

Output:

1/2*(a*log((a*sin(f*x + e) - sqrt((a + b)*a))/(a*sin(f*x + e) + sqrt((a + 
b)*a)))/(sqrt((a + b)*a)*b) + log(sin(f*x + e) + 1)/b - log(sin(f*x + e) - 
 1)/b)/f
 

Giac [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.35 \[ \int \frac {\sec ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\frac {2 \, a \arctan \left (\frac {a \sin \left (f x + e\right )}{\sqrt {-a^{2} - a b}}\right )}{\sqrt {-a^{2} - a b} b} + \frac {\log \left ({\left | \sin \left (f x + e\right ) + 1 \right |}\right )}{b} - \frac {\log \left ({\left | \sin \left (f x + e\right ) - 1 \right |}\right )}{b}}{2 \, f} \] Input:

integrate(sec(f*x+e)^3/(a+b*sec(f*x+e)^2),x, algorithm="giac")
 

Output:

1/2*(2*a*arctan(a*sin(f*x + e)/sqrt(-a^2 - a*b))/(sqrt(-a^2 - a*b)*b) + lo 
g(abs(sin(f*x + e) + 1))/b - log(abs(sin(f*x + e) - 1))/b)/f
 

Mupad [B] (verification not implemented)

Time = 15.53 (sec) , antiderivative size = 456, normalized size of antiderivative = 8.29 \[ \int \frac {\sec ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\mathrm {atanh}\left (\sin \left (e+f\,x\right )\right )}{b\,f}+\frac {\mathrm {atan}\left (\frac {\frac {\left (2\,a^3\,\sin \left (e+f\,x\right )+\frac {\left (2\,a^2\,b^2-\frac {\sin \left (e+f\,x\right )\,\left (16\,a^3\,b^2+8\,a^2\,b^3\right )\,\sqrt {a\,\left (a+b\right )}}{4\,\left (b^2+a\,b\right )}\right )\,\sqrt {a\,\left (a+b\right )}}{2\,\left (b^2+a\,b\right )}\right )\,\sqrt {a\,\left (a+b\right )}\,1{}\mathrm {i}}{b^2+a\,b}+\frac {\left (2\,a^3\,\sin \left (e+f\,x\right )-\frac {\left (2\,a^2\,b^2+\frac {\sin \left (e+f\,x\right )\,\left (16\,a^3\,b^2+8\,a^2\,b^3\right )\,\sqrt {a\,\left (a+b\right )}}{4\,\left (b^2+a\,b\right )}\right )\,\sqrt {a\,\left (a+b\right )}}{2\,\left (b^2+a\,b\right )}\right )\,\sqrt {a\,\left (a+b\right )}\,1{}\mathrm {i}}{b^2+a\,b}}{\frac {\left (2\,a^3\,\sin \left (e+f\,x\right )+\frac {\left (2\,a^2\,b^2-\frac {\sin \left (e+f\,x\right )\,\left (16\,a^3\,b^2+8\,a^2\,b^3\right )\,\sqrt {a\,\left (a+b\right )}}{4\,\left (b^2+a\,b\right )}\right )\,\sqrt {a\,\left (a+b\right )}}{2\,\left (b^2+a\,b\right )}\right )\,\sqrt {a\,\left (a+b\right )}}{b^2+a\,b}-\frac {\left (2\,a^3\,\sin \left (e+f\,x\right )-\frac {\left (2\,a^2\,b^2+\frac {\sin \left (e+f\,x\right )\,\left (16\,a^3\,b^2+8\,a^2\,b^3\right )\,\sqrt {a\,\left (a+b\right )}}{4\,\left (b^2+a\,b\right )}\right )\,\sqrt {a\,\left (a+b\right )}}{2\,\left (b^2+a\,b\right )}\right )\,\sqrt {a\,\left (a+b\right )}}{b^2+a\,b}}\right )\,\sqrt {a\,\left (a+b\right )}\,1{}\mathrm {i}}{f\,\left (b^2+a\,b\right )} \] Input:

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

Output:

atanh(sin(e + f*x))/(b*f) + (atan((((2*a^3*sin(e + f*x) + ((2*a^2*b^2 - (s 
in(e + f*x)*(8*a^2*b^3 + 16*a^3*b^2)*(a*(a + b))^(1/2))/(4*(a*b + b^2)))*( 
a*(a + b))^(1/2))/(2*(a*b + b^2)))*(a*(a + b))^(1/2)*1i)/(a*b + b^2) + ((2 
*a^3*sin(e + f*x) - ((2*a^2*b^2 + (sin(e + f*x)*(8*a^2*b^3 + 16*a^3*b^2)*( 
a*(a + b))^(1/2))/(4*(a*b + b^2)))*(a*(a + b))^(1/2))/(2*(a*b + b^2)))*(a* 
(a + b))^(1/2)*1i)/(a*b + b^2))/(((2*a^3*sin(e + f*x) + ((2*a^2*b^2 - (sin 
(e + f*x)*(8*a^2*b^3 + 16*a^3*b^2)*(a*(a + b))^(1/2))/(4*(a*b + b^2)))*(a* 
(a + b))^(1/2))/(2*(a*b + b^2)))*(a*(a + b))^(1/2))/(a*b + b^2) - ((2*a^3* 
sin(e + f*x) - ((2*a^2*b^2 + (sin(e + f*x)*(8*a^2*b^3 + 16*a^3*b^2)*(a*(a 
+ b))^(1/2))/(4*(a*b + b^2)))*(a*(a + b))^(1/2))/(2*(a*b + b^2)))*(a*(a + 
b))^(1/2))/(a*b + b^2)))*(a*(a + b))^(1/2)*1i)/(f*(a*b + b^2))
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 159, normalized size of antiderivative = 2.89 \[ \int \frac {\sec ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\sqrt {a}\, \sqrt {a +b}\, \mathrm {log}\left (\sqrt {a +b}\, \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+\sqrt {a +b}-2 \sqrt {a}\, \tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\sqrt {a}\, \sqrt {a +b}\, \mathrm {log}\left (\sqrt {a +b}\, \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+\sqrt {a +b}+2 \sqrt {a}\, \tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )-2 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right ) a -2 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right ) b +2 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) a +2 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) b}{2 b f \left (a +b \right )} \] Input:

int(sec(f*x+e)^3/(a+b*sec(f*x+e)^2),x)
 

Output:

(sqrt(a)*sqrt(a + b)*log(sqrt(a + b)*tan((e + f*x)/2)**2 + sqrt(a + b) - 2 
*sqrt(a)*tan((e + f*x)/2)) - sqrt(a)*sqrt(a + b)*log(sqrt(a + b)*tan((e + 
f*x)/2)**2 + sqrt(a + b) + 2*sqrt(a)*tan((e + f*x)/2)) - 2*log(tan((e + f* 
x)/2) - 1)*a - 2*log(tan((e + f*x)/2) - 1)*b + 2*log(tan((e + f*x)/2) + 1) 
*a + 2*log(tan((e + f*x)/2) + 1)*b)/(2*b*f*(a + b))