3.1.67 \(\int \frac {\sqrt {1+p x^2+x^4}}{1-x^4} \, dx\) [67]

Optimal. Leaf size=75 \[ \frac {1}{4} \sqrt {2-p} \tan ^{-1}\left (\frac {\sqrt {2-p} x}{\sqrt {1+p x^2+x^4}}\right )+\frac {1}{4} \sqrt {2+p} \tanh ^{-1}\left (\frac {\sqrt {2+p} x}{\sqrt {1+p x^2+x^4}}\right ) \]

[Out]

1/4*arctan(x*(2-p)^(1/2)/(x^4+p*x^2+1)^(1/2))*(2-p)^(1/2)+1/4*arctanh(x*(2+p)^(1/2)/(x^4+p*x^2+1)^(1/2))*(2+p)
^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2096, 1107, 211, 214} \begin {gather*} \frac {1}{4} \sqrt {2-p} \text {ArcTan}\left (\frac {\sqrt {2-p} x}{\sqrt {p x^2+x^4+1}}\right )+\frac {1}{4} \sqrt {p+2} \tanh ^{-1}\left (\frac {\sqrt {p+2} x}{\sqrt {p x^2+x^4+1}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[1 + p*x^2 + x^4]/(1 - x^4),x]

[Out]

(Sqrt[2 - p]*ArcTan[(Sqrt[2 - p]*x)/Sqrt[1 + p*x^2 + x^4]])/4 + (Sqrt[2 + p]*ArcTanh[(Sqrt[2 + p]*x)/Sqrt[1 +
p*x^2 + x^4]])/4

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 1107

Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/(b/
2 - q/2 + c*x^2), x], x] - Dist[c/q, Int[1/(b/2 + q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*
a*c, 0] && PosQ[b^2 - 4*a*c]

Rule 2096

Int[Sqrt[v_]/((d_) + (e_.)*(x_)^4), x_Symbol] :> With[{a = Coeff[v, x, 0], b = Coeff[v, x, 2], c = Coeff[v, x,
 4]}, Dist[a/d, Subst[Int[1/(1 - 2*b*x^2 + (b^2 - 4*a*c)*x^4), x], x, x/Sqrt[v]], x] /; EqQ[c*d + a*e, 0] && P
osQ[a*c]] /; FreeQ[{d, e}, x] && PolyQ[v, x^2, 2]

Rubi steps

\begin {align*} \int \frac {\sqrt {1+p x^2+x^4}}{1-x^4} \, dx &=\text {Subst}\left (\int \frac {1}{1-2 p x^2+\left (-4+p^2\right ) x^4} \, dx,x,\frac {x}{\sqrt {1+p x^2+x^4}}\right )\\ &=\frac {1}{4} \left (-4+p^2\right ) \text {Subst}\left (\int \frac {1}{-2-p+\left (-4+p^2\right ) x^2} \, dx,x,\frac {x}{\sqrt {1+p x^2+x^4}}\right )-\frac {1}{4} \left (-4+p^2\right ) \text {Subst}\left (\int \frac {1}{2-p+\left (-4+p^2\right ) x^2} \, dx,x,\frac {x}{\sqrt {1+p x^2+x^4}}\right )\\ &=\frac {1}{4} \sqrt {2-p} \tan ^{-1}\left (\frac {\sqrt {2-p} x}{\sqrt {1+p x^2+x^4}}\right )+\frac {1}{4} \sqrt {2+p} \tanh ^{-1}\left (\frac {\sqrt {2+p} x}{\sqrt {1+p x^2+x^4}}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.52, size = 81, normalized size = 1.08 \begin {gather*} \frac {1}{4} \left (-\sqrt {-2-p} \tan ^{-1}\left (\frac {\sqrt {-2-p} x}{\sqrt {1+p x^2+x^4}}\right )-\sqrt {2-p} \tan ^{-1}\left (\frac {\sqrt {1+p x^2+x^4}}{\sqrt {2-p} x}\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[1 + p*x^2 + x^4]/(1 - x^4),x]

[Out]

(-(Sqrt[-2 - p]*ArcTan[(Sqrt[-2 - p]*x)/Sqrt[1 + p*x^2 + x^4]]) - Sqrt[2 - p]*ArcTan[Sqrt[1 + p*x^2 + x^4]/(Sq
rt[2 - p]*x)])/4

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 0.11, size = 1512, normalized size = 20.16

method result size
elliptic \(\frac {\left (\frac {4 \left (\frac {1}{4}-\frac {p}{8}\right ) \arctanh \left (\frac {\sqrt {x^{4}+p \,x^{2}+1}\, \sqrt {2}}{x \sqrt {2 p -4}}\right )}{\sqrt {2 p -4}}+\frac {4 \left (\frac {1}{4}+\frac {p}{8}\right ) \arctanh \left (\frac {\sqrt {x^{4}+p \,x^{2}+1}\, \sqrt {2}}{x \sqrt {4+2 p}}\right )}{\sqrt {4+2 p}}\right ) \sqrt {2}}{2}\) \(89\)
default \(\text {Expression too large to display}\) \(1512\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^4+p*x^2+1)^(1/2)/(-x^4+1),x,method=_RETURNVERBOSE)

[Out]

-1/2*(1+p)/(-2*p+2*(p^2-4)^(1/2))^(1/2)*(1-(-1/2*p+1/2*(p^2-4)^(1/2))*x^2)^(1/2)*(1-(-1/2*p-1/2*(p^2-4)^(1/2))
*x^2)^(1/2)/(x^4+p*x^2+1)^(1/2)*EllipticF(1/2*x*(-2*p+2*(p^2-4)^(1/2))^(1/2),(-1-p*(-1/2*p-1/2*(p^2-4)^(1/2)))
^(1/2))+2/(-2*p+2*(p^2-4)^(1/2))^(1/2)*(1-(-1/2*p+1/2*(p^2-4)^(1/2))*x^2)^(1/2)*(1-(-1/2*p-1/2*(p^2-4)^(1/2))*
x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1/2))^(1/2)*(1+1/2*p*x^2-1/2*x^2*(p^2-4)^(1/2))^(1/2)*(1+1/2*p
*x^2+1/2*x^2*(p^2-4)^(1/2))^(1/2)/(x^4+p*x^2+1)^(1/2)*EllipticPi((-1/2*p+1/2*(p^2-4)^(1/2))^(1/2)*x,-1/(-1/2*p
+1/2*(p^2-4)^(1/2)),(-1/2*p-1/2*(p^2-4)^(1/2))^(1/2)/(-1/2*p+1/2*(p^2-4)^(1/2))^(1/2))-1/2*p/(-1/2*p+1/2*(p^2-
4)^(1/2))^(1/2)*(1+1/2*p*x^2-1/2*x^2*(p^2-4)^(1/2))^(1/2)*(1+1/2*p*x^2+1/2*x^2*(p^2-4)^(1/2))^(1/2)/(x^4+p*x^2
+1)^(1/2)*EllipticPi((-1/2*p+1/2*(p^2-4)^(1/2))^(1/2)*x,-1/(-1/2*p+1/2*(p^2-4)^(1/2)),(-1/2*p-1/2*(p^2-4)^(1/2
))^(1/2)/(-1/2*p+1/2*(p^2-4)^(1/2))^(1/2))

________________________________________________________________________________________

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]

integrate((x^4+p*x^2+1)^(1/2)/(-x^4+1),x, algorithm="maxima")

[Out]

-integrate(sqrt(x^4 + p*x^2 + 1)/(x^4 - 1), x)

________________________________________________________________________________________

Fricas [A]
time = 1.06, size = 359, normalized size = 4.79 \begin {gather*} \left [\frac {1}{8} \, \sqrt {p - 2} \log \left (\frac {x^{4} + 2 \, {\left (p - 1\right )} x^{2} - 2 \, \sqrt {x^{4} + p x^{2} + 1} \sqrt {p - 2} x + 1}{x^{4} + 2 \, x^{2} + 1}\right ) + \frac {1}{8} \, \sqrt {p + 2} \log \left (\frac {x^{4} + 2 \, {\left (p + 1\right )} x^{2} + 2 \, \sqrt {x^{4} + p x^{2} + 1} \sqrt {p + 2} x + 1}{x^{4} - 2 \, x^{2} + 1}\right ), \frac {1}{4} \, \sqrt {-p + 2} \arctan \left (\frac {\sqrt {-p + 2} x}{\sqrt {x^{4} + p x^{2} + 1}}\right ) + \frac {1}{8} \, \sqrt {p + 2} \log \left (\frac {x^{4} + 2 \, {\left (p + 1\right )} x^{2} + 2 \, \sqrt {x^{4} + p x^{2} + 1} \sqrt {p + 2} x + 1}{x^{4} - 2 \, x^{2} + 1}\right ), -\frac {1}{4} \, \sqrt {-p - 2} \arctan \left (\frac {\sqrt {x^{4} + p x^{2} + 1} \sqrt {-p - 2}}{{\left (p + 2\right )} x}\right ) + \frac {1}{8} \, \sqrt {p - 2} \log \left (\frac {x^{4} + 2 \, {\left (p - 1\right )} x^{2} - 2 \, \sqrt {x^{4} + p x^{2} + 1} \sqrt {p - 2} x + 1}{x^{4} + 2 \, x^{2} + 1}\right ), \frac {1}{4} \, \sqrt {-p + 2} \arctan \left (\frac {\sqrt {-p + 2} x}{\sqrt {x^{4} + p x^{2} + 1}}\right ) - \frac {1}{4} \, \sqrt {-p - 2} \arctan \left (\frac {\sqrt {x^{4} + p x^{2} + 1} \sqrt {-p - 2}}{{\left (p + 2\right )} x}\right )\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^4+p*x^2+1)^(1/2)/(-x^4+1),x, algorithm="fricas")

[Out]

[1/8*sqrt(p - 2)*log((x^4 + 2*(p - 1)*x^2 - 2*sqrt(x^4 + p*x^2 + 1)*sqrt(p - 2)*x + 1)/(x^4 + 2*x^2 + 1)) + 1/
8*sqrt(p + 2)*log((x^4 + 2*(p + 1)*x^2 + 2*sqrt(x^4 + p*x^2 + 1)*sqrt(p + 2)*x + 1)/(x^4 - 2*x^2 + 1)), 1/4*sq
rt(-p + 2)*arctan(sqrt(-p + 2)*x/sqrt(x^4 + p*x^2 + 1)) + 1/8*sqrt(p + 2)*log((x^4 + 2*(p + 1)*x^2 + 2*sqrt(x^
4 + p*x^2 + 1)*sqrt(p + 2)*x + 1)/(x^4 - 2*x^2 + 1)), -1/4*sqrt(-p - 2)*arctan(sqrt(x^4 + p*x^2 + 1)*sqrt(-p -
 2)/((p + 2)*x)) + 1/8*sqrt(p - 2)*log((x^4 + 2*(p - 1)*x^2 - 2*sqrt(x^4 + p*x^2 + 1)*sqrt(p - 2)*x + 1)/(x^4
+ 2*x^2 + 1)), 1/4*sqrt(-p + 2)*arctan(sqrt(-p + 2)*x/sqrt(x^4 + p*x^2 + 1)) - 1/4*sqrt(-p - 2)*arctan(sqrt(x^
4 + p*x^2 + 1)*sqrt(-p - 2)/((p + 2)*x))]

________________________________________________________________________________________

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]

integrate((x**4+p*x**2+1)**(1/2)/(-x**4+1),x)

[Out]

-Integral(sqrt(p*x**2 + x**4 + 1)/(x**4 - 1), x)

________________________________________________________________________________________

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]

integrate((x^4+p*x^2+1)^(1/2)/(-x^4+1),x, algorithm="giac")

[Out]

integrate(-sqrt(x^4 + p*x^2 + 1)/(x^4 - 1), x)

________________________________________________________________________________________

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]

int(-(p*x^2 + x^4 + 1)^(1/2)/(x^4 - 1),x)

[Out]

-int((p*x^2 + x^4 + 1)^(1/2)/(x^4 - 1), x)

________________________________________________________________________________________