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

   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 [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 32 \[ \int \frac {x}{\left (e^{-x}+e^x\right )^2} \, dx=\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] (verified)

Time = 0.05 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {2321, 2222, 2320, 36, 29, 31} \[ \int \frac {x}{\left (e^{-x}+e^x\right )^2} \, dx=-\frac {x}{2 \left (e^{2 x}+1\right )}+\frac {x}{2}-\frac {1}{4} \log \left (e^{2 x}+1\right ) \]

[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*} \text {integral}& = \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] (verified)

Time = 0.07 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.97 \[ \int \frac {x}{\left (e^{-x}+e^x\right )^2} \, dx=\frac {e^{2 x} x}{2+2 e^{2 x}}-\frac {1}{4} \log \left (1+e^{2 x}\right ) \]

[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] (verified)

Time = 0.04 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.78

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\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.03 \[ \int \frac {x}{\left (e^{-x}+e^x\right )^2} \, dx=\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 )}} \]

[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] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.75 \[ \int \frac {x}{\left (e^{-x}+e^x\right )^2} \, dx=- \frac {x}{2} + \frac {x}{2 + 2 e^{- 2 x}} - \frac {\log {\left (1 + e^{- 2 x} \right )}}{4} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.78 \[ \int \frac {x}{\left (e^{-x}+e^x\right )^2} \, dx=\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 ) \]

[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)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.25 \[ \int \frac {x}{\left (e^{-x}+e^x\right )^2} \, dx=\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 )}} \]

[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] (verification not implemented)

Time = 0.42 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.81 \[ \int \frac {x}{\left (e^{-x}+e^x\right )^2} \, dx=\frac {x\,{\mathrm {e}}^{2\,x}}{2\,\left ({\mathrm {e}}^{2\,x}+1\right )}-\frac {\ln \left ({\mathrm {e}}^{2\,x}+1\right )}{4} \]

[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