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

Optimal. Leaf size=5 \[ \log (x+\sin (x)) \]

[Out]

ln(x+sin(x))

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 5, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {6816} \begin {gather*} \log (x+\sin (x)) \end {gather*}

Antiderivative was successfully verified.

[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 {gather*} \begin {aligned} \text {Integral} &=\log (x+\sin (x))\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 5, normalized size = 1.00 \begin {gather*} \log (x+\sin (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

Log[x + Sin[x]]

________________________________________________________________________________________

Maple [A]
time = 0.12, size = 6, normalized size = 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 ^{2}\left (\frac {x}{2}\right )\right )+\ln \left (x \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+x +2 \tan \left (\frac {x}{2}\right )\right )\) \(30\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

ln(x+sin(x))

________________________________________________________________________________________

Maxima [A]
time = 0.34, size = 5, normalized size = 1.00 \begin {gather*} \log \left (x + \sin \left (x\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x + sin(x))

________________________________________________________________________________________

Fricas [A]
time = 0.62, size = 5, normalized size = 1.00 \begin {gather*} \log \left (x + \sin \left (x\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x + sin(x))

________________________________________________________________________________________

Sympy [A]
time = 0.05, size = 5, normalized size = 1.00 \begin {gather*} \log {\left (x + \sin {\left (x \right )} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x + sin(x))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 72 vs. \(2 (5) = 10\).
time = 0.50, size = 72, normalized size = 14.40 \begin {gather*} \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 ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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]
time = 0.09, size = 5, normalized size = 1.00 \begin {gather*} \ln \left (x+\sin \left (x\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x + sin(x))

________________________________________________________________________________________

Chatgpt [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {not solved} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

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

[Out]

not solved

________________________________________________________________________________________