Integrand size = 25, antiderivative size = 209 \[ \int \frac {a+b x+c x^2}{d+e x^2+f x^4} \, dx=\frac {\left (c-\frac {c e-2 a f}{\sqrt {e^2-4 d f}}\right ) \arctan \left (\frac {\sqrt {2} \sqrt {f} x}{\sqrt {e-\sqrt {e^2-4 d f}}}\right )}{\sqrt {2} \sqrt {f} \sqrt {e-\sqrt {e^2-4 d f}}}+\frac {\left (c+\frac {c e-2 a f}{\sqrt {e^2-4 d f}}\right ) \arctan \left (\frac {\sqrt {2} \sqrt {f} x}{\sqrt {e+\sqrt {e^2-4 d f}}}\right )}{\sqrt {2} \sqrt {f} \sqrt {e+\sqrt {e^2-4 d f}}}-\frac {b \text {arctanh}\left (\frac {e+2 f x^2}{\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}} \]
-b*arctanh((2*f*x^2+e)/(-4*d*f+e^2)^(1/2))/(-4*d*f+e^2)^(1/2)+1/2*arctan(x *2^(1/2)*f^(1/2)/(e-(-4*d*f+e^2)^(1/2))^(1/2))*(c+(2*a*f-c*e)/(-4*d*f+e^2) ^(1/2))*2^(1/2)/f^(1/2)/(e-(-4*d*f+e^2)^(1/2))^(1/2)+1/2*arctan(x*2^(1/2)* f^(1/2)/(e+(-4*d*f+e^2)^(1/2))^(1/2))*(c+(-2*a*f+c*e)/(-4*d*f+e^2)^(1/2))* 2^(1/2)/f^(1/2)/(e+(-4*d*f+e^2)^(1/2))^(1/2)
Time = 0.15 (sec) , antiderivative size = 234, normalized size of antiderivative = 1.12 \[ \int \frac {a+b x+c x^2}{d+e x^2+f x^4} \, dx=\frac {\frac {\sqrt {2} \left (2 a f+c \left (-e+\sqrt {e^2-4 d f}\right )\right ) \arctan \left (\frac {\sqrt {2} \sqrt {f} x}{\sqrt {e-\sqrt {e^2-4 d f}}}\right )}{\sqrt {f} \sqrt {e-\sqrt {e^2-4 d f}}}+\frac {\sqrt {2} \left (-2 a f+c \left (e+\sqrt {e^2-4 d f}\right )\right ) \arctan \left (\frac {\sqrt {2} \sqrt {f} x}{\sqrt {e+\sqrt {e^2-4 d f}}}\right )}{\sqrt {f} \sqrt {e+\sqrt {e^2-4 d f}}}+b \log \left (-e+\sqrt {e^2-4 d f}-2 f x^2\right )-b \log \left (e+\sqrt {e^2-4 d f}+2 f x^2\right )}{2 \sqrt {e^2-4 d f}} \]
((Sqrt[2]*(2*a*f + c*(-e + Sqrt[e^2 - 4*d*f]))*ArcTan[(Sqrt[2]*Sqrt[f]*x)/ Sqrt[e - Sqrt[e^2 - 4*d*f]]])/(Sqrt[f]*Sqrt[e - Sqrt[e^2 - 4*d*f]]) + (Sqr t[2]*(-2*a*f + c*(e + Sqrt[e^2 - 4*d*f]))*ArcTan[(Sqrt[2]*Sqrt[f]*x)/Sqrt[ e + Sqrt[e^2 - 4*d*f]]])/(Sqrt[f]*Sqrt[e + Sqrt[e^2 - 4*d*f]]) + b*Log[-e + Sqrt[e^2 - 4*d*f] - 2*f*x^2] - b*Log[e + Sqrt[e^2 - 4*d*f] + 2*f*x^2])/( 2*Sqrt[e^2 - 4*d*f])
Time = 0.48 (sec) , antiderivative size = 209, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {2202, 27, 1432, 1083, 219, 1480, 218}
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 {a+b x+c x^2}{d+e x^2+f x^4} \, dx\) |
\(\Big \downarrow \) 2202 |
\(\displaystyle \int \frac {c x^2+a}{f x^4+e x^2+d}dx+\int \frac {b x}{f x^4+e x^2+d}dx\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \int \frac {c x^2+a}{f x^4+e x^2+d}dx+b \int \frac {x}{f x^4+e x^2+d}dx\) |
\(\Big \downarrow \) 1432 |
\(\displaystyle \int \frac {c x^2+a}{f x^4+e x^2+d}dx+\frac {1}{2} b \int \frac {1}{f x^4+e x^2+d}dx^2\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \int \frac {c x^2+a}{f x^4+e x^2+d}dx-b \int \frac {1}{-x^4+e^2-4 d f}d\left (2 f x^2+e\right )\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \int \frac {c x^2+a}{f x^4+e x^2+d}dx-\frac {b \text {arctanh}\left (\frac {e+2 f x^2}{\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}\) |
\(\Big \downarrow \) 1480 |
\(\displaystyle \frac {1}{2} \left (c-\frac {c e-2 a f}{\sqrt {e^2-4 d f}}\right ) \int \frac {1}{f x^2+\frac {1}{2} \left (e-\sqrt {e^2-4 d f}\right )}dx+\frac {1}{2} \left (\frac {c e-2 a f}{\sqrt {e^2-4 d f}}+c\right ) \int \frac {1}{f x^2+\frac {1}{2} \left (e+\sqrt {e^2-4 d f}\right )}dx-\frac {b \text {arctanh}\left (\frac {e+2 f x^2}{\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {\left (c-\frac {c e-2 a f}{\sqrt {e^2-4 d f}}\right ) \arctan \left (\frac {\sqrt {2} \sqrt {f} x}{\sqrt {e-\sqrt {e^2-4 d f}}}\right )}{\sqrt {2} \sqrt {f} \sqrt {e-\sqrt {e^2-4 d f}}}+\frac {\left (\frac {c e-2 a f}{\sqrt {e^2-4 d f}}+c\right ) \arctan \left (\frac {\sqrt {2} \sqrt {f} x}{\sqrt {\sqrt {e^2-4 d f}+e}}\right )}{\sqrt {2} \sqrt {f} \sqrt {\sqrt {e^2-4 d f}+e}}-\frac {b \text {arctanh}\left (\frac {e+2 f x^2}{\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}\) |
((c - (c*e - 2*a*f)/Sqrt[e^2 - 4*d*f])*ArcTan[(Sqrt[2]*Sqrt[f]*x)/Sqrt[e - Sqrt[e^2 - 4*d*f]]])/(Sqrt[2]*Sqrt[f]*Sqrt[e - Sqrt[e^2 - 4*d*f]]) + ((c + (c*e - 2*a*f)/Sqrt[e^2 - 4*d*f])*ArcTan[(Sqrt[2]*Sqrt[f]*x)/Sqrt[e + Sqr t[e^2 - 4*d*f]]])/(Sqrt[2]*Sqrt[f]*Sqrt[e + Sqrt[e^2 - 4*d*f]]) - (b*ArcTa nh[(e + 2*f*x^2)/Sqrt[e^2 - 4*d*f]])/Sqrt[e^2 - 4*d*f]
3.4.37.3.1 Defintions of rubi rules used
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/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
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[(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]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.15 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.23
method | result | size |
risch | \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (f \,\textit {\_Z}^{4}+e \,\textit {\_Z}^{2}+d \right )}{\sum }\frac {\left (c \,\textit {\_R}^{2}+b \textit {\_R} +a \right ) \ln \left (x -\textit {\_R} \right )}{2 \textit {\_R}^{3} f +\textit {\_R} e}\right )}{2}\) | \(48\) |
default | \(4 f \left (-\frac {\sqrt {-4 d f +e^{2}}\, \left (\frac {b \ln \left (-2 f \,x^{2}+\sqrt {-4 d f +e^{2}}-e \right )}{2}+\frac {\left (-\sqrt {-4 d f +e^{2}}\, c -2 a f +e c \right ) \sqrt {2}\, \operatorname {arctanh}\left (\frac {f x \sqrt {2}}{\sqrt {\left (\sqrt {-4 d f +e^{2}}-e \right ) f}}\right )}{2 \sqrt {\left (\sqrt {-4 d f +e^{2}}-e \right ) f}}\right )}{4 f \left (4 d f -e^{2}\right )}-\frac {\sqrt {-4 d f +e^{2}}\, \left (-\frac {b \ln \left (2 f \,x^{2}+\sqrt {-4 d f +e^{2}}+e \right )}{2}+\frac {\left (\sqrt {-4 d f +e^{2}}\, c -2 a f +e c \right ) \sqrt {2}\, \arctan \left (\frac {f x \sqrt {2}}{\sqrt {\left (e +\sqrt {-4 d f +e^{2}}\right ) f}}\right )}{2 \sqrt {\left (e +\sqrt {-4 d f +e^{2}}\right ) f}}\right )}{4 f \left (4 d f -e^{2}\right )}\right )\) | \(240\) |
Result contains complex when optimal does not.
Time = 29.02 (sec) , antiderivative size = 578003, normalized size of antiderivative = 2765.56 \[ \int \frac {a+b x+c x^2}{d+e x^2+f x^4} \, dx=\text {Too large to display} \]
Timed out. \[ \int \frac {a+b x+c x^2}{d+e x^2+f x^4} \, dx=\text {Timed out} \]
\[ \int \frac {a+b x+c x^2}{d+e x^2+f x^4} \, dx=\int { \frac {c x^{2} + b x + a}{f x^{4} + e x^{2} + d} \,d x } \]
Leaf count of result is larger than twice the leaf count of optimal. 1714 vs. \(2 (171) = 342\).
Time = 1.12 (sec) , antiderivative size = 1714, normalized size of antiderivative = 8.20 \[ \int \frac {a+b x+c x^2}{d+e x^2+f x^4} \, dx=\text {Too large to display} \]
-1/2*(e^2*f^2 - 4*d*f^3 - 2*e*f^3 + f^4)*sqrt(e^2 - 4*d*f)*b*log(x^2 + 1/2 *(e - sqrt(e^2 - 4*d*f))/f)/((e^4 - 8*d*e^2*f - 2*e^3*f + 16*d^2*f^2 + 8*d *e*f^2 + e^2*f^2 - 4*d*f^3)*f^2) + 1/4*((sqrt(2)*sqrt(e*f + sqrt(e^2 - 4*d *f)*f)*e^4 - 8*sqrt(2)*sqrt(e*f + sqrt(e^2 - 4*d*f)*f)*d*e^2*f - 2*sqrt(2) *sqrt(e*f + sqrt(e^2 - 4*d*f)*f)*e^3*f - 2*e^4*f + 16*sqrt(2)*sqrt(e*f + s qrt(e^2 - 4*d*f)*f)*d^2*f^2 + 8*sqrt(2)*sqrt(e*f + sqrt(e^2 - 4*d*f)*f)*d* e*f^2 + sqrt(2)*sqrt(e*f + sqrt(e^2 - 4*d*f)*f)*e^2*f^2 + 16*d*e^2*f^2 + 2 *e^3*f^2 - 4*sqrt(2)*sqrt(e*f + sqrt(e^2 - 4*d*f)*f)*d*f^3 - 32*d^2*f^3 - 8*d*e*f^3 - sqrt(2)*sqrt(e^2 - 4*d*f)*sqrt(e*f + sqrt(e^2 - 4*d*f)*f)*e^3 + 4*sqrt(2)*sqrt(e^2 - 4*d*f)*sqrt(e*f + sqrt(e^2 - 4*d*f)*f)*d*e*f + 2*sq rt(2)*sqrt(e^2 - 4*d*f)*sqrt(e*f + sqrt(e^2 - 4*d*f)*f)*e^2*f - sqrt(2)*sq rt(e^2 - 4*d*f)*sqrt(e*f + sqrt(e^2 - 4*d*f)*f)*e*f^2 + 2*(e^2 - 4*d*f)*e^ 2*f - 8*(e^2 - 4*d*f)*d*f^2 - 2*(e^2 - 4*d*f)*e*f^2)*a - 2*(2*d*e^2*f^2 - 8*d^2*f^3 - sqrt(2)*sqrt(e^2 - 4*d*f)*sqrt(e*f + sqrt(e^2 - 4*d*f)*f)*d*e^ 2 + 4*sqrt(2)*sqrt(e^2 - 4*d*f)*sqrt(e*f + sqrt(e^2 - 4*d*f)*f)*d^2*f + 2* sqrt(2)*sqrt(e^2 - 4*d*f)*sqrt(e*f + sqrt(e^2 - 4*d*f)*f)*d*e*f - sqrt(2)* sqrt(e^2 - 4*d*f)*sqrt(e*f + sqrt(e^2 - 4*d*f)*f)*d*f^2 - 2*(e^2 - 4*d*f)* d*f^2)*c)*arctan(2*sqrt(1/2)*x/sqrt((e + sqrt(e^2 - 4*d*f))/f))/((d*e^4 - 8*d^2*e^2*f - 2*d*e^3*f + 16*d^3*f^2 + 8*d^2*e*f^2 + d*e^2*f^2 - 4*d^2*f^3 )*abs(f)) + 1/4*((sqrt(2)*sqrt(e*f - sqrt(e^2 - 4*d*f)*f)*e^4 - 8*sqrt(...
Time = 10.02 (sec) , antiderivative size = 3942, normalized size of antiderivative = 18.86 \[ \int \frac {a+b x+c x^2}{d+e x^2+f x^4} \, dx=\text {Too large to display} \]
symsum(log(a*b^2*f^2 - a^2*c*f^2 + b^3*f^2*x - c^3*d*f - 8*root(16*d*e^4*f *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