Integrand size = 18, antiderivative size = 222 \[ \int \frac {x^2}{a+f x^2+c x^4} \, dx=-\frac {\arctan \left (\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f}-2 \sqrt {c} x}{\sqrt {2 \sqrt {a} \sqrt {c}+f}}\right )}{2 \sqrt {c} \sqrt {2 \sqrt {a} \sqrt {c}+f}}+\frac {\arctan \left (\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f}+2 \sqrt {c} x}{\sqrt {2 \sqrt {a} \sqrt {c}+f}}\right )}{2 \sqrt {c} \sqrt {2 \sqrt {a} \sqrt {c}+f}}-\frac {\text {arctanh}\left (\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} x}{\sqrt {a}+\sqrt {c} x^2}\right )}{2 \sqrt {c} \sqrt {2 \sqrt {a} \sqrt {c}-f}} \] Output:
-1/2*arctan(((2*a^(1/2)*c^(1/2)-f)^(1/2)-2*c^(1/2)*x)/(2*a^(1/2)*c^(1/2)+f )^(1/2))/c^(1/2)/(2*a^(1/2)*c^(1/2)+f)^(1/2)+1/2*arctan(((2*a^(1/2)*c^(1/2 )-f)^(1/2)+2*c^(1/2)*x)/(2*a^(1/2)*c^(1/2)+f)^(1/2))/c^(1/2)/(2*a^(1/2)*c^ (1/2)+f)^(1/2)-1/2*arctanh((2*a^(1/2)*c^(1/2)-f)^(1/2)*x/(a^(1/2)+c^(1/2)* x^2))/c^(1/2)/(2*a^(1/2)*c^(1/2)-f)^(1/2)
Time = 0.06 (sec) , antiderivative size = 165, normalized size of antiderivative = 0.74 \[ \int \frac {x^2}{a+f x^2+c x^4} \, dx=\frac {\left (-f+\sqrt {-4 a c+f^2}\right ) \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {f-\sqrt {-4 a c+f^2}}}\right )}{\sqrt {2} \sqrt {c} \sqrt {-4 a c+f^2} \sqrt {f-\sqrt {-4 a c+f^2}}}+\frac {\sqrt {f+\sqrt {-4 a c+f^2}} \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {f+\sqrt {-4 a c+f^2}}}\right )}{\sqrt {2} \sqrt {c} \sqrt {-4 a c+f^2}} \] Input:
Integrate[x^2/(a + f*x^2 + c*x^4),x]
Output:
((-f + Sqrt[-4*a*c + f^2])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[f - Sqrt[-4*a*c + f^2]]])/(Sqrt[2]*Sqrt[c]*Sqrt[-4*a*c + f^2]*Sqrt[f - Sqrt[-4*a*c + f^2] ]) + (Sqrt[f + Sqrt[-4*a*c + f^2]]*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[f + Sqr t[-4*a*c + f^2]]])/(Sqrt[2]*Sqrt[c]*Sqrt[-4*a*c + f^2])
Time = 0.83 (sec) , antiderivative size = 336, normalized size of antiderivative = 1.51, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.389, Rules used = {1449, 1142, 25, 27, 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 {x^2}{a+c x^4+f x^2} \, dx\) |
\(\Big \downarrow \) 1449 |
\(\displaystyle \frac {\int \frac {x}{x^2-\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} x}{\sqrt {c}}+\frac {\sqrt {a}}{\sqrt {c}}}dx}{2 \sqrt {c} \sqrt {2 \sqrt {a} \sqrt {c}-f}}-\frac {\int \frac {x}{x^2+\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} x}{\sqrt {c}}+\frac {\sqrt {a}}{\sqrt {c}}}dx}{2 \sqrt {c} \sqrt {2 \sqrt {a} \sqrt {c}-f}}\) |
\(\Big \downarrow \) 1142 |
\(\displaystyle \frac {\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} \int \frac {1}{x^2-\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} x}{\sqrt {c}}+\frac {\sqrt {a}}{\sqrt {c}}}dx}{2 \sqrt {c}}+\frac {1}{2} \int -\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f}-2 \sqrt {c} x}{\sqrt {c} \left (x^2-\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} x}{\sqrt {c}}+\frac {\sqrt {a}}{\sqrt {c}}\right )}dx}{2 \sqrt {c} \sqrt {2 \sqrt {a} \sqrt {c}-f}}-\frac {\frac {1}{2} \int \frac {2 \sqrt {c} x+\sqrt {2 \sqrt {a} \sqrt {c}-f}}{\sqrt {c} \left (x^2+\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} x}{\sqrt {c}}+\frac {\sqrt {a}}{\sqrt {c}}\right )}dx-\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} \int \frac {1}{x^2+\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} x}{\sqrt {c}}+\frac {\sqrt {a}}{\sqrt {c}}}dx}{2 \sqrt {c}}}{2 \sqrt {c} \sqrt {2 \sqrt {a} \sqrt {c}-f}}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} \int \frac {1}{x^2-\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} x}{\sqrt {c}}+\frac {\sqrt {a}}{\sqrt {c}}}dx}{2 \sqrt {c}}-\frac {1}{2} \int \frac {\sqrt {2 \sqrt {a} \sqrt {c}-f}-2 \sqrt {c} x}{\sqrt {c} \left (x^2-\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} x}{\sqrt {c}}+\frac {\sqrt {a}}{\sqrt {c}}\right )}dx}{2 \sqrt {c} \sqrt {2 \sqrt {a} \sqrt {c}-f}}-\frac {\frac {1}{2} \int \frac {2 \sqrt {c} x+\sqrt {2 \sqrt {a} \sqrt {c}-f}}{\sqrt {c} \left (x^2+\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} x}{\sqrt {c}}+\frac {\sqrt {a}}{\sqrt {c}}\right )}dx-\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} \int \frac {1}{x^2+\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} x}{\sqrt {c}}+\frac {\sqrt {a}}{\sqrt {c}}}dx}{2 \sqrt {c}}}{2 \sqrt {c} \sqrt {2 \sqrt {a} \sqrt {c}-f}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} \int \frac {1}{x^2-\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} x}{\sqrt {c}}+\frac {\sqrt {a}}{\sqrt {c}}}dx}{2 \sqrt {c}}-\frac {\int \frac {\sqrt {2 \sqrt {a} \sqrt {c}-f}-2 \sqrt {c} x}{x^2-\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} x}{\sqrt {c}}+\frac {\sqrt {a}}{\sqrt {c}}}dx}{2 \sqrt {c}}}{2 \sqrt {c} \sqrt {2 \sqrt {a} \sqrt {c}-f}}-\frac {\frac {\int \frac {2 \sqrt {c} x+\sqrt {2 \sqrt {a} \sqrt {c}-f}}{x^2+\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} x}{\sqrt {c}}+\frac {\sqrt {a}}{\sqrt {c}}}dx}{2 \sqrt {c}}-\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} \int \frac {1}{x^2+\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} x}{\sqrt {c}}+\frac {\sqrt {a}}{\sqrt {c}}}dx}{2 \sqrt {c}}}{2 \sqrt {c} \sqrt {2 \sqrt {a} \sqrt {c}-f}}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \frac {-\frac {\int \frac {\sqrt {2 \sqrt {a} \sqrt {c}-f}-2 \sqrt {c} x}{x^2-\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} x}{\sqrt {c}}+\frac {\sqrt {a}}{\sqrt {c}}}dx}{2 \sqrt {c}}-\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} \int \frac {1}{-\left (2 x-\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f}}{\sqrt {c}}\right )^2-\frac {f+2 \sqrt {a} \sqrt {c}}{c}}d\left (2 x-\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f}}{\sqrt {c}}\right )}{\sqrt {c}}}{2 \sqrt {c} \sqrt {2 \sqrt {a} \sqrt {c}-f}}-\frac {\frac {\int \frac {2 \sqrt {c} x+\sqrt {2 \sqrt {a} \sqrt {c}-f}}{x^2+\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} x}{\sqrt {c}}+\frac {\sqrt {a}}{\sqrt {c}}}dx}{2 \sqrt {c}}+\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} \int \frac {1}{-\left (2 x+\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f}}{\sqrt {c}}\right )^2-\frac {f+2 \sqrt {a} \sqrt {c}}{c}}d\left (2 x+\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f}}{\sqrt {c}}\right )}{\sqrt {c}}}{2 \sqrt {c} \sqrt {2 \sqrt {a} \sqrt {c}-f}}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} \arctan \left (\frac {\sqrt {c} \left (2 x-\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f}}{\sqrt {c}}\right )}{\sqrt {2 \sqrt {a} \sqrt {c}+f}}\right )}{\sqrt {2 \sqrt {a} \sqrt {c}+f}}-\frac {\int \frac {\sqrt {2 \sqrt {a} \sqrt {c}-f}-2 \sqrt {c} x}{x^2-\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} x}{\sqrt {c}}+\frac {\sqrt {a}}{\sqrt {c}}}dx}{2 \sqrt {c}}}{2 \sqrt {c} \sqrt {2 \sqrt {a} \sqrt {c}-f}}-\frac {\frac {\int \frac {2 \sqrt {c} x+\sqrt {2 \sqrt {a} \sqrt {c}-f}}{x^2+\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} x}{\sqrt {c}}+\frac {\sqrt {a}}{\sqrt {c}}}dx}{2 \sqrt {c}}-\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} \arctan \left (\frac {\sqrt {c} \left (\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f}}{\sqrt {c}}+2 x\right )}{\sqrt {2 \sqrt {a} \sqrt {c}+f}}\right )}{\sqrt {2 \sqrt {a} \sqrt {c}+f}}}{2 \sqrt {c} \sqrt {2 \sqrt {a} \sqrt {c}-f}}\) |
\(\Big \downarrow \) 1103 |
\(\displaystyle \frac {\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} \arctan \left (\frac {\sqrt {c} \left (2 x-\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f}}{\sqrt {c}}\right )}{\sqrt {2 \sqrt {a} \sqrt {c}+f}}\right )}{\sqrt {2 \sqrt {a} \sqrt {c}+f}}+\frac {1}{2} \log \left (-x \sqrt {2 \sqrt {a} \sqrt {c}-f}+\sqrt {a}+\sqrt {c} x^2\right )}{2 \sqrt {c} \sqrt {2 \sqrt {a} \sqrt {c}-f}}-\frac {\frac {1}{2} \log \left (x \sqrt {2 \sqrt {a} \sqrt {c}-f}+\sqrt {a}+\sqrt {c} x^2\right )-\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f} \arctan \left (\frac {\sqrt {c} \left (\frac {\sqrt {2 \sqrt {a} \sqrt {c}-f}}{\sqrt {c}}+2 x\right )}{\sqrt {2 \sqrt {a} \sqrt {c}+f}}\right )}{\sqrt {2 \sqrt {a} \sqrt {c}+f}}}{2 \sqrt {c} \sqrt {2 \sqrt {a} \sqrt {c}-f}}\) |
Input:
Int[x^2/(a + f*x^2 + c*x^4),x]
Output:
((Sqrt[2*Sqrt[a]*Sqrt[c] - f]*ArcTan[(Sqrt[c]*(-(Sqrt[2*Sqrt[a]*Sqrt[c] - f]/Sqrt[c]) + 2*x))/Sqrt[2*Sqrt[a]*Sqrt[c] + f]])/Sqrt[2*Sqrt[a]*Sqrt[c] + f] + Log[Sqrt[a] - Sqrt[2*Sqrt[a]*Sqrt[c] - f]*x + Sqrt[c]*x^2]/2)/(2*Sqr t[c]*Sqrt[2*Sqrt[a]*Sqrt[c] - f]) - (-((Sqrt[2*Sqrt[a]*Sqrt[c] - f]*ArcTan [(Sqrt[c]*(Sqrt[2*Sqrt[a]*Sqrt[c] - f]/Sqrt[c] + 2*x))/Sqrt[2*Sqrt[a]*Sqrt [c] + f]])/Sqrt[2*Sqrt[a]*Sqrt[c] + f]) + Log[Sqrt[a] + Sqrt[2*Sqrt[a]*Sqr t[c] - f]*x + Sqrt[c]*x^2]/2)/(2*Sqrt[c]*Sqrt[2*Sqrt[a]*Sqrt[c] - f])
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_) + (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[((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]
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]
Int[(x_)^(m_)/((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*r) Int[x^(m - 1)/(q - r*x + x^2), x], x] - Simp[1/(2*c*r) Int[x^(m - 1)/(q + r*x + x^2), x], x]]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && GeQ[m, 1] && LtQ[m, 3] && NegQ[b^2 - 4*a*c]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.09 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.18
method | result | size |
risch | \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{4} c +f \,\textit {\_Z}^{2}+a \right )}{\sum }\frac {\textit {\_R}^{2} \ln \left (x -\textit {\_R} \right )}{2 \textit {\_R}^{3} c +\textit {\_R} f}\right )}{2}\) | \(41\) |
default | \(4 c \left (\frac {\left (\sqrt {-4 a c +f^{2}}+f \right ) \sqrt {2}\, \arctan \left (\frac {c x \sqrt {2}}{\sqrt {\left (\sqrt {-4 a c +f^{2}}+f \right ) c}}\right )}{8 c \sqrt {-4 a c +f^{2}}\, \sqrt {\left (\sqrt {-4 a c +f^{2}}+f \right ) c}}-\frac {\left (\sqrt {-4 a c +f^{2}}-f \right ) \sqrt {2}\, \operatorname {arctanh}\left (\frac {c x \sqrt {2}}{\sqrt {\left (\sqrt {-4 a c +f^{2}}-f \right ) c}}\right )}{8 c \sqrt {-4 a c +f^{2}}\, \sqrt {\left (\sqrt {-4 a c +f^{2}}-f \right ) c}}\right )\) | \(149\) |
Input:
int(x^2/(c*x^4+f*x^2+a),x,method=_RETURNVERBOSE)
Output:
1/2*sum(_R^2/(2*_R^3*c+_R*f)*ln(x-_R),_R=RootOf(_Z^4*c+_Z^2*f+a))
Leaf count of result is larger than twice the leaf count of optimal. 639 vs. \(2 (157) = 314\).
Time = 0.09 (sec) , antiderivative size = 639, normalized size of antiderivative = 2.88 \[ \int \frac {x^2}{a+f x^2+c x^4} \, dx=\frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {\frac {{\left (4 \, a c^{2} - c f^{2}\right )} \sqrt {-\frac {1}{4 \, a c^{3} - c^{2} f^{2}}} + f}{4 \, a c^{2} - c f^{2}}} \log \left (\sqrt {\frac {1}{2}} {\left (4 \, a c^{2} - c f^{2}\right )} \sqrt {\frac {{\left (4 \, a c^{2} - c f^{2}\right )} \sqrt {-\frac {1}{4 \, a c^{3} - c^{2} f^{2}}} + f}{4 \, a c^{2} - c f^{2}}} \sqrt {-\frac {1}{4 \, a c^{3} - c^{2} f^{2}}} + x\right ) - \frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {\frac {{\left (4 \, a c^{2} - c f^{2}\right )} \sqrt {-\frac {1}{4 \, a c^{3} - c^{2} f^{2}}} + f}{4 \, a c^{2} - c f^{2}}} \log \left (-\sqrt {\frac {1}{2}} {\left (4 \, a c^{2} - c f^{2}\right )} \sqrt {\frac {{\left (4 \, a c^{2} - c f^{2}\right )} \sqrt {-\frac {1}{4 \, a c^{3} - c^{2} f^{2}}} + f}{4 \, a c^{2} - c f^{2}}} \sqrt {-\frac {1}{4 \, a c^{3} - c^{2} f^{2}}} + x\right ) - \frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {-\frac {{\left (4 \, a c^{2} - c f^{2}\right )} \sqrt {-\frac {1}{4 \, a c^{3} - c^{2} f^{2}}} - f}{4 \, a c^{2} - c f^{2}}} \log \left (\sqrt {\frac {1}{2}} {\left (4 \, a c^{2} - c f^{2}\right )} \sqrt {-\frac {{\left (4 \, a c^{2} - c f^{2}\right )} \sqrt {-\frac {1}{4 \, a c^{3} - c^{2} f^{2}}} - f}{4 \, a c^{2} - c f^{2}}} \sqrt {-\frac {1}{4 \, a c^{3} - c^{2} f^{2}}} + x\right ) + \frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {-\frac {{\left (4 \, a c^{2} - c f^{2}\right )} \sqrt {-\frac {1}{4 \, a c^{3} - c^{2} f^{2}}} - f}{4 \, a c^{2} - c f^{2}}} \log \left (-\sqrt {\frac {1}{2}} {\left (4 \, a c^{2} - c f^{2}\right )} \sqrt {-\frac {{\left (4 \, a c^{2} - c f^{2}\right )} \sqrt {-\frac {1}{4 \, a c^{3} - c^{2} f^{2}}} - f}{4 \, a c^{2} - c f^{2}}} \sqrt {-\frac {1}{4 \, a c^{3} - c^{2} f^{2}}} + x\right ) \] Input:
integrate(x^2/(c*x^4+f*x^2+a),x, algorithm="fricas")
Output:
1/2*sqrt(1/2)*sqrt(((4*a*c^2 - c*f^2)*sqrt(-1/(4*a*c^3 - c^2*f^2)) + f)/(4 *a*c^2 - c*f^2))*log(sqrt(1/2)*(4*a*c^2 - c*f^2)*sqrt(((4*a*c^2 - c*f^2)*s qrt(-1/(4*a*c^3 - c^2*f^2)) + f)/(4*a*c^2 - c*f^2))*sqrt(-1/(4*a*c^3 - c^2 *f^2)) + x) - 1/2*sqrt(1/2)*sqrt(((4*a*c^2 - c*f^2)*sqrt(-1/(4*a*c^3 - c^2 *f^2)) + f)/(4*a*c^2 - c*f^2))*log(-sqrt(1/2)*(4*a*c^2 - c*f^2)*sqrt(((4*a *c^2 - c*f^2)*sqrt(-1/(4*a*c^3 - c^2*f^2)) + f)/(4*a*c^2 - c*f^2))*sqrt(-1 /(4*a*c^3 - c^2*f^2)) + x) - 1/2*sqrt(1/2)*sqrt(-((4*a*c^2 - c*f^2)*sqrt(- 1/(4*a*c^3 - c^2*f^2)) - f)/(4*a*c^2 - c*f^2))*log(sqrt(1/2)*(4*a*c^2 - c* f^2)*sqrt(-((4*a*c^2 - c*f^2)*sqrt(-1/(4*a*c^3 - c^2*f^2)) - f)/(4*a*c^2 - c*f^2))*sqrt(-1/(4*a*c^3 - c^2*f^2)) + x) + 1/2*sqrt(1/2)*sqrt(-((4*a*c^2 - c*f^2)*sqrt(-1/(4*a*c^3 - c^2*f^2)) - f)/(4*a*c^2 - c*f^2))*log(-sqrt(1 /2)*(4*a*c^2 - c*f^2)*sqrt(-((4*a*c^2 - c*f^2)*sqrt(-1/(4*a*c^3 - c^2*f^2) ) - f)/(4*a*c^2 - c*f^2))*sqrt(-1/(4*a*c^3 - c^2*f^2)) + x)
Time = 0.37 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.34 \[ \int \frac {x^2}{a+f x^2+c x^4} \, dx=\operatorname {RootSum} {\left (t^{4} \cdot \left (256 a^{2} c^{3} - 128 a c^{2} f^{2} + 16 c f^{4}\right ) + t^{2} \left (- 16 a c f + 4 f^{3}\right ) + a, \left ( t \mapsto t \log {\left (64 t^{3} a c^{2} - 16 t^{3} c f^{2} - 2 t f + x \right )} \right )\right )} \] Input:
integrate(x**2/(c*x**4+f*x**2+a),x)
Output:
RootSum(_t**4*(256*a**2*c**3 - 128*a*c**2*f**2 + 16*c*f**4) + _t**2*(-16*a *c*f + 4*f**3) + a, Lambda(_t, _t*log(64*_t**3*a*c**2 - 16*_t**3*c*f**2 - 2*_t*f + x)))
\[ \int \frac {x^2}{a+f x^2+c x^4} \, dx=\int { \frac {x^{2}}{c x^{4} + f x^{2} + a} \,d x } \] Input:
integrate(x^2/(c*x^4+f*x^2+a),x, algorithm="maxima")
Output:
integrate(x^2/(c*x^4 + f*x^2 + a), x)
Leaf count of result is larger than twice the leaf count of optimal. 503 vs. \(2 (157) = 314\).
Time = 0.68 (sec) , antiderivative size = 503, normalized size of antiderivative = 2.27 \[ \int \frac {x^2}{a+f x^2+c x^4} \, dx=\frac {{\left (8 \, a c^{3} - 2 \, c^{2} f^{2} - 4 \, \sqrt {2} \sqrt {-4 \, a c + f^{2}} \sqrt {c f + \sqrt {-4 \, a c + f^{2}} c} a c + \sqrt {2} \sqrt {-4 \, a c + f^{2}} \sqrt {c f + \sqrt {-4 \, a c + f^{2}} c} c^{2} - 2 \, \sqrt {2} \sqrt {-4 \, a c + f^{2}} \sqrt {c f + \sqrt {-4 \, a c + f^{2}} c} c f + \sqrt {2} \sqrt {-4 \, a c + f^{2}} \sqrt {c f + \sqrt {-4 \, a c + f^{2}} c} f^{2} - 2 \, {\left (4 \, a c - f^{2}\right )} c^{2}\right )} \arctan \left (\frac {2 \, \sqrt {\frac {1}{2}} x}{\sqrt {\frac {f + \sqrt {-4 \, a c + f^{2}}}{c}}}\right )}{2 \, {\left (16 \, a^{2} c^{2} - 4 \, a c^{3} + 8 \, a c^{2} f - 8 \, a c f^{2} + c^{2} f^{2} - 2 \, c f^{3} + f^{4}\right )} {\left | c \right |}} - \frac {{\left (8 \, a c^{3} - 2 \, c^{2} f^{2} - 4 \, \sqrt {2} \sqrt {-4 \, a c + f^{2}} \sqrt {c f - \sqrt {-4 \, a c + f^{2}} c} a c + \sqrt {2} \sqrt {-4 \, a c + f^{2}} \sqrt {c f - \sqrt {-4 \, a c + f^{2}} c} c^{2} - 2 \, \sqrt {2} \sqrt {-4 \, a c + f^{2}} \sqrt {c f - \sqrt {-4 \, a c + f^{2}} c} c f + \sqrt {2} \sqrt {-4 \, a c + f^{2}} \sqrt {c f - \sqrt {-4 \, a c + f^{2}} c} f^{2} - 2 \, {\left (4 \, a c - f^{2}\right )} c^{2}\right )} \arctan \left (\frac {2 \, \sqrt {\frac {1}{2}} x}{\sqrt {\frac {f - \sqrt {-4 \, a c + f^{2}}}{c}}}\right )}{2 \, {\left (16 \, a^{2} c^{2} - 4 \, a c^{3} + 8 \, a c^{2} f - 8 \, a c f^{2} + c^{2} f^{2} - 2 \, c f^{3} + f^{4}\right )} {\left | c \right |}} \] Input:
integrate(x^2/(c*x^4+f*x^2+a),x, algorithm="giac")
Output:
1/2*(8*a*c^3 - 2*c^2*f^2 - 4*sqrt(2)*sqrt(-4*a*c + f^2)*sqrt(c*f + sqrt(-4 *a*c + f^2)*c)*a*c + sqrt(2)*sqrt(-4*a*c + f^2)*sqrt(c*f + sqrt(-4*a*c + f ^2)*c)*c^2 - 2*sqrt(2)*sqrt(-4*a*c + f^2)*sqrt(c*f + sqrt(-4*a*c + f^2)*c) *c*f + sqrt(2)*sqrt(-4*a*c + f^2)*sqrt(c*f + sqrt(-4*a*c + f^2)*c)*f^2 - 2 *(4*a*c - f^2)*c^2)*arctan(2*sqrt(1/2)*x/sqrt((f + sqrt(-4*a*c + f^2))/c)) /((16*a^2*c^2 - 4*a*c^3 + 8*a*c^2*f - 8*a*c*f^2 + c^2*f^2 - 2*c*f^3 + f^4) *abs(c)) - 1/2*(8*a*c^3 - 2*c^2*f^2 - 4*sqrt(2)*sqrt(-4*a*c + f^2)*sqrt(c* f - sqrt(-4*a*c + f^2)*c)*a*c + sqrt(2)*sqrt(-4*a*c + f^2)*sqrt(c*f - sqrt (-4*a*c + f^2)*c)*c^2 - 2*sqrt(2)*sqrt(-4*a*c + f^2)*sqrt(c*f - sqrt(-4*a* c + f^2)*c)*c*f + sqrt(2)*sqrt(-4*a*c + f^2)*sqrt(c*f - sqrt(-4*a*c + f^2) *c)*f^2 - 2*(4*a*c - f^2)*c^2)*arctan(2*sqrt(1/2)*x/sqrt((f - sqrt(-4*a*c + f^2))/c))/((16*a^2*c^2 - 4*a*c^3 + 8*a*c^2*f - 8*a*c*f^2 + c^2*f^2 - 2*c *f^3 + f^4)*abs(c))
Time = 0.29 (sec) , antiderivative size = 416, normalized size of antiderivative = 1.87 \[ \int \frac {x^2}{a+f x^2+c x^4} \, dx=-2\,\mathrm {atanh}\left (\frac {\left (x\,\left (4\,a\,c^2-2\,c\,f^2\right )+\frac {x\,\left (8\,c^2\,f^3-32\,a\,c^3\,f\right )\,\left (f^3+\sqrt {-{\left (4\,a\,c-f^2\right )}^3}-4\,a\,c\,f\right )}{8\,\left (16\,a^2\,c^3-8\,a\,c^2\,f^2+c\,f^4\right )}\right )\,\sqrt {-\frac {f^3+\sqrt {-{\left (4\,a\,c-f^2\right )}^3}-4\,a\,c\,f}{8\,\left (16\,a^2\,c^3-8\,a\,c^2\,f^2+c\,f^4\right )}}}{a\,c}\right )\,\sqrt {-\frac {f^3+\sqrt {-{\left (4\,a\,c-f^2\right )}^3}-4\,a\,c\,f}{8\,\left (16\,a^2\,c^3-8\,a\,c^2\,f^2+c\,f^4\right )}}-2\,\mathrm {atanh}\left (\frac {\left (x\,\left (4\,a\,c^2-2\,c\,f^2\right )-\frac {x\,\left (8\,c^2\,f^3-32\,a\,c^3\,f\right )\,\left (\sqrt {-{\left (4\,a\,c-f^2\right )}^3}-f^3+4\,a\,c\,f\right )}{8\,\left (16\,a^2\,c^3-8\,a\,c^2\,f^2+c\,f^4\right )}\right )\,\sqrt {\frac {\sqrt {-{\left (4\,a\,c-f^2\right )}^3}-f^3+4\,a\,c\,f}{8\,\left (16\,a^2\,c^3-8\,a\,c^2\,f^2+c\,f^4\right )}}}{a\,c}\right )\,\sqrt {\frac {\sqrt {-{\left (4\,a\,c-f^2\right )}^3}-f^3+4\,a\,c\,f}{8\,\left (16\,a^2\,c^3-8\,a\,c^2\,f^2+c\,f^4\right )}} \] Input:
int(x^2/(a + c*x^4 + f*x^2),x)
Output:
- 2*atanh(((x*(4*a*c^2 - 2*c*f^2) + (x*(8*c^2*f^3 - 32*a*c^3*f)*(f^3 + (-( 4*a*c - f^2)^3)^(1/2) - 4*a*c*f))/(8*(c*f^4 + 16*a^2*c^3 - 8*a*c^2*f^2)))* (-(f^3 + (-(4*a*c - f^2)^3)^(1/2) - 4*a*c*f)/(8*(c*f^4 + 16*a^2*c^3 - 8*a* c^2*f^2)))^(1/2))/(a*c))*(-(f^3 + (-(4*a*c - f^2)^3)^(1/2) - 4*a*c*f)/(8*( c*f^4 + 16*a^2*c^3 - 8*a*c^2*f^2)))^(1/2) - 2*atanh(((x*(4*a*c^2 - 2*c*f^2 ) - (x*(8*c^2*f^3 - 32*a*c^3*f)*((-(4*a*c - f^2)^3)^(1/2) - f^3 + 4*a*c*f) )/(8*(c*f^4 + 16*a^2*c^3 - 8*a*c^2*f^2)))*(((-(4*a*c - f^2)^3)^(1/2) - f^3 + 4*a*c*f)/(8*(c*f^4 + 16*a^2*c^3 - 8*a*c^2*f^2)))^(1/2))/(a*c))*(((-(4*a *c - f^2)^3)^(1/2) - f^3 + 4*a*c*f)/(8*(c*f^4 + 16*a^2*c^3 - 8*a*c^2*f^2)) )^(1/2)
Time = 0.17 (sec) , antiderivative size = 351, normalized size of antiderivative = 1.58 \[ \int \frac {x^2}{a+f x^2+c x^4} \, dx=\frac {-4 \sqrt {a}\, \sqrt {2 \sqrt {c}\, \sqrt {a}+f}\, \mathit {atan} \left (\frac {\sqrt {2 \sqrt {c}\, \sqrt {a}-f}-2 \sqrt {c}\, x}{\sqrt {2 \sqrt {c}\, \sqrt {a}+f}}\right ) c +2 \sqrt {c}\, \sqrt {2 \sqrt {c}\, \sqrt {a}+f}\, \mathit {atan} \left (\frac {\sqrt {2 \sqrt {c}\, \sqrt {a}-f}-2 \sqrt {c}\, x}{\sqrt {2 \sqrt {c}\, \sqrt {a}+f}}\right ) f +4 \sqrt {a}\, \sqrt {2 \sqrt {c}\, \sqrt {a}+f}\, \mathit {atan} \left (\frac {\sqrt {2 \sqrt {c}\, \sqrt {a}-f}+2 \sqrt {c}\, x}{\sqrt {2 \sqrt {c}\, \sqrt {a}+f}}\right ) c -2 \sqrt {c}\, \sqrt {2 \sqrt {c}\, \sqrt {a}+f}\, \mathit {atan} \left (\frac {\sqrt {2 \sqrt {c}\, \sqrt {a}-f}+2 \sqrt {c}\, x}{\sqrt {2 \sqrt {c}\, \sqrt {a}+f}}\right ) f +2 \sqrt {a}\, \sqrt {2 \sqrt {c}\, \sqrt {a}-f}\, \mathrm {log}\left (-\sqrt {2 \sqrt {c}\, \sqrt {a}-f}\, x +\sqrt {a}+\sqrt {c}\, x^{2}\right ) c -2 \sqrt {a}\, \sqrt {2 \sqrt {c}\, \sqrt {a}-f}\, \mathrm {log}\left (\sqrt {2 \sqrt {c}\, \sqrt {a}-f}\, x +\sqrt {a}+\sqrt {c}\, x^{2}\right ) c +\sqrt {c}\, \sqrt {2 \sqrt {c}\, \sqrt {a}-f}\, \mathrm {log}\left (-\sqrt {2 \sqrt {c}\, \sqrt {a}-f}\, x +\sqrt {a}+\sqrt {c}\, x^{2}\right ) f -\sqrt {c}\, \sqrt {2 \sqrt {c}\, \sqrt {a}-f}\, \mathrm {log}\left (\sqrt {2 \sqrt {c}\, \sqrt {a}-f}\, x +\sqrt {a}+\sqrt {c}\, x^{2}\right ) f}{4 c \left (4 a c -f^{2}\right )} \] Input:
int(x^2/(c*x^4+f*x^2+a),x)
Output:
( - 4*sqrt(a)*sqrt(2*sqrt(c)*sqrt(a) + f)*atan((sqrt(2*sqrt(c)*sqrt(a) - f ) - 2*sqrt(c)*x)/sqrt(2*sqrt(c)*sqrt(a) + f))*c + 2*sqrt(c)*sqrt(2*sqrt(c) *sqrt(a) + f)*atan((sqrt(2*sqrt(c)*sqrt(a) - f) - 2*sqrt(c)*x)/sqrt(2*sqrt (c)*sqrt(a) + f))*f + 4*sqrt(a)*sqrt(2*sqrt(c)*sqrt(a) + f)*atan((sqrt(2*s qrt(c)*sqrt(a) - f) + 2*sqrt(c)*x)/sqrt(2*sqrt(c)*sqrt(a) + f))*c - 2*sqrt (c)*sqrt(2*sqrt(c)*sqrt(a) + f)*atan((sqrt(2*sqrt(c)*sqrt(a) - f) + 2*sqrt (c)*x)/sqrt(2*sqrt(c)*sqrt(a) + f))*f + 2*sqrt(a)*sqrt(2*sqrt(c)*sqrt(a) - f)*log( - sqrt(2*sqrt(c)*sqrt(a) - f)*x + sqrt(a) + sqrt(c)*x**2)*c - 2*s qrt(a)*sqrt(2*sqrt(c)*sqrt(a) - f)*log(sqrt(2*sqrt(c)*sqrt(a) - f)*x + sqr t(a) + sqrt(c)*x**2)*c + sqrt(c)*sqrt(2*sqrt(c)*sqrt(a) - f)*log( - sqrt(2 *sqrt(c)*sqrt(a) - f)*x + sqrt(a) + sqrt(c)*x**2)*f - sqrt(c)*sqrt(2*sqrt( c)*sqrt(a) - f)*log(sqrt(2*sqrt(c)*sqrt(a) - f)*x + sqrt(a) + sqrt(c)*x**2 )*f)/(4*c*(4*a*c - f**2))