3.308 \(\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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0357258, antiderivative size = 37, normalized size of antiderivative = 1., 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 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]

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 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 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]

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.0133128, size = 37, normalized size = 1. \[ \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]]

________________________________________________________________________________________

Maple [B]  time = 0.012, size = 93, normalized size = 2.5 \begin{align*} -{\frac{1}{2}\ln \left ( x+4-\sqrt{1+x} \right ) }-{\frac{\sqrt{11}}{11}\arctan \left ({\frac{\sqrt{11}}{11} \left ( 2\,\sqrt{1+x}-1 \right ) } \right ) }+{\frac{1}{2}\ln \left ( 4+x+\sqrt{1+x} \right ) }-{\frac{\sqrt{11}}{11}\arctan \left ({\frac{\sqrt{11}}{11} \left ( 1+2\,\sqrt{1+x} \right ) } \right ) }+{\frac{\sqrt{11}}{11}\arctan \left ({\frac{ \left ( 7+2\,x \right ) \sqrt{11}}{11}} \right ) }+{\frac{\ln \left ({x}^{2}+7\,x+15 \right ) }{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.41183, size = 41, normalized size = 1.11 \begin{align*} -\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 ) \end{align*}

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)

________________________________________________________________________________________

Fricas [A]  time = 2.08235, size = 126, normalized size = 3.41 \begin{align*} -\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 ) \end{align*}

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)

________________________________________________________________________________________

Sympy [A]  time = 1.26376, size = 39, normalized size = 1.05 \begin{align*} \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} \end{align*}

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

________________________________________________________________________________________

Giac [A]  time = 1.05178, size = 41, normalized size = 1.11 \begin{align*} -\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 ) \end{align*}

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)