\(\int \frac {d+e x+f x^2}{(1+x^2+x^4)^3} \, dx\) [30]

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

Optimal result

Integrand size = 21, antiderivative size = 206 \[ \int \frac {d+e x+f x^2}{\left (1+x^2+x^4\right )^3} \, dx=\frac {e \left (1+2 x^2\right )}{12 \left (1+x^2+x^4\right )^2}+\frac {x \left (d+f-(d-2 f) x^2\right )}{12 \left (1+x^2+x^4\right )^2}+\frac {e \left (1+2 x^2\right )}{6 \left (1+x^2+x^4\right )}+\frac {x \left (2 d+3 f-7 (d-f) x^2\right )}{24 \left (1+x^2+x^4\right )}-\frac {(13 d+2 f) \arctan \left (\frac {1-2 x}{\sqrt {3}}\right )}{48 \sqrt {3}}+\frac {(13 d+2 f) \arctan \left (\frac {1+2 x}{\sqrt {3}}\right )}{48 \sqrt {3}}+\frac {2 e \arctan \left (\frac {1+2 x^2}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {1}{16} (9 d-4 f) \text {arctanh}\left (\frac {x}{1+x^2}\right ) \] Output:

1/12*e*(2*x^2+1)/(x^4+x^2+1)^2+1/12*x*(d+f-(d-2*f)*x^2)/(x^4+x^2+1)^2+e*(2 
*x^2+1)/(6*x^4+6*x^2+6)+x*(2*d+3*f-7*(d-f)*x^2)/(24*x^4+24*x^2+24)-1/144*( 
13*d+2*f)*arctan(1/3*(1-2*x)*3^(1/2))*3^(1/2)+1/144*(13*d+2*f)*arctan(1/3* 
(1+2*x)*3^(1/2))*3^(1/2)+2/9*e*arctan(1/3*(2*x^2+1)*3^(1/2))*3^(1/2)+1/16* 
(9*d-4*f)*arctanh(x/(x^2+1))
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.69 (sec) , antiderivative size = 235, normalized size of antiderivative = 1.14 \[ \int \frac {d+e x+f x^2}{\left (1+x^2+x^4\right )^3} \, dx=\frac {1}{144} \left (\frac {6 \left (2 d x+3 f x-7 d x^3+7 f x^3+e \left (4+8 x^2\right )\right )}{1+x^2+x^4}+\frac {12 \left (e+2 e x^2+x \left (d+f-d x^2+2 f x^2\right )\right )}{\left (1+x^2+x^4\right )^2}-\frac {\left (\left (-47 i+7 \sqrt {3}\right ) d+\left (17 i-7 \sqrt {3}\right ) f\right ) \arctan \left (\frac {1}{2} \left (-i+\sqrt {3}\right ) x\right )}{\sqrt {\frac {1}{6} \left (1+i \sqrt {3}\right )}}-\frac {\left (\left (47 i+7 \sqrt {3}\right ) d-\left (17 i+7 \sqrt {3}\right ) f\right ) \arctan \left (\frac {1}{2} \left (i+\sqrt {3}\right ) x\right )}{\sqrt {\frac {1}{6} \left (1-i \sqrt {3}\right )}}-32 \sqrt {3} e \arctan \left (\frac {\sqrt {3}}{1+2 x^2}\right )\right ) \] Input:

Integrate[(d + e*x + f*x^2)/(1 + x^2 + x^4)^3,x]
 

Output:

((6*(2*d*x + 3*f*x - 7*d*x^3 + 7*f*x^3 + e*(4 + 8*x^2)))/(1 + x^2 + x^4) + 
 (12*(e + 2*e*x^2 + x*(d + f - d*x^2 + 2*f*x^2)))/(1 + x^2 + x^4)^2 - (((- 
47*I + 7*Sqrt[3])*d + (17*I - 7*Sqrt[3])*f)*ArcTan[((-I + Sqrt[3])*x)/2])/ 
Sqrt[(1 + I*Sqrt[3])/6] - (((47*I + 7*Sqrt[3])*d - (17*I + 7*Sqrt[3])*f)*A 
rcTan[((I + Sqrt[3])*x)/2])/Sqrt[(1 - I*Sqrt[3])/6] - 32*Sqrt[3]*e*ArcTan[ 
Sqrt[3]/(1 + 2*x^2)])/144
 

Rubi [A] (verified)

Time = 0.57 (sec) , antiderivative size = 240, normalized size of antiderivative = 1.17, number of steps used = 17, number of rules used = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.762, Rules used = {2202, 27, 1432, 1086, 1086, 1083, 217, 1492, 1492, 27, 1483, 1142, 25, 1083, 217, 1103}

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 {d+e x+f x^2}{\left (x^4+x^2+1\right )^3} \, dx\)

\(\Big \downarrow \) 2202

\(\displaystyle \int \frac {f x^2+d}{\left (x^4+x^2+1\right )^3}dx+\int \frac {e x}{\left (x^4+x^2+1\right )^3}dx\)

\(\Big \downarrow \) 27

\(\displaystyle \int \frac {f x^2+d}{\left (x^4+x^2+1\right )^3}dx+e \int \frac {x}{\left (x^4+x^2+1\right )^3}dx\)

\(\Big \downarrow \) 1432

\(\displaystyle \int \frac {f x^2+d}{\left (x^4+x^2+1\right )^3}dx+\frac {1}{2} e \int \frac {1}{\left (x^4+x^2+1\right )^3}dx^2\)

\(\Big \downarrow \) 1086

\(\displaystyle \int \frac {f x^2+d}{\left (x^4+x^2+1\right )^3}dx+\frac {1}{2} e \left (\int \frac {1}{\left (x^4+x^2+1\right )^2}dx^2+\frac {2 x^2+1}{6 \left (x^4+x^2+1\right )^2}\right )\)

\(\Big \downarrow \) 1086

\(\displaystyle \int \frac {f x^2+d}{\left (x^4+x^2+1\right )^3}dx+\frac {1}{2} e \left (\frac {2}{3} \int \frac {1}{x^4+x^2+1}dx^2+\frac {2 x^2+1}{3 \left (x^4+x^2+1\right )}+\frac {2 x^2+1}{6 \left (x^4+x^2+1\right )^2}\right )\)

\(\Big \downarrow \) 1083

\(\displaystyle \int \frac {f x^2+d}{\left (x^4+x^2+1\right )^3}dx+\frac {1}{2} e \left (-\frac {4}{3} \int \frac {1}{-x^4-3}d\left (2 x^2+1\right )+\frac {2 x^2+1}{3 \left (x^4+x^2+1\right )}+\frac {2 x^2+1}{6 \left (x^4+x^2+1\right )^2}\right )\)

\(\Big \downarrow \) 217

\(\displaystyle \int \frac {f x^2+d}{\left (x^4+x^2+1\right )^3}dx+\frac {1}{2} e \left (\frac {4 \arctan \left (\frac {2 x^2+1}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {2 x^2+1}{3 \left (x^4+x^2+1\right )}+\frac {2 x^2+1}{6 \left (x^4+x^2+1\right )^2}\right )\)

\(\Big \downarrow \) 1492

\(\displaystyle \frac {1}{12} \int \frac {-5 (d-2 f) x^2+11 d-f}{\left (x^4+x^2+1\right )^2}dx+\frac {1}{2} e \left (\frac {4 \arctan \left (\frac {2 x^2+1}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {2 x^2+1}{3 \left (x^4+x^2+1\right )}+\frac {2 x^2+1}{6 \left (x^4+x^2+1\right )^2}\right )+\frac {x \left (-\left (x^2 (d-2 f)\right )+d+f\right )}{12 \left (x^4+x^2+1\right )^2}\)

\(\Big \downarrow \) 1492

\(\displaystyle \frac {1}{12} \left (\frac {1}{6} \int \frac {3 \left (5 (4 d-f)-7 (d-f) x^2\right )}{x^4+x^2+1}dx+\frac {x \left (-7 x^2 (d-f)+2 d+3 f\right )}{2 \left (x^4+x^2+1\right )}\right )+\frac {1}{2} e \left (\frac {4 \arctan \left (\frac {2 x^2+1}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {2 x^2+1}{3 \left (x^4+x^2+1\right )}+\frac {2 x^2+1}{6 \left (x^4+x^2+1\right )^2}\right )+\frac {x \left (-\left (x^2 (d-2 f)\right )+d+f\right )}{12 \left (x^4+x^2+1\right )^2}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {1}{12} \left (\frac {1}{2} \int \frac {5 (4 d-f)-7 (d-f) x^2}{x^4+x^2+1}dx+\frac {x \left (-7 x^2 (d-f)+2 d+3 f\right )}{2 \left (x^4+x^2+1\right )}\right )+\frac {1}{2} e \left (\frac {4 \arctan \left (\frac {2 x^2+1}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {2 x^2+1}{3 \left (x^4+x^2+1\right )}+\frac {2 x^2+1}{6 \left (x^4+x^2+1\right )^2}\right )+\frac {x \left (-\left (x^2 (d-2 f)\right )+d+f\right )}{12 \left (x^4+x^2+1\right )^2}\)

\(\Big \downarrow \) 1483

\(\displaystyle \frac {1}{12} \left (\frac {1}{2} \left (\frac {1}{2} \int \frac {5 (4 d-f)-3 (9 d-4 f) x}{x^2-x+1}dx+\frac {1}{2} \int \frac {5 (4 d-f)+3 (9 d-4 f) x}{x^2+x+1}dx\right )+\frac {x \left (-7 x^2 (d-f)+2 d+3 f\right )}{2 \left (x^4+x^2+1\right )}\right )+\frac {1}{2} e \left (\frac {4 \arctan \left (\frac {2 x^2+1}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {2 x^2+1}{3 \left (x^4+x^2+1\right )}+\frac {2 x^2+1}{6 \left (x^4+x^2+1\right )^2}\right )+\frac {x \left (-\left (x^2 (d-2 f)\right )+d+f\right )}{12 \left (x^4+x^2+1\right )^2}\)

\(\Big \downarrow \) 1142

\(\displaystyle \frac {1}{12} \left (\frac {1}{2} \left (\frac {1}{2} \left (\frac {1}{2} (13 d+2 f) \int \frac {1}{x^2-x+1}dx-\frac {3}{2} (9 d-4 f) \int -\frac {1-2 x}{x^2-x+1}dx\right )+\frac {1}{2} \left (\frac {1}{2} (13 d+2 f) \int \frac {1}{x^2+x+1}dx+\frac {3}{2} (9 d-4 f) \int \frac {2 x+1}{x^2+x+1}dx\right )\right )+\frac {x \left (-7 x^2 (d-f)+2 d+3 f\right )}{2 \left (x^4+x^2+1\right )}\right )+\frac {1}{2} e \left (\frac {4 \arctan \left (\frac {2 x^2+1}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {2 x^2+1}{3 \left (x^4+x^2+1\right )}+\frac {2 x^2+1}{6 \left (x^4+x^2+1\right )^2}\right )+\frac {x \left (-\left (x^2 (d-2 f)\right )+d+f\right )}{12 \left (x^4+x^2+1\right )^2}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {1}{12} \left (\frac {1}{2} \left (\frac {1}{2} \left (\frac {1}{2} (13 d+2 f) \int \frac {1}{x^2-x+1}dx+\frac {3}{2} (9 d-4 f) \int \frac {1-2 x}{x^2-x+1}dx\right )+\frac {1}{2} \left (\frac {1}{2} (13 d+2 f) \int \frac {1}{x^2+x+1}dx+\frac {3}{2} (9 d-4 f) \int \frac {2 x+1}{x^2+x+1}dx\right )\right )+\frac {x \left (-7 x^2 (d-f)+2 d+3 f\right )}{2 \left (x^4+x^2+1\right )}\right )+\frac {1}{2} e \left (\frac {4 \arctan \left (\frac {2 x^2+1}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {2 x^2+1}{3 \left (x^4+x^2+1\right )}+\frac {2 x^2+1}{6 \left (x^4+x^2+1\right )^2}\right )+\frac {x \left (-\left (x^2 (d-2 f)\right )+d+f\right )}{12 \left (x^4+x^2+1\right )^2}\)

\(\Big \downarrow \) 1083

\(\displaystyle \frac {1}{12} \left (\frac {1}{2} \left (\frac {1}{2} \left (\frac {3}{2} (9 d-4 f) \int \frac {1-2 x}{x^2-x+1}dx-(13 d+2 f) \int \frac {1}{-(2 x-1)^2-3}d(2 x-1)\right )+\frac {1}{2} \left (\frac {3}{2} (9 d-4 f) \int \frac {2 x+1}{x^2+x+1}dx-(13 d+2 f) \int \frac {1}{-(2 x+1)^2-3}d(2 x+1)\right )\right )+\frac {x \left (-7 x^2 (d-f)+2 d+3 f\right )}{2 \left (x^4+x^2+1\right )}\right )+\frac {1}{2} e \left (\frac {4 \arctan \left (\frac {2 x^2+1}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {2 x^2+1}{3 \left (x^4+x^2+1\right )}+\frac {2 x^2+1}{6 \left (x^4+x^2+1\right )^2}\right )+\frac {x \left (-\left (x^2 (d-2 f)\right )+d+f\right )}{12 \left (x^4+x^2+1\right )^2}\)

\(\Big \downarrow \) 217

\(\displaystyle \frac {1}{12} \left (\frac {1}{2} \left (\frac {1}{2} \left (\frac {3}{2} (9 d-4 f) \int \frac {1-2 x}{x^2-x+1}dx+\frac {\arctan \left (\frac {2 x-1}{\sqrt {3}}\right ) (13 d+2 f)}{\sqrt {3}}\right )+\frac {1}{2} \left (\frac {3}{2} (9 d-4 f) \int \frac {2 x+1}{x^2+x+1}dx+\frac {\arctan \left (\frac {2 x+1}{\sqrt {3}}\right ) (13 d+2 f)}{\sqrt {3}}\right )\right )+\frac {x \left (-7 x^2 (d-f)+2 d+3 f\right )}{2 \left (x^4+x^2+1\right )}\right )+\frac {1}{2} e \left (\frac {4 \arctan \left (\frac {2 x^2+1}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {2 x^2+1}{3 \left (x^4+x^2+1\right )}+\frac {2 x^2+1}{6 \left (x^4+x^2+1\right )^2}\right )+\frac {x \left (-\left (x^2 (d-2 f)\right )+d+f\right )}{12 \left (x^4+x^2+1\right )^2}\)

\(\Big \downarrow \) 1103

\(\displaystyle \frac {1}{12} \left (\frac {1}{2} \left (\frac {1}{2} \left (\frac {\arctan \left (\frac {2 x-1}{\sqrt {3}}\right ) (13 d+2 f)}{\sqrt {3}}-\frac {3}{2} (9 d-4 f) \log \left (x^2-x+1\right )\right )+\frac {1}{2} \left (\frac {\arctan \left (\frac {2 x+1}{\sqrt {3}}\right ) (13 d+2 f)}{\sqrt {3}}+\frac {3}{2} (9 d-4 f) \log \left (x^2+x+1\right )\right )\right )+\frac {x \left (-7 x^2 (d-f)+2 d+3 f\right )}{2 \left (x^4+x^2+1\right )}\right )+\frac {1}{2} e \left (\frac {4 \arctan \left (\frac {2 x^2+1}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {2 x^2+1}{3 \left (x^4+x^2+1\right )}+\frac {2 x^2+1}{6 \left (x^4+x^2+1\right )^2}\right )+\frac {x \left (-\left (x^2 (d-2 f)\right )+d+f\right )}{12 \left (x^4+x^2+1\right )^2}\)

Input:

Int[(d + e*x + f*x^2)/(1 + x^2 + x^4)^3,x]
 

Output:

(x*(d + f - (d - 2*f)*x^2))/(12*(1 + x^2 + x^4)^2) + (e*((1 + 2*x^2)/(6*(1 
 + x^2 + x^4)^2) + (1 + 2*x^2)/(3*(1 + x^2 + x^4)) + (4*ArcTan[(1 + 2*x^2) 
/Sqrt[3]])/(3*Sqrt[3])))/2 + ((x*(2*d + 3*f - 7*(d - f)*x^2))/(2*(1 + x^2 
+ x^4)) + ((((13*d + 2*f)*ArcTan[(-1 + 2*x)/Sqrt[3]])/Sqrt[3] - (3*(9*d - 
4*f)*Log[1 - x + x^2])/2)/2 + (((13*d + 2*f)*ArcTan[(1 + 2*x)/Sqrt[3]])/Sq 
rt[3] + (3*(9*d - 4*f)*Log[1 + x + x^2])/2)/2)/2)/12
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 217
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 1083
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2   Subst[I 
nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, 
x]
 

rule 1086
Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(b + 2*c*x) 
*((a + b*x + c*x^2)^(p + 1)/((p + 1)*(b^2 - 4*a*c))), x] - Simp[2*c*((2*p + 
 3)/((p + 1)*(b^2 - 4*a*c)))   Int[(a + b*x + c*x^2)^(p + 1), x], x] /; Fre 
eQ[{a, b, c}, x] && ILtQ[p, -1]
 

rule 1103
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S 
imp[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 1142
Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S 
imp[(2*c*d - b*e)/(2*c)   Int[1/(a + b*x + c*x^2), x], x] + Simp[e/(2*c) 
Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x]
 

rule 1432
Int[(x_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Simp[1/2 
 Subst[Int[(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, p}, x]
 

rule 1483
Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] : 
> With[{q = Rt[a/c, 2]}, With[{r = Rt[2*q - b/c, 2]}, Simp[1/(2*c*q*r)   In 
t[(d*r - (d - e*q)*x)/(q - r*x + x^2), x], x] + Simp[1/(2*c*q*r)   Int[(d*r 
 + (d - e*q)*x)/(q + r*x + x^2), x], x]]] /; FreeQ[{a, b, c, d, e}, x] && N 
eQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && NegQ[b^2 - 4*a*c]
 

rule 1492
Int[((d_) + (e_.)*(x_)^2)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symb 
ol] :> Simp[x*(a*b*e - d*(b^2 - 2*a*c) - c*(b*d - 2*a*e)*x^2)*((a + b*x^2 + 
 c*x^4)^(p + 1)/(2*a*(p + 1)*(b^2 - 4*a*c))), x] + Simp[1/(2*a*(p + 1)*(b^2 
 - 4*a*c))   Int[Simp[(2*p + 3)*d*b^2 - a*b*e - 2*a*c*d*(4*p + 5) + (4*p + 
7)*(d*b - 2*a*e)*c*x^2, x]*(a + b*x^2 + c*x^4)^(p + 1), x], x] /; FreeQ[{a, 
 b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && 
 LtQ[p, -1] && IntegerQ[2*p]
 

rule 2202
Int[(Pn_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Module[{n 
 = Expon[Pn, x], k}, Int[Sum[Coeff[Pn, x, 2*k]*x^(2*k), {k, 0, n/2}]*(a + b 
*x^2 + c*x^4)^p, x] + Int[x*Sum[Coeff[Pn, x, 2*k + 1]*x^(2*k), {k, 0, (n - 
1)/2}]*(a + b*x^2 + c*x^4)^p, x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pn, x] 
 &&  !PolyQ[Pn, x^2]
 
Maple [A] (verified)

Time = 0.24 (sec) , antiderivative size = 202, normalized size of antiderivative = 0.98

method result size
default \(\frac {\left (-\frac {7 d}{3}+\frac {7 f}{3}-\frac {4 e}{3}\right ) x^{3}+\left (-6 d +4 f \right ) x^{2}+\left (-\frac {20 d}{3}+\frac {13 f}{3}+\frac {e}{3}\right ) x -4 d +\frac {4 f}{3}+2 e}{16 \left (x^{2}+x +1\right )^{2}}+\frac {\left (27 d -12 f \right ) \ln \left (x^{2}+x +1\right )}{96}+\frac {\left (\frac {13 d}{2}-16 e +f \right ) \arctan \left (\frac {\left (1+2 x \right ) \sqrt {3}}{3}\right ) \sqrt {3}}{72}-\frac {\left (\frac {7 d}{3}-\frac {7 f}{3}-\frac {4 e}{3}\right ) x^{3}+\left (-6 d +4 f \right ) x^{2}+\left (\frac {20 d}{3}-\frac {13 f}{3}+\frac {e}{3}\right ) x -4 d +\frac {4 f}{3}-2 e}{16 \left (x^{2}-x +1\right )^{2}}-\frac {\left (27 d -12 f \right ) \ln \left (x^{2}-x +1\right )}{96}-\frac {\left (-\frac {13 d}{2}-16 e -f \right ) \sqrt {3}\, \arctan \left (\frac {\left (2 x -1\right ) \sqrt {3}}{3}\right )}{72}\) \(202\)
risch \(\text {Expression too large to display}\) \(8277\)

Input:

int((f*x^2+e*x+d)/(x^4+x^2+1)^3,x,method=_RETURNVERBOSE)
 

Output:

1/16*((-7/3*d+7/3*f-4/3*e)*x^3+(-6*d+4*f)*x^2+(-20/3*d+13/3*f+1/3*e)*x-4*d 
+4/3*f+2*e)/(x^2+x+1)^2+1/96*(27*d-12*f)*ln(x^2+x+1)+1/72*(13/2*d-16*e+f)* 
arctan(1/3*(1+2*x)*3^(1/2))*3^(1/2)-1/16*((7/3*d-7/3*f-4/3*e)*x^3+(-6*d+4* 
f)*x^2+(20/3*d-13/3*f+1/3*e)*x-4*d+4/3*f-2*e)/(x^2-x+1)^2-1/96*(27*d-12*f) 
*ln(x^2-x+1)-1/72*(-13/2*d-16*e-f)*3^(1/2)*arctan(1/3*(2*x-1)*3^(1/2))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 384 vs. \(2 (184) = 368\).

Time = 0.13 (sec) , antiderivative size = 384, normalized size of antiderivative = 1.86 \[ \int \frac {d+e x+f x^2}{\left (1+x^2+x^4\right )^3} \, dx=-\frac {84 \, {\left (d - f\right )} x^{7} - 96 \, e x^{6} + 60 \, {\left (d - 2 \, f\right )} x^{5} - 144 \, e x^{4} + 84 \, {\left (d - 2 \, f\right )} x^{3} - 192 \, e x^{2} - 2 \, \sqrt {3} {\left ({\left (13 \, d - 32 \, e + 2 \, f\right )} x^{8} + 2 \, {\left (13 \, d - 32 \, e + 2 \, f\right )} x^{6} + 3 \, {\left (13 \, d - 32 \, e + 2 \, f\right )} x^{4} + 2 \, {\left (13 \, d - 32 \, e + 2 \, f\right )} x^{2} + 13 \, d - 32 \, e + 2 \, f\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) - 2 \, \sqrt {3} {\left ({\left (13 \, d + 32 \, e + 2 \, f\right )} x^{8} + 2 \, {\left (13 \, d + 32 \, e + 2 \, f\right )} x^{6} + 3 \, {\left (13 \, d + 32 \, e + 2 \, f\right )} x^{4} + 2 \, {\left (13 \, d + 32 \, e + 2 \, f\right )} x^{2} + 13 \, d + 32 \, e + 2 \, f\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) - 12 \, {\left (4 \, d + 5 \, f\right )} x - 9 \, {\left ({\left (9 \, d - 4 \, f\right )} x^{8} + 2 \, {\left (9 \, d - 4 \, f\right )} x^{6} + 3 \, {\left (9 \, d - 4 \, f\right )} x^{4} + 2 \, {\left (9 \, d - 4 \, f\right )} x^{2} + 9 \, d - 4 \, f\right )} \log \left (x^{2} + x + 1\right ) + 9 \, {\left ({\left (9 \, d - 4 \, f\right )} x^{8} + 2 \, {\left (9 \, d - 4 \, f\right )} x^{6} + 3 \, {\left (9 \, d - 4 \, f\right )} x^{4} + 2 \, {\left (9 \, d - 4 \, f\right )} x^{2} + 9 \, d - 4 \, f\right )} \log \left (x^{2} - x + 1\right ) - 72 \, e}{288 \, {\left (x^{8} + 2 \, x^{6} + 3 \, x^{4} + 2 \, x^{2} + 1\right )}} \] Input:

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

Output:

-1/288*(84*(d - f)*x^7 - 96*e*x^6 + 60*(d - 2*f)*x^5 - 144*e*x^4 + 84*(d - 
 2*f)*x^3 - 192*e*x^2 - 2*sqrt(3)*((13*d - 32*e + 2*f)*x^8 + 2*(13*d - 32* 
e + 2*f)*x^6 + 3*(13*d - 32*e + 2*f)*x^4 + 2*(13*d - 32*e + 2*f)*x^2 + 13* 
d - 32*e + 2*f)*arctan(1/3*sqrt(3)*(2*x + 1)) - 2*sqrt(3)*((13*d + 32*e + 
2*f)*x^8 + 2*(13*d + 32*e + 2*f)*x^6 + 3*(13*d + 32*e + 2*f)*x^4 + 2*(13*d 
 + 32*e + 2*f)*x^2 + 13*d + 32*e + 2*f)*arctan(1/3*sqrt(3)*(2*x - 1)) - 12 
*(4*d + 5*f)*x - 9*((9*d - 4*f)*x^8 + 2*(9*d - 4*f)*x^6 + 3*(9*d - 4*f)*x^ 
4 + 2*(9*d - 4*f)*x^2 + 9*d - 4*f)*log(x^2 + x + 1) + 9*((9*d - 4*f)*x^8 + 
 2*(9*d - 4*f)*x^6 + 3*(9*d - 4*f)*x^4 + 2*(9*d - 4*f)*x^2 + 9*d - 4*f)*lo 
g(x^2 - x + 1) - 72*e)/(x^8 + 2*x^6 + 3*x^4 + 2*x^2 + 1)
 

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 64.84 (sec) , antiderivative size = 4496, normalized size of antiderivative = 21.83 \[ \int \frac {d+e x+f x^2}{\left (1+x^2+x^4\right )^3} \, dx=\text {Too large to display} \] Input:

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

Output:

(-9*d/32 + f/8 - sqrt(3)*I*(13*d + 32*e + 2*f)/288)*log(x + (-1025428432*d 
**5*e - 334752912*d**5*(-9*d/32 + f/8 - sqrt(3)*I*(13*d + 32*e + 2*f)/288) 
 + 2008961360*d**4*e*f + 1151575920*d**4*f*(-9*d/32 + f/8 - sqrt(3)*I*(13* 
d + 32*e + 2*f)/288) - 431308800*d**3*e**3 - 3143688192*d**3*e**2*(-9*d/32 
 + f/8 - sqrt(3)*I*(13*d + 32*e + 2*f)/288) - 1598857120*d**3*e*f**2 + 991 
7005824*d**3*e*(-9*d/32 + f/8 - sqrt(3)*I*(13*d + 32*e + 2*f)/288)**2 - 94 
4300160*d**3*f**2*(-9*d/32 + f/8 - sqrt(3)*I*(13*d + 32*e + 2*f)/288) + 11 
878244352*d**3*(-9*d/32 + f/8 - sqrt(3)*I*(13*d + 32*e + 2*f)/288)**3 + 23 
3164800*d**2*e**3*f + 4409634816*d**2*e**2*f*(-9*d/32 + f/8 - sqrt(3)*I*(1 
3*d + 32*e + 2*f)/288) + 662937520*d**2*e*f**3 - 13004623872*d**2*e*f*(-9* 
d/32 + f/8 - sqrt(3)*I*(13*d + 32*e + 2*f)/288)**2 + 231796080*d**2*f**3*( 
-9*d/32 + f/8 - sqrt(3)*I*(13*d + 32*e + 2*f)/288) - 10089639936*d**2*f*(- 
9*d/32 + f/8 - sqrt(3)*I*(13*d + 32*e + 2*f)/288)**3 + 142606336*d*e**5 + 
754974720*d*e**4*(-9*d/32 + f/8 - sqrt(3)*I*(13*d + 32*e + 2*f)/288) - 184 
3200*d*e**3*f**2 + 3850371072*d*e**3*(-9*d/32 + f/8 - sqrt(3)*I*(13*d + 32 
*e + 2*f)/288)**2 - 1926291456*d*e**2*f**2*(-9*d/32 + f/8 - sqrt(3)*I*(13* 
d + 32*e + 2*f)/288) + 20384317440*d*e**2*(-9*d/32 + f/8 - sqrt(3)*I*(13*d 
 + 32*e + 2*f)/288)**3 - 146756960*d*e*f**4 + 5813379072*d*e*f**2*(-9*d/32 
 + f/8 - sqrt(3)*I*(13*d + 32*e + 2*f)/288)**2 + 12679200*d*f**4*(-9*d/32 
+ f/8 - sqrt(3)*I*(13*d + 32*e + 2*f)/288) + 1116758016*d*f**2*(-9*d/32...
 

Maxima [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 173, normalized size of antiderivative = 0.84 \[ \int \frac {d+e x+f x^2}{\left (1+x^2+x^4\right )^3} \, dx=\frac {1}{144} \, \sqrt {3} {\left (13 \, d - 32 \, e + 2 \, f\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + \frac {1}{144} \, \sqrt {3} {\left (13 \, d + 32 \, e + 2 \, f\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) + \frac {1}{32} \, {\left (9 \, d - 4 \, f\right )} \log \left (x^{2} + x + 1\right ) - \frac {1}{32} \, {\left (9 \, d - 4 \, f\right )} \log \left (x^{2} - x + 1\right ) - \frac {7 \, {\left (d - f\right )} x^{7} - 8 \, e x^{6} + 5 \, {\left (d - 2 \, f\right )} x^{5} - 12 \, e x^{4} + 7 \, {\left (d - 2 \, f\right )} x^{3} - 16 \, e x^{2} - {\left (4 \, d + 5 \, f\right )} x - 6 \, e}{24 \, {\left (x^{8} + 2 \, x^{6} + 3 \, x^{4} + 2 \, x^{2} + 1\right )}} \] Input:

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

Output:

1/144*sqrt(3)*(13*d - 32*e + 2*f)*arctan(1/3*sqrt(3)*(2*x + 1)) + 1/144*sq 
rt(3)*(13*d + 32*e + 2*f)*arctan(1/3*sqrt(3)*(2*x - 1)) + 1/32*(9*d - 4*f) 
*log(x^2 + x + 1) - 1/32*(9*d - 4*f)*log(x^2 - x + 1) - 1/24*(7*(d - f)*x^ 
7 - 8*e*x^6 + 5*(d - 2*f)*x^5 - 12*e*x^4 + 7*(d - 2*f)*x^3 - 16*e*x^2 - (4 
*d + 5*f)*x - 6*e)/(x^8 + 2*x^6 + 3*x^4 + 2*x^2 + 1)
 

Giac [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 165, normalized size of antiderivative = 0.80 \[ \int \frac {d+e x+f x^2}{\left (1+x^2+x^4\right )^3} \, dx=\frac {1}{144} \, \sqrt {3} {\left (13 \, d - 32 \, e + 2 \, f\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + \frac {1}{144} \, \sqrt {3} {\left (13 \, d + 32 \, e + 2 \, f\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) + \frac {1}{32} \, {\left (9 \, d - 4 \, f\right )} \log \left (x^{2} + x + 1\right ) - \frac {1}{32} \, {\left (9 \, d - 4 \, f\right )} \log \left (x^{2} - x + 1\right ) - \frac {7 \, d x^{7} - 7 \, f x^{7} - 8 \, e x^{6} + 5 \, d x^{5} - 10 \, f x^{5} - 12 \, e x^{4} + 7 \, d x^{3} - 14 \, f x^{3} - 16 \, e x^{2} - 4 \, d x - 5 \, f x - 6 \, e}{24 \, {\left (x^{4} + x^{2} + 1\right )}^{2}} \] Input:

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

Output:

1/144*sqrt(3)*(13*d - 32*e + 2*f)*arctan(1/3*sqrt(3)*(2*x + 1)) + 1/144*sq 
rt(3)*(13*d + 32*e + 2*f)*arctan(1/3*sqrt(3)*(2*x - 1)) + 1/32*(9*d - 4*f) 
*log(x^2 + x + 1) - 1/32*(9*d - 4*f)*log(x^2 - x + 1) - 1/24*(7*d*x^7 - 7* 
f*x^7 - 8*e*x^6 + 5*d*x^5 - 10*f*x^5 - 12*e*x^4 + 7*d*x^3 - 14*f*x^3 - 16* 
e*x^2 - 4*d*x - 5*f*x - 6*e)/(x^4 + x^2 + 1)^2
 

Mupad [B] (verification not implemented)

Time = 18.39 (sec) , antiderivative size = 249, normalized size of antiderivative = 1.21 \[ \int \frac {d+e x+f x^2}{\left (1+x^2+x^4\right )^3} \, dx=\frac {\left (\frac {7\,f}{24}-\frac {7\,d}{24}\right )\,x^7+\frac {e\,x^6}{3}+\left (\frac {5\,f}{12}-\frac {5\,d}{24}\right )\,x^5+\frac {e\,x^4}{2}+\left (\frac {7\,f}{12}-\frac {7\,d}{24}\right )\,x^3+\frac {2\,e\,x^2}{3}+\left (\frac {d}{6}+\frac {5\,f}{24}\right )\,x+\frac {e}{4}}{x^8+2\,x^6+3\,x^4+2\,x^2+1}-\ln \left (x-\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {9\,d}{32}-\frac {f}{8}+\frac {\sqrt {3}\,d\,13{}\mathrm {i}}{288}+\frac {\sqrt {3}\,e\,1{}\mathrm {i}}{9}+\frac {\sqrt {3}\,f\,1{}\mathrm {i}}{144}\right )-\ln \left (x+\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {f}{8}-\frac {9\,d}{32}+\frac {\sqrt {3}\,d\,13{}\mathrm {i}}{288}-\frac {\sqrt {3}\,e\,1{}\mathrm {i}}{9}+\frac {\sqrt {3}\,f\,1{}\mathrm {i}}{144}\right )+\ln \left (x-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {f}{8}-\frac {9\,d}{32}+\frac {\sqrt {3}\,d\,13{}\mathrm {i}}{288}+\frac {\sqrt {3}\,e\,1{}\mathrm {i}}{9}+\frac {\sqrt {3}\,f\,1{}\mathrm {i}}{144}\right )+\ln \left (x+\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {9\,d}{32}-\frac {f}{8}+\frac {\sqrt {3}\,d\,13{}\mathrm {i}}{288}-\frac {\sqrt {3}\,e\,1{}\mathrm {i}}{9}+\frac {\sqrt {3}\,f\,1{}\mathrm {i}}{144}\right ) \] Input:

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

Output:

(e/4 - x^5*((5*d)/24 - (5*f)/12) - x^3*((7*d)/24 - (7*f)/12) - x^7*((7*d)/ 
24 - (7*f)/24) + (2*e*x^2)/3 + (e*x^4)/2 + (e*x^6)/3 + x*(d/6 + (5*f)/24)) 
/(2*x^2 + 3*x^4 + 2*x^6 + x^8 + 1) - log(x - (3^(1/2)*1i)/2 - 1/2)*((9*d)/ 
32 - f/8 + (3^(1/2)*d*13i)/288 + (3^(1/2)*e*1i)/9 + (3^(1/2)*f*1i)/144) - 
log(x - (3^(1/2)*1i)/2 + 1/2)*(f/8 - (9*d)/32 + (3^(1/2)*d*13i)/288 - (3^( 
1/2)*e*1i)/9 + (3^(1/2)*f*1i)/144) + log(x + (3^(1/2)*1i)/2 - 1/2)*(f/8 - 
(9*d)/32 + (3^(1/2)*d*13i)/288 + (3^(1/2)*e*1i)/9 + (3^(1/2)*f*1i)/144) + 
log(x + (3^(1/2)*1i)/2 + 1/2)*((9*d)/32 - f/8 + (3^(1/2)*d*13i)/288 - (3^( 
1/2)*e*1i)/9 + (3^(1/2)*f*1i)/144)
 

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 905, normalized size of antiderivative = 4.39 \[ \int \frac {d+e x+f x^2}{\left (1+x^2+x^4\right )^3} \, dx =\text {Too large to display} \] Input:

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

Output:

(26*sqrt(3)*atan((2*x - 1)/sqrt(3))*d*x**8 + 52*sqrt(3)*atan((2*x - 1)/sqr 
t(3))*d*x**6 + 78*sqrt(3)*atan((2*x - 1)/sqrt(3))*d*x**4 + 52*sqrt(3)*atan 
((2*x - 1)/sqrt(3))*d*x**2 + 26*sqrt(3)*atan((2*x - 1)/sqrt(3))*d + 64*sqr 
t(3)*atan((2*x - 1)/sqrt(3))*e*x**8 + 128*sqrt(3)*atan((2*x - 1)/sqrt(3))* 
e*x**6 + 192*sqrt(3)*atan((2*x - 1)/sqrt(3))*e*x**4 + 128*sqrt(3)*atan((2* 
x - 1)/sqrt(3))*e*x**2 + 64*sqrt(3)*atan((2*x - 1)/sqrt(3))*e + 4*sqrt(3)* 
atan((2*x - 1)/sqrt(3))*f*x**8 + 8*sqrt(3)*atan((2*x - 1)/sqrt(3))*f*x**6 
+ 12*sqrt(3)*atan((2*x - 1)/sqrt(3))*f*x**4 + 8*sqrt(3)*atan((2*x - 1)/sqr 
t(3))*f*x**2 + 4*sqrt(3)*atan((2*x - 1)/sqrt(3))*f + 26*sqrt(3)*atan((2*x 
+ 1)/sqrt(3))*d*x**8 + 52*sqrt(3)*atan((2*x + 1)/sqrt(3))*d*x**6 + 78*sqrt 
(3)*atan((2*x + 1)/sqrt(3))*d*x**4 + 52*sqrt(3)*atan((2*x + 1)/sqrt(3))*d* 
x**2 + 26*sqrt(3)*atan((2*x + 1)/sqrt(3))*d - 64*sqrt(3)*atan((2*x + 1)/sq 
rt(3))*e*x**8 - 128*sqrt(3)*atan((2*x + 1)/sqrt(3))*e*x**6 - 192*sqrt(3)*a 
tan((2*x + 1)/sqrt(3))*e*x**4 - 128*sqrt(3)*atan((2*x + 1)/sqrt(3))*e*x**2 
 - 64*sqrt(3)*atan((2*x + 1)/sqrt(3))*e + 4*sqrt(3)*atan((2*x + 1)/sqrt(3) 
)*f*x**8 + 8*sqrt(3)*atan((2*x + 1)/sqrt(3))*f*x**6 + 12*sqrt(3)*atan((2*x 
 + 1)/sqrt(3))*f*x**4 + 8*sqrt(3)*atan((2*x + 1)/sqrt(3))*f*x**2 + 4*sqrt( 
3)*atan((2*x + 1)/sqrt(3))*f - 81*log(x**2 - x + 1)*d*x**8 - 162*log(x**2 
- x + 1)*d*x**6 - 243*log(x**2 - x + 1)*d*x**4 - 162*log(x**2 - x + 1)*d*x 
**2 - 81*log(x**2 - x + 1)*d + 36*log(x**2 - x + 1)*f*x**8 + 72*log(x**...