\(\int \frac {x^2}{(1+2 x+\sqrt {2+3 x+5 x^2})^2} \, dx\) [22]

Optimal result
Mathematica [C] (verified)
Rubi [A] (verified)
Maple [C] (verified)
Fricas [A] (verification not implemented)
Sympy [F]
Maxima [F]
Giac [F(-2)]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 25, antiderivative size = 516 \[ \int \frac {x^2}{\left (1+2 x+\sqrt {2+3 x+5 x^2}\right )^2} \, dx=\frac {223+29 \sqrt {2}-\frac {2 \left (41-18 \sqrt {2}\right ) \left (\sqrt {2}-\sqrt {2+3 x+5 x^2}\right )}{x}}{3 \left (1-5 \sqrt {2}-\frac {\left (3-4 \sqrt {2}\right ) \left (\sqrt {2}-\sqrt {2+3 x+5 x^2}\right )}{x}+\frac {\left (1-\sqrt {2}\right ) \left (\sqrt {2}-\sqrt {2+3 x+5 x^2}\right )^2}{x^2}\right )}-\frac {x^2 \left (2 \left (49+30 \sqrt {2}\right )+\frac {\left (49+24 \sqrt {2}\right ) \left (\sqrt {2}-\sqrt {2+3 x+5 x^2}\right )}{x}\right )}{\left (4+3 x-2 \sqrt {2} \sqrt {2+3 x+5 x^2}\right ) \left (1-5 \sqrt {2}-\frac {\left (3-4 \sqrt {2}\right ) \left (\sqrt {2}-\sqrt {2+3 x+5 x^2}\right )}{x}+\frac {\left (1-\sqrt {2}\right ) \left (\sqrt {2}-\sqrt {2+3 x+5 x^2}\right )^2}{x^2}\right )}-\frac {58 \arctan \left (\frac {3-4 \sqrt {2}-\frac {2 \left (1-\sqrt {2}\right ) \left (\sqrt {2}-\sqrt {2+3 x+5 x^2}\right )}{x}}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {112 \text {arctanh}\left (\frac {\sqrt {2}-\sqrt {2+3 x+5 x^2}}{\sqrt {5} x}\right )}{\sqrt {5}}-25 \log \left (\frac {4+3 x-2 \sqrt {2} \sqrt {2+3 x+5 x^2}}{x^2}\right )+25 \log \left (1-5 \sqrt {2}-\frac {\left (3-4 \sqrt {2}\right ) \left (\sqrt {2}-\sqrt {2+3 x+5 x^2}\right )}{x}+\frac {\left (1-\sqrt {2}\right ) \left (\sqrt {2}-\sqrt {2+3 x+5 x^2}\right )^2}{x^2}\right ) \] Output:

(223+29*2^(1/2)-2*(41-18*2^(1/2))*(2^(1/2)-(5*x^2+3*x+2)^(1/2))/x)/(3-15*2 
^(1/2)-3*(3-4*2^(1/2))*(2^(1/2)-(5*x^2+3*x+2)^(1/2))/x+3*(1-2^(1/2))*(2^(1 
/2)-(5*x^2+3*x+2)^(1/2))^2/x^2)-x^2*(98+60*2^(1/2)+(49+24*2^(1/2))*(2^(1/2 
)-(5*x^2+3*x+2)^(1/2))/x)/(4+3*x-2*2^(1/2)*(5*x^2+3*x+2)^(1/2))/(1-5*2^(1/ 
2)-(3-4*2^(1/2))*(2^(1/2)-(5*x^2+3*x+2)^(1/2))/x+(1-2^(1/2))*(2^(1/2)-(5*x 
^2+3*x+2)^(1/2))^2/x^2)-58/9*arctan(1/3*(3-4*2^(1/2)-2*(1-2^(1/2))*(2^(1/2 
)-(5*x^2+3*x+2)^(1/2))/x)*3^(1/2))*3^(1/2)+112/5*arctanh(1/5*(2^(1/2)-(5*x 
^2+3*x+2)^(1/2))*5^(1/2)/x)*5^(1/2)-25*ln((4+3*x-2*2^(1/2)*(5*x^2+3*x+2)^( 
1/2))/x^2)+25*ln(1-5*2^(1/2)-(3-4*2^(1/2))*(2^(1/2)-(5*x^2+3*x+2)^(1/2))/x 
+(1-2^(1/2))*(2^(1/2)-(5*x^2+3*x+2)^(1/2))^2/x^2)
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 8.93 (sec) , antiderivative size = 1100, normalized size of antiderivative = 2.13 \[ \int \frac {x^2}{\left (1+2 x+\sqrt {2+3 x+5 x^2}\right )^2} \, dx =\text {Too large to display} \] Input:

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

Output:

9*x + (22 - 26*x)/(3 - 3*x + 3*x^2) + Sqrt[2 + 3*x + 5*x^2]*(-4 + (2*(-1 + 
 5*x))/(3*(1 - x + x^2))) - (56*ArcSinh[(3 + 10*x)/Sqrt[31]])/Sqrt[5] + (2 
9*ArcTan[(-1 + 2*x)/Sqrt[3]])/(3*Sqrt[3]) - ((I/6)*(-167*I + 179*Sqrt[3])* 
ArcTan[(3*(9*(34937 + (128*I)*Sqrt[3]) + (659658 - (67008*I)*Sqrt[3])*x + 
(-2446517 + (925088*I)*Sqrt[3])*x^2 + (6*I)*(489919*I + 227688*Sqrt[3])*x^ 
3 + (4498469 + (2563280*I)*Sqrt[3])*x^4))/((7174320*I - 3656043*Sqrt[3])*x 
^4 + 3*(67584*I + 351351*Sqrt[3] + 124012*Sqrt[3 - (12*I)*Sqrt[3]]*Sqrt[2 
+ 3*x + 5*x^2]) + 2*x^3*(-5528904*I - 2114605*Sqrt[3] + 620060*Sqrt[3 - (1 
2*I)*Sqrt[3]]*Sqrt[2 + 3*x + 5*x^2]) - x^2*(5840832*I + 1586929*Sqrt[3] + 
868084*Sqrt[3 - (12*I)*Sqrt[3]]*Sqrt[2 + 3*x + 5*x^2]) + x*(-5840832*I + 3 
046486*Sqrt[3] + 868084*Sqrt[3 - (12*I)*Sqrt[3]]*Sqrt[2 + 3*x + 5*x^2]))]) 
/Sqrt[3 - (12*I)*Sqrt[3]] + ((167 - (179*I)*Sqrt[3])*ArcTan[(3*(-314433 + 
(1152*I)*Sqrt[3] + (-659658 - (67008*I)*Sqrt[3])*x + (2446517 + (925088*I) 
*Sqrt[3])*x^2 + 6*(489919 + (227688*I)*Sqrt[3])*x^3 + (-4498469 + (2563280 
*I)*Sqrt[3])*x^4))/(-3*(2391440*I + 1218681*Sqrt[3])*x^4 + x^2*(5840832*I 
- 1586929*Sqrt[3] - 868084*Sqrt[3 + (12*I)*Sqrt[3]]*Sqrt[2 + 3*x + 5*x^2]) 
 + 3*(-67584*I + 351351*Sqrt[3] + 124012*Sqrt[3 + (12*I)*Sqrt[3]]*Sqrt[2 + 
 3*x + 5*x^2]) + 2*x^3*(5528904*I - 2114605*Sqrt[3] + 620060*Sqrt[3 + (12* 
I)*Sqrt[3]]*Sqrt[2 + 3*x + 5*x^2]) + x*(5840832*I + 3046486*Sqrt[3] + 8680 
84*Sqrt[3 + (12*I)*Sqrt[3]]*Sqrt[2 + 3*x + 5*x^2]))])/(6*Sqrt[3 + (12*I...
 

Rubi [A] (verified)

Time = 0.82 (sec) , antiderivative size = 285, normalized size of antiderivative = 0.55, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {7293, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {x^2}{\left (\sqrt {5 x^2+3 x+2}+2 x+1\right )^2} \, dx\)

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (-\frac {4 \sqrt {5 x^2+3 x+2} x}{x^2-x+1}-\frac {2 \sqrt {5 x^2+3 x+2} x}{\left (x^2-x+1\right )^2}-\frac {6 \sqrt {5 x^2+3 x+2}}{x^2-x+1}+\frac {6 \sqrt {5 x^2+3 x+2}}{\left (x^2-x+1\right )^2}+\frac {25 x+1}{x^2-x+1}-\frac {2 (3 x+5)}{\left (x^2-x+1\right )^2}+9\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -6 \sqrt {5} \text {arcsinh}\left (\frac {10 x+3}{\sqrt {31}}\right )-\frac {26 \text {arcsinh}\left (\frac {10 x+3}{\sqrt {31}}\right )}{\sqrt {5}}+8 \sqrt {3} \arctan \left (\frac {5-4 x}{\sqrt {3} \sqrt {5 x^2+3 x+2}}\right )-\frac {43 \arctan \left (\frac {5-4 x}{\sqrt {3} \sqrt {5 x^2+3 x+2}}\right )}{3 \sqrt {3}}-9 \sqrt {3} \arctan \left (\frac {1-2 x}{\sqrt {3}}\right )+\frac {52 \arctan \left (\frac {1-2 x}{\sqrt {3}}\right )}{3 \sqrt {3}}+25 \text {arctanh}\left (\frac {2 x+1}{\sqrt {5 x^2+3 x+2}}\right )+\frac {2 (11-13 x)}{3 \left (x^2-x+1\right )}-\frac {2 (1-2 x) \sqrt {5 x^2+3 x+2}}{x^2-x+1}+\frac {2 (2-x) \sqrt {5 x^2+3 x+2}}{3 \left (x^2-x+1\right )}-4 \sqrt {5 x^2+3 x+2}+\frac {25}{2} \log \left (x^2-x+1\right )+9 x\)

Input:

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

Output:

9*x + (2*(11 - 13*x))/(3*(1 - x + x^2)) - 4*Sqrt[2 + 3*x + 5*x^2] - (2*(1 
- 2*x)*Sqrt[2 + 3*x + 5*x^2])/(1 - x + x^2) + (2*(2 - x)*Sqrt[2 + 3*x + 5* 
x^2])/(3*(1 - x + x^2)) - (26*ArcSinh[(3 + 10*x)/Sqrt[31]])/Sqrt[5] - 6*Sq 
rt[5]*ArcSinh[(3 + 10*x)/Sqrt[31]] + (52*ArcTan[(1 - 2*x)/Sqrt[3]])/(3*Sqr 
t[3]) - 9*Sqrt[3]*ArcTan[(1 - 2*x)/Sqrt[3]] - (43*ArcTan[(5 - 4*x)/(Sqrt[3 
]*Sqrt[2 + 3*x + 5*x^2])])/(3*Sqrt[3]) + 8*Sqrt[3]*ArcTan[(5 - 4*x)/(Sqrt[ 
3]*Sqrt[2 + 3*x + 5*x^2])] + 25*ArcTanh[(1 + 2*x)/Sqrt[2 + 3*x + 5*x^2]] + 
 (25*Log[1 - x + x^2])/2
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 7293
Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v] 
]
 
Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.68 (sec) , antiderivative size = 1280, normalized size of antiderivative = 2.48

method result size
trager \(\text {Expression too large to display}\) \(1280\)
default \(\text {Expression too large to display}\) \(3216\)

Input:

int(x^2/(1+2*x+(5*x^2+3*x+2)^(1/2))^2,x,method=_RETURNVERBOSE)
 

Output:

1/3*(27*x^2-49*x+23)*x/(x^2-x+1)-2/3*(6*x^2-11*x+7)/(x^2-x+1)*(5*x^2+3*x+2 
)^(1/2)+2/3*RootOf(20*_Z^2+1500*_Z-99)*ln((1620*RootOf(3*_Z^2-225*_Z+4429) 
^2*RootOf(20*_Z^2+1500*_Z-99)^2*x-250260*RootOf(3*_Z^2-225*_Z+4429)*RootOf 
(20*_Z^2+1500*_Z-99)^2*x+378540*RootOf(3*_Z^2-225*_Z+4429)^2*RootOf(20*_Z^ 
2+1500*_Z-99)*x+1400440*RootOf(20*_Z^2+1500*_Z-99)^2*x-1783152*RootOf(3*_Z 
^2-225*_Z+4429)*RootOf(20*_Z^2+1500*_Z-99)*(5*x^2+3*x+2)^(1/2)-31324140*Ro 
otOf(3*_Z^2-225*_Z+4429)*RootOf(20*_Z^2+1500*_Z-99)*x+9376965*RootOf(3*_Z^ 
2-225*_Z+4429)^2*x-4998672*RootOf(3*_Z^2-225*_Z+4429)*RootOf(20*_Z^2+1500* 
_Z-99)+227512656*RootOf(20*_Z^2+1500*_Z-99)*(5*x^2+3*x+2)^(1/2)-139203720* 
RootOf(20*_Z^2+1500*_Z-99)*x-179820648*(5*x^2+3*x+2)^(1/2)*RootOf(3*_Z^2-2 
25*_Z+4429)-300724245*RootOf(3*_Z^2-225*_Z+4429)*x+29066352*RootOf(20*_Z^2 
+1500*_Z-99)-140795928*RootOf(3*_Z^2-225*_Z+4429)+19010110392*(5*x^2+3*x+2 
)^(1/2)-28651884570*x-5845946904)/(3*RootOf(3*_Z^2-225*_Z+4429)*x-98*x-29) 
)-2/3*ln((1620*RootOf(3*_Z^2-225*_Z+4429)^2*RootOf(20*_Z^2+1500*_Z-99)^2*x 
-250260*RootOf(3*_Z^2-225*_Z+4429)*RootOf(20*_Z^2+1500*_Z-99)^2*x-135540*R 
ootOf(3*_Z^2-225*_Z+4429)^2*RootOf(20*_Z^2+1500*_Z-99)*x+1400440*RootOf(20 
*_Z^2+1500*_Z-99)^2*x+1783152*RootOf(3*_Z^2-225*_Z+4429)*RootOf(20*_Z^2+15 
00*_Z-99)*(5*x^2+3*x+2)^(1/2)-6214860*RootOf(3*_Z^2-225*_Z+4429)*RootOf(20 
*_Z^2+1500*_Z-99)*x-9901035*RootOf(3*_Z^2-225*_Z+4429)^2*x+4998672*RootOf( 
3*_Z^2-225*_Z+4429)*RootOf(20*_Z^2+1500*_Z-99)-227512656*RootOf(20*_Z^2...
 

Fricas [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 354, normalized size of antiderivative = 0.69 \[ \int \frac {x^2}{\left (1+2 x+\sqrt {2+3 x+5 x^2}\right )^2} \, dx=\frac {1620 \, x^{3} + 580 \, \sqrt {3} {\left (x^{2} - x + 1\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) + 290 \, \sqrt {3} {\left (x^{2} - x + 1\right )} \arctan \left (\frac {4 \, \sqrt {3} \sqrt {5 \, x^{2} + 3 \, x + 2} {\left (4 \, x - 5\right )} + 31 \, \sqrt {3} {\left (x^{2} - 2 \, x\right )}}{3 \, {\left (11 \, x^{2} - 12 \, x - 8\right )}}\right ) + 290 \, \sqrt {3} {\left (x^{2} - x + 1\right )} \arctan \left (\frac {4 \, \sqrt {3} \sqrt {5 \, x^{2} + 3 \, x + 2} {\left (4 \, x - 5\right )} - 31 \, \sqrt {3} {\left (x^{2} - 2 \, x\right )}}{3 \, {\left (11 \, x^{2} - 12 \, x - 8\right )}}\right ) + 1008 \, \sqrt {5} {\left (x^{2} - x + 1\right )} \log \left (4 \, \sqrt {5} \sqrt {5 \, x^{2} + 3 \, x + 2} {\left (10 \, x + 3\right )} - 200 \, x^{2} - 120 \, x - 49\right ) - 1620 \, x^{2} + 2250 \, {\left (x^{2} - x + 1\right )} \log \left (x^{2} - x + 1\right ) + 1125 \, {\left (x^{2} - x + 1\right )} \log \left (\frac {9 \, x^{2} + 2 \, \sqrt {5 \, x^{2} + 3 \, x + 2} {\left (2 \, x + 1\right )} + 7 \, x + 3}{x^{2}}\right ) - 1125 \, {\left (x^{2} - x + 1\right )} \log \left (\frac {9 \, x^{2} - 2 \, \sqrt {5 \, x^{2} + 3 \, x + 2} {\left (2 \, x + 1\right )} + 7 \, x + 3}{x^{2}}\right ) - 120 \, {\left (6 \, x^{2} - 11 \, x + 7\right )} \sqrt {5 \, x^{2} + 3 \, x + 2} + 60 \, x + 1320}{180 \, {\left (x^{2} - x + 1\right )}} \] Input:

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

Output:

1/180*(1620*x^3 + 580*sqrt(3)*(x^2 - x + 1)*arctan(1/3*sqrt(3)*(2*x - 1)) 
+ 290*sqrt(3)*(x^2 - x + 1)*arctan(1/3*(4*sqrt(3)*sqrt(5*x^2 + 3*x + 2)*(4 
*x - 5) + 31*sqrt(3)*(x^2 - 2*x))/(11*x^2 - 12*x - 8)) + 290*sqrt(3)*(x^2 
- x + 1)*arctan(1/3*(4*sqrt(3)*sqrt(5*x^2 + 3*x + 2)*(4*x - 5) - 31*sqrt(3 
)*(x^2 - 2*x))/(11*x^2 - 12*x - 8)) + 1008*sqrt(5)*(x^2 - x + 1)*log(4*sqr 
t(5)*sqrt(5*x^2 + 3*x + 2)*(10*x + 3) - 200*x^2 - 120*x - 49) - 1620*x^2 + 
 2250*(x^2 - x + 1)*log(x^2 - x + 1) + 1125*(x^2 - x + 1)*log((9*x^2 + 2*s 
qrt(5*x^2 + 3*x + 2)*(2*x + 1) + 7*x + 3)/x^2) - 1125*(x^2 - x + 1)*log((9 
*x^2 - 2*sqrt(5*x^2 + 3*x + 2)*(2*x + 1) + 7*x + 3)/x^2) - 120*(6*x^2 - 11 
*x + 7)*sqrt(5*x^2 + 3*x + 2) + 60*x + 1320)/(x^2 - x + 1)
 

Sympy [F]

\[ \int \frac {x^2}{\left (1+2 x+\sqrt {2+3 x+5 x^2}\right )^2} \, dx=\int \frac {x^{2}}{\left (2 x + \sqrt {5 x^{2} + 3 x + 2} + 1\right )^{2}}\, dx \] Input:

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

Output:

Integral(x**2/(2*x + sqrt(5*x**2 + 3*x + 2) + 1)**2, x)
 

Maxima [F]

\[ \int \frac {x^2}{\left (1+2 x+\sqrt {2+3 x+5 x^2}\right )^2} \, dx=\int { \frac {x^{2}}{{\left (2 \, x + \sqrt {5 \, x^{2} + 3 \, x + 2} + 1\right )}^{2}} \,d x } \] Input:

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

Output:

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

Giac [F(-2)]

Exception generated. \[ \int \frac {x^2}{\left (1+2 x+\sqrt {2+3 x+5 x^2}\right )^2} \, dx=\text {Exception raised: TypeError} \] Input:

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

Output:

Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Unable to divide, perhaps due to ro 
unding error%%%{923521,[8]%%%}+%%%{%%{[3694084,0]:[1,0,-5]%%},[7]%%%}+%%%{ 
42481966,
                                                                                    
                                                                                    
 

Mupad [F(-1)]

Timed out. \[ \int \frac {x^2}{\left (1+2 x+\sqrt {2+3 x+5 x^2}\right )^2} \, dx=\int \frac {x^2}{{\left (2\,x+\sqrt {5\,x^2+3\,x+2}+1\right )}^2} \,d x \] Input:

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

Output:

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

Reduce [F]

\[ \int \frac {x^2}{\left (1+2 x+\sqrt {2+3 x+5 x^2}\right )^2} \, dx=\int \frac {x^{2}}{\left (1+2 x +\sqrt {5 x^{2}+3 x +2}\right )^{2}}d x \] Input:

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

Output:

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