Optimal. Leaf size=12 \[ \frac {2}{1+\frac {\cot (x)}{x}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {6843, 32}
\begin {gather*} \frac {2}{\frac {\cot (x)}{x}+1} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 32
Rule 6843
Rubi steps
\begin {align*} \int \frac {2 x+\sin (2 x)}{(\cos (x)+x \sin (x))^2} \, dx &=-\left (2 \text {Subst}\left (\int \frac {1}{(1+x)^2} \, dx,x,\frac {\cot (x)}{x}\right )\right )\\ &=\frac {2}{1+\frac {\cot (x)}{x}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.10, size = 14, normalized size = 1.17 \begin {gather*} \frac {2 x \sin (x)}{\cos (x)+x \sin (x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 0.87, size = 44, normalized size = 3.67
method | result | size |
risch | \(-\frac {2 i}{x +i}-\frac {4 i x}{\left (x +i\right ) \left (x \,{\mathrm e}^{2 i x}-x +i {\mathrm e}^{2 i x}+i\right )}\) | \(44\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 78 vs.
\(2 (12) = 24\).
time = 3.64, size = 78, normalized size = 6.50 \begin {gather*} -\frac {2 \, {\left (\cos \left (2 \, x\right )^{2} + 2 \, x \sin \left (2 \, x\right ) + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1\right )}}{{\left (x^{2} + 1\right )} \cos \left (2 \, x\right )^{2} + {\left (x^{2} + 1\right )} \sin \left (2 \, x\right )^{2} + x^{2} - 2 \, {\left (x^{2} - 1\right )} \cos \left (2 \, x\right ) + 4 \, x \sin \left (2 \, x\right ) + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.87, size = 13, normalized size = 1.08 \begin {gather*} -\frac {2 \, \cos \left (x\right )}{x \sin \left (x\right ) + \cos \left (x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {2 x + \sin {\left (2 x \right )}}{\left (x \sin {\left (x \right )} + \cos {\left (x \right )}\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.42, size = 10, normalized size = 0.83 \begin {gather*} -\frac {2}{x \tan \left (x\right ) + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.08 \begin {gather*} \int \frac {2\,x+\sin \left (2\,x\right )}{{\left (\cos \left (x\right )+x\,\sin \left (x\right )\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________