3.281 \(\int \frac{3+2 x}{(3+2 x+x^2)^2 \sqrt{4+2 x+x^2}} \, dx\)

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

[Out]

-((3 - x)*Sqrt[4 + 2*x + x^2])/(4*(3 + 2*x + x^2)) - ArcTan[(1 + x)/(Sqrt[2]*Sqrt[4 + 2*x + x^2])]/(4*Sqrt[2])
 + ArcTanh[Sqrt[4 + 2*x + x^2]]

________________________________________________________________________________________

Rubi [A]  time = 0.0677463, antiderivative size = 76, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {1016, 1025, 982, 204, 1024, 206} \[ -\frac{\sqrt{x^2+2 x+4} (3-x)}{4 \left (x^2+2 x+3\right )}-\frac{\tan ^{-1}\left (\frac{x+1}{\sqrt{2} \sqrt{x^2+2 x+4}}\right )}{4 \sqrt{2}}+\tanh ^{-1}\left (\sqrt{x^2+2 x+4}\right ) \]

Antiderivative was successfully verified.

[In]

Int[(3 + 2*x)/((3 + 2*x + x^2)^2*Sqrt[4 + 2*x + x^2]),x]

[Out]

-((3 - x)*Sqrt[4 + 2*x + x^2])/(4*(3 + 2*x + x^2)) - ArcTan[(1 + x)/(Sqrt[2]*Sqrt[4 + 2*x + x^2])]/(4*Sqrt[2])
 + ArcTanh[Sqrt[4 + 2*x + x^2]]

Rule 1016

Int[((g_.) + (h_.)*(x_))*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_)*((d_) + (e_.)*(x_) + (f_.)*(x_)^2)^(q_), x_Sy
mbol] :> Simp[((a + b*x + c*x^2)^(p + 1)*(d + e*x + f*x^2)^(q + 1)*(g*c*(2*a*c*e - b*(c*d + a*f)) + (g*b - a*h
)*(2*c^2*d + b^2*f - c*(b*e + 2*a*f)) + c*(g*(2*c^2*d + b^2*f - c*(b*e + 2*a*f)) - h*(b*c*d - 2*a*c*e + a*b*f)
)*x))/((b^2 - 4*a*c)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*(p + 1)), x] + Dist[1/((b^2 - 4*a*c)*((c*d - a*
f)^2 - (b*d - a*e)*(c*e - b*f))*(p + 1)), Int[(a + b*x + c*x^2)^(p + 1)*(d + e*x + f*x^2)^q*Simp[(b*h - 2*g*c)
*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*(p + 1) + (b^2*(g*f) - b*(h*c*d + g*c*e + a*h*f) + 2*(g*c*(c*d - a*
f) - a*(-(h*c*e))))*(a*f*(p + 1) - c*d*(p + 2)) - e*((g*c)*(2*a*c*e - b*(c*d + a*f)) + (g*b - a*h)*(2*c^2*d +
b^2*f - c*(b*e + 2*a*f)))*(p + q + 2) - (2*f*((g*c)*(2*a*c*e - b*(c*d + a*f)) + (g*b - a*h)*(2*c^2*d + b^2*f -
 c*(b*e + 2*a*f)))*(p + q + 2) - (b^2*g*f - b*(h*c*d + g*c*e + a*h*f) + 2*(g*c*(c*d - a*f) - a*(-(h*c*e))))*(b
*f*(p + 1) - c*e*(2*p + q + 4)))*x - c*f*(b^2*(g*f) - b*(h*c*d + g*c*e + a*h*f) + 2*(g*c*(c*d - a*f) + a*h*c*e
))*(2*p + 2*q + 5)*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, h, q}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[e^2
- 4*d*f, 0] && LtQ[p, -1] && NeQ[(c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f), 0] &&  !( !IntegerQ[p] && ILtQ[q, -1
])

Rule 1025

Int[((g_.) + (h_.)*(x_))/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbo
l] :> -Dist[(h*e - 2*g*f)/(2*f), Int[1/((a + b*x + c*x^2)*Sqrt[d + e*x + f*x^2]), x], x] + Dist[h/(2*f), Int[(
e + 2*f*x)/((a + b*x + c*x^2)*Sqrt[d + e*x + f*x^2]), x], x] /; FreeQ[{a, b, c, d, e, f, g, h}, x] && NeQ[b^2
- 4*a*c, 0] && NeQ[e^2 - 4*d*f, 0] && EqQ[c*e - b*f, 0] && NeQ[h*e - 2*g*f, 0]

Rule 982

Int[1/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbol] :> Dist[-2*e, Su
bst[Int[1/(e*(b*e - 4*a*f) - (b*d - a*e)*x^2), x], x, (e + 2*f*x)/Sqrt[d + e*x + f*x^2]], x] /; FreeQ[{a, b, c
, d, e, f}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[e^2 - 4*d*f, 0] && EqQ[c*e - b*f, 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 1024

Int[((g_) + (h_.)*(x_))/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbol
] :> Dist[-2*g, Subst[Int[1/(b*d - a*e - b*x^2), x], x, Sqrt[d + e*x + f*x^2]], x] /; FreeQ[{a, b, c, d, e, f,
 g, h}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[e^2 - 4*d*f, 0] && EqQ[c*e - b*f, 0] && EqQ[h*e - 2*g*f, 0]

Rule 206

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

Rubi steps

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

Mathematica [A]  time = 0.368974, size = 146, normalized size = 1.92 \[ \frac{1}{32} \left (8 \left (\frac{\sqrt{x^2+2 x+4} (x-3)}{x^2+2 x+3}-2 \log \left (\left (x^2+2 x+3\right )^2\right )+2 \log \left (\left (x^2+2 x+3\right ) \left (x^2+2 \sqrt{x^2+2 x+4}+2 x+5\right )\right )\right )-4 \sqrt{2} \tan ^{-1}\left (\frac{\sqrt{2} \left (5 x^2+10 x+4\right )}{4 x^2+\left (11 \sqrt{x^2+2 x+4}+8\right ) x+11 \sqrt{x^2+2 x+4}+12}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(3 + 2*x)/((3 + 2*x + x^2)^2*Sqrt[4 + 2*x + x^2]),x]

[Out]

(-4*Sqrt[2]*ArcTan[(Sqrt[2]*(4 + 10*x + 5*x^2))/(12 + 4*x^2 + 11*Sqrt[4 + 2*x + x^2] + x*(8 + 11*Sqrt[4 + 2*x
+ x^2]))] + 8*(((-3 + x)*Sqrt[4 + 2*x + x^2])/(3 + 2*x + x^2) - 2*Log[(3 + 2*x + x^2)^2] + 2*Log[(3 + 2*x + x^
2)*(5 + 2*x + x^2 + 2*Sqrt[4 + 2*x + x^2])]))/32

________________________________________________________________________________________

Maple [A]  time = 0.024, size = 123, normalized size = 1.6 \begin{align*} -{\frac{1}{2} \left ( 1+\sqrt{{x}^{2}+2\,x+4} \right ) ^{-1}}+{\frac{1}{2}\ln \left ( 1+\sqrt{{x}^{2}+2\,x+4} \right ) }-{\frac{1}{2} \left ( -1+\sqrt{{x}^{2}+2\,x+4} \right ) ^{-1}}-{\frac{1}{2}\ln \left ( -1+\sqrt{{x}^{2}+2\,x+4} \right ) }+{\frac{3+3\,x}{4}{\frac{1}{\sqrt{{x}^{2}+2\,x+4}}} \left ({\frac{ \left ( 1+x \right ) ^{2}}{{x}^{2}+2\,x+4}}+2 \right ) ^{-1}}-{\frac{\sqrt{2}}{8}\arctan \left ({\frac{ \left ( 1+x \right ) \sqrt{2}}{2}{\frac{1}{\sqrt{{x}^{2}+2\,x+4}}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{2 \, x + 3}{\sqrt{x^{2} + 2 \, x + 4}{\left (x^{2} + 2 \, x + 3\right )}^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate((2*x + 3)/(sqrt(x^2 + 2*x + 4)*(x^2 + 2*x + 3)^2), x)

________________________________________________________________________________________

Fricas [B]  time = 1.88254, size = 504, normalized size = 6.63 \begin{align*} \frac{\sqrt{2}{\left (x^{2} + 2 \, x + 3\right )} \arctan \left (-\frac{1}{2} \, \sqrt{2}{\left (x + 2\right )} + \frac{1}{2} \, \sqrt{2} \sqrt{x^{2} + 2 \, x + 4}\right ) - \sqrt{2}{\left (x^{2} + 2 \, x + 3\right )} \arctan \left (-\frac{1}{2} \, \sqrt{2} x + \frac{1}{2} \, \sqrt{2} \sqrt{x^{2} + 2 \, x + 4}\right ) + 2 \, x^{2} - 4 \,{\left (x^{2} + 2 \, x + 3\right )} \log \left (x^{2} - \sqrt{x^{2} + 2 \, x + 4}{\left (x + 2\right )} + 3 \, x + 5\right ) + 4 \,{\left (x^{2} + 2 \, x + 3\right )} \log \left (x^{2} - \sqrt{x^{2} + 2 \, x + 4} x + x + 3\right ) + 2 \, \sqrt{x^{2} + 2 \, x + 4}{\left (x - 3\right )} + 4 \, x + 6}{8 \,{\left (x^{2} + 2 \, x + 3\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/8*(sqrt(2)*(x^2 + 2*x + 3)*arctan(-1/2*sqrt(2)*(x + 2) + 1/2*sqrt(2)*sqrt(x^2 + 2*x + 4)) - sqrt(2)*(x^2 + 2
*x + 3)*arctan(-1/2*sqrt(2)*x + 1/2*sqrt(2)*sqrt(x^2 + 2*x + 4)) + 2*x^2 - 4*(x^2 + 2*x + 3)*log(x^2 - sqrt(x^
2 + 2*x + 4)*(x + 2) + 3*x + 5) + 4*(x^2 + 2*x + 3)*log(x^2 - sqrt(x^2 + 2*x + 4)*x + x + 3) + 2*sqrt(x^2 + 2*
x + 4)*(x - 3) + 4*x + 6)/(x^2 + 2*x + 3)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{2 x + 3}{\left (x^{2} + 2 x + 3\right )^{2} \sqrt{x^{2} + 2 x + 4}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral((2*x + 3)/((x**2 + 2*x + 3)**2*sqrt(x**2 + 2*x + 4)), x)

________________________________________________________________________________________

Giac [B]  time = 1.09552, size = 317, normalized size = 4.17 \begin{align*} \frac{1}{8} \, \sqrt{2} \arctan \left (-\frac{1}{2} \, \sqrt{2}{\left (x - \sqrt{x^{2} + 2 \, x + 4} + 2\right )}\right ) - \frac{1}{8} \, \sqrt{2} \arctan \left (-\frac{1}{2} \, \sqrt{2}{\left (x - \sqrt{x^{2} + 2 \, x + 4}\right )}\right ) + \frac{4 \,{\left (x - \sqrt{x^{2} + 2 \, x + 4}\right )}^{3} + 13 \,{\left (x - \sqrt{x^{2} + 2 \, x + 4}\right )}^{2} + 26 \, x - 26 \, \sqrt{x^{2} + 2 \, x + 4} + 26}{2 \,{\left ({\left (x - \sqrt{x^{2} + 2 \, x + 4}\right )}^{4} + 4 \,{\left (x - \sqrt{x^{2} + 2 \, x + 4}\right )}^{3} + 8 \,{\left (x - \sqrt{x^{2} + 2 \, x + 4}\right )}^{2} + 8 \, x - 8 \, \sqrt{x^{2} + 2 \, x + 4} + 12\right )}} - \frac{1}{2} \, \log \left ({\left (x - \sqrt{x^{2} + 2 \, x + 4}\right )}^{2} + 4 \, x - 4 \, \sqrt{x^{2} + 2 \, x + 4} + 6\right ) + \frac{1}{2} \, \log \left ({\left (x - \sqrt{x^{2} + 2 \, x + 4}\right )}^{2} + 2\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/8*sqrt(2)*arctan(-1/2*sqrt(2)*(x - sqrt(x^2 + 2*x + 4) + 2)) - 1/8*sqrt(2)*arctan(-1/2*sqrt(2)*(x - sqrt(x^2
 + 2*x + 4))) + 1/2*(4*(x - sqrt(x^2 + 2*x + 4))^3 + 13*(x - sqrt(x^2 + 2*x + 4))^2 + 26*x - 26*sqrt(x^2 + 2*x
 + 4) + 26)/((x - sqrt(x^2 + 2*x + 4))^4 + 4*(x - sqrt(x^2 + 2*x + 4))^3 + 8*(x - sqrt(x^2 + 2*x + 4))^2 + 8*x
 - 8*sqrt(x^2 + 2*x + 4) + 12) - 1/2*log((x - sqrt(x^2 + 2*x + 4))^2 + 4*x - 4*sqrt(x^2 + 2*x + 4) + 6) + 1/2*
log((x - sqrt(x^2 + 2*x + 4))^2 + 2)