\(\int \frac {4+x}{8 x} \, dx\) [7807]

   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 = 10, antiderivative size = 13 \[ \int \frac {4+x}{8 x} \, dx=\frac {1}{8} (5+x+4 (8+\log (x))) \]

[Out]

1/2*ln(x)+37/8+1/8*x

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.92, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {12, 45} \[ \int \frac {4+x}{8 x} \, dx=\frac {x}{8}+\frac {\log (x)}{2} \]

[In]

Int[(4 + x)/(8*x),x]

[Out]

x/8 + Log[x]/2

Rule 12

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

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps \begin{align*} \text {integral}& = \frac {1}{8} \int \frac {4+x}{x} \, dx \\ & = \frac {1}{8} \int \left (1+\frac {4}{x}\right ) \, dx \\ & = \frac {x}{8}+\frac {\log (x)}{2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.77 \[ \int \frac {4+x}{8 x} \, dx=\frac {1}{8} (x+4 \log (x)) \]

[In]

Integrate[(4 + x)/(8*x),x]

[Out]

(x + 4*Log[x])/8

Maple [A] (verified)

Time = 0.02 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.69

method result size
default \(\frac {\ln \left (x \right )}{2}+\frac {x}{8}\) \(9\)
norman \(\frac {\ln \left (x \right )}{2}+\frac {x}{8}\) \(9\)
risch \(\frac {\ln \left (x \right )}{2}+\frac {x}{8}\) \(9\)
parallelrisch \(\frac {\ln \left (x \right )}{2}+\frac {x}{8}\) \(9\)

[In]

int(1/8*(4+x)/x,x,method=_RETURNVERBOSE)

[Out]

1/2*ln(x)+1/8*x

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.62 \[ \int \frac {4+x}{8 x} \, dx=\frac {1}{8} \, x + \frac {1}{2} \, \log \left (x\right ) \]

[In]

integrate(1/8*(4+x)/x,x, algorithm="fricas")

[Out]

1/8*x + 1/2*log(x)

Sympy [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.54 \[ \int \frac {4+x}{8 x} \, dx=\frac {x}{8} + \frac {\log {\left (x \right )}}{2} \]

[In]

integrate(1/8*(4+x)/x,x)

[Out]

x/8 + log(x)/2

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.62 \[ \int \frac {4+x}{8 x} \, dx=\frac {1}{8} \, x + \frac {1}{2} \, \log \left (x\right ) \]

[In]

integrate(1/8*(4+x)/x,x, algorithm="maxima")

[Out]

1/8*x + 1/2*log(x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.69 \[ \int \frac {4+x}{8 x} \, dx=\frac {1}{8} \, x + \frac {1}{2} \, \log \left ({\left | x \right |}\right ) \]

[In]

integrate(1/8*(4+x)/x,x, algorithm="giac")

[Out]

1/8*x + 1/2*log(abs(x))

Mupad [B] (verification not implemented)

Time = 13.52 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.62 \[ \int \frac {4+x}{8 x} \, dx=\frac {x}{8}+\frac {\ln \left (x\right )}{2} \]

[In]

int((x/8 + 1/2)/x,x)

[Out]

x/8 + log(x)/2