3.28.38 \(\int \frac {150+e^x (75-5 x)-12 x+(-3-e^x) \log (3+e^x)}{12+4 e^x} \, dx\) [2738]

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

[Out]

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

________________________________________________________________________________________

Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(50\) vs. \(2(22)=44\).
time = 0.18, antiderivative size = 50, normalized size of antiderivative = 2.27, number of steps used = 11, number of rules used = 8, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {6873, 12, 6874, 2215, 2221, 2317, 2438, 2439} \begin {gather*} -\frac {5 x^2}{8}+\frac {1}{8} (25-x)^2+\frac {75 x}{4}+\frac {1}{4} (25-x) \log \left (\frac {e^x}{3}+1\right )-\frac {1}{4} x \log (3) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(150 + E^x*(75 - 5*x) - 12*x + (-3 - E^x)*Log[3 + E^x])/(12 + 4*E^x),x]

[Out]

(25 - x)^2/8 + (75*x)/4 - (5*x^2)/8 - (x*Log[3])/4 + ((25 - x)*Log[1 + E^x/3])/4

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2215

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

Rule 2221

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

Rule 2317

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2438

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 2439

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

Rule 6873

Int[u_, x_Symbol] :> With[{v = NormalizeIntegrand[u, x]}, Int[v, x] /; v =!= u]

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {150+e^x (75-5 x)-12 x+\left (-3-e^x\right ) \log \left (3+e^x\right )}{4 \left (3+e^x\right )} \, dx\\ &=\frac {1}{4} \int \frac {150+e^x (75-5 x)-12 x+\left (-3-e^x\right ) \log \left (3+e^x\right )}{3+e^x} \, dx\\ &=\frac {1}{4} \int \left (75+\frac {3 (-25+x)}{3+e^x}-5 x-\log \left (3+e^x\right )\right ) \, dx\\ &=\frac {75 x}{4}-\frac {5 x^2}{8}-\frac {1}{4} \int \log \left (3+e^x\right ) \, dx+\frac {3}{4} \int \frac {-25+x}{3+e^x} \, dx\\ &=\frac {1}{8} (25-x)^2+\frac {75 x}{4}-\frac {5 x^2}{8}-\frac {1}{4} \int \frac {e^x (-25+x)}{3+e^x} \, dx-\frac {1}{4} \text {Subst}\left (\int \frac {\log (3+x)}{x} \, dx,x,e^x\right )\\ &=\frac {1}{8} (25-x)^2+\frac {75 x}{4}-\frac {5 x^2}{8}-\frac {1}{4} x \log (3)+\frac {1}{4} (25-x) \log \left (1+\frac {e^x}{3}\right )+\frac {1}{4} \int \log \left (1+\frac {e^x}{3}\right ) \, dx-\frac {1}{4} \text {Subst}\left (\int \frac {\log \left (1+\frac {x}{3}\right )}{x} \, dx,x,e^x\right )\\ &=\frac {1}{8} (25-x)^2+\frac {75 x}{4}-\frac {5 x^2}{8}-\frac {1}{4} x \log (3)+\frac {1}{4} (25-x) \log \left (1+\frac {e^x}{3}\right )+\frac {1}{4} \text {Li}_2\left (-\frac {e^x}{3}\right )+\frac {1}{4} \text {Subst}\left (\int \frac {\log \left (1+\frac {x}{3}\right )}{x} \, dx,x,e^x\right )\\ &=\frac {1}{8} (25-x)^2+\frac {75 x}{4}-\frac {5 x^2}{8}-\frac {1}{4} x \log (3)+\frac {1}{4} (25-x) \log \left (1+\frac {e^x}{3}\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.
time = 0.05, size = 53, normalized size = 2.41 \begin {gather*} \frac {1}{4} \left (75 x-\frac {5 x^2}{2}-x \log (3)-(-25+x) \log \left (1+3 e^{-x}\right )+\text {PolyLog}\left (2,-3 e^{-x}\right )+\text {PolyLog}\left (2,-\frac {e^x}{3}\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(150 + E^x*(75 - 5*x) - 12*x + (-3 - E^x)*Log[3 + E^x])/(12 + 4*E^x),x]

[Out]

(75*x - (5*x^2)/2 - x*Log[3] - (-25 + x)*Log[1 + 3/E^x] + PolyLog[2, -3/E^x] + PolyLog[2, -1/3*E^x])/4

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 0.07, size = 66, normalized size = 3.00

method result size
risch \(-\frac {x \ln \left (3+{\mathrm e}^{x}\right )}{4}-\frac {x^{2}}{2}+\frac {25 x}{2}+\frac {25 \ln \left (3+{\mathrm e}^{x}\right )}{4}\) \(25\)
norman \(\frac {25 x}{2}-\frac {x^{2}}{2}-\frac {x \ln \left (3+{\mathrm e}^{x}\right )}{4}+\frac {25 \ln \left (4 \,{\mathrm e}^{x}+12\right )}{4}\) \(27\)
default \(\frac {25 \ln \left ({\mathrm e}^{x}\right )}{2}+\frac {25 \ln \left (3+{\mathrm e}^{x}\right )}{4}-\frac {x^{2}}{2}-\frac {x \ln \left (1+\frac {{\mathrm e}^{x}}{3}\right )}{4}+\polylog \left (2, -\frac {{\mathrm e}^{x}}{3}\right )-\dilog \left (1+\frac {{\mathrm e}^{x}}{3}\right )-\frac {\left (\ln \left (3+{\mathrm e}^{x}\right )-\ln \left (1+\frac {{\mathrm e}^{x}}{3}\right )\right ) \ln \left (-\frac {{\mathrm e}^{x}}{3}\right )}{4}\) \(66\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-exp(x)-3)*ln(3+exp(x))+(-5*x+75)*exp(x)-12*x+150)/(4*exp(x)+12),x,method=_RETURNVERBOSE)

[Out]

25/2*ln(exp(x))+25/4*ln(3+exp(x))-1/2*x^2-1/4*x*ln(1+1/3*exp(x))+polylog(2,-1/3*exp(x))-dilog(1+1/3*exp(x))-1/
4*(ln(3+exp(x))-ln(1+1/3*exp(x)))*ln(-1/3*exp(x))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-exp(x)-3)*log(3+exp(x))+(-5*x+75)*exp(x)-12*x+150)/(4*exp(x)+12),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 19, normalized size = 0.86 \begin {gather*} -\frac {1}{2} \, x^{2} - \frac {1}{4} \, {\left (x - 25\right )} \log \left (e^{x} + 3\right ) + \frac {25}{2} \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-exp(x)-3)*log(3+exp(x))+(-5*x+75)*exp(x)-12*x+150)/(4*exp(x)+12),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.11, size = 29, normalized size = 1.32 \begin {gather*} - \frac {x^{2}}{2} - \frac {x \log {\left (e^{x} + 3 \right )}}{4} + \frac {25 x}{2} + \frac {25 \log {\left (e^{x} + 3 \right )}}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-exp(x)-3)*ln(3+exp(x))+(-5*x+75)*exp(x)-12*x+150)/(4*exp(x)+12),x)

[Out]

-x**2/2 - x*log(exp(x) + 3)/4 + 25*x/2 + 25*log(exp(x) + 3)/4

________________________________________________________________________________________

Giac [A]
time = 0.39, size = 24, normalized size = 1.09 \begin {gather*} -\frac {1}{2} \, x^{2} - \frac {1}{4} \, x \log \left (e^{x} + 3\right ) + \frac {25}{2} \, x + \frac {25}{4} \, \log \left (e^{x} + 3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-exp(x)-3)*log(3+exp(x))+(-5*x+75)*exp(x)-12*x+150)/(4*exp(x)+12),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.20, size = 14, normalized size = 0.64 \begin {gather*} -\frac {\left (x-25\right )\,\left (2\,x+\ln \left ({\mathrm {e}}^x+3\right )\right )}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(12*x + log(exp(x) + 3)*(exp(x) + 3) + exp(x)*(5*x - 75) - 150)/(4*exp(x) + 12),x)

[Out]

-((x - 25)*(2*x + log(exp(x) + 3)))/4

________________________________________________________________________________________