Integrand size = 6, antiderivative size = 15 \[ \int x \tan ^2(x) \, dx=-\frac {x^2}{2}+\log (\cos (x))+x \tan (x) \]
[Out]
Time = 0.02 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3801, 3556, 30} \[ \int x \tan ^2(x) \, dx=-\frac {x^2}{2}+x \tan (x)+\log (\cos (x)) \]
[In]
[Out]
Rule 30
Rule 3556
Rule 3801
Rubi steps \begin{align*} \text {integral}& = x \tan (x)-\int x \, dx-\int \tan (x) \, dx \\ & = -\frac {x^2}{2}+\log (\cos (x))+x \tan (x) \\ \end{align*}
Time = 0.01 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.00 \[ \int x \tan ^2(x) \, dx=-\frac {x^2}{2}+\log (\cos (x))+x \tan (x) \]
[In]
[Out]
Time = 0.05 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.33
method | result | size |
norman | \(x \tan \left (x \right )-\frac {x^{2}}{2}-\frac {\ln \left (1+\tan ^{2}\left (x \right )\right )}{2}\) | \(20\) |
parallelrisch | \(x \tan \left (x \right )-\frac {x^{2}}{2}-\frac {\ln \left (1+\tan ^{2}\left (x \right )\right )}{2}\) | \(20\) |
risch | \(-\frac {x^{2}}{2}-2 i x +\frac {2 i x}{{\mathrm e}^{2 i x}+1}+\ln \left ({\mathrm e}^{2 i x}+1\right )\) | \(32\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.40 \[ \int x \tan ^2(x) \, dx=-\frac {1}{2} \, x^{2} + x \tan \left (x\right ) + \frac {1}{2} \, \log \left (\frac {1}{\tan \left (x\right )^{2} + 1}\right ) \]
[In]
[Out]
Time = 0.08 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.27 \[ \int x \tan ^2(x) \, dx=- \frac {x^{2}}{2} + x \tan {\left (x \right )} - \frac {\log {\left (\tan ^{2}{\left (x \right )} + 1 \right )}}{2} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 107 vs. \(2 (13) = 26\).
Time = 0.27 (sec) , antiderivative size = 107, normalized size of antiderivative = 7.13 \[ \int x \tan ^2(x) \, dx=-\frac {x^{2} \cos \left (2 \, x\right )^{2} + x^{2} \sin \left (2 \, x\right )^{2} + 2 \, x^{2} \cos \left (2 \, x\right ) + x^{2} - {\left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1\right )} \log \left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1\right ) - 4 \, x \sin \left (2 \, x\right )}{2 \, {\left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1\right )}} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.53 \[ \int x \tan ^2(x) \, dx=-\frac {1}{2} \, x^{2} + x \tan \left (x\right ) + \frac {1}{2} \, \log \left (\frac {4}{\tan \left (x\right )^{2} + 1}\right ) \]
[In]
[Out]
Time = 0.02 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.87 \[ \int x \tan ^2(x) \, dx=\ln \left (\cos \left (x\right )\right )+x\,\mathrm {tan}\left (x\right )-\frac {x^2}{2} \]
[In]
[Out]