Optimal. Leaf size=49 \[ \frac {\sin ^2(c+d x)}{2 a d}-\frac {\sin (c+d x)}{a d}+\frac {\log (\sin (c+d x)+1)}{a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 49, 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 {\sin ^2(c+d x)}{2 a d}-\frac {\sin (c+d x)}{a d}+\frac {\log (\sin (c+d x)+1)}{a 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+a \sin (c+d x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x^2}{a^2 (a+x)} \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {\operatorname {Subst}\left (\int \frac {x^2}{a+x} \, dx,x,a \sin (c+d x)\right )}{a^3 d}\\ &=\frac {\operatorname {Subst}\left (\int \left (-a+x+\frac {a^2}{a+x}\right ) \, dx,x,a \sin (c+d x)\right )}{a^3 d}\\ &=\frac {\log (1+\sin (c+d x))}{a d}-\frac {\sin (c+d x)}{a d}+\frac {\sin ^2(c+d x)}{2 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 38, normalized size = 0.78 \[ \frac {\sin ^2(c+d x)-2 \sin (c+d x)+2 \log (\sin (c+d x)+1)}{2 a d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.51, size = 36, normalized size = 0.73 \[ -\frac {\cos \left (d x + c\right )^{2} - 2 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 2 \, \sin \left (d x + c\right )}{2 \, a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 45, normalized size = 0.92 \[ \frac {\frac {2 \, \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a} + \frac {a \sin \left (d x + c\right )^{2} - 2 \, a \sin \left (d x + c\right )}{a^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.12, size = 48, normalized size = 0.98 \[ \frac {\ln \left (1+\sin \left (d x +c \right )\right )}{a d}-\frac {\sin \left (d x +c \right )}{a d}+\frac {\sin ^{2}\left (d x +c \right )}{2 a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 41, normalized size = 0.84 \[ \frac {\frac {\sin \left (d x + c\right )^{2} - 2 \, \sin \left (d x + c\right )}{a} + \frac {2 \, \log \left (\sin \left (d x + c\right ) + 1\right )}{a}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.05, size = 35, normalized size = 0.71 \[ \frac {\ln \left (\sin \left (c+d\,x\right )+1\right )-\sin \left (c+d\,x\right )+\frac {{\sin \left (c+d\,x\right )}^2}{2}}{a\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.11, size = 53, normalized size = 1.08 \[ \begin {cases} \frac {\log {\left (\sin {\left (c + d x \right )} + 1 \right )}}{a d} + \frac {\sin ^{2}{\left (c + d x \right )}}{2 a d} - \frac {\sin {\left (c + d x \right )}}{a d} & \text {for}\: d \neq 0 \\\frac {x \sin ^{2}{\relax (c )} \cos {\relax (c )}}{a \sin {\relax (c )} + a} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________