\(\int \frac {\sqrt {c+d \sqrt {b+a x^2}}}{x} \, dx\) [2093]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [F(-1)]
   Sympy [F]
   Maxima [F]
   Giac [B] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 23, antiderivative size = 151 \[ \int \frac {\sqrt {c+d \sqrt {b+a x^2}}}{x} \, dx=2 \sqrt {c+d \sqrt {b+a x^2}}+\sqrt {-c+\sqrt {b} d} \arctan \left (\frac {\sqrt {-c+\sqrt {b} d} \sqrt {c+d \sqrt {b+a x^2}}}{c-\sqrt {b} d}\right )+\sqrt {-c-\sqrt {b} d} \arctan \left (\frac {\sqrt {-c-\sqrt {b} d} \sqrt {c+d \sqrt {b+a x^2}}}{c+\sqrt {b} d}\right ) \]

[Out]

2*(c+d*(a*x^2+b)^(1/2))^(1/2)+(-c+d*b^(1/2))^(1/2)*arctan((-c+d*b^(1/2))^(1/2)*(c+d*(a*x^2+b)^(1/2))^(1/2)/(c-
d*b^(1/2)))+(-c-d*b^(1/2))^(1/2)*arctan((-c-d*b^(1/2))^(1/2)*(c+d*(a*x^2+b)^(1/2))^(1/2)/(c+d*b^(1/2)))

Rubi [A] (verified)

Time = 0.24 (sec) , antiderivative size = 122, normalized size of antiderivative = 0.81, number of steps used = 8, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {378, 1412, 839, 841, 1180, 213} \[ \int \frac {\sqrt {c+d \sqrt {b+a x^2}}}{x} \, dx=-\sqrt {c-\sqrt {b} d} \text {arctanh}\left (\frac {\sqrt {d \sqrt {a x^2+b}+c}}{\sqrt {c-\sqrt {b} d}}\right )-\sqrt {\sqrt {b} d+c} \text {arctanh}\left (\frac {\sqrt {d \sqrt {a x^2+b}+c}}{\sqrt {\sqrt {b} d+c}}\right )+2 \sqrt {d \sqrt {a x^2+b}+c} \]

[In]

Int[Sqrt[c + d*Sqrt[b + a*x^2]]/x,x]

[Out]

2*Sqrt[c + d*Sqrt[b + a*x^2]] - Sqrt[c - Sqrt[b]*d]*ArcTanh[Sqrt[c + d*Sqrt[b + a*x^2]]/Sqrt[c - Sqrt[b]*d]] -
 Sqrt[c + Sqrt[b]*d]*ArcTanh[Sqrt[c + d*Sqrt[b + a*x^2]]/Sqrt[c + Sqrt[b]*d]]

Rule 213

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

Rule 378

Int[((a_) + (b_.)*(v_)^(n_))^(p_.)*(x_)^(m_.), x_Symbol] :> With[{c = Coefficient[v, x, 0], d = Coefficient[v,
 x, 1]}, Dist[1/d^(m + 1), Subst[Int[SimplifyIntegrand[(x - c)^m*(a + b*x^n)^p, x], x], x, v], x] /; NeQ[c, 0]
] /; FreeQ[{a, b, n, p}, x] && LinearQ[v, x] && IntegerQ[m]

Rule 839

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Simp[g*((d + e*x)^m/(
c*m)), x] + Dist[1/c, Int[(d + e*x)^(m - 1)*(Simp[c*d*f - a*e*g + (g*c*d + c*e*f)*x, x]/(a + c*x^2)), x], x] /
; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && FractionQ[m] && GtQ[m, 0]

Rule 841

Int[((f_.) + (g_.)*(x_))/(Sqrt[(d_.) + (e_.)*(x_)]*((a_) + (c_.)*(x_)^2)), x_Symbol] :> Dist[2, Subst[Int[(e*f
 - d*g + g*x^2)/(c*d^2 + a*e^2 - 2*c*d*x^2 + c*x^4), x], x, Sqrt[d + e*x]], x] /; FreeQ[{a, c, d, e, f, g}, x]
 && NeQ[c*d^2 + a*e^2, 0]

Rule 1180

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Di
st[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^2), x], x] + Dist[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]

Rule 1412

Int[((a_) + (c_.)*(x_)^(n2_.))^(p_.)*((d_) + (e_.)*(x_)^(n_))^(q_.), x_Symbol] :> With[{g = Denominator[n]}, D
ist[g, Subst[Int[x^(g - 1)*(d + e*x^(g*n))^q*(a + c*x^(2*g*n))^p, x], x, x^(1/g)], x]] /; FreeQ[{a, c, d, e, p
, q}, x] && EqQ[n2, 2*n] && FractionQ[n]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} \text {Subst}\left (\int \frac {\sqrt {c+d \sqrt {b+a x}}}{x} \, dx,x,x^2\right ) \\ & = \frac {1}{2} \text {Subst}\left (\int \frac {\sqrt {c+d \sqrt {x}}}{-b+x} \, dx,x,b+a x^2\right ) \\ & = \text {Subst}\left (\int \frac {x \sqrt {c+d x}}{-b+x^2} \, dx,x,\sqrt {b+a x^2}\right ) \\ & = 2 \sqrt {c+d \sqrt {b+a x^2}}+\text {Subst}\left (\int \frac {b d+c x}{\sqrt {c+d x} \left (-b+x^2\right )} \, dx,x,\sqrt {b+a x^2}\right ) \\ & = 2 \sqrt {c+d \sqrt {b+a x^2}}+2 \text {Subst}\left (\int \frac {-c^2+b d^2+c x^2}{c^2-b d^2-2 c x^2+x^4} \, dx,x,\sqrt {c+d \sqrt {b+a x^2}}\right ) \\ & = 2 \sqrt {c+d \sqrt {b+a x^2}}+\left (c-\sqrt {b} d\right ) \text {Subst}\left (\int \frac {1}{-c+\sqrt {b} d+x^2} \, dx,x,\sqrt {c+d \sqrt {b+a x^2}}\right )+\left (c+\sqrt {b} d\right ) \text {Subst}\left (\int \frac {1}{-c-\sqrt {b} d+x^2} \, dx,x,\sqrt {c+d \sqrt {b+a x^2}}\right ) \\ & = 2 \sqrt {c+d \sqrt {b+a x^2}}-\sqrt {c-\sqrt {b} d} \text {arctanh}\left (\frac {\sqrt {c+d \sqrt {b+a x^2}}}{\sqrt {c-\sqrt {b} d}}\right )-\sqrt {c+\sqrt {b} d} \text {arctanh}\left (\frac {\sqrt {c+d \sqrt {b+a x^2}}}{\sqrt {c+\sqrt {b} d}}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.30 (sec) , antiderivative size = 130, normalized size of antiderivative = 0.86 \[ \int \frac {\sqrt {c+d \sqrt {b+a x^2}}}{x} \, dx=2 \sqrt {c+d \sqrt {b+a x^2}}-\sqrt {-c-\sqrt {b} d} \arctan \left (\frac {\sqrt {c+d \sqrt {b+a x^2}}}{\sqrt {-c-\sqrt {b} d}}\right )-\sqrt {-c+\sqrt {b} d} \arctan \left (\frac {\sqrt {c+d \sqrt {b+a x^2}}}{\sqrt {-c+\sqrt {b} d}}\right ) \]

[In]

Integrate[Sqrt[c + d*Sqrt[b + a*x^2]]/x,x]

[Out]

2*Sqrt[c + d*Sqrt[b + a*x^2]] - Sqrt[-c - Sqrt[b]*d]*ArcTan[Sqrt[c + d*Sqrt[b + a*x^2]]/Sqrt[-c - Sqrt[b]*d]]
- Sqrt[-c + Sqrt[b]*d]*ArcTan[Sqrt[c + d*Sqrt[b + a*x^2]]/Sqrt[-c + Sqrt[b]*d]]

Maple [F]

\[\int \frac {\sqrt {c +d \sqrt {a \,x^{2}+b}}}{x}d x\]

[In]

int((c+d*(a*x^2+b)^(1/2))^(1/2)/x,x)

[Out]

int((c+d*(a*x^2+b)^(1/2))^(1/2)/x,x)

Fricas [F(-1)]

Timed out. \[ \int \frac {\sqrt {c+d \sqrt {b+a x^2}}}{x} \, dx=\text {Timed out} \]

[In]

integrate((c+d*(a*x^2+b)^(1/2))^(1/2)/x,x, algorithm="fricas")

[Out]

Timed out

Sympy [F]

\[ \int \frac {\sqrt {c+d \sqrt {b+a x^2}}}{x} \, dx=\int \frac {\sqrt {c + d \sqrt {a x^{2} + b}}}{x}\, dx \]

[In]

integrate((c+d*(a*x**2+b)**(1/2))**(1/2)/x,x)

[Out]

Integral(sqrt(c + d*sqrt(a*x**2 + b))/x, x)

Maxima [F]

\[ \int \frac {\sqrt {c+d \sqrt {b+a x^2}}}{x} \, dx=\int { \frac {\sqrt {\sqrt {a x^{2} + b} d + c}}{x} \,d x } \]

[In]

integrate((c+d*(a*x^2+b)^(1/2))^(1/2)/x,x, algorithm="maxima")

[Out]

integrate(sqrt(sqrt(a*x^2 + b)*d + c)/x, x)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 288 vs. \(2 (110) = 220\).

Time = 0.30 (sec) , antiderivative size = 288, normalized size of antiderivative = 1.91 \[ \int \frac {\sqrt {c+d \sqrt {b+a x^2}}}{x} \, dx=\frac {2 \, \sqrt {\sqrt {a x^{2} + b} d + c} d + \frac {{\left (\sqrt {b} c d^{3} \mathrm {sgn}\left ({\left (\sqrt {a x^{2} + b} d + c\right )} d - c d\right ) - b d^{3} {\left | d \right |} + c^{2} d {\left | d \right |} \mathrm {sgn}\left ({\left (\sqrt {a x^{2} + b} d + c\right )} d - c d\right ) - \sqrt {b} c d^{3}\right )} \arctan \left (\frac {\sqrt {\sqrt {a x^{2} + b} d + c}}{\sqrt {-c + \sqrt {b d^{2}}}}\right )}{{\left (\sqrt {b} d + c\right )} \sqrt {\sqrt {b} d - c} {\left | d \right |}} + \frac {{\left (\sqrt {b} c d^{3} \mathrm {sgn}\left ({\left (\sqrt {a x^{2} + b} d + c\right )} d - c d\right ) + b d^{3} {\left | d \right |} - c^{2} d {\left | d \right |} \mathrm {sgn}\left ({\left (\sqrt {a x^{2} + b} d + c\right )} d - c d\right ) - \sqrt {b} c d^{3}\right )} \arctan \left (\frac {\sqrt {\sqrt {a x^{2} + b} d + c}}{\sqrt {-c - \sqrt {b d^{2}}}}\right )}{{\left (\sqrt {b} d - c\right )} \sqrt {-\sqrt {b} d - c} {\left | d \right |}}}{d} \]

[In]

integrate((c+d*(a*x^2+b)^(1/2))^(1/2)/x,x, algorithm="giac")

[Out]

(2*sqrt(sqrt(a*x^2 + b)*d + c)*d + (sqrt(b)*c*d^3*sgn((sqrt(a*x^2 + b)*d + c)*d - c*d) - b*d^3*abs(d) + c^2*d*
abs(d)*sgn((sqrt(a*x^2 + b)*d + c)*d - c*d) - sqrt(b)*c*d^3)*arctan(sqrt(sqrt(a*x^2 + b)*d + c)/sqrt(-c + sqrt
(b*d^2)))/((sqrt(b)*d + c)*sqrt(sqrt(b)*d - c)*abs(d)) + (sqrt(b)*c*d^3*sgn((sqrt(a*x^2 + b)*d + c)*d - c*d) +
 b*d^3*abs(d) - c^2*d*abs(d)*sgn((sqrt(a*x^2 + b)*d + c)*d - c*d) - sqrt(b)*c*d^3)*arctan(sqrt(sqrt(a*x^2 + b)
*d + c)/sqrt(-c - sqrt(b*d^2)))/((sqrt(b)*d - c)*sqrt(-sqrt(b)*d - c)*abs(d)))/d

Mupad [F(-1)]

Timed out. \[ \int \frac {\sqrt {c+d \sqrt {b+a x^2}}}{x} \, dx=\int \frac {\sqrt {c+d\,\sqrt {a\,x^2+b}}}{x} \,d x \]

[In]

int((c + d*(b + a*x^2)^(1/2))^(1/2)/x,x)

[Out]

int((c + d*(b + a*x^2)^(1/2))^(1/2)/x, x)