\(\int \frac {1+\cos (x)}{x+\sin (x)} \, dx\) [232]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 5 \[ \int \frac {1+\cos (x)}{x+\sin (x)} \, dx=\log (x+\sin (x)) \]

[Out]

ln(x+sin(x))

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 5, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {6816} \[ \int \frac {1+\cos (x)}{x+\sin (x)} \, dx=\log (x+\sin (x)) \]

[In]

Int[(1 + Cos[x])/(x + Sin[x]),x]

[Out]

Log[x + Sin[x]]

Rule 6816

Int[(u_)/(y_), x_Symbol] :> With[{q = DerivativeDivides[y, u, x]}, Simp[q*Log[RemoveContent[y, x]], x] /;  !Fa
lseQ[q]]

Rubi steps \begin{align*} \text {integral}& = \log (x+\sin (x)) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 5, normalized size of antiderivative = 1.00 \[ \int \frac {1+\cos (x)}{x+\sin (x)} \, dx=\log (x+\sin (x)) \]

[In]

Integrate[(1 + Cos[x])/(x + Sin[x]),x]

[Out]

Log[x + Sin[x]]

Maple [A] (verified)

Time = 0.19 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.20

method result size
derivativedivides \(\ln \left (x +\sin \left (x \right )\right )\) \(6\)
default \(\ln \left (x +\sin \left (x \right )\right )\) \(6\)
risch \(-i x +\ln \left ({\mathrm e}^{2 i x}+2 i x \,{\mathrm e}^{i x}-1\right )\) \(23\)
parallelrisch \(-\ln \left (\frac {1}{1+\cos \left (x \right )}\right )+\ln \left (\frac {x +\sin \left (x \right )}{1+\cos \left (x \right )}\right )\) \(23\)
norman \(-\ln \left (1+\tan \left (\frac {x}{2}\right )^{2}\right )+\ln \left (x \tan \left (\frac {x}{2}\right )^{2}+x +2 \tan \left (\frac {x}{2}\right )\right )\) \(30\)

[In]

int((1+cos(x))/(x+sin(x)),x,method=_RETURNVERBOSE)

[Out]

ln(x+sin(x))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 5, normalized size of antiderivative = 1.00 \[ \int \frac {1+\cos (x)}{x+\sin (x)} \, dx=\log \left (x + \sin \left (x\right )\right ) \]

[In]

integrate((1+cos(x))/(x+sin(x)),x, algorithm="fricas")

[Out]

log(x + sin(x))

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 5, normalized size of antiderivative = 1.00 \[ \int \frac {1+\cos (x)}{x+\sin (x)} \, dx=\log {\left (x + \sin {\left (x \right )} \right )} \]

[In]

integrate((1+cos(x))/(x+sin(x)),x)

[Out]

log(x + sin(x))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 5, normalized size of antiderivative = 1.00 \[ \int \frac {1+\cos (x)}{x+\sin (x)} \, dx=\log \left (x + \sin \left (x\right )\right ) \]

[In]

integrate((1+cos(x))/(x+sin(x)),x, algorithm="maxima")

[Out]

log(x + sin(x))

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 72 vs. \(2 (5) = 10\).

Time = 0.28 (sec) , antiderivative size = 72, normalized size of antiderivative = 14.40 \[ \int \frac {1+\cos (x)}{x+\sin (x)} \, dx=\frac {1}{2} \, \log \left (\frac {4 \, {\left (x^{2} \tan \left (\frac {1}{2} \, x\right )^{4} + 2 \, x^{2} \tan \left (\frac {1}{2} \, x\right )^{2} + 4 \, x \tan \left (\frac {1}{2} \, x\right )^{3} + x^{2} + 4 \, x \tan \left (\frac {1}{2} \, x\right ) + 4 \, \tan \left (\frac {1}{2} \, x\right )^{2}\right )}}{\tan \left (\frac {1}{2} \, x\right )^{4} + 2 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right ) \]

[In]

integrate((1+cos(x))/(x+sin(x)),x, algorithm="giac")

[Out]

1/2*log(4*(x^2*tan(1/2*x)^4 + 2*x^2*tan(1/2*x)^2 + 4*x*tan(1/2*x)^3 + x^2 + 4*x*tan(1/2*x) + 4*tan(1/2*x)^2)/(
tan(1/2*x)^4 + 2*tan(1/2*x)^2 + 1))

Mupad [B] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 5, normalized size of antiderivative = 1.00 \[ \int \frac {1+\cos (x)}{x+\sin (x)} \, dx=\ln \left (x+\sin \left (x\right )\right ) \]

[In]

int((cos(x) + 1)/(x + sin(x)),x)

[Out]

log(x + sin(x))