Optimal. Leaf size=43 \[ -\frac {49}{5} \sin ^5(x)-\frac {49 \sin ^3(x)}{3}+63 \sin ^2(x)-49 \sin (x)-2 \log (1-\sin (x))+128 \log (\sin (x)+1) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3175, 3223, 1810, 633, 31} \[ -\frac {49}{5} \sin ^5(x)-\frac {49 \sin ^3(x)}{3}+63 \sin ^2(x)-49 \sin (x)-2 \log (1-\sin (x))+128 \log (\sin (x)+1) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 633
Rule 1810
Rule 3175
Rule 3223
Rubi steps
\begin {align*} \int \frac {\cos (x) \left (9-7 \sin ^3(x)\right )^2}{1-\sin ^2(x)} \, dx &=\int \sec (x) \left (9-7 \sin ^3(x)\right )^2 \, dx\\ &=\operatorname {Subst}\left (\int \frac {\left (9-7 x^3\right )^2}{1-x^2} \, dx,x,\sin (x)\right )\\ &=\operatorname {Subst}\left (\int \left (-49+126 x-49 x^2-49 x^4+\frac {2 (65-63 x)}{1-x^2}\right ) \, dx,x,\sin (x)\right )\\ &=-49 \sin (x)+63 \sin ^2(x)-\frac {49 \sin ^3(x)}{3}-\frac {49 \sin ^5(x)}{5}+2 \operatorname {Subst}\left (\int \frac {65-63 x}{1-x^2} \, dx,x,\sin (x)\right )\\ &=-49 \sin (x)+63 \sin ^2(x)-\frac {49 \sin ^3(x)}{3}-\frac {49 \sin ^5(x)}{5}+2 \operatorname {Subst}\left (\int \frac {1}{1-x} \, dx,x,\sin (x)\right )-128 \operatorname {Subst}\left (\int \frac {1}{-1-x} \, dx,x,\sin (x)\right )\\ &=-2 \log (1-\sin (x))+128 \log (1+\sin (x))-49 \sin (x)+63 \sin ^2(x)-\frac {49 \sin ^3(x)}{3}-\frac {49 \sin ^5(x)}{5}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 71, normalized size = 1.65 \[ -\frac {49}{5} \sin ^5(x)-\frac {49 \sin ^3(x)}{3}-49 \sin (x)-63 \cos ^2(x)+49 \tanh ^{-1}(\sin (x))+126 \log (\cos (x))-81 \log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )+81 \log \left (\sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.95, size = 41, normalized size = 0.95 \[ -63 \, \cos \relax (x)^{2} - \frac {49}{15} \, {\left (3 \, \cos \relax (x)^{4} - 11 \, \cos \relax (x)^{2} + 23\right )} \sin \relax (x) + 128 \, \log \left (\sin \relax (x) + 1\right ) - 2 \, \log \left (-\sin \relax (x) + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 6.00, size = 39, normalized size = 0.91 \[ -\frac {49}{5} \, \sin \relax (x)^{5} - \frac {49}{3} \, \sin \relax (x)^{3} + 63 \, \sin \relax (x)^{2} + 128 \, \log \left (\sin \relax (x) + 1\right ) - 2 \, \log \left (-\sin \relax (x) + 1\right ) - 49 \, \sin \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 38, normalized size = 0.88 \[ -\frac {49 \left (\sin ^{5}\relax (x )\right )}{5}-\frac {49 \left (\sin ^{3}\relax (x )\right )}{3}+63 \left (\sin ^{2}\relax (x )\right )-49 \sin \relax (x )-2 \ln \left (\sin \relax (x )-1\right )+128 \ln \left (1+\sin \relax (x )\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 37, normalized size = 0.86 \[ -\frac {49}{5} \, \sin \relax (x)^{5} - \frac {49}{3} \, \sin \relax (x)^{3} + 63 \, \sin \relax (x)^{2} + 128 \, \log \left (\sin \relax (x) + 1\right ) - 2 \, \log \left (\sin \relax (x) - 1\right ) - 49 \, \sin \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.08, size = 37, normalized size = 0.86 \[ 128\,\ln \left (\sin \relax (x)+1\right )-2\,\ln \left (\sin \relax (x)-1\right )-49\,\sin \relax (x)+63\,{\sin \relax (x)}^2-\frac {49\,{\sin \relax (x)}^3}{3}-\frac {49\,{\sin \relax (x)}^5}{5} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 2.95, size = 44, normalized size = 1.02 \[ - 2 \log {\left (\sin {\relax (x )} - 1 \right )} + 128 \log {\left (\sin {\relax (x )} + 1 \right )} - \frac {49 \sin ^{5}{\relax (x )}}{5} - \frac {49 \sin ^{3}{\relax (x )}}{3} + 63 \sin ^{2}{\relax (x )} - 49 \sin {\relax (x )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________