Optimal. Leaf size=61 \[ \frac {(a-b)^2 \log (\sin (c+d x)+1)}{2 d}-\frac {(a+b)^2 \log (1-\sin (c+d x))}{2 d}-\frac {b^2 \sin (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {2668, 702, 633, 31} \[ \frac {(a-b)^2 \log (\sin (c+d x)+1)}{2 d}-\frac {(a+b)^2 \log (1-\sin (c+d x))}{2 d}-\frac {b^2 \sin (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 633
Rule 702
Rule 2668
Rubi steps
\begin {align*} \int \sec (c+d x) (a+b \sin (c+d x))^2 \, dx &=\frac {b \operatorname {Subst}\left (\int \frac {(a+x)^2}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {b \operatorname {Subst}\left (\int \left (-1+\frac {a^2+b^2+2 a x}{b^2-x^2}\right ) \, dx,x,b \sin (c+d x)\right )}{d}\\ &=-\frac {b^2 \sin (c+d x)}{d}+\frac {b \operatorname {Subst}\left (\int \frac {a^2+b^2+2 a x}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=-\frac {b^2 \sin (c+d x)}{d}-\frac {(a-b)^2 \operatorname {Subst}\left (\int \frac {1}{-b-x} \, dx,x,b \sin (c+d x)\right )}{2 d}+\frac {(a+b)^2 \operatorname {Subst}\left (\int \frac {1}{b-x} \, dx,x,b \sin (c+d x)\right )}{2 d}\\ &=-\frac {(a+b)^2 \log (1-\sin (c+d x))}{2 d}+\frac {(a-b)^2 \log (1+\sin (c+d x))}{2 d}-\frac {b^2 \sin (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 54, normalized size = 0.89 \[ \frac {(a-b)^2 \log (\sin (c+d x)+1)-(a+b)^2 \log (1-\sin (c+d x))-2 b^2 \sin (c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.49, size = 62, normalized size = 1.02 \[ -\frac {2 \, b^{2} \sin \left (d x + c\right ) - {\left (a^{2} - 2 \, a b + b^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (a^{2} + 2 \, a b + b^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.51, size = 62, normalized size = 1.02 \[ -\frac {2 \, b^{2} \sin \left (d x + c\right ) - {\left (a^{2} - 2 \, a b + b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) + {\left (a^{2} + 2 \, a b + b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.14, size = 72, normalized size = 1.18 \[ -\frac {b^{2} \sin \left (d x +c \right )}{d}+\frac {a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {b^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}-\frac {2 a b \ln \left (\cos \left (d x +c \right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.33, size = 60, normalized size = 0.98 \[ -\frac {2 \, b^{2} \sin \left (d x + c\right ) - {\left (a^{2} - 2 \, a b + b^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (a^{2} + 2 \, a b + b^{2}\right )} \log \left (\sin \left (d x + c\right ) - 1\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.16, size = 50, normalized size = 0.82 \[ -\frac {\frac {\ln \left (\sin \left (c+d\,x\right )-1\right )\,{\left (a+b\right )}^2}{2}-\frac {\ln \left (\sin \left (c+d\,x\right )+1\right )\,{\left (a-b\right )}^2}{2}+b^2\,\sin \left (c+d\,x\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sin {\left (c + d x \right )}\right )^{2} \sec {\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________