Integrand size = 26, antiderivative size = 103 \[ \int \frac {x^2}{a+8 x-8 x^2+4 x^3-x^4} \, dx=\frac {\arctan \left (\frac {1-x}{\sqrt {1-\sqrt {4+a}}}\right )}{2 \sqrt {1-\sqrt {4+a}}}+\frac {\arctan \left (\frac {1-x}{\sqrt {1+\sqrt {4+a}}}\right )}{2 \sqrt {1+\sqrt {4+a}}}+\frac {\text {arctanh}\left (\frac {1+(-1+x)^2}{\sqrt {4+a}}\right )}{\sqrt {4+a}} \] Output:
1/2*arctan((1-x)/(1-(4+a)^(1/2))^(1/2))/(1-(4+a)^(1/2))^(1/2)+1/2*arctan(( 1-x)/(1+(4+a)^(1/2))^(1/2))/(1+(4+a)^(1/2))^(1/2)+arctanh((1+(-1+x)^2)/(4+ a)^(1/2))/(4+a)^(1/2)
Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
Time = 0.04 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.59 \[ \int \frac {x^2}{a+8 x-8 x^2+4 x^3-x^4} \, dx=-\frac {1}{4} \text {RootSum}\left [a+8 \text {$\#$1}-8 \text {$\#$1}^2+4 \text {$\#$1}^3-\text {$\#$1}^4\&,\frac {\log (x-\text {$\#$1}) \text {$\#$1}^2}{-2+4 \text {$\#$1}-3 \text {$\#$1}^2+\text {$\#$1}^3}\&\right ] \] Input:
Integrate[x^2/(a + 8*x - 8*x^2 + 4*x^3 - x^4),x]
Output:
-1/4*RootSum[a + 8*#1 - 8*#1^2 + 4*#1^3 - #1^4 & , (Log[x - #1]*#1^2)/(-2 + 4*#1 - 3*#1^2 + #1^3) & ]
Time = 0.57 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.02, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.346, Rules used = {2459, 2006, 2202, 27, 1432, 1083, 219, 1480, 217}
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}{a-x^4+4 x^3-8 x^2+8 x} \, dx\) |
\(\Big \downarrow \) 2459 |
\(\displaystyle \int \frac {(x-1)^2+2 (x-1)+1}{a-(x-1)^4-2 (x-1)^2+3}d(x-1)\) |
\(\Big \downarrow \) 2006 |
\(\displaystyle \int \frac {x^2}{a-(x-1)^4-2 (x-1)^2+3}d(x-1)\) |
\(\Big \downarrow \) 2202 |
\(\displaystyle \int \frac {(x-1)^2+1}{-(x-1)^4-2 (x-1)^2+a+3}d(x-1)+\int \frac {2 (x-1)}{-(x-1)^4-2 (x-1)^2+a+3}d(x-1)\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \int \frac {(x-1)^2+1}{-(x-1)^4-2 (x-1)^2+a+3}d(x-1)+2 \int \frac {x-1}{-(x-1)^4-2 (x-1)^2+a+3}d(x-1)\) |
\(\Big \downarrow \) 1432 |
\(\displaystyle \int \frac {1}{-(x-1)^4-2 (x-1)^2+a+3}d(x-1)^2+\int \frac {(x-1)^2+1}{-(x-1)^4-2 (x-1)^2+a+3}d(x-1)\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \int \frac {(x-1)^2+1}{-(x-1)^4-2 (x-1)^2+a+3}d(x-1)-2 \int \frac {1}{4 (a+4)-(x-1)^4}d\left (-2 (x-1)^2-2\right )\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \int \frac {(x-1)^2+1}{-(x-1)^4-2 (x-1)^2+a+3}d(x-1)-\frac {\text {arctanh}\left (\frac {-2 (x-1)^2-2}{2 \sqrt {a+4}}\right )}{\sqrt {a+4}}\) |
\(\Big \downarrow \) 1480 |
\(\displaystyle \frac {1}{2} \int \frac {1}{-(x-1)^2-\sqrt {a+4}-1}d(x-1)+\frac {1}{2} \int \frac {1}{-(x-1)^2+\sqrt {a+4}-1}d(x-1)-\frac {\text {arctanh}\left (\frac {-2 (x-1)^2-2}{2 \sqrt {a+4}}\right )}{\sqrt {a+4}}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle -\frac {\arctan \left (\frac {x-1}{\sqrt {1-\sqrt {a+4}}}\right )}{2 \sqrt {1-\sqrt {a+4}}}-\frac {\arctan \left (\frac {x-1}{\sqrt {\sqrt {a+4}+1}}\right )}{2 \sqrt {\sqrt {a+4}+1}}-\frac {\text {arctanh}\left (\frac {-2 (x-1)^2-2}{2 \sqrt {a+4}}\right )}{\sqrt {a+4}}\) |
Input:
Int[x^2/(a + 8*x - 8*x^2 + 4*x^3 - x^4),x]
Output:
-1/2*ArcTan[(-1 + x)/Sqrt[1 - Sqrt[4 + a]]]/Sqrt[1 - Sqrt[4 + a]] - ArcTan [(-1 + x)/Sqrt[1 + Sqrt[4 + a]]]/(2*Sqrt[1 + Sqrt[4 + a]]) - ArcTanh[(-2 - 2*(-1 + x)^2)/(2*Sqrt[4 + a])]/Sqrt[4 + a]
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
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])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
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]
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]
Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] : > With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[(e/2 + (2*c*d - b*e)/(2*q)) Int[1/( b/2 - q/2 + c*x^2), x], x] + Simp[(e/2 - (2*c*d - b*e)/(2*q)) Int[1/(b/2 + q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - a*e^2, 0] && PosQ[b^2 - 4*a*c]
Int[(u_.)*(Px_), x_Symbol] :> With[{a = Rt[Coeff[Px, x, 0], Expon[Px, x]], b = Rt[Coeff[Px, x, Expon[Px, x]], Expon[Px, x]]}, Int[u*(a + b*x)^Expon[Px , x], x] /; EqQ[Px, (a + b*x)^Expon[Px, x]]] /; PolyQ[Px, x] && GtQ[Expon[P x, x], 1] && NeQ[Coeff[Px, x, 0], 0] && !MatchQ[Px, (a_.)*(v_)^Expon[Px, x ] /; FreeQ[a, x] && LinearQ[v, x]]
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]
Int[(Pn_)^(p_.)*(Qx_), x_Symbol] :> With[{S = Coeff[Pn, x, Expon[Pn, x] - 1 ]/(Expon[Pn, x]*Coeff[Pn, x, Expon[Pn, x]])}, Subst[Int[ExpandToSum[Pn /. x -> x - S, x]^p*ExpandToSum[Qx /. x -> x - S, x], x], x, x + S] /; Binomial Q[Pn /. x -> x - S, x] || (IntegerQ[Expon[Pn, x]/2] && TrinomialQ[Pn /. x - > x - S, x])] /; FreeQ[p, x] && PolyQ[Pn, x] && GtQ[Expon[Pn, x], 2] && NeQ [Coeff[Pn, x, Expon[Pn, x] - 1], 0] && PolyQ[Qx, x] && !(MonomialQ[Qx, x] && IGtQ[p, 0])
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.06 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.52
method | result | size |
default | \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{4}-4 \textit {\_Z}^{3}+8 \textit {\_Z}^{2}-8 \textit {\_Z} -a \right )}{\sum }\frac {\textit {\_R}^{2} \ln \left (x -\textit {\_R} \right )}{-\textit {\_R}^{3}+3 \textit {\_R}^{2}-4 \textit {\_R} +2}\right )}{4}\) | \(54\) |
risch | \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{4}-4 \textit {\_Z}^{3}+8 \textit {\_Z}^{2}-8 \textit {\_Z} -a \right )}{\sum }\frac {\textit {\_R}^{2} \ln \left (x -\textit {\_R} \right )}{-\textit {\_R}^{3}+3 \textit {\_R}^{2}-4 \textit {\_R} +2}\right )}{4}\) | \(54\) |
Input:
int(x^2/(-x^4+4*x^3-8*x^2+a+8*x),x,method=_RETURNVERBOSE)
Output:
1/4*sum(_R^2/(-_R^3+3*_R^2-4*_R+2)*ln(x-_R),_R=RootOf(_Z^4-4*_Z^3+8*_Z^2-8 *_Z-a))
Result contains complex when optimal does not.
Time = 18.26 (sec) , antiderivative size = 1515766, normalized size of antiderivative = 14716.17 \[ \int \frac {x^2}{a+8 x-8 x^2+4 x^3-x^4} \, dx=\text {Too large to display} \] Input:
integrate(x^2/(-x^4+4*x^3-8*x^2+a+8*x),x, algorithm="fricas")
Output:
Too large to include
Leaf count of result is larger than twice the leaf count of optimal. 172 vs. \(2 (82) = 164\).
Time = 4.21 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.67 \[ \int \frac {x^2}{a+8 x-8 x^2+4 x^3-x^4} \, dx=- \operatorname {RootSum} {\left (t^{4} \cdot \left (256 a^{3} + 2816 a^{2} + 10240 a + 12288\right ) + t^{2} \left (- 160 a^{2} - 1152 a - 2048\right ) + t \left (- 32 a^{2} - 256 a - 512\right ) - a^{2}, \left ( t \mapsto t \log {\left (x + \frac {- 64 t^{3} a^{4} - 448 t^{3} a^{3} - 256 t^{3} a^{2} + 3584 t^{3} a + 6144 t^{3} - 224 t^{2} a^{3} - 2208 t^{2} a^{2} - 7168 t^{2} a - 7680 t^{2} + 56 t a^{3} + 400 t a^{2} + 864 t a + 512 t + 5 a^{3} + 34 a^{2} + 56 a}{a^{3} + 60 a^{2} + 320 a + 448} \right )} \right )\right )} \] Input:
integrate(x**2/(-x**4+4*x**3-8*x**2+a+8*x),x)
Output:
-RootSum(_t**4*(256*a**3 + 2816*a**2 + 10240*a + 12288) + _t**2*(-160*a**2 - 1152*a - 2048) + _t*(-32*a**2 - 256*a - 512) - a**2, Lambda(_t, _t*log( x + (-64*_t**3*a**4 - 448*_t**3*a**3 - 256*_t**3*a**2 + 3584*_t**3*a + 614 4*_t**3 - 224*_t**2*a**3 - 2208*_t**2*a**2 - 7168*_t**2*a - 7680*_t**2 + 5 6*_t*a**3 + 400*_t*a**2 + 864*_t*a + 512*_t + 5*a**3 + 34*a**2 + 56*a)/(a* *3 + 60*a**2 + 320*a + 448))))
\[ \int \frac {x^2}{a+8 x-8 x^2+4 x^3-x^4} \, dx=\int { -\frac {x^{2}}{x^{4} - 4 \, x^{3} + 8 \, x^{2} - a - 8 \, x} \,d x } \] Input:
integrate(x^2/(-x^4+4*x^3-8*x^2+a+8*x),x, algorithm="maxima")
Output:
-integrate(x^2/(x^4 - 4*x^3 + 8*x^2 - a - 8*x), x)
\[ \int \frac {x^2}{a+8 x-8 x^2+4 x^3-x^4} \, dx=\int { -\frac {x^{2}}{x^{4} - 4 \, x^{3} + 8 \, x^{2} - a - 8 \, x} \,d x } \] Input:
integrate(x^2/(-x^4+4*x^3-8*x^2+a+8*x),x, algorithm="giac")
Output:
integrate(-x^2/(x^4 - 4*x^3 + 8*x^2 - a - 8*x), x)
Time = 22.43 (sec) , antiderivative size = 878, normalized size of antiderivative = 8.52 \[ \int \frac {x^2}{a+8 x-8 x^2+4 x^3-x^4} \, dx=\sum _{k=1}^4\ln \left (64\,\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )-a-8\,x+\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )\,a\,20-{\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )}^2\,a\,48+{\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )}^3\,a\,64+{\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )}^2\,x\,128-{\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )}^3\,x\,256-192\,{\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )}^2+256\,{\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )}^3-\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )\,a\,x\,4+{\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )}^2\,a\,x\,32-{\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )}^3\,a\,x\,64\right )\,\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right ) \] Input:
int(x^2/(a + 8*x - 8*x^2 + 4*x^3 - x^4),x)
Output:
symsum(log(64*root(2816*a^2*z^4 + 256*a^3*z^4 + 10240*a*z^4 + 12288*z^4 - 160*a^2*z^2 - 1152*a*z^2 - 2048*z^2 + 32*a^2*z + 256*a*z + 512*z - a^2, z, k) - a - 8*x + 20*root(2816*a^2*z^4 + 256*a^3*z^4 + 10240*a*z^4 + 12288*z ^4 - 160*a^2*z^2 - 1152*a*z^2 - 2048*z^2 + 32*a^2*z + 256*a*z + 512*z - a^ 2, z, k)*a - 48*root(2816*a^2*z^4 + 256*a^3*z^4 + 10240*a*z^4 + 12288*z^4 - 160*a^2*z^2 - 1152*a*z^2 - 2048*z^2 + 32*a^2*z + 256*a*z + 512*z - a^2, z, k)^2*a + 64*root(2816*a^2*z^4 + 256*a^3*z^4 + 10240*a*z^4 + 12288*z^4 - 160*a^2*z^2 - 1152*a*z^2 - 2048*z^2 + 32*a^2*z + 256*a*z + 512*z - a^2, z , k)^3*a + 128*root(2816*a^2*z^4 + 256*a^3*z^4 + 10240*a*z^4 + 12288*z^4 - 160*a^2*z^2 - 1152*a*z^2 - 2048*z^2 + 32*a^2*z + 256*a*z + 512*z - a^2, z , k)^2*x - 256*root(2816*a^2*z^4 + 256*a^3*z^4 + 10240*a*z^4 + 12288*z^4 - 160*a^2*z^2 - 1152*a*z^2 - 2048*z^2 + 32*a^2*z + 256*a*z + 512*z - a^2, z , k)^3*x - 192*root(2816*a^2*z^4 + 256*a^3*z^4 + 10240*a*z^4 + 12288*z^4 - 160*a^2*z^2 - 1152*a*z^2 - 2048*z^2 + 32*a^2*z + 256*a*z + 512*z - a^2, z , k)^2 + 256*root(2816*a^2*z^4 + 256*a^3*z^4 + 10240*a*z^4 + 12288*z^4 - 1 60*a^2*z^2 - 1152*a*z^2 - 2048*z^2 + 32*a^2*z + 256*a*z + 512*z - a^2, z, k)^3 - 4*root(2816*a^2*z^4 + 256*a^3*z^4 + 10240*a*z^4 + 12288*z^4 - 160*a ^2*z^2 - 1152*a*z^2 - 2048*z^2 + 32*a^2*z + 256*a*z + 512*z - a^2, z, k)*a *x + 32*root(2816*a^2*z^4 + 256*a^3*z^4 + 10240*a*z^4 + 12288*z^4 - 160*a^ 2*z^2 - 1152*a*z^2 - 2048*z^2 + 32*a^2*z + 256*a*z + 512*z - a^2, z, k)...
Time = 0.17 (sec) , antiderivative size = 415, normalized size of antiderivative = 4.03 \[ \int \frac {x^2}{a+8 x-8 x^2+4 x^3-x^4} \, dx=\frac {-2 \sqrt {a +4}\, \sqrt {\sqrt {a +4}+1}\, \mathit {atan} \left (\frac {x -1}{\sqrt {\sqrt {a +4}+1}}\right ) a -8 \sqrt {a +4}\, \sqrt {\sqrt {a +4}+1}\, \mathit {atan} \left (\frac {x -1}{\sqrt {\sqrt {a +4}+1}}\right )+2 \sqrt {\sqrt {a +4}+1}\, \mathit {atan} \left (\frac {x -1}{\sqrt {\sqrt {a +4}+1}}\right ) a +8 \sqrt {\sqrt {a +4}+1}\, \mathit {atan} \left (\frac {x -1}{\sqrt {\sqrt {a +4}+1}}\right )-\sqrt {a +4}\, \sqrt {\sqrt {a +4}-1}\, \mathrm {log}\left (\sqrt {\sqrt {a +4}-1}-x +1\right ) a -4 \sqrt {a +4}\, \sqrt {\sqrt {a +4}-1}\, \mathrm {log}\left (\sqrt {\sqrt {a +4}-1}-x +1\right )+\sqrt {a +4}\, \sqrt {\sqrt {a +4}-1}\, \mathrm {log}\left (\sqrt {\sqrt {a +4}-1}+x -1\right ) a +4 \sqrt {a +4}\, \sqrt {\sqrt {a +4}-1}\, \mathrm {log}\left (\sqrt {\sqrt {a +4}-1}+x -1\right )-\sqrt {\sqrt {a +4}-1}\, \mathrm {log}\left (\sqrt {\sqrt {a +4}-1}-x +1\right ) a -4 \sqrt {\sqrt {a +4}-1}\, \mathrm {log}\left (\sqrt {\sqrt {a +4}-1}-x +1\right )+\sqrt {\sqrt {a +4}-1}\, \mathrm {log}\left (\sqrt {\sqrt {a +4}-1}+x -1\right ) a +4 \sqrt {\sqrt {a +4}-1}\, \mathrm {log}\left (\sqrt {\sqrt {a +4}-1}+x -1\right )-2 \sqrt {a +4}\, \mathrm {log}\left (\sqrt {\sqrt {a +4}-1}-x +1\right ) a -6 \sqrt {a +4}\, \mathrm {log}\left (\sqrt {\sqrt {a +4}-1}-x +1\right )-2 \sqrt {a +4}\, \mathrm {log}\left (\sqrt {\sqrt {a +4}-1}+x -1\right ) a -6 \sqrt {a +4}\, \mathrm {log}\left (\sqrt {\sqrt {a +4}-1}+x -1\right )+2 \sqrt {a +4}\, \mathrm {log}\left (\sqrt {a +4}+x^{2}-2 x +2\right ) a +6 \sqrt {a +4}\, \mathrm {log}\left (\sqrt {a +4}+x^{2}-2 x +2\right )}{4 a^{2}+28 a +48} \] Input:
int(x^2/(-x^4+4*x^3-8*x^2+a+8*x),x)
Output:
( - 2*sqrt(a + 4)*sqrt(sqrt(a + 4) + 1)*atan((x - 1)/sqrt(sqrt(a + 4) + 1) )*a - 8*sqrt(a + 4)*sqrt(sqrt(a + 4) + 1)*atan((x - 1)/sqrt(sqrt(a + 4) + 1)) + 2*sqrt(sqrt(a + 4) + 1)*atan((x - 1)/sqrt(sqrt(a + 4) + 1))*a + 8*sq rt(sqrt(a + 4) + 1)*atan((x - 1)/sqrt(sqrt(a + 4) + 1)) - sqrt(a + 4)*sqrt (sqrt(a + 4) - 1)*log(sqrt(sqrt(a + 4) - 1) - x + 1)*a - 4*sqrt(a + 4)*sqr t(sqrt(a + 4) - 1)*log(sqrt(sqrt(a + 4) - 1) - x + 1) + sqrt(a + 4)*sqrt(s qrt(a + 4) - 1)*log(sqrt(sqrt(a + 4) - 1) + x - 1)*a + 4*sqrt(a + 4)*sqrt( sqrt(a + 4) - 1)*log(sqrt(sqrt(a + 4) - 1) + x - 1) - sqrt(sqrt(a + 4) - 1 )*log(sqrt(sqrt(a + 4) - 1) - x + 1)*a - 4*sqrt(sqrt(a + 4) - 1)*log(sqrt( sqrt(a + 4) - 1) - x + 1) + sqrt(sqrt(a + 4) - 1)*log(sqrt(sqrt(a + 4) - 1 ) + x - 1)*a + 4*sqrt(sqrt(a + 4) - 1)*log(sqrt(sqrt(a + 4) - 1) + x - 1) - 2*sqrt(a + 4)*log(sqrt(sqrt(a + 4) - 1) - x + 1)*a - 6*sqrt(a + 4)*log(s qrt(sqrt(a + 4) - 1) - x + 1) - 2*sqrt(a + 4)*log(sqrt(sqrt(a + 4) - 1) + x - 1)*a - 6*sqrt(a + 4)*log(sqrt(sqrt(a + 4) - 1) + x - 1) + 2*sqrt(a + 4 )*log(sqrt(a + 4) + x**2 - 2*x + 2)*a + 6*sqrt(a + 4)*log(sqrt(a + 4) + x* *2 - 2*x + 2))/(4*(a**2 + 7*a + 12))