3.6.39 \(\int \frac {x}{(e^{-x}+e^x)^2} \, dx\) [539]

Optimal. Leaf size=32 \[ \frac {x}{2}-\frac {x}{2 \left (1+e^{2 x}\right )}-\frac {1}{4} \log \left (1+e^{2 x}\right ) \]

[Out]

1/2*x-1/2*x/(1+exp(2*x))-1/4*ln(1+exp(2*x))

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {2321, 2222, 2320, 36, 29, 31} \begin {gather*} -\frac {x}{2 \left (e^{2 x}+1\right )}+\frac {x}{2}-\frac {1}{4} \log \left (e^{2 x}+1\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x/2 - x/(2*(1 + E^(2*x))) - Log[1 + E^(2*x)]/4

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 2222

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

Rule 2320

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 2321

Int[(u_.)*((a_.)*(F_)^(v_) + (b_.)*(F_)^(w_))^(n_), x_Symbol] :> Int[u*F^(n*v)*(a + b*F^ExpandToSum[w - v, x])
^n, x] /; FreeQ[{F, a, b, n}, x] && ILtQ[n, 0] && LinearQ[{v, w}, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 31, normalized size = 0.97 \begin {gather*} \frac {e^{2 x} x}{2+2 e^{2 x}}-\frac {1}{4} \log \left (1+e^{2 x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(E^(2*x)*x)/(2 + 2*E^(2*x)) - Log[1 + E^(2*x)]/4

________________________________________________________________________________________

Maple [A]
time = 0.03, size = 26, normalized size = 0.81

method result size
risch \(\frac {x}{2}-\frac {x}{2 \left (1+{\mathrm e}^{2 x}\right )}-\frac {\ln \left (1+{\mathrm e}^{2 x}\right )}{4}\) \(25\)
default \(-\frac {\ln \left (1+{\mathrm e}^{2 x}\right )}{4}+\frac {{\mathrm e}^{2 x} x}{2+2 \,{\mathrm e}^{2 x}}\) \(26\)
norman \(-\frac {\ln \left (1+{\mathrm e}^{2 x}\right )}{4}+\frac {{\mathrm e}^{2 x} x}{2+2 \,{\mathrm e}^{2 x}}\) \(26\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x/(exp(-x)+exp(x))^2,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 2.68, size = 25, normalized size = 0.78 \begin {gather*} \frac {x e^{\left (2 \, x\right )}}{2 \, {\left (e^{\left (2 \, x\right )} + 1\right )}} - \frac {1}{4} \, \log \left (e^{\left (2 \, x\right )} + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x/(exp(-x)+exp(x))^2,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.64, size = 33, normalized size = 1.03 \begin {gather*} \frac {2 \, x e^{\left (2 \, x\right )} - {\left (e^{\left (2 \, x\right )} + 1\right )} \log \left (e^{\left (2 \, x\right )} + 1\right )}{4 \, {\left (e^{\left (2 \, x\right )} + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x/(exp(-x)+exp(x))^2,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.04, size = 22, normalized size = 0.69 \begin {gather*} \frac {x}{2} - \frac {x}{2 e^{2 x} + 2} - \frac {\log {\left (e^{2 x} + 1 \right )}}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x/(exp(-x)+exp(x))**2,x)

[Out]

x/2 - x/(2*exp(2*x) + 2) - log(exp(2*x) + 1)/4

________________________________________________________________________________________

Giac [A]
time = 1.01, size = 40, normalized size = 1.25 \begin {gather*} \frac {2 \, x e^{\left (2 \, x\right )} - e^{\left (2 \, x\right )} \log \left (e^{\left (2 \, x\right )} + 1\right ) - \log \left (e^{\left (2 \, x\right )} + 1\right )}{4 \, {\left (e^{\left (2 \, x\right )} + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x/(exp(-x)+exp(x))^2,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.33, size = 26, normalized size = 0.81 \begin {gather*} \frac {x\,{\mathrm {e}}^{2\,x}}{2\,\left ({\mathrm {e}}^{2\,x}+1\right )}-\frac {\ln \left ({\mathrm {e}}^{2\,x}+1\right )}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x/(exp(-x) + exp(x))^2,x)

[Out]

(x*exp(2*x))/(2*(exp(2*x) + 1)) - log(exp(2*x) + 1)/4

________________________________________________________________________________________