\(\int \frac {x^2 (a+b \text {arctanh}(c+d x))}{e-f x^2} \, dx\) [64]

Optimal result
Mathematica [C] (warning: unable to verify)
Rubi [A] (verified)
Maple [B] (verified)
Fricas [F]
Sympy [F(-1)]
Maxima [F(-2)]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 24, antiderivative size = 323 \[ \int \frac {x^2 (a+b \text {arctanh}(c+d x))}{e-f x^2} \, dx=-\frac {a x}{f}-\frac {b (c+d x) \text {arctanh}(c+d x)}{d f}-\frac {\sqrt {e} (a+b \text {arctanh}(c+d x)) \log \left (\frac {2 d \left (\sqrt {e}-\sqrt {f} x\right )}{\left (d \sqrt {e}-(1-c) \sqrt {f}\right ) (1+c+d x)}\right )}{2 f^{3/2}}+\frac {\sqrt {e} (a+b \text {arctanh}(c+d x)) \log \left (\frac {2 d \left (\sqrt {e}+\sqrt {f} x\right )}{\left (d \sqrt {e}+(1-c) \sqrt {f}\right ) (1+c+d x)}\right )}{2 f^{3/2}}-\frac {b \log \left (1-(c+d x)^2\right )}{2 d f}+\frac {b \sqrt {e} \operatorname {PolyLog}\left (2,1-\frac {2 d \left (\sqrt {e}-\sqrt {f} x\right )}{\left (d \sqrt {e}-(1-c) \sqrt {f}\right ) (1+c+d x)}\right )}{4 f^{3/2}}-\frac {b \sqrt {e} \operatorname {PolyLog}\left (2,1-\frac {2 d \left (\sqrt {e}+\sqrt {f} x\right )}{\left (d \sqrt {e}+(1-c) \sqrt {f}\right ) (1+c+d x)}\right )}{4 f^{3/2}} \] Output:

-a*x/f-b*(d*x+c)*arctanh(d*x+c)/d/f-1/2*e^(1/2)*(a+b*arctanh(d*x+c))*ln(2* 
d*(e^(1/2)-f^(1/2)*x)/(d*e^(1/2)-(1-c)*f^(1/2))/(d*x+c+1))/f^(3/2)+1/2*e^( 
1/2)*(a+b*arctanh(d*x+c))*ln(2*d*(e^(1/2)+f^(1/2)*x)/(d*e^(1/2)+(1-c)*f^(1 
/2))/(d*x+c+1))/f^(3/2)-1/2*b*ln(1-(d*x+c)^2)/d/f+1/4*b*e^(1/2)*polylog(2, 
1-2*d*(e^(1/2)-f^(1/2)*x)/(d*e^(1/2)-(1-c)*f^(1/2))/(d*x+c+1))/f^(3/2)-1/4 
*b*e^(1/2)*polylog(2,1-2*d*(e^(1/2)+f^(1/2)*x)/(d*e^(1/2)+(1-c)*f^(1/2))/( 
d*x+c+1))/f^(3/2)
 

Mathematica [C] (warning: unable to verify)

Result contains complex when optimal does not.

Time = 11.08 (sec) , antiderivative size = 1198, normalized size of antiderivative = 3.71 \[ \int \frac {x^2 (a+b \text {arctanh}(c+d x))}{e-f x^2} \, dx =\text {Too large to display} \] Input:

Integrate[(x^2*(a + b*ArcTanh[c + d*x]))/(e - f*x^2),x]
 

Output:

-((a*x)/f) + (a*Sqrt[e]*ArcTanh[(Sqrt[f]*x)/Sqrt[e]])/f^(3/2) + (b*(-((c + 
 d*x)*ArcTanh[c + d*x]) + Log[1/Sqrt[1 - (c + d*x)^2]]))/(d*f) + (b*Sqrt[e 
]*(2*d^2*e*ArcTanh[c - (d*Sqrt[e])/Sqrt[f]]*ArcTanh[c + d*x] - 2*c^2*f*Arc 
Tanh[c - (d*Sqrt[e])/Sqrt[f]]*ArcTanh[c + d*x] - 2*d^2*e*ArcTanh[c + (d*Sq 
rt[e])/Sqrt[f]]*ArcTanh[c + d*x] + 2*c^2*f*ArcTanh[c + (d*Sqrt[e])/Sqrt[f] 
]*ArcTanh[c + d*x] - 2*d*Sqrt[e]*Sqrt[f]*ArcTanh[c + d*x]^2 + d*Sqrt[e]*E^ 
ArcTanh[c + (d*Sqrt[e])/Sqrt[f]]*Sqrt[1 - c^2 - (d^2*e)/f - (2*c*d*Sqrt[e] 
)/Sqrt[f]]*Sqrt[f]*ArcTanh[c + d*x]^2 + d*Sqrt[e]*E^ArcTanh[c - (d*Sqrt[e] 
)/Sqrt[f]]*Sqrt[1 - c^2 - (d^2*e)/f + (2*c*d*Sqrt[e])/Sqrt[f]]*Sqrt[f]*Arc 
Tanh[c + d*x]^2 - c*E^ArcTanh[c + (d*Sqrt[e])/Sqrt[f]]*Sqrt[1 - c^2 - (d^2 
*e)/f - (2*c*d*Sqrt[e])/Sqrt[f]]*f*ArcTanh[c + d*x]^2 + c*E^ArcTanh[c - (d 
*Sqrt[e])/Sqrt[f]]*Sqrt[1 - c^2 - (d^2*e)/f + (2*c*d*Sqrt[e])/Sqrt[f]]*f*A 
rcTanh[c + d*x]^2 + 2*d^2*e*ArcTanh[c - (d*Sqrt[e])/Sqrt[f]]*Log[1 - E^(2* 
ArcTanh[c - (d*Sqrt[e])/Sqrt[f]] - 2*ArcTanh[c + d*x])] - 2*c^2*f*ArcTanh[ 
c - (d*Sqrt[e])/Sqrt[f]]*Log[1 - E^(2*ArcTanh[c - (d*Sqrt[e])/Sqrt[f]] - 2 
*ArcTanh[c + d*x])] - 2*d^2*e*ArcTanh[c + d*x]*Log[1 - E^(2*ArcTanh[c - (d 
*Sqrt[e])/Sqrt[f]] - 2*ArcTanh[c + d*x])] + 2*c^2*f*ArcTanh[c + d*x]*Log[1 
 - E^(2*ArcTanh[c - (d*Sqrt[e])/Sqrt[f]] - 2*ArcTanh[c + d*x])] - 2*d^2*e* 
ArcTanh[c + (d*Sqrt[e])/Sqrt[f]]*Log[1 - E^(2*ArcTanh[c + (d*Sqrt[e])/Sqrt 
[f]] - 2*ArcTanh[c + d*x])] + 2*c^2*f*ArcTanh[c + (d*Sqrt[e])/Sqrt[f]]*...
 

Rubi [A] (verified)

Time = 1.16 (sec) , antiderivative size = 524, normalized size of antiderivative = 1.62, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {7276, 2009}

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 (a+b \text {arctanh}(c+d x))}{e-f x^2} \, dx\)

\(\Big \downarrow \) 7276

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a \sqrt {e} \text {arctanh}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{f^{3/2}}-\frac {a x}{f}-\frac {b (c+d x) \text {arctanh}(c+d x)}{d f}+\frac {b \sqrt {e} \operatorname {PolyLog}\left (2,-\frac {\sqrt {f} (-c-d x+1)}{d \sqrt {e}-(1-c) \sqrt {f}}\right )}{4 f^{3/2}}-\frac {b \sqrt {e} \operatorname {PolyLog}\left (2,\frac {\sqrt {f} (-c-d x+1)}{\sqrt {f} (1-c)+d \sqrt {e}}\right )}{4 f^{3/2}}+\frac {b \sqrt {e} \operatorname {PolyLog}\left (2,-\frac {\sqrt {f} (c+d x+1)}{d \sqrt {e}-(c+1) \sqrt {f}}\right )}{4 f^{3/2}}-\frac {b \sqrt {e} \operatorname {PolyLog}\left (2,\frac {\sqrt {f} (c+d x+1)}{\sqrt {f} (c+1)+d \sqrt {e}}\right )}{4 f^{3/2}}+\frac {b \sqrt {e} \log (-c-d x+1) \log \left (\frac {d \left (\sqrt {e}-\sqrt {f} x\right )}{d \sqrt {e}-(1-c) \sqrt {f}}\right )}{4 f^{3/2}}-\frac {b \sqrt {e} \log (c+d x+1) \log \left (\frac {d \left (\sqrt {e}-\sqrt {f} x\right )}{(c+1) \sqrt {f}+d \sqrt {e}}\right )}{4 f^{3/2}}-\frac {b \sqrt {e} \log (-c-d x+1) \log \left (\frac {d \left (\sqrt {e}+\sqrt {f} x\right )}{(1-c) \sqrt {f}+d \sqrt {e}}\right )}{4 f^{3/2}}+\frac {b \sqrt {e} \log (c+d x+1) \log \left (\frac {d \left (\sqrt {e}+\sqrt {f} x\right )}{d \sqrt {e}-(c+1) \sqrt {f}}\right )}{4 f^{3/2}}-\frac {b \log \left (1-(c+d x)^2\right )}{2 d f}\)

Input:

Int[(x^2*(a + b*ArcTanh[c + d*x]))/(e - f*x^2),x]
 

Output:

-((a*x)/f) + (a*Sqrt[e]*ArcTanh[(Sqrt[f]*x)/Sqrt[e]])/f^(3/2) - (b*(c + d* 
x)*ArcTanh[c + d*x])/(d*f) + (b*Sqrt[e]*Log[1 - c - d*x]*Log[(d*(Sqrt[e] - 
 Sqrt[f]*x))/(d*Sqrt[e] - (1 - c)*Sqrt[f])])/(4*f^(3/2)) - (b*Sqrt[e]*Log[ 
1 + c + d*x]*Log[(d*(Sqrt[e] - Sqrt[f]*x))/(d*Sqrt[e] + (1 + c)*Sqrt[f])]) 
/(4*f^(3/2)) - (b*Sqrt[e]*Log[1 - c - d*x]*Log[(d*(Sqrt[e] + Sqrt[f]*x))/( 
d*Sqrt[e] + (1 - c)*Sqrt[f])])/(4*f^(3/2)) + (b*Sqrt[e]*Log[1 + c + d*x]*L 
og[(d*(Sqrt[e] + Sqrt[f]*x))/(d*Sqrt[e] - (1 + c)*Sqrt[f])])/(4*f^(3/2)) - 
 (b*Log[1 - (c + d*x)^2])/(2*d*f) + (b*Sqrt[e]*PolyLog[2, -((Sqrt[f]*(1 - 
c - d*x))/(d*Sqrt[e] - (1 - c)*Sqrt[f]))])/(4*f^(3/2)) - (b*Sqrt[e]*PolyLo 
g[2, (Sqrt[f]*(1 - c - d*x))/(d*Sqrt[e] + (1 - c)*Sqrt[f])])/(4*f^(3/2)) + 
 (b*Sqrt[e]*PolyLog[2, -((Sqrt[f]*(1 + c + d*x))/(d*Sqrt[e] - (1 + c)*Sqrt 
[f]))])/(4*f^(3/2)) - (b*Sqrt[e]*PolyLog[2, (Sqrt[f]*(1 + c + d*x))/(d*Sqr 
t[e] + (1 + c)*Sqrt[f])])/(4*f^(3/2))
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 7276
Int[(u_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> With[{v = RationalFunctionE 
xpand[u/(a + b*x^n), x]}, Int[v, x] /; SumQ[v]] /; FreeQ[{a, b}, x] && IGtQ 
[n, 0]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(638\) vs. \(2(265)=530\).

Time = 1.99 (sec) , antiderivative size = 639, normalized size of antiderivative = 1.98

method result size
risch \(\frac {b \ln \left (-d x -c +1\right ) x}{2 f}+\frac {b \ln \left (-d x -c +1\right ) c}{2 d f}-\frac {b \ln \left (-d x -c +1\right )}{2 d f}+\frac {b}{d f}-\frac {b e \ln \left (-d x -c +1\right ) \ln \left (\frac {d \sqrt {e f}-\left (-d x -c +1\right ) f -f c +f}{d \sqrt {e f}-f c +f}\right )}{4 f \sqrt {e f}}+\frac {b e \ln \left (-d x -c +1\right ) \ln \left (\frac {d \sqrt {e f}+\left (-d x -c +1\right ) f +f c -f}{d \sqrt {e f}+f c -f}\right )}{4 f \sqrt {e f}}-\frac {b e \operatorname {dilog}\left (\frac {d \sqrt {e f}-\left (-d x -c +1\right ) f -f c +f}{d \sqrt {e f}-f c +f}\right )}{4 f \sqrt {e f}}+\frac {b e \operatorname {dilog}\left (\frac {d \sqrt {e f}+\left (-d x -c +1\right ) f +f c -f}{d \sqrt {e f}+f c -f}\right )}{4 f \sqrt {e f}}-\frac {a x}{f}-\frac {a c}{d f}+\frac {a}{d f}-\frac {a e \,\operatorname {arctanh}\left (\frac {2 \left (-d x -c +1\right ) f +2 f c -2 f}{2 d \sqrt {e f}}\right )}{f \sqrt {e f}}-\frac {b \ln \left (d x +c +1\right ) x}{2 f}-\frac {b \ln \left (d x +c +1\right ) c}{2 d f}-\frac {b \ln \left (d x +c +1\right )}{2 d f}-\frac {b e \ln \left (d x +c +1\right ) \ln \left (\frac {d \sqrt {e f}+f c -f \left (d x +c +1\right )+f}{d \sqrt {e f}+f c +f}\right )}{4 f \sqrt {e f}}+\frac {b e \ln \left (d x +c +1\right ) \ln \left (\frac {d \sqrt {e f}-f c +f \left (d x +c +1\right )-f}{d \sqrt {e f}-f c -f}\right )}{4 f \sqrt {e f}}-\frac {b e \operatorname {dilog}\left (\frac {d \sqrt {e f}+f c -f \left (d x +c +1\right )+f}{d \sqrt {e f}+f c +f}\right )}{4 f \sqrt {e f}}+\frac {b e \operatorname {dilog}\left (\frac {d \sqrt {e f}-f c +f \left (d x +c +1\right )-f}{d \sqrt {e f}-f c -f}\right )}{4 f \sqrt {e f}}\) \(639\)
derivativedivides \(\text {Expression too large to display}\) \(10548\)
default \(\text {Expression too large to display}\) \(10548\)
parts \(\text {Expression too large to display}\) \(10551\)

Input:

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

Output:

1/2*b/f*ln(-d*x-c+1)*x+1/2/d*b/f*ln(-d*x-c+1)*c-1/2/d*b/f*ln(-d*x-c+1)+1/d 
*b/f-1/4*b*e/f*ln(-d*x-c+1)/(e*f)^(1/2)*ln((d*(e*f)^(1/2)-(-d*x-c+1)*f-f*c 
+f)/(d*(e*f)^(1/2)-f*c+f))+1/4*b*e/f*ln(-d*x-c+1)/(e*f)^(1/2)*ln((d*(e*f)^ 
(1/2)+(-d*x-c+1)*f+f*c-f)/(d*(e*f)^(1/2)+f*c-f))-1/4*b*e/f/(e*f)^(1/2)*dil 
og((d*(e*f)^(1/2)-(-d*x-c+1)*f-f*c+f)/(d*(e*f)^(1/2)-f*c+f))+1/4*b*e/f/(e* 
f)^(1/2)*dilog((d*(e*f)^(1/2)+(-d*x-c+1)*f+f*c-f)/(d*(e*f)^(1/2)+f*c-f))-a 
*x/f-1/d*a/f*c+1/d*a/f-a*e/f/(e*f)^(1/2)*arctanh(1/2*(2*(-d*x-c+1)*f+2*f*c 
-2*f)/d/(e*f)^(1/2))-1/2*b/f*ln(d*x+c+1)*x-1/2*b/d/f*ln(d*x+c+1)*c-1/2*b/d 
/f*ln(d*x+c+1)-1/4*b*e/f*ln(d*x+c+1)/(e*f)^(1/2)*ln((d*(e*f)^(1/2)+f*c-f*( 
d*x+c+1)+f)/(d*(e*f)^(1/2)+f*c+f))+1/4*b*e/f*ln(d*x+c+1)/(e*f)^(1/2)*ln((d 
*(e*f)^(1/2)-f*c+f*(d*x+c+1)-f)/(d*(e*f)^(1/2)-f*c-f))-1/4*b*e/f/(e*f)^(1/ 
2)*dilog((d*(e*f)^(1/2)+f*c-f*(d*x+c+1)+f)/(d*(e*f)^(1/2)+f*c+f))+1/4*b*e/ 
f/(e*f)^(1/2)*dilog((d*(e*f)^(1/2)-f*c+f*(d*x+c+1)-f)/(d*(e*f)^(1/2)-f*c-f 
))
 

Fricas [F]

\[ \int \frac {x^2 (a+b \text {arctanh}(c+d x))}{e-f x^2} \, dx=\int { -\frac {{\left (b \operatorname {artanh}\left (d x + c\right ) + a\right )} x^{2}}{f x^{2} - e} \,d x } \] Input:

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

Output:

integral(-(b*x^2*arctanh(d*x + c) + a*x^2)/(f*x^2 - e), x)
 

Sympy [F(-1)]

Timed out. \[ \int \frac {x^2 (a+b \text {arctanh}(c+d x))}{e-f x^2} \, dx=\text {Timed out} \] Input:

integrate(x**2*(a+b*atanh(d*x+c))/(-f*x**2+e),x)
                                                                                    
                                                                                    
 

Output:

Timed out
 

Maxima [F(-2)]

Exception generated. \[ \int \frac {x^2 (a+b \text {arctanh}(c+d x))}{e-f x^2} \, dx=\text {Exception raised: ValueError} \] Input:

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

Output:

Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(e>0)', see `assume?` for more de 
tails)Is e
 

Giac [F]

\[ \int \frac {x^2 (a+b \text {arctanh}(c+d x))}{e-f x^2} \, dx=\int { -\frac {{\left (b \operatorname {artanh}\left (d x + c\right ) + a\right )} x^{2}}{f x^{2} - e} \,d x } \] Input:

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

Output:

integrate(-(b*arctanh(d*x + c) + a)*x^2/(f*x^2 - e), x)
 

Mupad [F(-1)]

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

int((x^2*(a + b*atanh(c + d*x)))/(e - f*x^2),x)
 

Output:

int((x^2*(a + b*atanh(c + d*x)))/(e - f*x^2), x)
 

Reduce [F]

\[ \int \frac {x^2 (a+b \text {arctanh}(c+d x))}{e-f x^2} \, dx=\frac {\sqrt {f}\, \sqrt {e}\, \mathrm {log}\left (-\sqrt {f}\, \sqrt {e}-f x \right ) a -\sqrt {f}\, \sqrt {e}\, \mathrm {log}\left (\sqrt {f}\, \sqrt {e}-f x \right ) a +2 \left (\int \frac {\mathit {atanh} \left (d x +c \right ) x^{2}}{-f \,x^{2}+e}d x \right ) b \,f^{2}-2 a f x}{2 f^{2}} \] Input:

int(x^2*(a+b*atanh(d*x+c))/(-f*x^2+e),x)
 

Output:

(sqrt(f)*sqrt(e)*log( - sqrt(f)*sqrt(e) - f*x)*a - sqrt(f)*sqrt(e)*log(sqr 
t(f)*sqrt(e) - f*x)*a + 2*int((atanh(c + d*x)*x**2)/(e - f*x**2),x)*b*f**2 
 - 2*a*f*x)/(2*f**2)