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

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

Optimal result

Integrand size = 29, antiderivative size = 106 \[ \int \frac {x^2}{a c+b c x^2+d \sqrt {a+b x^2}} \, dx=\frac {x}{b c}-\frac {\sqrt {a c^2-d^2} \arctan \left (\frac {\sqrt {b} \sqrt {a c^2-d^2} x}{a c+d \sqrt {a+b x^2}}\right )}{b^{3/2} c^2}-\frac {d \text {arctanh}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{b^{3/2} c^2} \] Output:

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

Mathematica [A] (verified)

Time = 0.39 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.93 \[ \int \frac {x^2}{a c+b c x^2+d \sqrt {a+b x^2}} \, dx=\frac {\sqrt {b} c x+2 \sqrt {a c^2-d^2} \arctan \left (\frac {d+c \left (-\sqrt {b} x+\sqrt {a+b x^2}\right )}{\sqrt {a c^2-d^2}}\right )+d \log \left (-\sqrt {b} x+\sqrt {a+b x^2}\right )}{b^{3/2} c^2} \] Input:

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

Output:

(Sqrt[b]*c*x + 2*Sqrt[a*c^2 - d^2]*ArcTan[(d + c*(-(Sqrt[b]*x) + Sqrt[a + 
b*x^2]))/Sqrt[a*c^2 - d^2]] + d*Log[-(Sqrt[b]*x) + Sqrt[a + b*x^2]])/(b^(3 
/2)*c^2)
 

Rubi [A] (verified)

Time = 0.67 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.47, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.310, Rules used = {2587, 27, 262, 218, 385, 224, 219, 291, 218}

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}{d \sqrt {a+b x^2}+a c+b c x^2} \, dx\)

\(\Big \downarrow \) 2587

\(\displaystyle a c \int \frac {x^2}{a \left (b x^2 c^2+a c^2-d^2\right )}dx-a d \int \frac {x^2}{a \sqrt {b x^2+a} \left (b x^2 c^2+a c^2-d^2\right )}dx\)

\(\Big \downarrow \) 27

\(\displaystyle c \int \frac {x^2}{b x^2 c^2+a c^2-d^2}dx-d \int \frac {x^2}{\sqrt {b x^2+a} \left (b x^2 c^2+a c^2-d^2\right )}dx\)

\(\Big \downarrow \) 262

\(\displaystyle c \left (\frac {x}{b c^2}-\frac {\left (a c^2-d^2\right ) \int \frac {1}{b x^2 c^2+a c^2-d^2}dx}{b c^2}\right )-d \int \frac {x^2}{\sqrt {b x^2+a} \left (b x^2 c^2+a c^2-d^2\right )}dx\)

\(\Big \downarrow \) 218

\(\displaystyle c \left (\frac {x}{b c^2}-\frac {\sqrt {a c^2-d^2} \arctan \left (\frac {\sqrt {b} c x}{\sqrt {a c^2-d^2}}\right )}{b^{3/2} c^3}\right )-d \int \frac {x^2}{\sqrt {b x^2+a} \left (b x^2 c^2+a c^2-d^2\right )}dx\)

\(\Big \downarrow \) 385

\(\displaystyle c \left (\frac {x}{b c^2}-\frac {\sqrt {a c^2-d^2} \arctan \left (\frac {\sqrt {b} c x}{\sqrt {a c^2-d^2}}\right )}{b^{3/2} c^3}\right )-d \left (\frac {\int \frac {1}{\sqrt {b x^2+a}}dx}{b c^2}-\frac {\left (a c^2-d^2\right ) \int \frac {1}{\sqrt {b x^2+a} \left (b x^2 c^2+a c^2-d^2\right )}dx}{b c^2}\right )\)

\(\Big \downarrow \) 224

\(\displaystyle c \left (\frac {x}{b c^2}-\frac {\sqrt {a c^2-d^2} \arctan \left (\frac {\sqrt {b} c x}{\sqrt {a c^2-d^2}}\right )}{b^{3/2} c^3}\right )-d \left (\frac {\int \frac {1}{1-\frac {b x^2}{b x^2+a}}d\frac {x}{\sqrt {b x^2+a}}}{b c^2}-\frac {\left (a c^2-d^2\right ) \int \frac {1}{\sqrt {b x^2+a} \left (b x^2 c^2+a c^2-d^2\right )}dx}{b c^2}\right )\)

\(\Big \downarrow \) 219

\(\displaystyle c \left (\frac {x}{b c^2}-\frac {\sqrt {a c^2-d^2} \arctan \left (\frac {\sqrt {b} c x}{\sqrt {a c^2-d^2}}\right )}{b^{3/2} c^3}\right )-d \left (\frac {\text {arctanh}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{b^{3/2} c^2}-\frac {\left (a c^2-d^2\right ) \int \frac {1}{\sqrt {b x^2+a} \left (b x^2 c^2+a c^2-d^2\right )}dx}{b c^2}\right )\)

\(\Big \downarrow \) 291

\(\displaystyle c \left (\frac {x}{b c^2}-\frac {\sqrt {a c^2-d^2} \arctan \left (\frac {\sqrt {b} c x}{\sqrt {a c^2-d^2}}\right )}{b^{3/2} c^3}\right )-d \left (\frac {\text {arctanh}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{b^{3/2} c^2}-\frac {\left (a c^2-d^2\right ) \int \frac {1}{a c^2-d^2-\frac {\left (b \left (a c^2-d^2\right )-a b c^2\right ) x^2}{b x^2+a}}d\frac {x}{\sqrt {b x^2+a}}}{b c^2}\right )\)

\(\Big \downarrow \) 218

\(\displaystyle c \left (\frac {x}{b c^2}-\frac {\sqrt {a c^2-d^2} \arctan \left (\frac {\sqrt {b} c x}{\sqrt {a c^2-d^2}}\right )}{b^{3/2} c^3}\right )-d \left (\frac {\text {arctanh}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{b^{3/2} c^2}-\frac {\sqrt {a c^2-d^2} \arctan \left (\frac {\sqrt {b} d x}{\sqrt {a+b x^2} \sqrt {a c^2-d^2}}\right )}{b^{3/2} c^2 d}\right )\)

Input:

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

Output:

c*(x/(b*c^2) - (Sqrt[a*c^2 - d^2]*ArcTan[(Sqrt[b]*c*x)/Sqrt[a*c^2 - d^2]]) 
/(b^(3/2)*c^3)) - d*(-((Sqrt[a*c^2 - d^2]*ArcTan[(Sqrt[b]*d*x)/(Sqrt[a*c^2 
 - d^2]*Sqrt[a + b*x^2])])/(b^(3/2)*c^2*d)) + ArcTanh[(Sqrt[b]*x)/Sqrt[a + 
 b*x^2]]/(b^(3/2)*c^2))
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

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

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

rule 224
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], 
x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b}, x] &&  !GtQ[a, 0]
 

rule 262
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x) 
^(m - 1)*((a + b*x^2)^(p + 1)/(b*(m + 2*p + 1))), x] - Simp[a*c^2*((m - 1)/ 
(b*(m + 2*p + 1)))   Int[(c*x)^(m - 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b 
, c, p}, x] && GtQ[m, 2 - 1] && NeQ[m + 2*p + 1, 0] && IntBinomialQ[a, b, c 
, 2, m, p, x]
 

rule 291
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Subst 
[Int[1/(c - (b*c - a*d)*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b, c, 
d}, x] && NeQ[b*c - a*d, 0]
 

rule 385
Int[(((e_.)*(x_))^(m_)*((c_) + (d_.)*(x_)^2)^(q_.))/((a_) + (b_.)*(x_)^2), 
x_Symbol] :> Simp[e^2/b   Int[(e*x)^(m - 2)*(c + d*x^2)^q, x], x] - Simp[a* 
(e^2/b)   Int[(e*x)^(m - 2)*((c + d*x^2)^q/(a + b*x^2)), x], x] /; FreeQ[{a 
, b, c, d, e, m, q}, x] && NeQ[b*c - a*d, 0] && LeQ[2, m, 3] && IntBinomial 
Q[a, b, c, d, e, m, 2, -1, q, x]
 

rule 2587
Int[(u_.)/((c_) + (d_.)*(x_)^(n_) + (e_.)*Sqrt[(a_) + (b_.)*(x_)^(n_)]), x_ 
Symbol] :> Simp[c   Int[u/(c^2 - a*e^2 + c*d*x^n), x], x] - Simp[a*e   Int[ 
u/((c^2 - a*e^2 + c*d*x^n)*Sqrt[a + b*x^n]), x], x] /; FreeQ[{a, b, c, d, e 
, n}, x] && EqQ[b*c - a*d, 0]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(1779\) vs. \(2(90)=180\).

Time = 0.03 (sec) , antiderivative size = 1780, normalized size of antiderivative = 16.79

method result size
default \(\text {Expression too large to display}\) \(1780\)

Input:

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

Output:

d*(-1/2*c^2*a/(-a*b)^(1/2)/((-a*b)^(1/2)*c^2+(-(a*c^2-d^2)*b*c^2)^(1/2))/( 
-(-a*b)^(1/2)*c^2+(-(a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*b*c^2)^(1/2)/b/c^2)+d^2/c^2)^(1/2))/b^(1/2)-d^2/c^2/(d^2/c^2)^(1/2)* 
ln((2*d^2/c^2+2/c^2*(-(a*c^2-d^2)*b*c^2)^(1/2)*(x-(-(a*c^2-d^2)*b*c^2)^(1/ 
2)/b/c^2)+2*(d^2/c^2)^(1/2)*((x-(-(a*c^2-d^2)*b*c^2)^(1/2)/b/c^2)^2*b+2/c^ 
2*(-(a*c^2-d^2)*b*c^2)^(1/2)*(x-(-(a*c^2-d^2)*b*c^2)^(1/2)/b/c^2)+d^2/c^2) 
^(1/2))/(x-(-(a*c^2-d^2)*b*c^2)^(1/2)/b/c^2)))-1/2*c^2*(a*c^2-d^2)/((-a...
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 213 vs. \(2 (90) = 180\).

Time = 0.17 (sec) , antiderivative size = 1168, normalized size of antiderivative = 11.02 \[ \int \frac {x^2}{a c+b c x^2+d \sqrt {a+b x^2}} \, dx =\text {Too large to display} \] Input:

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

Output:

[1/4*(4*b*c*x + 2*sqrt(b)*d*log(-2*b*x^2 + 2*sqrt(b*x^2 + a)*sqrt(b)*x - a 
) + b*sqrt(-(a*c^2 - d^2)/b)*log((a^4*c^4 - 2*a^3*c^2*d^2 + a^2*d^4 + (a^2 
*b^2*c^4 - 8*a*b^2*c^2*d^2 + 8*b^2*d^4)*x^4 + 2*(a^3*b*c^4 - 5*a^2*b*c^2*d 
^2 + 4*a*b*d^4)*x^2 - 4*((a*b^2*c^2*d - 2*b^2*d^3)*x^3 + (a^2*b*c^2*d - a* 
b*d^3)*x)*sqrt(b*x^2 + a)*sqrt(-(a*c^2 - d^2)/b))/(b^2*c^4*x^4 + a^2*c^4 - 
 2*a*c^2*d^2 + d^4 + 2*(a*b*c^4 - b*c^2*d^2)*x^2)) + 2*b*sqrt(-(a*c^2 - d^ 
2)/b)*log((b*c^2*x^2 - 2*b*c*x*sqrt(-(a*c^2 - d^2)/b) - a*c^2 + d^2)/(b*c^ 
2*x^2 + a*c^2 - d^2)))/(b^2*c^2), 1/4*(4*b*c*x + 4*sqrt(-b)*d*arctan(sqrt( 
-b)*x/sqrt(b*x^2 + a)) + b*sqrt(-(a*c^2 - d^2)/b)*log((a^4*c^4 - 2*a^3*c^2 
*d^2 + a^2*d^4 + (a^2*b^2*c^4 - 8*a*b^2*c^2*d^2 + 8*b^2*d^4)*x^4 + 2*(a^3* 
b*c^4 - 5*a^2*b*c^2*d^2 + 4*a*b*d^4)*x^2 - 4*((a*b^2*c^2*d - 2*b^2*d^3)*x^ 
3 + (a^2*b*c^2*d - a*b*d^3)*x)*sqrt(b*x^2 + a)*sqrt(-(a*c^2 - d^2)/b))/(b^ 
2*c^4*x^4 + a^2*c^4 - 2*a*c^2*d^2 + d^4 + 2*(a*b*c^4 - b*c^2*d^2)*x^2)) + 
2*b*sqrt(-(a*c^2 - d^2)/b)*log((b*c^2*x^2 - 2*b*c*x*sqrt(-(a*c^2 - d^2)/b) 
 - a*c^2 + d^2)/(b*c^2*x^2 + a*c^2 - d^2)))/(b^2*c^2), 1/2*(2*b*c*x + 2*b* 
sqrt((a*c^2 - d^2)/b)*arctan(-b*c*x*sqrt((a*c^2 - d^2)/b)/(a*c^2 - d^2)) - 
 b*sqrt((a*c^2 - d^2)/b)*arctan(1/2*(a^2*c^2 - a*d^2 + (a*b*c^2 - 2*b*d^2) 
*x^2)*sqrt(b*x^2 + a)*sqrt((a*c^2 - d^2)/b)/((a*b*c^2*d - b*d^3)*x^3 + (a^ 
2*c^2*d - a*d^3)*x)) + sqrt(b)*d*log(-2*b*x^2 + 2*sqrt(b*x^2 + a)*sqrt(b)* 
x - a))/(b^2*c^2), 1/2*(2*b*c*x + 2*b*sqrt((a*c^2 - d^2)/b)*arctan(-b*c...
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F(-2)]

Exception generated. \[ \int \frac {x^2}{a c+b c x^2+d \sqrt {a+b x^2}} \, dx=\text {Exception raised: TypeError} \] Input:

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

Output:

Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:index.cc index_m i_lex_is_greater E 
rror: Bad Argument Value
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.80 \[ \int \frac {x^2}{a c+b c x^2+d \sqrt {a+b x^2}} \, dx=\frac {-2 \sqrt {b}\, \sqrt {a \,c^{2}-d^{2}}\, \mathit {atan} \left (\frac {\sqrt {b \,x^{2}+a}\, c +\sqrt {b}\, c x +d}{\sqrt {a \,c^{2}-d^{2}}}\right )-\sqrt {b}\, \mathrm {log}\left (\frac {\sqrt {b \,x^{2}+a}+\sqrt {b}\, x}{\sqrt {a}}\right ) d +b c x}{b^{2} c^{2}} \] Input:

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

Output:

( - 2*sqrt(b)*sqrt(a*c**2 - d**2)*atan((sqrt(a + b*x**2)*c + sqrt(b)*c*x + 
 d)/sqrt(a*c**2 - d**2)) - sqrt(b)*log((sqrt(a + b*x**2) + sqrt(b)*x)/sqrt 
(a))*d + b*c*x)/(b**2*c**2)