Optimal. Leaf size=35 \[ \frac {\sin ((1-m) x)}{2 (1-m)}-\frac {\sin ((m+1) x)}{2 (m+1)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {4569, 2637} \[ \frac {\sin ((1-m) x)}{2 (1-m)}-\frac {\sin ((m+1) x)}{2 (m+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2637
Rule 4569
Rubi steps
\begin {align*} \int \sin (x) \sin (m x) \, dx &=\int \left (\frac {1}{2} \cos ((1-m) x)-\frac {1}{2} \cos ((1+m) x)\right ) \, dx\\ &=\frac {1}{2} \int \cos ((1-m) x) \, dx-\frac {1}{2} \int \cos ((1+m) x) \, dx\\ &=\frac {\sin ((1-m) x)}{2 (1-m)}-\frac {\sin ((1+m) x)}{2 (1+m)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 25, normalized size = 0.71 \[ \frac {\cos (x) \sin (m x)-m \sin (x) \cos (m x)}{m^2-1} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.08, size = 26, normalized size = 0.74 \[ -\frac {m \cos \left (m x\right ) \sin \relax (x) - \cos \relax (x) \sin \left (m x\right )}{m^{2} - 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 29, normalized size = 0.83 \[ -\frac {\sin \left (m x + x\right )}{2 \, {\left (m + 1\right )}} + \frac {\sin \left (m x - x\right )}{2 \, {\left (m - 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.08, size = 28, normalized size = 0.80 \[ \frac {\sin \left (\left (-1+m \right ) x \right )}{-2+2 m}-\frac {\sin \left (\left (1+m \right ) x \right )}{2 \left (1+m \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 28, normalized size = 0.80 \[ -\frac {\sin \left ({\left (m + 1\right )} x\right )}{2 \, {\left (m + 1\right )}} - \frac {\sin \left (-{\left (m - 1\right )} x\right )}{2 \, {\left (m - 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.32, size = 64, normalized size = 1.83 \[ \left \{\begin {array}{cl} \frac {x}{2}-\frac {\sin \left (2\,x\right )}{4} & \text {\ if\ \ }m=1\\ \frac {\sin \left (2\,x\right )}{4}-\frac {x}{2} & \text {\ if\ \ }m=-1\\ \frac {\sin \left (x\,\left (m-1\right )\right )}{2\,m-2}-\frac {\sin \left (x\,\left (m+1\right )\right )}{2\,m+2} & \text {\ if\ \ }m\neq -1\wedge m\neq 1 \end {array}\right . \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.79, size = 78, normalized size = 2.23 \[ \begin {cases} - \frac {x \sin ^{2}{\relax (x )}}{2} - \frac {x \cos ^{2}{\relax (x )}}{2} + \frac {\sin {\relax (x )} \cos {\relax (x )}}{2} & \text {for}\: m = -1 \\\frac {x \sin ^{2}{\relax (x )}}{2} + \frac {x \cos ^{2}{\relax (x )}}{2} - \frac {\sin {\relax (x )} \cos {\relax (x )}}{2} & \text {for}\: m = 1 \\- \frac {m \sin {\relax (x )} \cos {\left (m x \right )}}{m^{2} - 1} + \frac {\sin {\left (m x \right )} \cos {\relax (x )}}{m^{2} - 1} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________