Integrand size = 11, antiderivative size = 51 \[ \int \frac {1}{(a \sec (x)+b \tan (x))^3} \, dx=-\frac {\log (a+b \sin (x))}{b^3}+\frac {a^2-b^2}{2 b^3 (a+b \sin (x))^2}-\frac {2 a}{b^3 (a+b \sin (x))} \] Output:
-ln(a+b*sin(x))/b^3+1/2*(a^2-b^2)/b^3/(a+b*sin(x))^2-2*a/b^3/(a+b*sin(x))
Time = 0.13 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.78 \[ \int \frac {1}{(a \sec (x)+b \tan (x))^3} \, dx=-\frac {\log (a+b \sin (x))+\frac {3 a^2+b^2+4 a b \sin (x)}{2 (a+b \sin (x))^2}}{b^3} \] Input:
Integrate[(a*Sec[x] + b*Tan[x])^(-3),x]
Output:
-((Log[a + b*Sin[x]] + (3*a^2 + b^2 + 4*a*b*Sin[x])/(2*(a + b*Sin[x])^2))/ b^3)
Time = 0.29 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.90, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.545, Rules used = {3042, 4891, 3042, 3147, 476, 2009}
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 {1}{(a \sec (x)+b \tan (x))^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{(a \sec (x)+b \tan (x))^3}dx\) |
\(\Big \downarrow \) 4891 |
\(\displaystyle \int \frac {\cos ^3(x)}{(a+b \sin (x))^3}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (x)^3}{(a+b \sin (x))^3}dx\) |
\(\Big \downarrow \) 3147 |
\(\displaystyle \frac {\int \frac {b^2-b^2 \sin ^2(x)}{(a+b \sin (x))^3}d(b \sin (x))}{b^3}\) |
\(\Big \downarrow \) 476 |
\(\displaystyle \frac {\int \left (\frac {2 a}{(a+b \sin (x))^2}+\frac {1}{-a-b \sin (x)}+\frac {b^2-a^2}{(a+b \sin (x))^3}\right )d(b \sin (x))}{b^3}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {a^2-b^2}{2 (a+b \sin (x))^2}-\frac {2 a}{a+b \sin (x)}-\log (a+b \sin (x))}{b^3}\) |
Input:
Int[(a*Sec[x] + b*Tan[x])^(-3),x]
Output:
(-Log[a + b*Sin[x]] + (a^2 - b^2)/(2*(a + b*Sin[x])^2) - (2*a)/(a + b*Sin[ x]))/b^3
Int[((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ ExpandIntegrand[(c + d*x)^n*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, n}, x] && IGtQ[p, 0]
Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m _.), x_Symbol] :> Simp[1/(b^p*f) Subst[Int[(a + x)^m*(b^2 - x^2)^((p - 1) /2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && IntegerQ[(p - 1)/2] && NeQ[a^2 - b^2, 0]
Int[(u_.)*((b_.)*sec[(c_.) + (d_.)*(x_)]^(n_.) + (a_.)*tan[(c_.) + (d_.)*(x _)]^(n_.))^(p_), x_Symbol] :> Int[ActivateTrig[u]*Sec[c + d*x]^(n*p)*(b + a *Sin[c + d*x]^n)^p, x] /; FreeQ[{a, b, c, d}, x] && IntegersQ[n, p]
Time = 7.45 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.98
method | result | size |
default | \(-\frac {-a^{2}+b^{2}}{2 b^{3} \left (a +b \sin \left (x \right )\right )^{2}}-\frac {\ln \left (a +b \sin \left (x \right )\right )}{b^{3}}-\frac {2 a}{b^{3} \left (a +b \sin \left (x \right )\right )}\) | \(50\) |
risch | \(\frac {i x}{b^{3}}-\frac {2 i \left (3 i a^{2} {\mathrm e}^{2 i x}+i b^{2} {\mathrm e}^{2 i x}+2 b a \,{\mathrm e}^{3 i x}-2 a b \,{\mathrm e}^{i x}\right )}{\left (b \,{\mathrm e}^{2 i x}-b +2 i a \,{\mathrm e}^{i x}\right )^{2} b^{3}}-\frac {\ln \left ({\mathrm e}^{2 i x}+\frac {2 i a \,{\mathrm e}^{i x}}{b}-1\right )}{b^{3}}\) | \(103\) |
Input:
int(1/(a*sec(x)+b*tan(x))^3,x,method=_RETURNVERBOSE)
Output:
-1/2*(-a^2+b^2)/b^3/(a+b*sin(x))^2-ln(a+b*sin(x))/b^3-2*a/b^3/(a+b*sin(x))
Time = 0.08 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.63 \[ \int \frac {1}{(a \sec (x)+b \tan (x))^3} \, dx=\frac {4 \, a b \sin \left (x\right ) + 3 \, a^{2} + b^{2} - 2 \, {\left (b^{2} \cos \left (x\right )^{2} - 2 \, a b \sin \left (x\right ) - a^{2} - b^{2}\right )} \log \left (b \sin \left (x\right ) + a\right )}{2 \, {\left (b^{5} \cos \left (x\right )^{2} - 2 \, a b^{4} \sin \left (x\right ) - a^{2} b^{3} - b^{5}\right )}} \] Input:
integrate(1/(a*sec(x)+b*tan(x))^3,x, algorithm="fricas")
Output:
1/2*(4*a*b*sin(x) + 3*a^2 + b^2 - 2*(b^2*cos(x)^2 - 2*a*b*sin(x) - a^2 - b ^2)*log(b*sin(x) + a))/(b^5*cos(x)^2 - 2*a*b^4*sin(x) - a^2*b^3 - b^5)
Leaf count of result is larger than twice the leaf count of optimal. 503 vs. \(2 (46) = 92\).
Time = 1.14 (sec) , antiderivative size = 503, normalized size of antiderivative = 9.86 \[ \int \frac {1}{(a \sec (x)+b \tan (x))^3} \, dx =\text {Too large to display} \] Input:
integrate(1/(a*sec(x)+b*tan(x))**3,x)
Output:
Piecewise((-2*a**2*log(a*sec(x)/b + tan(x))*sec(x)**2/(2*a**2*b**3*sec(x)* *2 + 4*a*b**4*tan(x)*sec(x) + 2*b**5*tan(x)**2) + a**2*log(tan(x)**2 + 1)* sec(x)**2/(2*a**2*b**3*sec(x)**2 + 4*a*b**4*tan(x)*sec(x) + 2*b**5*tan(x)* *2) - a**2*sec(x)**2/(2*a**2*b**3*sec(x)**2 + 4*a*b**4*tan(x)*sec(x) + 2*b **5*tan(x)**2) - 4*a*b*log(a*sec(x)/b + tan(x))*tan(x)*sec(x)/(2*a**2*b**3 *sec(x)**2 + 4*a*b**4*tan(x)*sec(x) + 2*b**5*tan(x)**2) + 2*a*b*log(tan(x) **2 + 1)*tan(x)*sec(x)/(2*a**2*b**3*sec(x)**2 + 4*a*b**4*tan(x)*sec(x) + 2 *b**5*tan(x)**2) - 2*b**2*log(a*sec(x)/b + tan(x))*tan(x)**2/(2*a**2*b**3* sec(x)**2 + 4*a*b**4*tan(x)*sec(x) + 2*b**5*tan(x)**2) + b**2*log(tan(x)** 2 + 1)*tan(x)**2/(2*a**2*b**3*sec(x)**2 + 4*a*b**4*tan(x)*sec(x) + 2*b**5* tan(x)**2) + b**2*tan(x)**2/(2*a**2*b**3*sec(x)**2 + 4*a*b**4*tan(x)*sec(x ) + 2*b**5*tan(x)**2) - b**2/(2*a**2*b**3*sec(x)**2 + 4*a*b**4*tan(x)*sec( x) + 2*b**5*tan(x)**2), Ne(b, 0)), ((2*tan(x)**3/(3*sec(x)**3) + tan(x)/se c(x)**3)/a**3, True))
Leaf count of result is larger than twice the leaf count of optimal. 201 vs. \(2 (49) = 98\).
Time = 0.12 (sec) , antiderivative size = 201, normalized size of antiderivative = 3.94 \[ \int \frac {1}{(a \sec (x)+b \tan (x))^3} \, dx=\frac {2 \, {\left (\frac {{\left (a^{3} + a b^{2}\right )} \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {{\left (3 \, a^{2} b + b^{3}\right )} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac {{\left (a^{3} + a b^{2}\right )} \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}}\right )}}{a^{4} b^{2} + \frac {4 \, a^{3} b^{3} \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {4 \, a^{3} b^{3} \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} + \frac {a^{4} b^{2} \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}} + \frac {2 \, {\left (a^{4} b^{2} + 2 \, a^{2} b^{4}\right )} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}} - \frac {\log \left (a + \frac {2 \, b \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {a \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}\right )}{b^{3}} + \frac {\log \left (\frac {\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + 1\right )}{b^{3}} \] Input:
integrate(1/(a*sec(x)+b*tan(x))^3,x, algorithm="maxima")
Output:
2*((a^3 + a*b^2)*sin(x)/(cos(x) + 1) + (3*a^2*b + b^3)*sin(x)^2/(cos(x) + 1)^2 + (a^3 + a*b^2)*sin(x)^3/(cos(x) + 1)^3)/(a^4*b^2 + 4*a^3*b^3*sin(x)/ (cos(x) + 1) + 4*a^3*b^3*sin(x)^3/(cos(x) + 1)^3 + a^4*b^2*sin(x)^4/(cos(x ) + 1)^4 + 2*(a^4*b^2 + 2*a^2*b^4)*sin(x)^2/(cos(x) + 1)^2) - log(a + 2*b* sin(x)/(cos(x) + 1) + a*sin(x)^2/(cos(x) + 1)^2)/b^3 + log(sin(x)^2/(cos(x ) + 1)^2 + 1)/b^3
Time = 0.11 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.84 \[ \int \frac {1}{(a \sec (x)+b \tan (x))^3} \, dx=-\frac {\log \left ({\left | b \sin \left (x\right ) + a \right |}\right )}{b^{3}} + \frac {3 \, b \sin \left (x\right )^{2} + 2 \, a \sin \left (x\right ) - b}{2 \, {\left (b \sin \left (x\right ) + a\right )}^{2} b^{2}} \] Input:
integrate(1/(a*sec(x)+b*tan(x))^3,x, algorithm="giac")
Output:
-log(abs(b*sin(x) + a))/b^3 + 1/2*(3*b*sin(x)^2 + 2*a*sin(x) - b)/((b*sin( x) + a)^2*b^2)
Time = 16.19 (sec) , antiderivative size = 106, normalized size of antiderivative = 2.08 \[ \int \frac {1}{(a \sec (x)+b \tan (x))^3} \, dx=\frac {2\,a^3\,b\,\sin \left (x\right )+3\,a^2\,b^2\,{\sin \left (x\right )}^2+2\,a\,b^3\,\sin \left (x\right )+b^4\,{\sin \left (x\right )}^2}{2\,a^4\,b^3+4\,a^3\,b^4\,\sin \left (x\right )+2\,a^2\,b^5\,{\sin \left (x\right )}^2}-\frac {2\,\mathrm {atanh}\left (\frac {b^2+a\,\sin \left (x\right )\,b}{2\,a^2+\sin \left (x\right )\,a\,b-b^2}\right )}{b^3} \] Input:
int(1/(b*tan(x) + a/cos(x))^3,x)
Output:
(b^4*sin(x)^2 + 3*a^2*b^2*sin(x)^2 + 2*a*b^3*sin(x) + 2*a^3*b*sin(x))/(2*a ^4*b^3 + 2*a^2*b^5*sin(x)^2 + 4*a^3*b^4*sin(x)) - (2*atanh((b^2 + a*b*sin( x))/(2*a^2 - b^2 + a*b*sin(x))))/b^3
Time = 0.17 (sec) , antiderivative size = 156, normalized size of antiderivative = 3.06 \[ \int \frac {1}{(a \sec (x)+b \tan (x))^3} \, dx=\frac {\mathrm {log}\left (\tan \left (x \right )^{2}+1\right ) \sec \left (x \right )^{2} a^{2}+2 \,\mathrm {log}\left (\tan \left (x \right )^{2}+1\right ) \sec \left (x \right ) \tan \left (x \right ) a b +\mathrm {log}\left (\tan \left (x \right )^{2}+1\right ) \tan \left (x \right )^{2} b^{2}-2 \,\mathrm {log}\left (\sec \left (x \right ) a +\tan \left (x \right ) b \right ) \sec \left (x \right )^{2} a^{2}-4 \,\mathrm {log}\left (\sec \left (x \right ) a +\tan \left (x \right ) b \right ) \sec \left (x \right ) \tan \left (x \right ) a b -2 \,\mathrm {log}\left (\sec \left (x \right ) a +\tan \left (x \right ) b \right ) \tan \left (x \right )^{2} b^{2}-\sec \left (x \right )^{2} a^{2}+\tan \left (x \right )^{2} b^{2}-b^{2}}{2 b^{3} \left (\sec \left (x \right )^{2} a^{2}+2 \sec \left (x \right ) \tan \left (x \right ) a b +\tan \left (x \right )^{2} b^{2}\right )} \] Input:
int(1/(a*sec(x)+b*tan(x))^3,x)
Output:
(log(tan(x)**2 + 1)*sec(x)**2*a**2 + 2*log(tan(x)**2 + 1)*sec(x)*tan(x)*a* b + log(tan(x)**2 + 1)*tan(x)**2*b**2 - 2*log(sec(x)*a + tan(x)*b)*sec(x)* *2*a**2 - 4*log(sec(x)*a + tan(x)*b)*sec(x)*tan(x)*a*b - 2*log(sec(x)*a + tan(x)*b)*tan(x)**2*b**2 - sec(x)**2*a**2 + tan(x)**2*b**2 - b**2)/(2*b**3 *(sec(x)**2*a**2 + 2*sec(x)*tan(x)*a*b + tan(x)**2*b**2))