3.67 \(\int \frac{\sqrt{1+p x^2+x^4}}{1-x^4} \, dx\)

Optimal. Leaf size=75 \[ \frac{1}{4} \sqrt{2-p} \tan ^{-1}\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 ) \]

[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

________________________________________________________________________________________

Rubi [A]  time = 0.0944013, antiderivative size = 75, normalized size of antiderivative = 1., 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 = {2071, 1093, 205, 208} \[ \frac{1}{4} \sqrt{2-p} \tan ^{-1}\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 ) \]

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 2071

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]

Rule 1093

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 205

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

Rule 208

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

Rubi steps

\begin{align*} \int \frac{\sqrt{1+p x^2+x^4}}{1-x^4} \, dx &=\operatorname{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 ) \operatorname{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 ) \operatorname{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 [C]  time = 7.08417, size = 5727, normalized size = 76.36 \[ \text{Result too large to show} \]

Antiderivative was successfully verified.

[In]

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

[Out]

Result too large to show

________________________________________________________________________________________

Maple [C]  time = 0.071, size = 1512, normalized size = 20.2 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/(-2*p+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)*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))
*p-1/(-2*p+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)*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*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)/(p+(p^2-4)^(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*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)/(p+(p^2-4)^(1/2))*EllipticE(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)))^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2-4)^(1/2))^(1/2),(-1-p*(-1/2*p-1/2*(p^2-4)^(1/2)))^(1/2)))+1/4*(2+p)*(-1/2/(2+p)^(1/2)*arctanh(1/2*(p*x^2+
2*x^2+p+2)/(2+p)^(1/2)/(x^4+p*x^2+1)^(1/2))+1/(-1/2*p+1/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)*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*(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))
-1/4*(2+p)*(-1/2/(2+p)^(1/2)*arctanh(1/2*(p*x^2+2*x^2+p+2)/(2+p)^(1/2)/(x^4+p*x^2+1)^(1/2))-1/(-1/2*p+1/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)*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., size = 0, normalized size = 0. \begin{align*} -\int \frac{\sqrt{x^{4} + p x^{2} + 1}}{x^{4} - 1}\,{d x} \end{align*}

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 = 2.56811, size = 957, normalized size = 12.76 \begin{align*} \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{align*}

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., size = 0, normalized size = 0. \begin{align*} - \int \frac{\sqrt{p x^{2} + x^{4} + 1}}{x^{4} - 1}\, dx \end{align*}

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., size = 0, normalized size = 0. \begin{align*} \int -\frac{\sqrt{x^{4} + p x^{2} + 1}}{x^{4} - 1}\,{d x} \end{align*}

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)