Optimal. Leaf size=171 \[ -\frac {\sqrt {p+\sqrt {4+p^2}} \tan ^{-1}\left (\frac {\sqrt {p+\sqrt {4+p^2}} x \left (p-\sqrt {4+p^2}-2 x^2\right )}{2 \sqrt {2} \sqrt {1+p x^2-x^4}}\right )}{2 \sqrt {2}}+\frac {\sqrt {-p+\sqrt {4+p^2}} \tanh ^{-1}\left (\frac {\sqrt {-p+\sqrt {4+p^2}} x \left (p+\sqrt {4+p^2}-2 x^2\right )}{2 \sqrt {2} \sqrt {1+p x^2-x^4}}\right )}{2 \sqrt {2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 171, normalized size of antiderivative = 1.00, number of steps
used = 1, number of rules used = 1, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.042, Rules used = {2097}
\begin {gather*} \frac {\sqrt {\sqrt {p^2+4}-p} \tanh ^{-1}\left (\frac {\sqrt {\sqrt {p^2+4}-p} x \left (\sqrt {p^2+4}+p-2 x^2\right )}{2 \sqrt {2} \sqrt {p x^2-x^4+1}}\right )}{2 \sqrt {2}}-\frac {\sqrt {\sqrt {p^2+4}+p} \text {ArcTan}\left (\frac {\sqrt {\sqrt {p^2+4}+p} x \left (-\sqrt {p^2+4}+p-2 x^2\right )}{2 \sqrt {2} \sqrt {p x^2-x^4+1}}\right )}{2 \sqrt {2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2097
Rubi steps
\begin {align*} \int \frac {\sqrt {1+p x^2-x^4}}{1+x^4} \, dx &=-\frac {\sqrt {p+\sqrt {4+p^2}} \tan ^{-1}\left (\frac {\sqrt {p+\sqrt {4+p^2}} x \left (p-\sqrt {4+p^2}-2 x^2\right )}{2 \sqrt {2} \sqrt {1+p x^2-x^4}}\right )}{2 \sqrt {2}}+\frac {\sqrt {-p+\sqrt {4+p^2}} \tanh ^{-1}\left (\frac {\sqrt {-p+\sqrt {4+p^2}} x \left (p+\sqrt {4+p^2}-2 x^2\right )}{2 \sqrt {2} \sqrt {1+p x^2-x^4}}\right )}{2 \sqrt {2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.26, size = 92, normalized size = 0.54 \begin {gather*} \frac {1}{4} i \left (\sqrt {-2 i-p} \tan ^{-1}\left (\frac {\sqrt {-2 i-p} x}{\sqrt {1+p x^2-x^4}}\right )-\sqrt {2 i-p} \tan ^{-1}\left (\frac {\sqrt {2 i-p} x}{\sqrt {1+p x^2-x^4}}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(624\) vs.
\(2(131)=262\).
time = 0.11, size = 625, normalized size = 3.65
method | result | size |
default | \(\frac {\left (-\frac {\sqrt {p +\sqrt {p^{2}+4}}\, \sqrt {p^{2}+4}\, \ln \left (\frac {-x^{4}+p \,x^{2}+1}{x^{2}}-\frac {\sqrt {-x^{4}+p \,x^{2}+1}\, \sqrt {2}\, \sqrt {p +\sqrt {p^{2}+4}}}{x}+\sqrt {p^{2}+4}\right )}{16}-\frac {\sqrt {p^{2}+4}\, \left (p +\sqrt {p^{2}+4}\right ) \arctan \left (\frac {\frac {2 \sqrt {-x^{4}+p \,x^{2}+1}\, \sqrt {2}}{x}-2 \sqrt {p +\sqrt {p^{2}+4}}}{2 \sqrt {-p +\sqrt {p^{2}+4}}}\right )}{8 \sqrt {-p +\sqrt {p^{2}+4}}}+\frac {\sqrt {p +\sqrt {p^{2}+4}}\, p \ln \left (\frac {-x^{4}+p \,x^{2}+1}{x^{2}}-\frac {\sqrt {-x^{4}+p \,x^{2}+1}\, \sqrt {2}\, \sqrt {p +\sqrt {p^{2}+4}}}{x}+\sqrt {p^{2}+4}\right )}{16}+\frac {p \left (p +\sqrt {p^{2}+4}\right ) \arctan \left (\frac {\frac {2 \sqrt {-x^{4}+p \,x^{2}+1}\, \sqrt {2}}{x}-2 \sqrt {p +\sqrt {p^{2}+4}}}{2 \sqrt {-p +\sqrt {p^{2}+4}}}\right )}{8 \sqrt {-p +\sqrt {p^{2}+4}}}+\frac {\sqrt {p +\sqrt {p^{2}+4}}\, \sqrt {p^{2}+4}\, \ln \left (\frac {-x^{4}+p \,x^{2}+1}{x^{2}}+\frac {\sqrt {-x^{4}+p \,x^{2}+1}\, \sqrt {2}\, \sqrt {p +\sqrt {p^{2}+4}}}{x}+\sqrt {p^{2}+4}\right )}{16}-\frac {\sqrt {p^{2}+4}\, \left (p +\sqrt {p^{2}+4}\right ) \arctan \left (\frac {\frac {2 \sqrt {-x^{4}+p \,x^{2}+1}\, \sqrt {2}}{x}+2 \sqrt {p +\sqrt {p^{2}+4}}}{2 \sqrt {-p +\sqrt {p^{2}+4}}}\right )}{8 \sqrt {-p +\sqrt {p^{2}+4}}}-\frac {\sqrt {p +\sqrt {p^{2}+4}}\, p \ln \left (\frac {-x^{4}+p \,x^{2}+1}{x^{2}}+\frac {\sqrt {-x^{4}+p \,x^{2}+1}\, \sqrt {2}\, \sqrt {p +\sqrt {p^{2}+4}}}{x}+\sqrt {p^{2}+4}\right )}{16}+\frac {p \left (p +\sqrt {p^{2}+4}\right ) \arctan \left (\frac {\frac {2 \sqrt {-x^{4}+p \,x^{2}+1}\, \sqrt {2}}{x}+2 \sqrt {p +\sqrt {p^{2}+4}}}{2 \sqrt {-p +\sqrt {p^{2}+4}}}\right )}{8 \sqrt {-p +\sqrt {p^{2}+4}}}\right ) \sqrt {2}}{2}\) | \(625\) |
elliptic | \(\frac {\left (-\frac {\sqrt {p +\sqrt {p^{2}+4}}\, \sqrt {p^{2}+4}\, \ln \left (\frac {-x^{4}+p \,x^{2}+1}{x^{2}}-\frac {\sqrt {-x^{4}+p \,x^{2}+1}\, \sqrt {2}\, \sqrt {p +\sqrt {p^{2}+4}}}{x}+\sqrt {p^{2}+4}\right )}{16}-\frac {\sqrt {p^{2}+4}\, \left (p +\sqrt {p^{2}+4}\right ) \arctan \left (\frac {\frac {2 \sqrt {-x^{4}+p \,x^{2}+1}\, \sqrt {2}}{x}-2 \sqrt {p +\sqrt {p^{2}+4}}}{2 \sqrt {-p +\sqrt {p^{2}+4}}}\right )}{8 \sqrt {-p +\sqrt {p^{2}+4}}}+\frac {\sqrt {p +\sqrt {p^{2}+4}}\, p \ln \left (\frac {-x^{4}+p \,x^{2}+1}{x^{2}}-\frac {\sqrt {-x^{4}+p \,x^{2}+1}\, \sqrt {2}\, \sqrt {p +\sqrt {p^{2}+4}}}{x}+\sqrt {p^{2}+4}\right )}{16}+\frac {p \left (p +\sqrt {p^{2}+4}\right ) \arctan \left (\frac {\frac {2 \sqrt {-x^{4}+p \,x^{2}+1}\, \sqrt {2}}{x}-2 \sqrt {p +\sqrt {p^{2}+4}}}{2 \sqrt {-p +\sqrt {p^{2}+4}}}\right )}{8 \sqrt {-p +\sqrt {p^{2}+4}}}+\frac {\sqrt {p +\sqrt {p^{2}+4}}\, \sqrt {p^{2}+4}\, \ln \left (\frac {-x^{4}+p \,x^{2}+1}{x^{2}}+\frac {\sqrt {-x^{4}+p \,x^{2}+1}\, \sqrt {2}\, \sqrt {p +\sqrt {p^{2}+4}}}{x}+\sqrt {p^{2}+4}\right )}{16}-\frac {\sqrt {p^{2}+4}\, \left (p +\sqrt {p^{2}+4}\right ) \arctan \left (\frac {\frac {2 \sqrt {-x^{4}+p \,x^{2}+1}\, \sqrt {2}}{x}+2 \sqrt {p +\sqrt {p^{2}+4}}}{2 \sqrt {-p +\sqrt {p^{2}+4}}}\right )}{8 \sqrt {-p +\sqrt {p^{2}+4}}}-\frac {\sqrt {p +\sqrt {p^{2}+4}}\, p \ln \left (\frac {-x^{4}+p \,x^{2}+1}{x^{2}}+\frac {\sqrt {-x^{4}+p \,x^{2}+1}\, \sqrt {2}\, \sqrt {p +\sqrt {p^{2}+4}}}{x}+\sqrt {p^{2}+4}\right )}{16}+\frac {p \left (p +\sqrt {p^{2}+4}\right ) \arctan \left (\frac {\frac {2 \sqrt {-x^{4}+p \,x^{2}+1}\, \sqrt {2}}{x}+2 \sqrt {p +\sqrt {p^{2}+4}}}{2 \sqrt {-p +\sqrt {p^{2}+4}}}\right )}{8 \sqrt {-p +\sqrt {p^{2}+4}}}\right ) \sqrt {2}}{2}\) | \(625\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 2667 vs.
\(2 (135) = 270\).
time = 4.37, size = 2667, normalized size = 15.60 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {p x^{2} - x^{4} + 1}}{x^{4} + 1}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {-x^4+p\,x^2+1}}{x^4+1} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________