Optimal. Leaf size=55 \[ \frac {a^2 \log (a+b \sin (c+d x))}{b^3 d}-\frac {a \sin (c+d x)}{b^2 d}+\frac {\sin ^2(c+d x)}{2 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2833, 12, 43} \[ \frac {a^2 \log (a+b \sin (c+d x))}{b^3 d}-\frac {a \sin (c+d x)}{b^2 d}+\frac {\sin ^2(c+d x)}{2 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 43
Rule 2833
Rubi steps
\begin {align*} \int \frac {\cos (c+d x) \sin ^2(c+d x)}{a+b \sin (c+d x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x^2}{b^2 (a+x)} \, dx,x,b \sin (c+d x)\right )}{b d}\\ &=\frac {\operatorname {Subst}\left (\int \frac {x^2}{a+x} \, dx,x,b \sin (c+d x)\right )}{b^3 d}\\ &=\frac {\operatorname {Subst}\left (\int \left (-a+x+\frac {a^2}{a+x}\right ) \, dx,x,b \sin (c+d x)\right )}{b^3 d}\\ &=\frac {a^2 \log (a+b \sin (c+d x))}{b^3 d}-\frac {a \sin (c+d x)}{b^2 d}+\frac {\sin ^2(c+d x)}{2 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.11, size = 49, normalized size = 0.89 \[ \frac {2 a^2 \log (a+b \sin (c+d x))-2 a b \sin (c+d x)+b^2 \sin ^2(c+d x)}{2 b^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.81, size = 47, normalized size = 0.85 \[ -\frac {b^{2} \cos \left (d x + c\right )^{2} - 2 \, a^{2} \log \left (b \sin \left (d x + c\right ) + a\right ) + 2 \, a b \sin \left (d x + c\right )}{2 \, b^{3} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 50, normalized size = 0.91 \[ \frac {\frac {2 \, a^{2} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{b^{3}} + \frac {b \sin \left (d x + c\right )^{2} - 2 \, a \sin \left (d x + c\right )}{b^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.18, size = 54, normalized size = 0.98 \[ \frac {\ln \left (a +b \sin \left (d x +c \right )\right ) a^{2}}{d \,b^{3}}-\frac {a \sin \left (d x +c \right )}{b^{2} d}+\frac {\sin ^{2}\left (d x +c \right )}{2 b d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 49, normalized size = 0.89 \[ \frac {\frac {2 \, a^{2} \log \left (b \sin \left (d x + c\right ) + a\right )}{b^{3}} + \frac {b \sin \left (d x + c\right )^{2} - 2 \, a \sin \left (d x + c\right )}{b^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.07, size = 47, normalized size = 0.85 \[ \frac {2\,a^2\,\ln \left (a+b\,\sin \left (c+d\,x\right )\right )+b^2\,{\sin \left (c+d\,x\right )}^2-2\,a\,b\,\sin \left (c+d\,x\right )}{2\,b^3\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.05, size = 87, normalized size = 1.58 \[ \begin {cases} \frac {x \sin ^{2}{\relax (c )} \cos {\relax (c )}}{a} & \text {for}\: b = 0 \wedge d = 0 \\\frac {\sin ^{3}{\left (c + d x \right )}}{3 a d} & \text {for}\: b = 0 \\\frac {x \sin ^{2}{\relax (c )} \cos {\relax (c )}}{a + b \sin {\relax (c )}} & \text {for}\: d = 0 \\\frac {a^{2} \log {\left (\frac {a}{b} + \sin {\left (c + d x \right )} \right )}}{b^{3} d} - \frac {a \sin {\left (c + d x \right )}}{b^{2} d} - \frac {\cos ^{2}{\left (c + d x \right )}}{2 b d} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________