Integrand size = 11, antiderivative size = 8 \[ \int \frac {x+\sin (x)}{1+\cos (x)} \, dx=x \tan \left (\frac {x}{2}\right ) \]
[Out]
Leaf count is larger than twice the leaf count of optimal. \(25\) vs. \(2(8)=16\).
Time = 0.07 (sec) , antiderivative size = 25, normalized size of antiderivative = 3.12, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.545, Rules used = {4462, 3399, 4269, 3556, 2746, 31} \[ \int \frac {x+\sin (x)}{1+\cos (x)} \, dx=x \tan \left (\frac {x}{2}\right )+2 \log \left (\cos \left (\frac {x}{2}\right )\right )-\log (\cos (x)+1) \]
[In]
[Out]
Rule 31
Rule 2746
Rule 3399
Rule 3556
Rule 4269
Rule 4462
Rubi steps \begin{align*} \text {integral}& = \int \frac {x}{1+\cos (x)} \, dx+\int \frac {\sin (x)}{1+\cos (x)} \, dx \\ & = \frac {1}{2} \int x \sec ^2\left (\frac {x}{2}\right ) \, dx-\text {Subst}\left (\int \frac {1}{1+x} \, dx,x,\cos (x)\right ) \\ & = -\log (1+\cos (x))+x \tan \left (\frac {x}{2}\right )-\int \tan \left (\frac {x}{2}\right ) \, dx \\ & = 2 \log \left (\cos \left (\frac {x}{2}\right )\right )-\log (1+\cos (x))+x \tan \left (\frac {x}{2}\right ) \\ \end{align*}
Time = 0.04 (sec) , antiderivative size = 8, normalized size of antiderivative = 1.00 \[ \int \frac {x+\sin (x)}{1+\cos (x)} \, dx=x \tan \left (\frac {x}{2}\right ) \]
[In]
[Out]
Time = 0.07 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.88
method | result | size |
lookup | \(x \tan \left (\frac {x}{2}\right )\) | \(7\) |
default | \(x \tan \left (\frac {x}{2}\right )\) | \(7\) |
norman | \(x \tan \left (\frac {x}{2}\right )\) | \(7\) |
parallelrisch | \(x \tan \left (\frac {x}{2}\right )\) | \(7\) |
risch | \(-i x +\frac {2 i x}{{\mathrm e}^{i x}+1}\) | \(19\) |
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.25 \[ \int \frac {x+\sin (x)}{1+\cos (x)} \, dx=\frac {x \sin \left (x\right )}{\cos \left (x\right ) + 1} \]
[In]
[Out]
Time = 0.16 (sec) , antiderivative size = 5, normalized size of antiderivative = 0.62 \[ \int \frac {x+\sin (x)}{1+\cos (x)} \, dx=x \tan {\left (\frac {x}{2} \right )} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 61 vs. \(2 (6) = 12\).
Time = 0.19 (sec) , antiderivative size = 61, normalized size of antiderivative = 7.62 \[ \int \frac {x+\sin (x)}{1+\cos (x)} \, dx=\frac {{\left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right ) + 2 \, x \sin \left (x\right )}{\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1} - \log \left (\cos \left (x\right ) + 1\right ) \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 6, normalized size of antiderivative = 0.75 \[ \int \frac {x+\sin (x)}{1+\cos (x)} \, dx=x \tan \left (\frac {1}{2} \, x\right ) \]
[In]
[Out]
Time = 14.73 (sec) , antiderivative size = 6, normalized size of antiderivative = 0.75 \[ \int \frac {x+\sin (x)}{1+\cos (x)} \, dx=x\,\mathrm {tan}\left (\frac {x}{2}\right ) \]
[In]
[Out]