Optimal. Leaf size=55 \[ \frac {d \sin ^2(a+b x)}{4 b^2}-\frac {(c+d x) \sin (a+b x) \cos (a+b x)}{2 b}+\frac {c x}{2}+\frac {d x^2}{4} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {3310} \[ \frac {d \sin ^2(a+b x)}{4 b^2}-\frac {(c+d x) \sin (a+b x) \cos (a+b x)}{2 b}+\frac {c x}{2}+\frac {d x^2}{4} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3310
Rubi steps
\begin {align*} \int (c+d x) \sin ^2(a+b x) \, dx &=-\frac {(c+d x) \cos (a+b x) \sin (a+b x)}{2 b}+\frac {d \sin ^2(a+b x)}{4 b^2}+\frac {1}{2} \int (c+d x) \, dx\\ &=\frac {c x}{2}+\frac {d x^2}{4}-\frac {(c+d x) \cos (a+b x) \sin (a+b x)}{2 b}+\frac {d \sin ^2(a+b x)}{4 b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.16, size = 52, normalized size = 0.95 \[ \frac {2 b (-(c+d x) \sin (2 (a+b x))+2 a c+b x (2 c+d x))-d \cos (2 (a+b x))}{8 b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.82, size = 54, normalized size = 0.98 \[ \frac {b^{2} d x^{2} + 2 \, b^{2} c x - d \cos \left (b x + a\right )^{2} - 2 \, {\left (b d x + b c\right )} \cos \left (b x + a\right ) \sin \left (b x + a\right )}{4 \, b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.42, size = 48, normalized size = 0.87 \[ \frac {1}{4} \, d x^{2} + \frac {1}{2} \, c x - \frac {d \cos \left (2 \, b x + 2 \, a\right )}{8 \, b^{2}} - \frac {{\left (b d x + b c\right )} \sin \left (2 \, b x + 2 \, a\right )}{4 \, b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.02, size = 112, normalized size = 2.04 \[ \frac {\frac {d \left (\left (b x +a \right ) \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-\frac {\left (b x +a \right )^{2}}{4}+\frac {\left (\sin ^{2}\left (b x +a \right )\right )}{4}\right )}{b}-\frac {d a \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )}{b}+c \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.30, size = 96, normalized size = 1.75 \[ \frac {2 \, {\left (2 \, b x + 2 \, a - \sin \left (2 \, b x + 2 \, a\right )\right )} c - \frac {2 \, {\left (2 \, b x + 2 \, a - \sin \left (2 \, b x + 2 \, a\right )\right )} a d}{b} + \frac {{\left (2 \, {\left (b x + a\right )}^{2} - 2 \, {\left (b x + a\right )} \sin \left (2 \, b x + 2 \, a\right ) - \cos \left (2 \, b x + 2 \, a\right )\right )} d}{b}}{8 \, b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.09, size = 57, normalized size = 1.04 \[ \frac {c\,x}{2}+\frac {d\,x^2}{4}-\frac {d\,\cos \left (2\,a+2\,b\,x\right )}{8\,b^2}-\frac {c\,\sin \left (2\,a+2\,b\,x\right )}{4\,b}-\frac {d\,x\,\sin \left (2\,a+2\,b\,x\right )}{4\,b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.67, size = 126, normalized size = 2.29 \[ \begin {cases} \frac {c x \sin ^{2}{\left (a + b x \right )}}{2} + \frac {c x \cos ^{2}{\left (a + b x \right )}}{2} + \frac {d x^{2} \sin ^{2}{\left (a + b x \right )}}{4} + \frac {d x^{2} \cos ^{2}{\left (a + b x \right )}}{4} - \frac {c \sin {\left (a + b x \right )} \cos {\left (a + b x \right )}}{2 b} - \frac {d x \sin {\left (a + b x \right )} \cos {\left (a + b x \right )}}{2 b} - \frac {d \cos ^{2}{\left (a + b x \right )}}{4 b^{2}} & \text {for}\: b \neq 0 \\\left (c x + \frac {d x^{2}}{2}\right ) \sin ^{2}{\relax (a )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________