\(\int (a+b \text {arctanh}(c \sqrt {x}))^2 \, dx\) [197]

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

Optimal result

Integrand size = 14, antiderivative size = 85 \[ \int \left (a+b \text {arctanh}\left (c \sqrt {x}\right )\right )^2 \, dx=\frac {2 a b \sqrt {x}}{c}+\frac {2 b^2 \sqrt {x} \text {arctanh}\left (c \sqrt {x}\right )}{c}-\frac {\left (a+b \text {arctanh}\left (c \sqrt {x}\right )\right )^2}{c^2}+x \left (a+b \text {arctanh}\left (c \sqrt {x}\right )\right )^2+\frac {b^2 \log \left (1-c^2 x\right )}{c^2} \] Output:

2*a*b*x^(1/2)/c+2*b^2*x^(1/2)*arctanh(c*x^(1/2))/c-(a+b*arctanh(c*x^(1/2)) 
)^2/c^2+x*(a+b*arctanh(c*x^(1/2)))^2+b^2*ln(-c^2*x+1)/c^2
 

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.35 \[ \int \left (a+b \text {arctanh}\left (c \sqrt {x}\right )\right )^2 \, dx=\frac {2 a b c \sqrt {x}+a^2 c^2 x+2 b c \left (b+a c \sqrt {x}\right ) \sqrt {x} \text {arctanh}\left (c \sqrt {x}\right )+b^2 \left (-1+c^2 x\right ) \text {arctanh}\left (c \sqrt {x}\right )^2+b (a+b) \log \left (1-c \sqrt {x}\right )-a b \log \left (1+c \sqrt {x}\right )+b^2 \log \left (1+c \sqrt {x}\right )}{c^2} \] Input:

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

Output:

(2*a*b*c*Sqrt[x] + a^2*c^2*x + 2*b*c*(b + a*c*Sqrt[x])*Sqrt[x]*ArcTanh[c*S 
qrt[x]] + b^2*(-1 + c^2*x)*ArcTanh[c*Sqrt[x]]^2 + b*(a + b)*Log[1 - c*Sqrt 
[x]] - a*b*Log[1 + c*Sqrt[x]] + b^2*Log[1 + c*Sqrt[x]])/c^2
 

Rubi [A] (verified)

Time = 0.51 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.13, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {6442, 6452, 6542, 2009, 6510}

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

\(\Big \downarrow \) 6442

\(\displaystyle 2 \int \sqrt {x} \left (a+b \text {arctanh}\left (c \sqrt {x}\right )\right )^2d\sqrt {x}\)

\(\Big \downarrow \) 6452

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

\(\Big \downarrow \) 6542

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

\(\Big \downarrow \) 2009

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

\(\Big \downarrow \) 6510

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

Input:

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

Output:

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

Defintions of rubi rules used

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

rule 6442
Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_)]*(b_.))^(p_), x_Symbol] :> With[{k = D 
enominator[n]}, Simp[k   Subst[Int[x^(k - 1)*(a + b*ArcTanh[c*x^(k*n)])^p, 
x], x, x^(1/k)], x]] /; FreeQ[{a, b, c}, x] && IGtQ[p, 1] && FractionQ[n]
 

rule 6452
Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] : 
> Simp[x^(m + 1)*((a + b*ArcTanh[c*x^n])^p/(m + 1)), x] - Simp[b*c*n*(p/(m 
+ 1))   Int[x^(m + n)*((a + b*ArcTanh[c*x^n])^(p - 1)/(1 - c^2*x^(2*n))), x 
], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1 
] && IntegerQ[m])) && NeQ[m, -1]
 

rule 6510
Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symb 
ol] :> Simp[(a + b*ArcTanh[c*x])^(p + 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b 
, c, d, e, p}, x] && EqQ[c^2*d + e, 0] && NeQ[p, -1]
 

rule 6542
Int[(((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_))/((d_) + ( 
e_.)*(x_)^2), x_Symbol] :> Simp[f^2/e   Int[(f*x)^(m - 2)*(a + b*ArcTanh[c* 
x])^p, x], x] - Simp[d*(f^2/e)   Int[(f*x)^(m - 2)*((a + b*ArcTanh[c*x])^p/ 
(d + e*x^2)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && GtQ[p, 0] && GtQ[m, 
 1]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(212\) vs. \(2(75)=150\).

Time = 1.00 (sec) , antiderivative size = 213, normalized size of antiderivative = 2.51

method result size
parts \(x \,a^{2}+\frac {2 b^{2} \left (\frac {c^{2} x \operatorname {arctanh}\left (c \sqrt {x}\right )^{2}}{2}+\operatorname {arctanh}\left (c \sqrt {x}\right ) c \sqrt {x}+\frac {\operatorname {arctanh}\left (c \sqrt {x}\right ) \ln \left (c \sqrt {x}-1\right )}{2}-\frac {\operatorname {arctanh}\left (c \sqrt {x}\right ) \ln \left (1+c \sqrt {x}\right )}{2}-\frac {\ln \left (c \sqrt {x}-1\right ) \ln \left (\frac {c \sqrt {x}}{2}+\frac {1}{2}\right )}{4}+\frac {\ln \left (c \sqrt {x}-1\right )^{2}}{8}+\frac {\ln \left (c \sqrt {x}-1\right )}{2}+\frac {\ln \left (1+c \sqrt {x}\right )}{2}+\frac {\ln \left (1+c \sqrt {x}\right )^{2}}{8}-\frac {\left (\ln \left (1+c \sqrt {x}\right )-\ln \left (\frac {c \sqrt {x}}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {c \sqrt {x}}{2}+\frac {1}{2}\right )}{4}\right )}{c^{2}}+\frac {4 a b \left (\frac {c^{2} x \,\operatorname {arctanh}\left (c \sqrt {x}\right )}{2}+\frac {c \sqrt {x}}{2}+\frac {\ln \left (c \sqrt {x}-1\right )}{4}-\frac {\ln \left (1+c \sqrt {x}\right )}{4}\right )}{c^{2}}\) \(213\)
derivativedivides \(\frac {a^{2} c^{2} x +2 b^{2} \left (\frac {c^{2} x \operatorname {arctanh}\left (c \sqrt {x}\right )^{2}}{2}+\operatorname {arctanh}\left (c \sqrt {x}\right ) c \sqrt {x}+\frac {\operatorname {arctanh}\left (c \sqrt {x}\right ) \ln \left (c \sqrt {x}-1\right )}{2}-\frac {\operatorname {arctanh}\left (c \sqrt {x}\right ) \ln \left (1+c \sqrt {x}\right )}{2}-\frac {\ln \left (c \sqrt {x}-1\right ) \ln \left (\frac {c \sqrt {x}}{2}+\frac {1}{2}\right )}{4}+\frac {\ln \left (c \sqrt {x}-1\right )^{2}}{8}+\frac {\ln \left (c \sqrt {x}-1\right )}{2}+\frac {\ln \left (1+c \sqrt {x}\right )}{2}+\frac {\ln \left (1+c \sqrt {x}\right )^{2}}{8}-\frac {\left (\ln \left (1+c \sqrt {x}\right )-\ln \left (\frac {c \sqrt {x}}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {c \sqrt {x}}{2}+\frac {1}{2}\right )}{4}\right )+4 a b \left (\frac {c^{2} x \,\operatorname {arctanh}\left (c \sqrt {x}\right )}{2}+\frac {c \sqrt {x}}{2}+\frac {\ln \left (c \sqrt {x}-1\right )}{4}-\frac {\ln \left (1+c \sqrt {x}\right )}{4}\right )}{c^{2}}\) \(215\)
default \(\frac {a^{2} c^{2} x +2 b^{2} \left (\frac {c^{2} x \operatorname {arctanh}\left (c \sqrt {x}\right )^{2}}{2}+\operatorname {arctanh}\left (c \sqrt {x}\right ) c \sqrt {x}+\frac {\operatorname {arctanh}\left (c \sqrt {x}\right ) \ln \left (c \sqrt {x}-1\right )}{2}-\frac {\operatorname {arctanh}\left (c \sqrt {x}\right ) \ln \left (1+c \sqrt {x}\right )}{2}-\frac {\ln \left (c \sqrt {x}-1\right ) \ln \left (\frac {c \sqrt {x}}{2}+\frac {1}{2}\right )}{4}+\frac {\ln \left (c \sqrt {x}-1\right )^{2}}{8}+\frac {\ln \left (c \sqrt {x}-1\right )}{2}+\frac {\ln \left (1+c \sqrt {x}\right )}{2}+\frac {\ln \left (1+c \sqrt {x}\right )^{2}}{8}-\frac {\left (\ln \left (1+c \sqrt {x}\right )-\ln \left (\frac {c \sqrt {x}}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {c \sqrt {x}}{2}+\frac {1}{2}\right )}{4}\right )+4 a b \left (\frac {c^{2} x \,\operatorname {arctanh}\left (c \sqrt {x}\right )}{2}+\frac {c \sqrt {x}}{2}+\frac {\ln \left (c \sqrt {x}-1\right )}{4}-\frac {\ln \left (1+c \sqrt {x}\right )}{4}\right )}{c^{2}}\) \(215\)

Input:

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

Output:

x*a^2+2*b^2/c^2*(1/2*c^2*x*arctanh(c*x^(1/2))^2+arctanh(c*x^(1/2))*c*x^(1/ 
2)+1/2*arctanh(c*x^(1/2))*ln(c*x^(1/2)-1)-1/2*arctanh(c*x^(1/2))*ln(1+c*x^ 
(1/2))-1/4*ln(c*x^(1/2)-1)*ln(1/2*c*x^(1/2)+1/2)+1/8*ln(c*x^(1/2)-1)^2+1/2 
*ln(c*x^(1/2)-1)+1/2*ln(1+c*x^(1/2))+1/8*ln(1+c*x^(1/2))^2-1/4*(ln(1+c*x^( 
1/2))-ln(1/2*c*x^(1/2)+1/2))*ln(-1/2*c*x^(1/2)+1/2))+4*a*b/c^2*(1/2*c^2*x* 
arctanh(c*x^(1/2))+1/2*c*x^(1/2)+1/4*ln(c*x^(1/2)-1)-1/4*ln(1+c*x^(1/2)))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 165 vs. \(2 (75) = 150\).

Time = 0.10 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.94 \[ \int \left (a+b \text {arctanh}\left (c \sqrt {x}\right )\right )^2 \, dx=\frac {4 \, a^{2} c^{2} x + 8 \, a b c \sqrt {x} + {\left (b^{2} c^{2} x - b^{2}\right )} \log \left (-\frac {c^{2} x + 2 \, c \sqrt {x} + 1}{c^{2} x - 1}\right )^{2} + 4 \, {\left (a b c^{2} - a b + b^{2}\right )} \log \left (c \sqrt {x} + 1\right ) - 4 \, {\left (a b c^{2} - a b - b^{2}\right )} \log \left (c \sqrt {x} - 1\right ) + 4 \, {\left (a b c^{2} x - a b c^{2} + b^{2} c \sqrt {x}\right )} \log \left (-\frac {c^{2} x + 2 \, c \sqrt {x} + 1}{c^{2} x - 1}\right )}{4 \, c^{2}} \] Input:

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

Output:

1/4*(4*a^2*c^2*x + 8*a*b*c*sqrt(x) + (b^2*c^2*x - b^2)*log(-(c^2*x + 2*c*s 
qrt(x) + 1)/(c^2*x - 1))^2 + 4*(a*b*c^2 - a*b + b^2)*log(c*sqrt(x) + 1) - 
4*(a*b*c^2 - a*b - b^2)*log(c*sqrt(x) - 1) + 4*(a*b*c^2*x - a*b*c^2 + b^2* 
c*sqrt(x))*log(-(c^2*x + 2*c*sqrt(x) + 1)/(c^2*x - 1)))/c^2
 

Sympy [F]

\[ \int \left (a+b \text {arctanh}\left (c \sqrt {x}\right )\right )^2 \, dx=\int \left (a + b \operatorname {atanh}{\left (c \sqrt {x} \right )}\right )^{2}\, dx \] Input:

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

Output:

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 175 vs. \(2 (75) = 150\).

Time = 0.04 (sec) , antiderivative size = 175, normalized size of antiderivative = 2.06 \[ \int \left (a+b \text {arctanh}\left (c \sqrt {x}\right )\right )^2 \, dx={\left (c {\left (\frac {2 \, \sqrt {x}}{c^{2}} - \frac {\log \left (c \sqrt {x} + 1\right )}{c^{3}} + \frac {\log \left (c \sqrt {x} - 1\right )}{c^{3}}\right )} + 2 \, x \operatorname {artanh}\left (c \sqrt {x}\right )\right )} a b + \frac {1}{4} \, {\left (4 \, c {\left (\frac {2 \, \sqrt {x}}{c^{2}} - \frac {\log \left (c \sqrt {x} + 1\right )}{c^{3}} + \frac {\log \left (c \sqrt {x} - 1\right )}{c^{3}}\right )} \operatorname {artanh}\left (c \sqrt {x}\right ) + 4 \, x \operatorname {artanh}\left (c \sqrt {x}\right )^{2} - \frac {2 \, {\left (\log \left (c \sqrt {x} - 1\right ) - 2\right )} \log \left (c \sqrt {x} + 1\right ) - \log \left (c \sqrt {x} + 1\right )^{2} - \log \left (c \sqrt {x} - 1\right )^{2} - 4 \, \log \left (c \sqrt {x} - 1\right )}{c^{2}}\right )} b^{2} + a^{2} x \] Input:

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [B] (verification not implemented)

Time = 3.77 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.11 \[ \int \left (a+b \text {arctanh}\left (c \sqrt {x}\right )\right )^2 \, dx=a^2\,x+\frac {c\,\left (2\,b^2\,\sqrt {x}\,\mathrm {atanh}\left (c\,\sqrt {x}\right )+2\,a\,b\,\sqrt {x}\right )-b^2\,{\mathrm {atanh}\left (c\,\sqrt {x}\right )}^2+b^2\,\ln \left (c^2\,x-1\right )-2\,a\,b\,\mathrm {atanh}\left (c\,\sqrt {x}\right )}{c^2}+b^2\,x\,{\mathrm {atanh}\left (c\,\sqrt {x}\right )}^2+2\,a\,b\,x\,\mathrm {atanh}\left (c\,\sqrt {x}\right ) \] Input:

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

Output:

a^2*x + (c*(2*b^2*x^(1/2)*atanh(c*x^(1/2)) + 2*a*b*x^(1/2)) - b^2*atanh(c* 
x^(1/2))^2 + b^2*log(c^2*x - 1) - 2*a*b*atanh(c*x^(1/2)))/c^2 + b^2*x*atan 
h(c*x^(1/2))^2 + 2*a*b*x*atanh(c*x^(1/2))
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.22 \[ \int \left (a+b \text {arctanh}\left (c \sqrt {x}\right )\right )^2 \, dx=\frac {\mathit {atanh} \left (\sqrt {x}\, c \right )^{2} b^{2} c^{2} x -\mathit {atanh} \left (\sqrt {x}\, c \right )^{2} b^{2}+2 \sqrt {x}\, \mathit {atanh} \left (\sqrt {x}\, c \right ) b^{2} c +2 \mathit {atanh} \left (\sqrt {x}\, c \right ) a b \,c^{2} x -2 \mathit {atanh} \left (\sqrt {x}\, c \right ) a b +2 \mathit {atanh} \left (\sqrt {x}\, c \right ) b^{2}+2 \sqrt {x}\, a b c +2 \,\mathrm {log}\left (\sqrt {x}\, c -1\right ) b^{2}+a^{2} c^{2} x}{c^{2}} \] Input:

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

Output:

(atanh(sqrt(x)*c)**2*b**2*c**2*x - atanh(sqrt(x)*c)**2*b**2 + 2*sqrt(x)*at 
anh(sqrt(x)*c)*b**2*c + 2*atanh(sqrt(x)*c)*a*b*c**2*x - 2*atanh(sqrt(x)*c) 
*a*b + 2*atanh(sqrt(x)*c)*b**2 + 2*sqrt(x)*a*b*c + 2*log(sqrt(x)*c - 1)*b* 
*2 + a**2*c**2*x)/c**2