Integrand size = 9, antiderivative size = 34 \[ \int (-\cos (x)+\sec (x))^3 \, dx=-\frac {5}{2} \text {arctanh}(\sin (x))+\frac {5 \sin (x)}{2}+\frac {5 \sin ^3(x)}{6}+\frac {1}{2} \sin ^3(x) \tan ^2(x) \] Output:
-5/2*arctanh(sin(x))+5/2*sin(x)+5/6*sin(x)^3+1/2*sin(x)^3*tan(x)^2
Time = 0.01 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.12 \[ \int (-\cos (x)+\sec (x))^3 \, dx=-\frac {5}{2} \text {arctanh}(\sin (x))+\frac {5}{2} \sec (x) \tan (x)-\frac {5}{3} \sin (x) \tan ^2(x)-\frac {1}{3} \sin ^3(x) \tan ^2(x) \] Input:
Integrate[(-Cos[x] + Sec[x])^3,x]
Output:
(-5*ArcTanh[Sin[x]])/2 + (5*Sec[x]*Tan[x])/2 - (5*Sin[x]*Tan[x]^2)/3 - (Si n[x]^3*Tan[x]^2)/3
Time = 0.27 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.15, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.778, Rules used = {3042, 4897, 3042, 3072, 252, 254, 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 (\sec (x)-\cos (x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (\sec (x)-\cos (x))^3dx\) |
\(\Big \downarrow \) 4897 |
\(\displaystyle \int \sin ^3(x) \tan ^3(x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin (x)^3 \tan (x)^3dx\) |
\(\Big \downarrow \) 3072 |
\(\displaystyle \int \frac {\sin ^6(x)}{\left (1-\sin ^2(x)\right )^2}d\sin (x)\) |
\(\Big \downarrow \) 252 |
\(\displaystyle \frac {\sin ^5(x)}{2 \left (1-\sin ^2(x)\right )}-\frac {5}{2} \int \frac {\sin ^4(x)}{1-\sin ^2(x)}d\sin (x)\) |
\(\Big \downarrow \) 254 |
\(\displaystyle \frac {\sin ^5(x)}{2 \left (1-\sin ^2(x)\right )}-\frac {5}{2} \int \left (-\sin ^2(x)+\frac {1}{1-\sin ^2(x)}-1\right )d\sin (x)\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\sin ^5(x)}{2 \left (1-\sin ^2(x)\right )}-\frac {5}{2} \left (\text {arctanh}(\sin (x))-\frac {1}{3} \sin ^3(x)-\sin (x)\right )\) |
Input:
Int[(-Cos[x] + Sec[x])^3,x]
Output:
Sin[x]^5/(2*(1 - Sin[x]^2)) - (5*(ArcTanh[Sin[x]] - Sin[x] - Sin[x]^3/3))/ 2
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x )^(m - 1)*((a + b*x^2)^(p + 1)/(2*b*(p + 1))), x] - Simp[c^2*((m - 1)/(2*b* (p + 1))) Int[(c*x)^(m - 2)*(a + b*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c }, x] && LtQ[p, -1] && GtQ[m, 1] && !ILtQ[(m + 2*p + 3)/2, 0] && IntBinomi alQ[a, b, c, 2, m, p, x]
Int[(x_)^(m_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^2, x], x] /; FreeQ[{a, b}, x] && IGtQ[m, 3]
Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_ Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f Subst[Int[ (ff*x)^(m + n)/(a^2 - ff^2*x^2)^((n + 1)/2), x], x, a*(Sin[e + f*x]/ff)], x ]] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1)/2]
Time = 0.69 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.88
method | result | size |
default | \(-\frac {\left (2+\cos \left (x \right )^{2}\right ) \sin \left (x \right )}{3}+3 \sin \left (x \right )-\frac {5 \ln \left (\sec \left (x \right )+\tan \left (x \right )\right )}{2}+\frac {\tan \left (x \right ) \sec \left (x \right )}{2}\) | \(30\) |
parts | \(-\frac {\left (2+\cos \left (x \right )^{2}\right ) \sin \left (x \right )}{3}+3 \sin \left (x \right )-\frac {5 \ln \left (\sec \left (x \right )+\tan \left (x \right )\right )}{2}+\frac {\tan \left (x \right ) \sec \left (x \right )}{2}\) | \(30\) |
parallelrisch | \(\frac {\left (60 \cos \left (2 x \right )+60\right ) \ln \left (\tan \left (\frac {x}{2}\right )-1\right )+\left (-60 \cos \left (2 x \right )-60\right ) \ln \left (\tan \left (\frac {x}{2}\right )+1\right )+50 \sin \left (x \right )+25 \sin \left (3 x \right )-\sin \left (5 x \right )}{24+24 \cos \left (2 x \right )}\) | \(61\) |
norman | \(\frac {\frac {20 \tan \left (\frac {x}{2}\right )^{3}}{3}-\frac {22 \tan \left (\frac {x}{2}\right )^{5}}{3}+\frac {20 \tan \left (\frac {x}{2}\right )^{7}}{3}+5 \tan \left (\frac {x}{2}\right )^{9}+5 \tan \left (\frac {x}{2}\right )}{\left (1+\tan \left (\frac {x}{2}\right )^{2}\right )^{3} \left (\tan \left (\frac {x}{2}\right )^{2}-1\right )^{2}}+\frac {5 \ln \left (\tan \left (\frac {x}{2}\right )-1\right )}{2}-\frac {5 \ln \left (\tan \left (\frac {x}{2}\right )+1\right )}{2}\) | \(80\) |
risch | \(\frac {i {\mathrm e}^{3 i x}}{24}-\frac {9 i {\mathrm e}^{i x}}{8}+\frac {9 i {\mathrm e}^{-i x}}{8}-\frac {i {\mathrm e}^{-3 i x}}{24}-\frac {i \left ({\mathrm e}^{3 i x}-{\mathrm e}^{i x}\right )}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}+\frac {5 \ln \left ({\mathrm e}^{i x}-i\right )}{2}-\frac {5 \ln \left ({\mathrm e}^{i x}+i\right )}{2}\) | \(81\) |
Input:
int((-cos(x)+sec(x))^3,x,method=_RETURNVERBOSE)
Output:
-1/3*(2+cos(x)^2)*sin(x)+3*sin(x)-5/2*ln(sec(x)+tan(x))+1/2*tan(x)*sec(x)
Time = 0.08 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.44 \[ \int (-\cos (x)+\sec (x))^3 \, dx=-\frac {15 \, \cos \left (x\right )^{2} \log \left (\sin \left (x\right ) + 1\right ) - 15 \, \cos \left (x\right )^{2} \log \left (-\sin \left (x\right ) + 1\right ) + 2 \, {\left (2 \, \cos \left (x\right )^{4} - 14 \, \cos \left (x\right )^{2} - 3\right )} \sin \left (x\right )}{12 \, \cos \left (x\right )^{2}} \] Input:
integrate((-cos(x)+sec(x))^3,x, algorithm="fricas")
Output:
-1/12*(15*cos(x)^2*log(sin(x) + 1) - 15*cos(x)^2*log(-sin(x) + 1) + 2*(2*c os(x)^4 - 14*cos(x)^2 - 3)*sin(x))/cos(x)^2
Time = 1.54 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.24 \[ \int (-\cos (x)+\sec (x))^3 \, dx=\frac {5 \log {\left (\sin {\left (x \right )} - 1 \right )}}{4} - \frac {5 \log {\left (\sin {\left (x \right )} + 1 \right )}}{4} + \frac {\sin ^{3}{\left (x \right )}}{3} + 2 \sin {\left (x \right )} - \frac {\sin {\left (x \right )}}{2 \sin ^{2}{\left (x \right )} - 2} \] Input:
integrate((-cos(x)+sec(x))**3,x)
Output:
5*log(sin(x) - 1)/4 - 5*log(sin(x) + 1)/4 + sin(x)**3/3 + 2*sin(x) - sin(x )/(2*sin(x)**2 - 2)
Time = 0.03 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.09 \[ \int (-\cos (x)+\sec (x))^3 \, dx=\frac {1}{3} \, \sin \left (x\right )^{3} - \frac {\sin \left (x\right )}{2 \, {\left (\sin \left (x\right )^{2} - 1\right )}} - \frac {5}{4} \, \log \left (\sin \left (x\right ) + 1\right ) + \frac {5}{4} \, \log \left (\sin \left (x\right ) - 1\right ) + 2 \, \sin \left (x\right ) \] Input:
integrate((-cos(x)+sec(x))^3,x, algorithm="maxima")
Output:
1/3*sin(x)^3 - 1/2*sin(x)/(sin(x)^2 - 1) - 5/4*log(sin(x) + 1) + 5/4*log(s in(x) - 1) + 2*sin(x)
Time = 0.11 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.15 \[ \int (-\cos (x)+\sec (x))^3 \, dx=\frac {1}{3} \, \sin \left (x\right )^{3} - \frac {\sin \left (x\right )}{2 \, {\left (\sin \left (x\right )^{2} - 1\right )}} - \frac {5}{4} \, \log \left (\sin \left (x\right ) + 1\right ) + \frac {5}{4} \, \log \left (-\sin \left (x\right ) + 1\right ) + 2 \, \sin \left (x\right ) \] Input:
integrate((-cos(x)+sec(x))^3,x, algorithm="giac")
Output:
1/3*sin(x)^3 - 1/2*sin(x)/(sin(x)^2 - 1) - 5/4*log(sin(x) + 1) + 5/4*log(- sin(x) + 1) + 2*sin(x)
Time = 15.84 (sec) , antiderivative size = 68, normalized size of antiderivative = 2.00 \[ \int (-\cos (x)+\sec (x))^3 \, dx=\frac {5\,{\mathrm {tan}\left (\frac {x}{2}\right )}^9+\frac {20\,{\mathrm {tan}\left (\frac {x}{2}\right )}^7}{3}-\frac {22\,{\mathrm {tan}\left (\frac {x}{2}\right )}^5}{3}+\frac {20\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3}{3}+5\,\mathrm {tan}\left (\frac {x}{2}\right )}{{\left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2-1\right )}^2\,{\left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2+1\right )}^3}-5\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {x}{2}\right )\right ) \] Input:
int(-(cos(x) - 1/cos(x))^3,x)
Output:
(5*tan(x/2) + (20*tan(x/2)^3)/3 - (22*tan(x/2)^5)/3 + (20*tan(x/2)^7)/3 + 5*tan(x/2)^9)/((tan(x/2)^2 - 1)^2*(tan(x/2)^2 + 1)^3) - 5*atanh(tan(x/2))
Time = 0.16 (sec) , antiderivative size = 72, normalized size of antiderivative = 2.12 \[ \int (-\cos (x)+\sec (x))^3 \, dx=\frac {15 \,\mathrm {log}\left (\tan \left (\frac {x}{2}\right )-1\right ) \sin \left (x \right )^{2}-15 \,\mathrm {log}\left (\tan \left (\frac {x}{2}\right )-1\right )-15 \,\mathrm {log}\left (\tan \left (\frac {x}{2}\right )+1\right ) \sin \left (x \right )^{2}+15 \,\mathrm {log}\left (\tan \left (\frac {x}{2}\right )+1\right )+2 \sin \left (x \right )^{5}+10 \sin \left (x \right )^{3}-15 \sin \left (x \right )}{6 \sin \left (x \right )^{2}-6} \] Input:
int((-cos(x)+sec(x))^3,x)
Output:
(15*log(tan(x/2) - 1)*sin(x)**2 - 15*log(tan(x/2) - 1) - 15*log(tan(x/2) + 1)*sin(x)**2 + 15*log(tan(x/2) + 1) + 2*sin(x)**5 + 10*sin(x)**3 - 15*sin (x))/(6*(sin(x)**2 - 1))