3.27 \(\int \frac {\log (1+e^x)}{1+e^{2 x}} \, dx\)

Optimal. Leaf size=102 \[ -\operatorname {PolyLog}\left (2,-e^x\right )-\frac {1}{2} \operatorname {PolyLog}\left (2,\left (\frac {1}{2}-\frac {i}{2}\right ) \left (e^x+1\right )\right )-\frac {1}{2} \operatorname {PolyLog}\left (2,\left (\frac {1}{2}+\frac {i}{2}\right ) \left (e^x+1\right )\right )-\frac {1}{2} \log \left (\left (\frac {1}{2}-\frac {i}{2}\right ) \left (-e^x+i\right )\right ) \log \left (e^x+1\right )-\frac {1}{2} \log \left (\left (-\frac {1}{2}-\frac {i}{2}\right ) \left (e^x+i\right )\right ) \log \left (e^x+1\right ) \]

[Out]

-1/2*ln((1/2-1/2*I)*(I-exp(x)))*ln(1+exp(x))-1/2*ln((-1/2-1/2*I)*(I+exp(x)))*ln(1+exp(x))-polylog(2,-exp(x))-1
/2*polylog(2,(1/2-1/2*I)*(1+exp(x)))-1/2*polylog(2,(1/2+1/2*I)*(1+exp(x)))

________________________________________________________________________________________

Rubi [A]  time = 0.15, antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 10, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.625, Rules used = {2282, 266, 36, 29, 31, 2416, 2391, 260, 2394, 2393} \[ -\text {PolyLog}\left (2,-e^x\right )-\frac {1}{2} \text {PolyLog}\left (2,\left (\frac {1}{2}-\frac {i}{2}\right ) \left (e^x+1\right )\right )-\frac {1}{2} \text {PolyLog}\left (2,\left (\frac {1}{2}+\frac {i}{2}\right ) \left (e^x+1\right )\right )-\frac {1}{2} \log \left (\left (\frac {1}{2}-\frac {i}{2}\right ) \left (-e^x+i\right )\right ) \log \left (e^x+1\right )-\frac {1}{2} \log \left (\left (-\frac {1}{2}-\frac {i}{2}\right ) \left (e^x+i\right )\right ) \log \left (e^x+1\right ) \]

Antiderivative was successfully verified.

[In]

Int[Log[1 + E^x]/(1 + E^(2*x)),x]

[Out]

-(Log[(1/2 - I/2)*(I - E^x)]*Log[1 + E^x])/2 - (Log[(-1/2 - I/2)*(I + E^x)]*Log[1 + E^x])/2 - PolyLog[2, -E^x]
 - PolyLog[2, (1/2 - I/2)*(1 + E^x)]/2 - PolyLog[2, (1/2 + I/2)*(1 + E^x)]/2

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 2282

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2393

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Dist[1/g, Subst[Int[(a +
 b*Log[1 + (c*e*x)/g])/x, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g
 + c*(e*f - d*g), 0]

Rule 2394

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(Log[(e*(f +
g*x))/(e*f - d*g)]*(a + b*Log[c*(d + e*x)^n]))/g, x] - Dist[(b*e*n)/g, Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2416

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((h_.)*(x_))^(m_.)*((f_) + (g_.)*(x_)^(r_.))^(q
_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*Log[c*(d + e*x)^n])^p, (h*x)^m*(f + g*x^r)^q, x], x] /; FreeQ[{a,
 b, c, d, e, f, g, h, m, n, p, q, r}, x] && IntegerQ[m] && IntegerQ[q]

Rubi steps

\begin {align*} \int \frac {\log \left (1+e^x\right )}{1+e^{2 x}} \, dx &=\operatorname {Subst}\left (\int \frac {\log (1+x)}{x \left (1+x^2\right )} \, dx,x,e^x\right )\\ &=\operatorname {Subst}\left (\int \left (\frac {\log (1+x)}{x}-\frac {x \log (1+x)}{1+x^2}\right ) \, dx,x,e^x\right )\\ &=\operatorname {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^x\right )-\operatorname {Subst}\left (\int \frac {x \log (1+x)}{1+x^2} \, dx,x,e^x\right )\\ &=-\text {Li}_2\left (-e^x\right )-\operatorname {Subst}\left (\int \left (-\frac {\log (1+x)}{2 (i-x)}+\frac {\log (1+x)}{2 (i+x)}\right ) \, dx,x,e^x\right )\\ &=-\text {Li}_2\left (-e^x\right )+\frac {1}{2} \operatorname {Subst}\left (\int \frac {\log (1+x)}{i-x} \, dx,x,e^x\right )-\frac {1}{2} \operatorname {Subst}\left (\int \frac {\log (1+x)}{i+x} \, dx,x,e^x\right )\\ &=-\frac {1}{2} \log \left (\left (\frac {1}{2}-\frac {i}{2}\right ) \left (i-e^x\right )\right ) \log \left (1+e^x\right )-\frac {1}{2} \log \left (\left (-\frac {1}{2}-\frac {i}{2}\right ) \left (i+e^x\right )\right ) \log \left (1+e^x\right )-\text {Li}_2\left (-e^x\right )+\frac {1}{2} \operatorname {Subst}\left (\int \frac {\log \left (\left (\frac {1}{2}-\frac {i}{2}\right ) (i-x)\right )}{1+x} \, dx,x,e^x\right )+\frac {1}{2} \operatorname {Subst}\left (\int \frac {\log \left (\left (-\frac {1}{2}-\frac {i}{2}\right ) (i+x)\right )}{1+x} \, dx,x,e^x\right )\\ &=-\frac {1}{2} \log \left (\left (\frac {1}{2}-\frac {i}{2}\right ) \left (i-e^x\right )\right ) \log \left (1+e^x\right )-\frac {1}{2} \log \left (\left (-\frac {1}{2}-\frac {i}{2}\right ) \left (i+e^x\right )\right ) \log \left (1+e^x\right )-\text {Li}_2\left (-e^x\right )+\frac {1}{2} \operatorname {Subst}\left (\int \frac {\log \left (1-\left (\frac {1}{2}+\frac {i}{2}\right ) x\right )}{x} \, dx,x,1+e^x\right )+\frac {1}{2} \operatorname {Subst}\left (\int \frac {\log \left (1-\left (\frac {1}{2}-\frac {i}{2}\right ) x\right )}{x} \, dx,x,1+e^x\right )\\ &=-\frac {1}{2} \log \left (\left (\frac {1}{2}-\frac {i}{2}\right ) \left (i-e^x\right )\right ) \log \left (1+e^x\right )-\frac {1}{2} \log \left (\left (-\frac {1}{2}-\frac {i}{2}\right ) \left (i+e^x\right )\right ) \log \left (1+e^x\right )-\text {Li}_2\left (-e^x\right )-\frac {1}{2} \text {Li}_2\left (\left (\frac {1}{2}-\frac {i}{2}\right ) \left (1+e^x\right )\right )-\frac {1}{2} \text {Li}_2\left (\left (\frac {1}{2}+\frac {i}{2}\right ) \left (1+e^x\right )\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 102, normalized size = 1.00 \[ -\operatorname {PolyLog}\left (2,-e^x\right )-\frac {1}{2} \operatorname {PolyLog}\left (2,\left (\frac {1}{2}-\frac {i}{2}\right ) \left (e^x+1\right )\right )-\frac {1}{2} \operatorname {PolyLog}\left (2,\left (\frac {1}{2}+\frac {i}{2}\right ) \left (e^x+1\right )\right )-\frac {1}{2} \log \left (\left (\frac {1}{2}-\frac {i}{2}\right ) \left (-e^x+i\right )\right ) \log \left (e^x+1\right )-\frac {1}{2} \log \left (\left (-\frac {1}{2}-\frac {i}{2}\right ) \left (e^x+i\right )\right ) \log \left (e^x+1\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Log[1 + E^x]/(1 + E^(2*x)),x]

[Out]

-1/2*(Log[(1/2 - I/2)*(I - E^x)]*Log[1 + E^x]) - (Log[(-1/2 - I/2)*(I + E^x)]*Log[1 + E^x])/2 - PolyLog[2, -E^
x] - PolyLog[2, (1/2 - I/2)*(1 + E^x)]/2 - PolyLog[2, (1/2 + I/2)*(1 + E^x)]/2

________________________________________________________________________________________

fricas [F]  time = 0.42, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {\log \left (e^{x} + 1\right )}{e^{\left (2 \, x\right )} + 1}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(1+exp(x))/(1+exp(2*x)),x, algorithm="fricas")

[Out]

integral(log(e^x + 1)/(e^(2*x) + 1), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\log \left (e^{x} + 1\right )}{e^{\left (2 \, x\right )} + 1}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(1+exp(x))/(1+exp(2*x)),x, algorithm="giac")

[Out]

integrate(log(e^x + 1)/(e^(2*x) + 1), x)

________________________________________________________________________________________

maple [A]  time = 0.06, size = 83, normalized size = 0.81 \[ -\frac {\ln \left ({\mathrm e}^{x}+1\right ) \ln \left (-\frac {{\mathrm e}^{x}}{2}+\frac {1}{2}-\frac {i \left ({\mathrm e}^{x}+1\right )}{2}\right )}{2}-\frac {\ln \left ({\mathrm e}^{x}+1\right ) \ln \left (-\frac {{\mathrm e}^{x}}{2}+\frac {1}{2}+\frac {i \left ({\mathrm e}^{x}+1\right )}{2}\right )}{2}-\dilog \left ({\mathrm e}^{x}+1\right )-\frac {\dilog \left (-\frac {{\mathrm e}^{x}}{2}+\frac {1}{2}-\frac {i \left ({\mathrm e}^{x}+1\right )}{2}\right )}{2}-\frac {\dilog \left (-\frac {{\mathrm e}^{x}}{2}+\frac {1}{2}+\frac {i \left ({\mathrm e}^{x}+1\right )}{2}\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(exp(x)+1)/(exp(2*x)+1),x)

[Out]

-dilog(exp(x)+1)-1/2*ln(exp(x)+1)*ln(1/2-1/2*exp(x)+1/2*I*(exp(x)+1))-1/2*ln(exp(x)+1)*ln(1/2-1/2*exp(x)-1/2*I
*(exp(x)+1))-1/2*dilog(1/2-1/2*exp(x)+1/2*I*(exp(x)+1))-1/2*dilog(1/2-1/2*exp(x)-1/2*I*(exp(x)+1))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\log \left (e^{x} + 1\right )}{e^{\left (2 \, x\right )} + 1}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(1+exp(x))/(1+exp(2*x)),x, algorithm="maxima")

[Out]

integrate(log(e^x + 1)/(e^(2*x) + 1), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\ln \left ({\mathrm {e}}^x+1\right )}{{\mathrm {e}}^{2\,x}+1} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(exp(x) + 1)/(exp(2*x) + 1),x)

[Out]

int(log(exp(x) + 1)/(exp(2*x) + 1), x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(1+exp(x))/(1+exp(2*x)),x)

[Out]

Timed out

________________________________________________________________________________________