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

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

Optimal result

Integrand size = 30, antiderivative size = 109 \[ \int \frac {x \left (a+b x+c x^2\right )}{\sqrt {-1+d x} \sqrt {1+d x}} \, dx=\frac {(2 c+d (b+2 a d)) \sqrt {-1+d x} \sqrt {1+d x}}{2 d^4}+\frac {(4 c+3 b d) (-1+d x)^{3/2} \sqrt {1+d x}}{6 d^4}+\frac {c (-1+d x)^{5/2} \sqrt {1+d x}}{3 d^4}+\frac {b \text {arccosh}(d x)}{2 d^3} \] Output:

1/2*(2*c+d*(2*a*d+b))*(d*x-1)^(1/2)*(d*x+1)^(1/2)/d^4+1/6*(3*b*d+4*c)*(d*x 
-1)^(3/2)*(d*x+1)^(1/2)/d^4+1/3*c*(d*x-1)^(5/2)*(d*x+1)^(1/2)/d^4+1/2*b*ar 
ccosh(d*x)/d^3
 

Mathematica [A] (verified)

Time = 0.17 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.68 \[ \int \frac {x \left (a+b x+c x^2\right )}{\sqrt {-1+d x} \sqrt {1+d x}} \, dx=\frac {\sqrt {-1+d x} \sqrt {1+d x} \left (3 d^2 (2 a+b x)+2 c \left (2+d^2 x^2\right )\right )+6 b d \text {arctanh}\left (\sqrt {\frac {-1+d x}{1+d x}}\right )}{6 d^4} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.40 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.26, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {2113, 2340, 533, 25, 27, 455, 224, 219}

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

\(\Big \downarrow \) 2113

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

\(\Big \downarrow \) 2340

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

\(\Big \downarrow \) 533

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 455

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

\(\Big \downarrow \) 224

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

\(\Big \downarrow \) 219

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

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 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 455
Int[((c_) + (d_.)*(x_))*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[d*(( 
a + b*x^2)^(p + 1)/(2*b*(p + 1))), x] + Simp[c   Int[(a + b*x^2)^p, x], x] 
/; FreeQ[{a, b, c, d, p}, x] &&  !LeQ[p, -1]
 

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

rule 2113
Int[(Px_)*((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_. 
)*(x_))^(p_.), x_Symbol] :> Simp[(a + b*x)^FracPart[m]*((c + d*x)^FracPart[ 
m]/(a*c + b*d*x^2)^FracPart[m])   Int[Px*(a*c + b*d*x^2)^m*(e + f*x)^p, x], 
 x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && PolyQ[Px, x] && EqQ[b*c + a 
*d, 0] && EqQ[m, n] &&  !IntegerQ[m]
 

rule 2340
Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[ 
{q = Expon[Pq, x], f = Coeff[Pq, x, Expon[Pq, x]]}, Simp[f*(c*x)^(m + q - 1 
)*((a + b*x^2)^(p + 1)/(b*c^(q - 1)*(m + q + 2*p + 1))), x] + Simp[1/(b*(m 
+ q + 2*p + 1))   Int[(c*x)^m*(a + b*x^2)^p*ExpandToSum[b*(m + q + 2*p + 1) 
*Pq - b*f*(m + q + 2*p + 1)*x^q - a*f*(m + q - 1)*x^(q - 2), x], x], x] /; 
GtQ[q, 1] && NeQ[m + q + 2*p + 1, 0]] /; FreeQ[{a, b, c, m, p}, x] && PolyQ 
[Pq, x] && ( !IGtQ[m, 0] || IGtQ[p + 1/2, -1])
 
Maple [A] (verified)

Time = 0.41 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.99

method result size
risch \(\frac {\left (2 c \,d^{2} x^{2}+3 b \,d^{2} x +6 a \,d^{2}+4 c \right ) \sqrt {x d +1}\, \sqrt {x d -1}}{6 d^{4}}+\frac {b \ln \left (\frac {d^{2} x}{\sqrt {d^{2}}}+\sqrt {d^{2} x^{2}-1}\right ) \sqrt {\left (x d +1\right ) \left (x d -1\right )}}{2 d^{2} \sqrt {d^{2}}\, \sqrt {x d -1}\, \sqrt {x d +1}}\) \(108\)
default \(\frac {\sqrt {x d -1}\, \sqrt {x d +1}\, \left (2 \,\operatorname {csgn}\left (d \right ) c \,d^{2} x^{2} \sqrt {d^{2} x^{2}-1}+3 \sqrt {d^{2} x^{2}-1}\, \operatorname {csgn}\left (d \right ) b \,d^{2} x +6 \,\operatorname {csgn}\left (d \right ) \sqrt {d^{2} x^{2}-1}\, a \,d^{2}+4 \,\operatorname {csgn}\left (d \right ) \sqrt {d^{2} x^{2}-1}\, c +3 \ln \left (\left (\sqrt {d^{2} x^{2}-1}\, \operatorname {csgn}\left (d \right )+x d \right ) \operatorname {csgn}\left (d \right )\right ) b d \right ) \operatorname {csgn}\left (d \right )}{6 d^{4} \sqrt {d^{2} x^{2}-1}}\) \(137\)

Input:

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

Output:

1/6*(2*c*d^2*x^2+3*b*d^2*x+6*a*d^2+4*c)*(d*x+1)^(1/2)*(d*x-1)^(1/2)/d^4+1/ 
2*b/d^2*ln(d^2*x/(d^2)^(1/2)+(d^2*x^2-1)^(1/2))/(d^2)^(1/2)*((d*x+1)*(d*x- 
1))^(1/2)/(d*x-1)^(1/2)/(d*x+1)^(1/2)
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.67 \[ \int \frac {x \left (a+b x+c x^2\right )}{\sqrt {-1+d x} \sqrt {1+d x}} \, dx=-\frac {3 \, b d \log \left (-d x + \sqrt {d x + 1} \sqrt {d x - 1}\right ) - {\left (2 \, c d^{2} x^{2} + 3 \, b d^{2} x + 6 \, a d^{2} + 4 \, c\right )} \sqrt {d x + 1} \sqrt {d x - 1}}{6 \, d^{4}} \] Input:

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

Output:

-1/6*(3*b*d*log(-d*x + sqrt(d*x + 1)*sqrt(d*x - 1)) - (2*c*d^2*x^2 + 3*b*d 
^2*x + 6*a*d^2 + 4*c)*sqrt(d*x + 1)*sqrt(d*x - 1))/d^4
 

Sympy [F(-1)]

Timed out. \[ \int \frac {x \left (a+b x+c x^2\right )}{\sqrt {-1+d x} \sqrt {1+d x}} \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.92 \[ \int \frac {x \left (a+b x+c x^2\right )}{\sqrt {-1+d x} \sqrt {1+d x}} \, dx=\frac {\sqrt {d^{2} x^{2} - 1} c x^{2}}{3 \, d^{2}} + \frac {\sqrt {d^{2} x^{2} - 1} b x}{2 \, d^{2}} + \frac {\sqrt {d^{2} x^{2} - 1} a}{d^{2}} + \frac {b \log \left (2 \, d^{2} x + 2 \, \sqrt {d^{2} x^{2} - 1} d\right )}{2 \, d^{3}} + \frac {2 \, \sqrt {d^{2} x^{2} - 1} c}{3 \, d^{4}} \] Input:

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

Output:

1/3*sqrt(d^2*x^2 - 1)*c*x^2/d^2 + 1/2*sqrt(d^2*x^2 - 1)*b*x/d^2 + sqrt(d^2 
*x^2 - 1)*a/d^2 + 1/2*b*log(2*d^2*x + 2*sqrt(d^2*x^2 - 1)*d)/d^3 + 2/3*sqr 
t(d^2*x^2 - 1)*c/d^4
 

Giac [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.96 \[ \int \frac {x \left (a+b x+c x^2\right )}{\sqrt {-1+d x} \sqrt {1+d x}} \, dx=\frac {\sqrt {d x + 1} \sqrt {d x - 1} {\left ({\left (d x + 1\right )} {\left (\frac {2 \, {\left (d x + 1\right )} c}{d^{3}} + \frac {3 \, b d^{10} - 4 \, c d^{9}}{d^{12}}\right )} + \frac {3 \, {\left (2 \, a d^{11} - b d^{10} + 2 \, c d^{9}\right )}}{d^{12}}\right )} - \frac {6 \, b \log \left (\sqrt {d x + 1} - \sqrt {d x - 1}\right )}{d^{2}}}{6 \, d} \] Input:

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

Output:

1/6*(sqrt(d*x + 1)*sqrt(d*x - 1)*((d*x + 1)*(2*(d*x + 1)*c/d^3 + (3*b*d^10 
 - 4*c*d^9)/d^12) + 3*(2*a*d^11 - b*d^10 + 2*c*d^9)/d^12) - 6*b*log(sqrt(d 
*x + 1) - sqrt(d*x - 1))/d^2)/d
 

Mupad [B] (verification not implemented)

Time = 11.08 (sec) , antiderivative size = 318, normalized size of antiderivative = 2.92 \[ \int \frac {x \left (a+b x+c x^2\right )}{\sqrt {-1+d x} \sqrt {1+d x}} \, dx=\frac {\sqrt {d\,x-1}\,\left (\frac {2\,c}{3\,d^4}+\frac {c\,x^3}{3\,d}+\frac {c\,x^2}{3\,d^2}+\frac {2\,c\,x}{3\,d^3}\right )}{\sqrt {d\,x+1}}+\frac {2\,b\,\mathrm {atanh}\left (\frac {\sqrt {d\,x-1}-\mathrm {i}}{\sqrt {d\,x+1}-1}\right )}{d^3}-\frac {\frac {14\,b\,{\left (\sqrt {d\,x-1}-\mathrm {i}\right )}^3}{{\left (\sqrt {d\,x+1}-1\right )}^3}+\frac {14\,b\,{\left (\sqrt {d\,x-1}-\mathrm {i}\right )}^5}{{\left (\sqrt {d\,x+1}-1\right )}^5}+\frac {2\,b\,{\left (\sqrt {d\,x-1}-\mathrm {i}\right )}^7}{{\left (\sqrt {d\,x+1}-1\right )}^7}+\frac {2\,b\,\left (\sqrt {d\,x-1}-\mathrm {i}\right )}{\sqrt {d\,x+1}-1}}{d^3-\frac {4\,d^3\,{\left (\sqrt {d\,x-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {d\,x+1}-1\right )}^2}+\frac {6\,d^3\,{\left (\sqrt {d\,x-1}-\mathrm {i}\right )}^4}{{\left (\sqrt {d\,x+1}-1\right )}^4}-\frac {4\,d^3\,{\left (\sqrt {d\,x-1}-\mathrm {i}\right )}^6}{{\left (\sqrt {d\,x+1}-1\right )}^6}+\frac {d^3\,{\left (\sqrt {d\,x-1}-\mathrm {i}\right )}^8}{{\left (\sqrt {d\,x+1}-1\right )}^8}}+\frac {a\,\sqrt {d\,x-1}\,\sqrt {d\,x+1}}{d^2} \] Input:

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

Output:

(2*b*atanh(((d*x - 1)^(1/2) - 1i)/((d*x + 1)^(1/2) - 1)))/d^3 - ((14*b*((d 
*x - 1)^(1/2) - 1i)^3)/((d*x + 1)^(1/2) - 1)^3 + (14*b*((d*x - 1)^(1/2) - 
1i)^5)/((d*x + 1)^(1/2) - 1)^5 + (2*b*((d*x - 1)^(1/2) - 1i)^7)/((d*x + 1) 
^(1/2) - 1)^7 + (2*b*((d*x - 1)^(1/2) - 1i))/((d*x + 1)^(1/2) - 1))/(d^3 - 
 (4*d^3*((d*x - 1)^(1/2) - 1i)^2)/((d*x + 1)^(1/2) - 1)^2 + (6*d^3*((d*x - 
 1)^(1/2) - 1i)^4)/((d*x + 1)^(1/2) - 1)^4 - (4*d^3*((d*x - 1)^(1/2) - 1i) 
^6)/((d*x + 1)^(1/2) - 1)^6 + (d^3*((d*x - 1)^(1/2) - 1i)^8)/((d*x + 1)^(1 
/2) - 1)^8) + ((d*x - 1)^(1/2)*((2*c)/(3*d^4) + (c*x^3)/(3*d) + (c*x^2)/(3 
*d^2) + (2*c*x)/(3*d^3)))/(d*x + 1)^(1/2) + (a*(d*x - 1)^(1/2)*(d*x + 1)^( 
1/2))/d^2
 

Reduce [B] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.94 \[ \int \frac {x \left (a+b x+c x^2\right )}{\sqrt {-1+d x} \sqrt {1+d x}} \, dx=\frac {6 \sqrt {d x +1}\, \sqrt {d x -1}\, a \,d^{2}+3 \sqrt {d x +1}\, \sqrt {d x -1}\, b \,d^{2} x +2 \sqrt {d x +1}\, \sqrt {d x -1}\, c \,d^{2} x^{2}+4 \sqrt {d x +1}\, \sqrt {d x -1}\, c +6 \,\mathrm {log}\left (\frac {\sqrt {d x -1}+\sqrt {d x +1}}{\sqrt {2}}\right ) b d}{6 d^{4}} \] Input:

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

Output:

(6*sqrt(d*x + 1)*sqrt(d*x - 1)*a*d**2 + 3*sqrt(d*x + 1)*sqrt(d*x - 1)*b*d* 
*2*x + 2*sqrt(d*x + 1)*sqrt(d*x - 1)*c*d**2*x**2 + 4*sqrt(d*x + 1)*sqrt(d* 
x - 1)*c + 6*log((sqrt(d*x - 1) + sqrt(d*x + 1))/sqrt(2))*b*d)/(6*d**4)