\(\int \frac {d+e x+f x^2+g x^3+h x^4+j x^5+k x^6+l x^7+m x^8}{a+b x^2+c x^4} \, dx\) [52]

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

Optimal result

Integrand size = 55, antiderivative size = 545 \[ \int \frac {d+e x+f x^2+g x^3+h x^4+j x^5+k x^6+l x^7+m x^8}{a+b x^2+c x^4} \, dx=\frac {\left (c^2 h+b^2 m-c (b k+a m)\right ) x}{c^3}+\frac {(c j-b l) x^2}{2 c^2}+\frac {(c k-b m) x^3}{3 c^2}+\frac {l x^4}{4 c}+\frac {m x^5}{5 c}+\frac {\left (c^3 f-c^2 (b h+a k)-b^3 m+b c (b k+2 a m)+\frac {2 c^4 d-c^3 (b f+2 a h)+b^4 m-b^2 c (b k+4 a m)+c^2 \left (b^2 h+3 a b k+2 a^2 m\right )}{\sqrt {b^2-4 a c}}\right ) \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} c^{7/2} \sqrt {b-\sqrt {b^2-4 a c}}}+\frac {\left (c^3 f-c^2 (b h+a k)-b^3 m+b c (b k+2 a m)-\frac {2 c^4 d-c^3 (b f+2 a h)+b^4 m-b^2 c (b k+4 a m)+c^2 \left (b^2 h+3 a b k+2 a^2 m\right )}{\sqrt {b^2-4 a c}}\right ) \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b+\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} c^{7/2} \sqrt {b+\sqrt {b^2-4 a c}}}-\frac {\left (2 c^3 e-c^2 (b g+2 a j)-b^3 l+b c (b j+3 a l)\right ) \text {arctanh}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right )}{2 c^3 \sqrt {b^2-4 a c}}+\frac {\left (c^2 g+b^2 l-c (b j+a l)\right ) \log \left (a+b x^2+c x^4\right )}{4 c^3} \] Output:

(c^2*h+b^2*m-c*(a*m+b*k))*x/c^3+1/2*(-b*l+c*j)*x^2/c^2+1/3*(-b*m+c*k)*x^3/ 
c^2+1/4*l*x^4/c+1/5*m*x^5/c+1/2*(c^3*f-c^2*(a*k+b*h)-b^3*m+b*c*(2*a*m+b*k) 
+(2*c^4*d-c^3*(2*a*h+b*f)+b^4*m-b^2*c*(4*a*m+b*k)+c^2*(2*a^2*m+3*a*b*k+b^2 
*h))/(-4*a*c+b^2)^(1/2))*arctan(2^(1/2)*c^(1/2)*x/(b-(-4*a*c+b^2)^(1/2))^( 
1/2))*2^(1/2)/c^(7/2)/(b-(-4*a*c+b^2)^(1/2))^(1/2)+1/2*(c^3*f-c^2*(a*k+b*h 
)-b^3*m+b*c*(2*a*m+b*k)-(2*c^4*d-c^3*(2*a*h+b*f)+b^4*m-b^2*c*(4*a*m+b*k)+c 
^2*(2*a^2*m+3*a*b*k+b^2*h))/(-4*a*c+b^2)^(1/2))*arctan(2^(1/2)*c^(1/2)*x/( 
b+(-4*a*c+b^2)^(1/2))^(1/2))*2^(1/2)/c^(7/2)/(b+(-4*a*c+b^2)^(1/2))^(1/2)- 
1/2*(2*c^3*e-c^2*(2*a*j+b*g)-b^3*l+b*c*(3*a*l+b*j))*arctanh((2*c*x^2+b)/(- 
4*a*c+b^2)^(1/2))/c^3/(-4*a*c+b^2)^(1/2)+1/4*(c^2*g+b^2*l-c*(a*l+b*j))*ln( 
c*x^4+b*x^2+a)/c^3
 

Mathematica [A] (verified)

Time = 1.27 (sec) , antiderivative size = 816, normalized size of antiderivative = 1.50 \[ \int \frac {d+e x+f x^2+g x^3+h x^4+j x^5+k x^6+l x^7+m x^8}{a+b x^2+c x^4} \, dx=\frac {\left (c^2 h+b^2 m-c (b k+a m)\right ) x}{c^3}+\frac {(c j-b l) x^2}{2 c^2}+\frac {(c k-b m) x^3}{3 c^2}+\frac {l x^4}{4 c}+\frac {m x^5}{5 c}+\frac {\left (2 c^4 d+c^3 \left (-b f+\sqrt {b^2-4 a c} f-2 a h\right )+b^3 \left (b-\sqrt {b^2-4 a c}\right ) m+c^2 \left (b^2 h-b \sqrt {b^2-4 a c} h+3 a b k-a \sqrt {b^2-4 a c} k+2 a^2 m\right )+b c \left (-b^2 k+b \sqrt {b^2-4 a c} k-4 a b m+2 a \sqrt {b^2-4 a c} m\right )\right ) \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} c^{7/2} \sqrt {b^2-4 a c} \sqrt {b-\sqrt {b^2-4 a c}}}-\frac {\left (2 c^4 d-c^3 \left (b f+\sqrt {b^2-4 a c} f+2 a h\right )+b^3 \left (b+\sqrt {b^2-4 a c}\right ) m+c^2 \left (b^2 h+b \sqrt {b^2-4 a c} h+3 a b k+a \sqrt {b^2-4 a c} k+2 a^2 m\right )-b c \left (b^2 k+b \sqrt {b^2-4 a c} k+4 a b m+2 a \sqrt {b^2-4 a c} m\right )\right ) \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b+\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} c^{7/2} \sqrt {b^2-4 a c} \sqrt {b+\sqrt {b^2-4 a c}}}+\frac {\left (2 c^3 e+c^2 \left (-b g+\sqrt {b^2-4 a c} g-2 a j\right )+b^2 \left (-b+\sqrt {b^2-4 a c}\right ) l+c \left (b^2 j-b \sqrt {b^2-4 a c} j+3 a b l-a \sqrt {b^2-4 a c} l\right )\right ) \log \left (-b+\sqrt {b^2-4 a c}-2 c x^2\right )}{4 c^3 \sqrt {b^2-4 a c}}+\frac {\left (-2 c^3 e+c^2 \left (b g+\sqrt {b^2-4 a c} g+2 a j\right )+b^2 \left (b+\sqrt {b^2-4 a c}\right ) l-c \left (b^2 j+b \sqrt {b^2-4 a c} j+3 a b l+a \sqrt {b^2-4 a c} l\right )\right ) \log \left (b+\sqrt {b^2-4 a c}+2 c x^2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*a*c])*l + c*(b^2*j 
 - b*Sqrt[b^2 - 4*a*c]*j + 3*a*b*l - a*Sqrt[b^2 - 4*a*c]*l))*Log[-b + Sqrt 
[b^2 - 4*a*c] - 2*c*x^2])/(4*c^3*Sqrt[b^2 - 4*a*c]) + ((-2*c^3*e + c^2*(b* 
g + Sqrt[b^2 - 4*a*c]*g + 2*a*j) + b^2*(b + Sqrt[b^2 - 4*a*c])*l - c*(b^2* 
j + b*Sqrt[b^2 - 4*a*c]*j + 3*a*b*l + a*Sqrt[b^2 - 4*a*c]*l))*Log[b + Sqrt 
[b^2 - 4*a*c] + 2*c*x^2])/(4*c^3*Sqrt[b^2 - 4*a*c])
 

Rubi [A] (verified)

Time = 3.07 (sec) , antiderivative size = 545, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.109, Rules used = {2202, 2194, 2188, 2009, 2205, 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 {d+e x+f x^2+g x^3+h x^4+j x^5+k x^6+l x^7+m x^8}{a+b x^2+c x^4} \, dx\)

\(\Big \downarrow \) 2202

\(\displaystyle \int \frac {m x^8+k x^6+h x^4+f x^2+d}{c x^4+b x^2+a}dx+\int \frac {x \left (l x^6+j x^4+g x^2+e\right )}{c x^4+b x^2+a}dx\)

\(\Big \downarrow \) 2194

\(\displaystyle \int \frac {m x^8+k x^6+h x^4+f x^2+d}{c x^4+b x^2+a}dx+\frac {1}{2} \int \frac {l x^6+j x^4+g x^2+e}{c x^4+b x^2+a}dx^2\)

\(\Big \downarrow \) 2188

\(\displaystyle \frac {1}{2} \int \left (\frac {l x^2}{c}+\frac {c j-b l}{c^2}+\frac {e c^2-a j c+\left (l b^2+c^2 g-c (b j+a l)\right ) x^2+a b l}{c^2 \left (c x^4+b x^2+a\right )}\right )dx^2+\int \frac {m x^8+k x^6+h x^4+f x^2+d}{c x^4+b x^2+a}dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \int \frac {m x^8+k x^6+h x^4+f x^2+d}{c x^4+b x^2+a}dx+\frac {1}{2} \left (-\frac {\text {arctanh}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right ) \left (-c^2 (2 a j+b g)+b c (3 a l+b j)+b^3 (-l)+2 c^3 e\right )}{c^3 \sqrt {b^2-4 a c}}+\frac {\log \left (a+b x^2+c x^4\right ) \left (-c (a l+b j)+b^2 l+c^2 g\right )}{2 c^3}+\frac {x^2 (c j-b l)}{c^2}+\frac {l x^4}{2 c}\right )\)

\(\Big \downarrow \) 2205

\(\displaystyle \int \left (\frac {m x^4}{c}+\frac {(c k-b m) x^2}{c^2}+\frac {m b^2+c^2 h-c (b k+a m)}{c^3}+\frac {d c^3-a h c^2+a (b k+a m) c+\left (-m b^3+c (b k+2 a m) b+c^3 f-c^2 (b h+a k)\right ) x^2-a b^2 m}{c^3 \left (c x^4+b x^2+a\right )}\right )dx+\frac {1}{2} \left (-\frac {\text {arctanh}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right ) \left (-c^2 (2 a j+b g)+b c (3 a l+b j)+b^3 (-l)+2 c^3 e\right )}{c^3 \sqrt {b^2-4 a c}}+\frac {\log \left (a+b x^2+c x^4\right ) \left (-c (a l+b j)+b^2 l+c^2 g\right )}{2 c^3}+\frac {x^2 (c j-b l)}{c^2}+\frac {l x^4}{2 c}\right )\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b-\sqrt {b^2-4 a c}}}\right ) \left (\frac {c^2 \left (2 a^2 m+3 a b k+b^2 h\right )-b^2 c (4 a m+b k)-c^3 (2 a h+b f)+b^4 m+2 c^4 d}{\sqrt {b^2-4 a c}}-c^2 (a k+b h)+b c (2 a m+b k)+b^3 (-m)+c^3 f\right )}{\sqrt {2} c^{7/2} \sqrt {b-\sqrt {b^2-4 a c}}}+\frac {\arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {\sqrt {b^2-4 a c}+b}}\right ) \left (-\frac {c^2 \left (2 a^2 m+3 a b k+b^2 h\right )-b^2 c (4 a m+b k)-c^3 (2 a h+b f)+b^4 m+2 c^4 d}{\sqrt {b^2-4 a c}}-c^2 (a k+b h)+b c (2 a m+b k)+b^3 (-m)+c^3 f\right )}{\sqrt {2} c^{7/2} \sqrt {\sqrt {b^2-4 a c}+b}}+\frac {1}{2} \left (-\frac {\text {arctanh}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right ) \left (-c^2 (2 a j+b g)+b c (3 a l+b j)+b^3 (-l)+2 c^3 e\right )}{c^3 \sqrt {b^2-4 a c}}+\frac {\log \left (a+b x^2+c x^4\right ) \left (-c (a l+b j)+b^2 l+c^2 g\right )}{2 c^3}+\frac {x^2 (c j-b l)}{c^2}+\frac {l x^4}{2 c}\right )+\frac {x \left (-c (a m+b k)+b^2 m+c^2 h\right )}{c^3}+\frac {x^3 (c k-b m)}{3 c^2}+\frac {m x^5}{5 c}\)

Input:

Int[(d + e*x + f*x^2 + g*x^3 + h*x^4 + j*x^5 + k*x^6 + l*x^7 + m*x^8)/(a + 
 b*x^2 + c*x^4),x]
 

Output:

((c^2*h + b^2*m - c*(b*k + a*m))*x)/c^3 + ((c*k - b*m)*x^3)/(3*c^2) + (m*x 
^5)/(5*c) + ((c^3*f - c^2*(b*h + a*k) - b^3*m + b*c*(b*k + 2*a*m) + (2*c^4 
*d - c^3*(b*f + 2*a*h) + b^4*m - b^2*c*(b*k + 4*a*m) + c^2*(b^2*h + 3*a*b* 
k + 2*a^2*m))/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[ 
b^2 - 4*a*c]]])/(Sqrt[2]*c^(7/2)*Sqrt[b - Sqrt[b^2 - 4*a*c]]) + ((c^3*f - 
c^2*(b*h + a*k) - b^3*m + b*c*(b*k + 2*a*m) - (2*c^4*d - c^3*(b*f + 2*a*h) 
 + b^4*m - b^2*c*(b*k + 4*a*m) + c^2*(b^2*h + 3*a*b*k + 2*a^2*m))/Sqrt[b^2 
 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[ 
2]*c^(7/2)*Sqrt[b + Sqrt[b^2 - 4*a*c]]) + (((c*j - b*l)*x^2)/c^2 + (l*x^4) 
/(2*c) - ((2*c^3*e - c^2*(b*g + 2*a*j) - b^3*l + b*c*(b*j + 3*a*l))*ArcTan 
h[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(c^3*Sqrt[b^2 - 4*a*c]) + ((c^2*g + b^ 
2*l - c*(b*j + a*l))*Log[a + b*x^2 + c*x^4])/(2*c^3))/2
 

Defintions of rubi rules used

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

rule 2188
Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[Expand 
Integrand[Pq*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq 
, x] && IGtQ[p, -2]
 

rule 2194
Int[(Pq_)*(x_)^(m_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] : 
> Simp[1/2   Subst[Int[x^((m - 1)/2)*SubstFor[x^2, Pq, x]*(a + b*x + c*x^2) 
^p, x], x, x^2], x] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x^2] && IntegerQ 
[(m - 1)/2]
 

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]
 

rule 2205
Int[(Px_)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> Int[ExpandInte 
grand[Px/(a + b*x^2 + c*x^4), x], x] /; FreeQ[{a, b, c}, x] && PolyQ[Px, x^ 
2] && Expon[Px, x^2] > 1
 
Maple [C] (verified)

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

Time = 0.60 (sec) , antiderivative size = 246, normalized size of antiderivative = 0.45

method result size
risch \(\frac {m \,x^{5}}{5 c}+\frac {l \,x^{4}}{4 c}-\frac {b m \,x^{3}}{3 c^{2}}+\frac {k \,x^{3}}{3 c}-\frac {b l \,x^{2}}{2 c^{2}}+\frac {j \,x^{2}}{2 c}-\frac {x a m}{c^{2}}+\frac {x \,b^{2} m}{c^{3}}-\frac {x b k}{c^{2}}+\frac {h x}{c}+\frac {\munderset {\textit {\_R} =\operatorname {RootOf}\left (c \,\textit {\_Z}^{4}+\textit {\_Z}^{2} b +a \right )}{\sum }\frac {\left (c \left (-a c l +b^{2} l -b c j +c^{2} g \right ) \textit {\_R}^{3}+\left (2 a b c m -a \,c^{2} k -b^{3} m +b^{2} c k -b \,c^{2} h +c^{3} f \right ) \textit {\_R}^{2}+c \left (a b l -a c j +e \,c^{2}\right ) \textit {\_R} +a^{2} c m -a \,b^{2} m +a b c k -a \,c^{2} h +c^{3} d \right ) \ln \left (x -\textit {\_R} \right )}{2 \textit {\_R}^{3} c +\textit {\_R} b}}{2 c^{3}}\) \(246\)
default \(-\frac {-\frac {1}{5} m \,x^{5} c^{2}-\frac {1}{4} l \,x^{4} c^{2}+\frac {1}{3} b c m \,x^{3}-\frac {1}{3} c^{2} k \,x^{3}+\frac {1}{2} b c l \,x^{2}-\frac {1}{2} c^{2} j \,x^{2}+x a c m -x \,b^{2} m +x b c k -x \,c^{2} h}{c^{3}}+\frac {-\frac {\sqrt {-4 a c +b^{2}}\, \left (\frac {\left (-\sqrt {-4 a c +b^{2}}\, a \,c^{2} l +\sqrt {-4 a c +b^{2}}\, b^{2} c l -\sqrt {-4 a c +b^{2}}\, b \,c^{2} j +\sqrt {-4 a c +b^{2}}\, c^{3} g -3 a b \,c^{2} l +2 a \,c^{3} j +b^{3} c l -b^{2} c^{2} j +b \,c^{3} g -2 c^{4} e \right ) \ln \left (2 c \,x^{2}+\sqrt {-4 a c +b^{2}}+b \right )}{4 c}+\frac {\left (2 \sqrt {-4 a c +b^{2}}\, a b m c -c^{2} \sqrt {-4 a c +b^{2}}\, a k -\sqrt {-4 a c +b^{2}}\, b^{3} m +\sqrt {-4 a c +b^{2}}\, b^{2} k c -c^{2} \sqrt {-4 a c +b^{2}}\, b h +c^{3} \sqrt {-4 a c +b^{2}}\, f -2 a^{2} c^{2} m +4 a \,b^{2} m c -3 a b \,c^{2} k +2 a \,c^{3} h -b^{4} m +b^{3} k c -c^{2} b^{2} h +c^{3} b f -2 c^{4} d \right ) \sqrt {2}\, \arctan \left (\frac {c x \sqrt {2}}{\sqrt {\left (b +\sqrt {-4 a c +b^{2}}\right ) c}}\right )}{2 \sqrt {\left (b +\sqrt {-4 a c +b^{2}}\right ) c}}\right )}{c \left (4 a c -b^{2}\right )}-\frac {\sqrt {-4 a c +b^{2}}\, \left (-\frac {\left (\sqrt {-4 a c +b^{2}}\, a \,c^{2} l -\sqrt {-4 a c +b^{2}}\, b^{2} c l +\sqrt {-4 a c +b^{2}}\, b \,c^{2} j -\sqrt {-4 a c +b^{2}}\, c^{3} g -3 a b \,c^{2} l +2 a \,c^{3} j +b^{3} c l -b^{2} c^{2} j +b \,c^{3} g -2 c^{4} e \right ) \ln \left (-2 c \,x^{2}+\sqrt {-4 a c +b^{2}}-b \right )}{4 c}+\frac {\left (-2 \sqrt {-4 a c +b^{2}}\, a b m c +c^{2} \sqrt {-4 a c +b^{2}}\, a k +\sqrt {-4 a c +b^{2}}\, b^{3} m -\sqrt {-4 a c +b^{2}}\, b^{2} k c +c^{2} \sqrt {-4 a c +b^{2}}\, b h -c^{3} \sqrt {-4 a c +b^{2}}\, f -2 a^{2} c^{2} m +4 a \,b^{2} m c -3 a b \,c^{2} k +2 a \,c^{3} h -b^{4} m +b^{3} k c -c^{2} b^{2} h +c^{3} b f -2 c^{4} d \right ) \sqrt {2}\, \operatorname {arctanh}\left (\frac {c x \sqrt {2}}{\sqrt {\left (-b +\sqrt {-4 a c +b^{2}}\right ) c}}\right )}{2 \sqrt {\left (-b +\sqrt {-4 a c +b^{2}}\right ) c}}\right )}{c \left (4 a c -b^{2}\right )}}{c^{2}}\) \(829\)

Input:

int((m*x^8+l*x^7+k*x^6+j*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(c*x^4+b*x^2+a),x,me 
thod=_RETURNVERBOSE)
 

Output:

1/5*m*x^5/c+1/4*l*x^4/c-1/3/c^2*b*m*x^3+1/3/c*k*x^3-1/2/c^2*b*l*x^2+1/2/c* 
j*x^2-1/c^2*x*a*m+1/c^3*x*b^2*m-1/c^2*x*b*k+h*x/c+1/2/c^3*sum((c*(-a*c*l+b 
^2*l-b*c*j+c^2*g)*_R^3+(2*a*b*c*m-a*c^2*k-b^3*m+b^2*c*k-b*c^2*h+c^3*f)*_R^ 
2+c*(a*b*l-a*c*j+c^2*e)*_R+a^2*c*m-a*b^2*m+a*b*c*k-a*c^2*h+c^3*d)/(2*_R^3* 
c+_R*b)*ln(x-_R),_R=RootOf(_Z^4*c+_Z^2*b+a))
 

Fricas [F(-1)]

Timed out. \[ \int \frac {d+e x+f x^2+g x^3+h x^4+j x^5+k x^6+l x^7+m x^8}{a+b x^2+c x^4} \, dx=\text {Timed out} \] Input:

integrate((m*x^8+l*x^7+k*x^6+j*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(c*x^4+b*x^2+a 
),x, algorithm="fricas")
 

Output:

Timed out
                                                                                    
                                                                                    
 

Sympy [F(-1)]

Timed out. \[ \int \frac {d+e x+f x^2+g x^3+h x^4+j x^5+k x^6+l x^7+m x^8}{a+b x^2+c x^4} \, dx=\text {Timed out} \] Input:

integrate((m*x**8+l*x**7+k*x**6+j*x**5+h*x**4+g*x**3+f*x**2+e*x+d)/(c*x**4 
+b*x**2+a),x)
 

Output:

Timed out
 

Maxima [F]

\[ \int \frac {d+e x+f x^2+g x^3+h x^4+j x^5+k x^6+l x^7+m x^8}{a+b x^2+c x^4} \, dx=\int { \frac {m x^{8} + l x^{7} + k x^{6} + j x^{5} + h x^{4} + g x^{3} + f x^{2} + e x + d}{c x^{4} + b x^{2} + a} \,d x } \] Input:

integrate((m*x^8+l*x^7+k*x^6+j*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(c*x^4+b*x^2+a 
),x, algorithm="maxima")
 

Output:

1/60*(12*c^2*m*x^5 + 15*c^2*l*x^4 + 20*(c^2*k - b*c*m)*x^3 + 30*(c^2*j - b 
*c*l)*x^2 + 60*(c^2*h - b*c*k + (b^2 - a*c)*m)*x)/c^3 - integrate(-(c^3*d 
- a*c^2*h + a*b*c*k + (c^3*g - b*c^2*j + (b^2*c - a*c^2)*l)*x^3 + (c^3*f - 
 b*c^2*h + (b^2*c - a*c^2)*k - (b^3 - 2*a*b*c)*m)*x^2 - (a*b^2 - a^2*c)*m 
+ (c^3*e - a*c^2*j + a*b*c*l)*x)/(c*x^4 + b*x^2 + a), x)/c^3
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 11830 vs. \(2 (495) = 990\).

Time = 1.35 (sec) , antiderivative size = 11830, normalized size of antiderivative = 21.71 \[ \int \frac {d+e x+f x^2+g x^3+h x^4+j x^5+k x^6+l x^7+m x^8}{a+b x^2+c x^4} \, dx=\text {Too large to display} \] Input:

integrate((m*x^8+l*x^7+k*x^6+j*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(c*x^4+b*x^2+a 
),x, algorithm="giac")
 

Output:

-1/8*((2*b^4*c^5 - 16*a*b^2*c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qrt(2)*sqrt(b^2 - 4*a*c)*sqrt(b*c + sqrt(b^2 - 4*a 
*c)*c)*a*b*c^5 - 2*(b^2 - 4*a*c)*b^3*c^4 + 8*(b^2 - 4*a*c)*a*b*c^5)*c^2*h 
+ (2*b^6*c^3 - 18*a*b^4*c^4 + 48*a^2*b^2*c^5 - 32*a^3*c^6 - sqrt(2)*sqrt(b 
^2 - 4*a*c)*sqrt(b*c + sqrt(b^2 - 4*a*c)*c)*b^6*c + 9*sqrt(2)*sqrt(b^2 - 4 
*a*c)*sqrt(b*c + sqrt(b^2 - 4*a*c)*c)*a*b^4*c^2 + 2*sqrt(2)*sqrt(b^2 - 4*a 
*c)*sqrt(b*c + sqrt(b^2 - 4*a*c)*c)*b^5*c^2 - 24*sqrt(2)*sqrt(b^2 - 4*a...
 

Mupad [B] (verification not implemented)

Time = 23.35 (sec) , antiderivative size = 49150, normalized size of antiderivative = 90.18 \[ \int \frac {d+e x+f x^2+g x^3+h x^4+j x^5+k x^6+l x^7+m x^8}{a+b x^2+c x^4} \, dx=\text {Too large to display} \] Input:

int((d + e*x + f*x^2 + g*x^3 + h*x^4 + j*x^5 + k*x^6 + l*x^7 + m*x^8)/(a + 
 b*x^2 + c*x^4),x)
 

Output:

x^2*(j/(2*c) - (b*l)/(2*c^2)) - x*((b*(k/c - (b*m)/c^2))/c - h/c + (a*m)/c 
^2) + x^3*(k/(3*c) - (b*m)/(3*c^2)) + symsum(log((c^7*d*e^2 - a*c^6*f^3 - 
c^7*d^2*f + b^7*d*m^2 + a^4*c^3*k^3 + a^4*b^3*m^3 + a^2*b*c^4*h^3 + b^2*c^ 
5*d*g^2 + b^3*c^4*d*h^2 + a^2*c^5*d*j^2 - a^2*c^5*f*h^2 + a^2*c^5*g^2*h + 
b^4*c^3*d*j^2 - a^3*c^4*d*l^2 - b^2*c^5*d^2*k + b^5*c^2*d*k^2 + 3*a^2*c^5* 
f^2*k - 3*a^3*c^4*f*k^2 + a^2*c^5*e^2*m - a^3*c^4*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^2...
 

Reduce [B] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 4445, normalized size of antiderivative = 8.16 \[ \int \frac {d+e x+f x^2+g x^3+h x^4+j x^5+k x^6+l x^7+m x^8}{a+b x^2+c x^4} \, dx =\text {Too large to display} \] Input:

int((m*x^8+l*x^7+k*x^6+j*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(c*x^4+b*x^2+a),x)
 

Output:

( - 90*sqrt(2*sqrt(c)*sqrt(a) + b)*sqrt(2*sqrt(c)*sqrt(a) - b)*atan((sqrt( 
2*sqrt(c)*sqrt(a) - b) - 2*sqrt(c)*x)/sqrt(2*sqrt(c)*sqrt(a) + b))*a**2*b* 
c**2*l + 60*sqrt(2*sqrt(c)*sqrt(a) + b)*sqrt(2*sqrt(c)*sqrt(a) - b)*atan(( 
sqrt(2*sqrt(c)*sqrt(a) - b) - 2*sqrt(c)*x)/sqrt(2*sqrt(c)*sqrt(a) + b))*a* 
*2*c**3*j + 30*sqrt(2*sqrt(c)*sqrt(a) + b)*sqrt(2*sqrt(c)*sqrt(a) - b)*ata 
n((sqrt(2*sqrt(c)*sqrt(a) - b) - 2*sqrt(c)*x)/sqrt(2*sqrt(c)*sqrt(a) + b)) 
*a*b**3*c*l - 30*sqrt(2*sqrt(c)*sqrt(a) + b)*sqrt(2*sqrt(c)*sqrt(a) - b)*a 
tan((sqrt(2*sqrt(c)*sqrt(a) - b) - 2*sqrt(c)*x)/sqrt(2*sqrt(c)*sqrt(a) + b 
))*a*b**2*c**2*j + 30*sqrt(2*sqrt(c)*sqrt(a) + b)*sqrt(2*sqrt(c)*sqrt(a) - 
 b)*atan((sqrt(2*sqrt(c)*sqrt(a) - b) - 2*sqrt(c)*x)/sqrt(2*sqrt(c)*sqrt(a 
) + b))*a*b*c**3*g - 60*sqrt(2*sqrt(c)*sqrt(a) + b)*sqrt(2*sqrt(c)*sqrt(a) 
 - b)*atan((sqrt(2*sqrt(c)*sqrt(a) - b) - 2*sqrt(c)*x)/sqrt(2*sqrt(c)*sqrt 
(a) + b))*a*c**4*e - 90*sqrt(a)*sqrt(2*sqrt(c)*sqrt(a) + b)*atan((sqrt(2*s 
qrt(c)*sqrt(a) - b) - 2*sqrt(c)*x)/sqrt(2*sqrt(c)*sqrt(a) + b))*a**2*b*c** 
2*m + 60*sqrt(a)*sqrt(2*sqrt(c)*sqrt(a) + b)*atan((sqrt(2*sqrt(c)*sqrt(a) 
- b) - 2*sqrt(c)*x)/sqrt(2*sqrt(c)*sqrt(a) + b))*a**2*c**3*k + 30*sqrt(a)* 
sqrt(2*sqrt(c)*sqrt(a) + b)*atan((sqrt(2*sqrt(c)*sqrt(a) - b) - 2*sqrt(c)* 
x)/sqrt(2*sqrt(c)*sqrt(a) + b))*a*b**3*c*m - 30*sqrt(a)*sqrt(2*sqrt(c)*sqr 
t(a) + b)*atan((sqrt(2*sqrt(c)*sqrt(a) - b) - 2*sqrt(c)*x)/sqrt(2*sqrt(c)* 
sqrt(a) + b))*a*b**2*c**2*k + 30*sqrt(a)*sqrt(2*sqrt(c)*sqrt(a) + b)*at...