Optimal. Leaf size=12 \[ \frac{x}{2}+\frac{\tan (x)}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0468899, antiderivative size = 12, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.133, Rules used = {388, 203} \[ \frac{x}{2}+\frac{\tan (x)}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 388
Rule 203
Rubi steps
\begin{align*} \int \frac{1+\cos ^2(x)}{1+\cos (2 x)} \, dx &=\operatorname{Subst}\left (\int \frac{2+x^2}{2+2 x^2} \, dx,x,\tan (x)\right )\\ &=\frac{\tan (x)}{2}+\operatorname{Subst}\left (\int \frac{1}{2+2 x^2} \, dx,x,\tan (x)\right )\\ &=\frac{x}{2}+\frac{\tan (x)}{2}\\ \end{align*}
Mathematica [A] time = 0.0157699, size = 12, normalized size = 1. \[ \frac{x}{2}+\frac{\tan (x)}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.047, size = 9, normalized size = 0.8 \begin{align*}{\frac{x}{2}}+{\frac{\tan \left ( x \right ) }{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 0.945971, size = 24, normalized size = 2. \begin{align*} \frac{1}{2} \, x + \frac{\sin \left (2 \, x\right )}{2 \,{\left (\cos \left (2 \, x\right ) + 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.30898, size = 43, normalized size = 3.58 \begin{align*} \frac{x \cos \left (x\right ) + \sin \left (x\right )}{2 \, \cos \left (x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.68321, size = 7, normalized size = 0.58 \begin{align*} \frac{x}{2} + \frac{\tan{\left (x \right )}}{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.0669, size = 11, normalized size = 0.92 \begin{align*} \frac{1}{2} \, x + \frac{1}{2} \, \tan \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]