3.697 \(\int \frac {1}{4+x+\sqrt {1+x}} \, dx\)

Optimal. Leaf size=37 \[ \log \left (x+\sqrt {x+1}+4\right )-\frac {2 \tan ^{-1}\left (\frac {2 \sqrt {x+1}+1}{\sqrt {11}}\right )}{\sqrt {11}} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {634, 618, 204, 628} \[ \log \left (x+\sqrt {x+1}+4\right )-\frac {2 \tan ^{-1}\left (\frac {2 \sqrt {x+1}+1}{\sqrt {11}}\right )}{\sqrt {11}} \]

Antiderivative was successfully verified.

[In]

Int[(4 + x + Sqrt[1 + x])^(-1),x]

[Out]

(-2*ArcTan[(1 + 2*Sqrt[1 + x])/Sqrt[11]])/Sqrt[11] + Log[4 + x + Sqrt[1 + x]]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 618

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

Rule 628

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

Rule 634

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

Rubi steps

\begin {align*} \int \frac {1}{4+x+\sqrt {1+x}} \, dx &=2 \operatorname {Subst}\left (\int \frac {x}{3+x+x^2} \, dx,x,\sqrt {1+x}\right )\\ &=-\operatorname {Subst}\left (\int \frac {1}{3+x+x^2} \, dx,x,\sqrt {1+x}\right )+\operatorname {Subst}\left (\int \frac {1+2 x}{3+x+x^2} \, dx,x,\sqrt {1+x}\right )\\ &=\log \left (4+x+\sqrt {1+x}\right )+2 \operatorname {Subst}\left (\int \frac {1}{-11-x^2} \, dx,x,1+2 \sqrt {1+x}\right )\\ &=-\frac {2 \tan ^{-1}\left (\frac {1+2 \sqrt {1+x}}{\sqrt {11}}\right )}{\sqrt {11}}+\log \left (4+x+\sqrt {1+x}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 37, normalized size = 1.00 \[ \log \left (x+\sqrt {x+1}+4\right )-\frac {2 \tan ^{-1}\left (\frac {2 \sqrt {x+1}+1}{\sqrt {11}}\right )}{\sqrt {11}} \]

Antiderivative was successfully verified.

[In]

Integrate[(4 + x + Sqrt[1 + x])^(-1),x]

[Out]

(-2*ArcTan[(1 + 2*Sqrt[1 + x])/Sqrt[11]])/Sqrt[11] + Log[4 + x + Sqrt[1 + x]]

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 32, normalized size = 0.86 \[ -\frac {2}{11} \, \sqrt {11} \arctan \left (\frac {2}{11} \, \sqrt {11} \sqrt {x + 1} + \frac {1}{11} \, \sqrt {11}\right ) + \log \left (x + \sqrt {x + 1} + 4\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(4+x+(1+x)^(1/2)),x, algorithm="fricas")

[Out]

-2/11*sqrt(11)*arctan(2/11*sqrt(11)*sqrt(x + 1) + 1/11*sqrt(11)) + log(x + sqrt(x + 1) + 4)

________________________________________________________________________________________

giac [A]  time = 0.37, size = 30, normalized size = 0.81 \[ -\frac {2}{11} \, \sqrt {11} \arctan \left (\frac {1}{11} \, \sqrt {11} {\left (2 \, \sqrt {x + 1} + 1\right )}\right ) + \log \left (x + \sqrt {x + 1} + 4\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(4+x+(1+x)^(1/2)),x, algorithm="giac")

[Out]

-2/11*sqrt(11)*arctan(1/11*sqrt(11)*(2*sqrt(x + 1) + 1)) + log(x + sqrt(x + 1) + 4)

________________________________________________________________________________________

maple [B]  time = 0.01, size = 93, normalized size = 2.51 \[ -\frac {\sqrt {11}\, \arctan \left (\frac {\left (1+2 \sqrt {x +1}\right ) \sqrt {11}}{11}\right )}{11}+\frac {\sqrt {11}\, \arctan \left (\frac {\left (2 x +7\right ) \sqrt {11}}{11}\right )}{11}-\frac {\sqrt {11}\, \arctan \left (\frac {\left (2 \sqrt {x +1}-1\right ) \sqrt {11}}{11}\right )}{11}+\frac {\ln \left (x +4+\sqrt {x +1}\right )}{2}-\frac {\ln \left (x +4-\sqrt {x +1}\right )}{2}+\frac {\ln \left (x^{2}+7 x +15\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(4+x+(x+1)^(1/2)),x)

[Out]

-1/2*ln(x+4-(x+1)^(1/2))-1/11*11^(1/2)*arctan(1/11*(2*(x+1)^(1/2)-1)*11^(1/2))+1/2*ln(4+x+(x+1)^(1/2))-1/11*ar
ctan(1/11*(1+2*(x+1)^(1/2))*11^(1/2))*11^(1/2)+1/11*11^(1/2)*arctan(1/11*(2*x+7)*11^(1/2))+1/2*ln(x^2+7*x+15)

________________________________________________________________________________________

maxima [A]  time = 1.73, size = 30, normalized size = 0.81 \[ -\frac {2}{11} \, \sqrt {11} \arctan \left (\frac {1}{11} \, \sqrt {11} {\left (2 \, \sqrt {x + 1} + 1\right )}\right ) + \log \left (x + \sqrt {x + 1} + 4\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(4+x+(1+x)^(1/2)),x, algorithm="maxima")

[Out]

-2/11*sqrt(11)*arctan(1/11*sqrt(11)*(2*sqrt(x + 1) + 1)) + log(x + sqrt(x + 1) + 4)

________________________________________________________________________________________

mupad [B]  time = 0.07, size = 32, normalized size = 0.86 \[ \ln \left (x+\sqrt {x+1}+4\right )-\frac {2\,\sqrt {11}\,\mathrm {atan}\left (\frac {\sqrt {11}}{11}+\frac {2\,\sqrt {11}\,\sqrt {x+1}}{11}\right )}{11} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(x + (x + 1)^(1/2) + 4),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 2.31, size = 39, normalized size = 1.05 \[ \log {\left (x + \sqrt {x + 1} + 4 \right )} - \frac {2 \sqrt {11} \operatorname {atan}{\left (\frac {2 \sqrt {11} \left (\sqrt {x + 1} + \frac {1}{2}\right )}{11} \right )}}{11} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x + sqrt(x + 1) + 4) - 2*sqrt(11)*atan(2*sqrt(11)*(sqrt(x + 1) + 1/2)/11)/11

________________________________________________________________________________________