Optimal. Leaf size=20 \[ \frac {x \csc (x)}{x \cos (x)-\sin (x)}-\cot (x) \]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4594, 3767, 8} \[ \frac {x \csc (x)}{x \cos (x)-\sin (x)}-\cot (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3767
Rule 4594
Rubi steps
\begin {align*} \int \frac {x^2}{(x \cos (x)-\sin (x))^2} \, dx &=\frac {x \csc (x)}{x \cos (x)-\sin (x)}+\int \csc ^2(x) \, dx\\ &=\frac {x \csc (x)}{x \cos (x)-\sin (x)}-\operatorname {Subst}(\int 1 \, dx,x,\cot (x))\\ &=-\cot (x)+\frac {x \csc (x)}{x \cos (x)-\sin (x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.24, size = 19, normalized size = 0.95 \[ \frac {x \sin (x)+\cos (x)}{x \cos (x)-\sin (x)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x^2}{(x \cos (x)-\sin (x))^2} \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.15, size = 19, normalized size = 0.95 \[ \frac {x \sin \relax (x) + \cos \relax (x)}{x \cos \relax (x) - \sin \relax (x)} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.63, size = 39, normalized size = 1.95 \[ -\frac {2 \, x \tan \left (\frac {1}{2} \, x\right ) - \tan \left (\frac {1}{2} \, x\right )^{2} + 1}{x \tan \left (\frac {1}{2} \, x\right )^{2} - x + 2 \, \tan \left (\frac {1}{2} \, x\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.25, size = 29, normalized size = 1.45
method | result | size |
risch | \(\frac {2 i \left (x -i\right )}{i {\mathrm e}^{2 i x}+x \,{\mathrm e}^{2 i x}-i+x}\) | \(29\) |
norman | \(\frac {-1+\tan ^{2}\left (\frac {x}{2}\right )-2 x \tan \left (\frac {x}{2}\right )}{x \left (\tan ^{2}\left (\frac {x}{2}\right )\right )-x +2 \tan \left (\frac {x}{2}\right )}\) | \(37\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.70, size = 69, normalized size = 3.45 \[ \frac {2 \, {\left (2 \, x \cos \left (2 \, x\right ) + {\left (x^{2} - 1\right )} \sin \left (2 \, x\right )\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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.05 \[ \int \frac {x^2}{{\left (\sin \relax (x)-x\,\cos \relax (x)\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 1.47, size = 66, normalized size = 3.30 \[ - \frac {2 x \tan {\left (\frac {x}{2} \right )}}{x \tan ^{2}{\left (\frac {x}{2} \right )} - x + 2 \tan {\left (\frac {x}{2} \right )}} + \frac {\tan ^{2}{\left (\frac {x}{2} \right )}}{x \tan ^{2}{\left (\frac {x}{2} \right )} - x + 2 \tan {\left (\frac {x}{2} \right )}} - \frac {1}{x \tan ^{2}{\left (\frac {x}{2} \right )} - x + 2 \tan {\left (\frac {x}{2} \right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________