3.933 \(\int \frac{\cos (x)+\sin (x)}{e^{-x}+\sin (x)} \, dx\)

Optimal. Leaf size=9 \[ \log \left (e^x \sin (x)+1\right ) \]

[Out]

Log[1 + E^x*Sin[x]]

________________________________________________________________________________________

Rubi [F]  time = 0.380774, antiderivative size = 0, normalized size of antiderivative = 0., number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0., Rules used = {} \[ \int \frac{\cos (x)+\sin (x)}{e^{-x}+\sin (x)} \, dx \]

Verification is Not applicable to the result.

[In]

Int[(Cos[x] + Sin[x])/(E^(-x) + Sin[x]),x]

[Out]

x + Log[Sin[x]] - Defer[Int][(1 + E^x*Sin[x])^(-1), x] - Defer[Int][Cot[x]/(1 + E^x*Sin[x]), x]

Rubi steps

\begin{align*} \int \frac{\cos (x)+\sin (x)}{e^{-x}+\sin (x)} \, dx &=\int \left (1+\cot (x)-\frac{(1+\cot (x)) \csc (x)}{e^x+\csc (x)}\right ) \, dx\\ &=x+\int \cot (x) \, dx-\int \frac{(1+\cot (x)) \csc (x)}{e^x+\csc (x)} \, dx\\ &=x+\log (\sin (x))-\int \left (\frac{1}{1+e^x \sin (x)}+\frac{\cot (x)}{1+e^x \sin (x)}\right ) \, dx\\ &=x+\log (\sin (x))-\int \frac{1}{1+e^x \sin (x)} \, dx-\int \frac{\cot (x)}{1+e^x \sin (x)} \, dx\\ \end{align*}

Mathematica [A]  time = 0.123442, size = 9, normalized size = 1. \[ \log \left (e^x \sin (x)+1\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(Cos[x] + Sin[x])/(E^(-x) + Sin[x]),x]

[Out]

Log[1 + E^x*Sin[x]]

________________________________________________________________________________________

Maple [B]  time = 0.063, size = 57, normalized size = 6.3 \begin{align*}{ \left ( x+x \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{2} \right ) \left ( 1+ \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{2} \right ) ^{-1}}-\ln \left ( 1+ \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{2} \right ) +\ln \left ({{\rm e}^{-x}} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{2}+{{\rm e}^{-x}}+2\,\tan \left ( x/2 \right ) \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cos(x)+sin(x))/(exp(-x)+sin(x)),x)

[Out]

(x+x*tan(1/2*x)^2)/(1+tan(1/2*x)^2)-ln(1+tan(1/2*x)^2)+ln(exp(-x)*tan(1/2*x)^2+exp(-x)+2*tan(1/2*x))

________________________________________________________________________________________

Maxima [B]  time = 1.61049, size = 111, normalized size = 12.33 \begin{align*} x + \frac{1}{2} \, \log \left ({\left (\cos \left (2 \, x\right )^{2} e^{\left (2 \, x\right )} + 4 \, \cos \left (x\right ) e^{x} \sin \left (2 \, x\right ) + e^{\left (2 \, x\right )} \sin \left (2 \, x\right )^{2} - 2 \,{\left (2 \, e^{x} \sin \left (x\right ) + e^{\left (2 \, x\right )}\right )} \cos \left (2 \, x\right ) + 4 \, \cos \left (x\right )^{2} + 4 \, e^{x} \sin \left (x\right ) + 4 \, \sin \left (x\right )^{2} + e^{\left (2 \, x\right )}\right )} e^{\left (-2 \, x\right )}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + 1/2*log((cos(2*x)^2*e^(2*x) + 4*cos(x)*e^x*sin(2*x) + e^(2*x)*sin(2*x)^2 - 2*(2*e^x*sin(x) + e^(2*x))*cos(
2*x) + 4*cos(x)^2 + 4*e^x*sin(x) + 4*sin(x)^2 + e^(2*x))*e^(-2*x))

________________________________________________________________________________________

Fricas [A]  time = 2.1199, size = 35, normalized size = 3.89 \begin{align*} x + \log \left (e^{\left (-x\right )} + \sin \left (x\right )\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + log(e^(-x) + sin(x))

________________________________________________________________________________________

Sympy [A]  time = 0.331089, size = 10, normalized size = 1.11 \begin{align*} x + \log{\left (\sin{\left (x \right )} + e^{- x} \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((cos(x)+sin(x))/(exp(-x)+sin(x)),x)

[Out]

x + log(sin(x) + exp(-x))

________________________________________________________________________________________

Giac [B]  time = 1.06841, size = 112, normalized size = 12.44 \begin{align*} x + \frac{1}{2} \, \log \left (\frac{4 \,{\left (e^{\left (-2 \, x\right )} \tan \left (\frac{1}{2} \, x\right )^{4} + 4 \, e^{\left (-x\right )} \tan \left (\frac{1}{2} \, x\right )^{3} + 2 \, e^{\left (-2 \, x\right )} \tan \left (\frac{1}{2} \, x\right )^{2} + 4 \, e^{\left (-x\right )} \tan \left (\frac{1}{2} \, x\right ) + 4 \, \tan \left (\frac{1}{2} \, x\right )^{2} + e^{\left (-2 \, x\right )}\right )}}{\tan \left (\frac{1}{2} \, x\right )^{4} + 2 \, \tan \left (\frac{1}{2} \, x\right )^{2} + 1}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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