3.7.97 \(\int \frac {1}{4+x+\sqrt {1+x}} \, dx\) [697]

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

[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.03, 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 = {648, 632, 210, 642} \begin {gather*} \log \left (x+\sqrt {x+1}+4\right )-\frac {2 \text {ArcTan}\left (\frac {2 \sqrt {x+1}+1}{\sqrt {11}}\right )}{\sqrt {11}} \end {gather*}

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 210

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

Rule 632

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 642

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 648

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 \text {Subst}\left (\int \frac {x}{3+x+x^2} \, dx,x,\sqrt {1+x}\right )\\ &=-\text {Subst}\left (\int \frac {1}{3+x+x^2} \, dx,x,\sqrt {1+x}\right )+\text {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 \text {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.03, size = 37, normalized size = 1.00 \begin {gather*} -\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 {gather*}

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] Leaf count of result is larger than twice the leaf count of optimal. \(92\) vs. \(2(30)=60\).
time = 0.15, size = 93, normalized size = 2.51

method result size
derivativedivides \(\ln \left (4+x +\sqrt {1+x}\right )-\frac {2 \arctan \left (\frac {\left (1+2 \sqrt {1+x}\right ) \sqrt {11}}{11}\right ) \sqrt {11}}{11}\) \(31\)
default \(\frac {\ln \left (4+x +\sqrt {1+x}\right )}{2}-\frac {\arctan \left (\frac {\left (1+2 \sqrt {1+x}\right ) \sqrt {11}}{11}\right ) \sqrt {11}}{11}-\frac {\ln \left (x +4-\sqrt {1+x}\right )}{2}-\frac {\sqrt {11}\, \arctan \left (\frac {\left (2 \sqrt {1+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 {\ln \left (x^{2}+7 x +15\right )}{2}\) \(93\)
trager \(\RootOf \left (11 \textit {\_Z}^{2}-22 \textit {\_Z} +12\right ) \ln \left (4+x +\sqrt {1+x}\right )-\ln \left (-847 \RootOf \left (11 \textit {\_Z}^{2}-22 \textit {\_Z} +12\right )^{2} x +1760 \RootOf \left (11 \textit {\_Z}^{2}-22 \textit {\_Z} +12\right ) \sqrt {1+x}+1749 \RootOf \left (11 \textit {\_Z}^{2}-22 \textit {\_Z} +12\right ) x +770 \RootOf \left (11 \textit {\_Z}^{2}-22 \textit {\_Z} +12\right )-1660 \sqrt {1+x}-824 x -1030\right ) \RootOf \left (11 \textit {\_Z}^{2}-22 \textit {\_Z} +12\right )+\ln \left (-847 \RootOf \left (11 \textit {\_Z}^{2}-22 \textit {\_Z} +12\right )^{2} x +1760 \RootOf \left (11 \textit {\_Z}^{2}-22 \textit {\_Z} +12\right ) \sqrt {1+x}+1749 \RootOf \left (11 \textit {\_Z}^{2}-22 \textit {\_Z} +12\right ) x +770 \RootOf \left (11 \textit {\_Z}^{2}-22 \textit {\_Z} +12\right )-1660 \sqrt {1+x}-824 x -1030\right )\) \(184\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(4+x+(1+x)^(1/2)),x,method=_RETURNVERBOSE)

[Out]

1/2*ln(4+x+(1+x)^(1/2))-1/11*arctan(1/11*(1+2*(1+x)^(1/2))*11^(1/2))*11^(1/2)-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/11*11^(1/2)*arctan(1/11*(2*x+7)*11^(1/2))+1/2*ln(x^2+7*x+15)

________________________________________________________________________________________

Maxima [A]
time = 0.49, size = 30, normalized size = 0.81 \begin {gather*} -\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 {gather*}

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 = 0.35, size = 32, normalized size = 0.86 \begin {gather*} -\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 {gather*}

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 = 0.98, size = 39, normalized size = 1.05 \begin {gather*} \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 {gather*}

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.89, size = 30, normalized size = 0.81 \begin {gather*} -\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 {gather*}

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)

________________________________________________________________________________________

Mupad [B]
time = 0.07, size = 32, normalized size = 0.86 \begin {gather*} \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} \end {gather*}

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

________________________________________________________________________________________