\(\int (a+b \text {arctanh}(c x)) (d+e \log (f+g x^2)) \, dx\) [533]

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

Optimal result

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

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

Mathematica [C] (warning: unable to verify)

Result contains complex when optimal does not.

Time = 2.30 (sec) , antiderivative size = 1251, normalized size of antiderivative = 2.09 \[ \int (a+b \text {arctanh}(c x)) \left (d+e \log \left (f+g x^2\right )\right ) \, dx =\text {Too large to display} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 1.86 (sec) , antiderivative size = 609, normalized size of antiderivative = 1.02, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.571, Rules used = {6635, 2925, 2841, 2840, 2838, 6542, 2009, 6536, 218, 6534, 2856, 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 (a+b \text {arctanh}(c x)) \left (d+e \log \left (f+g x^2\right )\right ) \, dx\)

\(\Big \downarrow \) 6635

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

\(\Big \downarrow \) 2925

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

\(\Big \downarrow \) 2841

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

\(\Big \downarrow \) 2840

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

\(\Big \downarrow \) 2838

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

\(\Big \downarrow \) 6542

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

\(\Big \downarrow \) 2009

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

\(\Big \downarrow \) 6536

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

\(\Big \downarrow \) 218

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

\(\Big \downarrow \) 6534

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

\(\Big \downarrow \) 2856

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

x*(a + b*ArcTanh[c*x])*(d + e*Log[f + g*x^2]) - 2*e*g*((a*x + b*x*ArcTanh[ 
c*x] + (b*Log[1 - c^2*x^2])/(2*c))/g - (f*((a*ArcTan[(Sqrt[g]*x)/Sqrt[f]]) 
/(Sqrt[f]*Sqrt[g]) + b*((-1/2*(Log[1 - c*x]*Log[(c*(Sqrt[-f] - Sqrt[g]*x)) 
/(c*Sqrt[-f] - Sqrt[g])])/(Sqrt[-f]*Sqrt[g]) + (Log[1 - c*x]*Log[(c*(Sqrt[ 
-f] + Sqrt[g]*x))/(c*Sqrt[-f] + Sqrt[g])])/(2*Sqrt[-f]*Sqrt[g]) - PolyLog[ 
2, -((Sqrt[g]*(1 - c*x))/(c*Sqrt[-f] - Sqrt[g]))]/(2*Sqrt[-f]*Sqrt[g]) + P 
olyLog[2, (Sqrt[g]*(1 - c*x))/(c*Sqrt[-f] + Sqrt[g])]/(2*Sqrt[-f]*Sqrt[g]) 
)/2 + ((Log[1 + c*x]*Log[(c*(Sqrt[-f] - Sqrt[g]*x))/(c*Sqrt[-f] + Sqrt[g]) 
])/(2*Sqrt[-f]*Sqrt[g]) - (Log[1 + c*x]*Log[(c*(Sqrt[-f] + Sqrt[g]*x))/(c* 
Sqrt[-f] - Sqrt[g])])/(2*Sqrt[-f]*Sqrt[g]) - PolyLog[2, -((Sqrt[g]*(1 + c* 
x))/(c*Sqrt[-f] - Sqrt[g]))]/(2*Sqrt[-f]*Sqrt[g]) + PolyLog[2, (Sqrt[g]*(1 
 + c*x))/(c*Sqrt[-f] + Sqrt[g])]/(2*Sqrt[-f]*Sqrt[g]))/2)))/g) - (b*c*(-(( 
Log[(g*(1 - c^2*x^2))/(c^2*f + g)]*(d + e*Log[f + g*x^2]))/c^2) - (e*PolyL 
og[2, (c^2*(f + g*x^2))/(c^2*f + g)])/c^2))/2
 

Defintions of rubi rules used

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 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2838
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 
, (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
 

rule 2840
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_ 
Symbol] :> Simp[1/g   Subst[Int[(a + b*Log[1 + c*e*(x/g)])/x, x], x, f + g* 
x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g + c 
*(e*f - d*g), 0]
 

rule 2841
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_ 
)), x_Symbol] :> Simp[Log[e*((f + g*x)/(e*f - d*g))]*((a + b*Log[c*(d + e*x 
)^n])/g), x] - Simp[b*e*(n/g)   Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d + e*x 
), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]
 

rule 2856
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_. 
)*(x_)^(r_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*Log[c*(d + e*x) 
^n])^p, (f + g*x^r)^q, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, r}, x] && I 
GtQ[p, 0] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[r] && NeQ[r, 1]))
 

rule 2925
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m 
_.)*((f_) + (g_.)*(x_)^(s_))^(r_.), x_Symbol] :> Simp[1/n   Subst[Int[x^(Si 
mplify[(m + 1)/n] - 1)*(f + g*x^(s/n))^r*(a + b*Log[c*(d + e*x)^p])^q, x], 
x, x^n], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, q, r, s}, x] && Integer 
Q[r] && IntegerQ[s/n] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0 
] || IGtQ[q, 0])
 

rule 6534
Int[ArcTanh[(c_.)*(x_)]/((d_.) + (e_.)*(x_)^2), x_Symbol] :> Simp[1/2   Int 
[Log[1 + c*x]/(d + e*x^2), x], x] - Simp[1/2   Int[Log[1 - c*x]/(d + e*x^2) 
, x], x] /; FreeQ[{c, d, e}, x]
 

rule 6536
Int[(ArcTanh[(c_.)*(x_)]*(b_.) + (a_))/((d_.) + (e_.)*(x_)^2), x_Symbol] :> 
 Simp[a   Int[1/(d + e*x^2), x], x] + Simp[b   Int[ArcTanh[c*x]/(d + e*x^2) 
, x], x] /; FreeQ[{a, b, c, d, e}, x]
 

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]
 

rule 6635
Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))*((d_.) + Log[(f_.) + (g_.)*(x_)^2]* 
(e_.)), x_Symbol] :> Simp[x*(d + e*Log[f + g*x^2])*(a + b*ArcTanh[c*x]), x] 
 + (-Simp[b*c   Int[x*((d + e*Log[f + g*x^2])/(1 - c^2*x^2)), x], x] - Simp 
[2*e*g   Int[x^2*((a + b*ArcTanh[c*x])/(f + g*x^2)), x], x]) /; FreeQ[{a, b 
, c, d, e, f, g}, x]
 
Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 18.32 (sec) , antiderivative size = 3550, normalized size of antiderivative = 5.93

method result size
risch \(\text {Expression too large to display}\) \(3550\)

Input:

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

Output:

a*d*x+1/2/c*ln(-c*x+1)*b*d-2*a*e*x+4*b*e/c-b*e/c*ln(c*x+1)+a*e*x*ln(g*x^2+ 
f)+1/2*d*b*ln(c*x+1)*x-1/2*d*b*ln(-c*x+1)*x+e*b*ln(-c*x+1)*x-b*e*x*ln(c*x+ 
1)-b*d/c-1/2*I*e*b/c*Pi*csgn(I*c^2)^3-1/4*I*e*b/c*Pi*ln(-c*x+1)*csgn(I/c^2 
)*csgn(I*(c^2*f+((c*x-1)^2+2*c*x-1)*g))*csgn(I/c^2*(c^2*f+((c*x-1)^2+2*c*x 
-1)*g))+1/4*I*e*b*Pi*ln(-c*x+1)*csgn(I/c^2)*csgn(I*(c^2*f+((c*x-1)^2+2*c*x 
-1)*g))*csgn(I/c^2*(c^2*f+((c*x-1)^2+2*c*x-1)*g))*x-1/4*I*e*b/c*Pi*ln(c*x+ 
1)*csgn(I/c^2)*csgn(I*(c^2*f+((c*x+1)^2-2*c*x-1)*g))*csgn(I/c^2*(c^2*f+((c 
*x+1)^2-2*c*x-1)*g))-1/4*I*e*b*Pi*ln(c*x+1)*csgn(I/c^2)*csgn(I*(c^2*f+((c* 
x+1)^2-2*c*x-1)*g))*csgn(I/c^2*(c^2*f+((c*x+1)^2-2*c*x-1)*g))*x-1/4*I*e*b/ 
c*Pi*csgn(I/c^2)*csgn(I/c^2*(c^2*f+((c*x-1)^2+2*c*x-1)*g))^2-1/4*I*e*b/c*P 
i*csgn(I*(c^2*f+((c*x-1)^2+2*c*x-1)*g))*csgn(I/c^2*(c^2*f+((c*x-1)^2+2*c*x 
-1)*g))^2+1/4*I*e*b/c*Pi*ln(-c*x+1)*csgn(I*c^2)^3-1/4*I*e*b/c*Pi*ln(-c*x+1 
)*csgn(I/c^2*(c^2*f+((c*x-1)^2+2*c*x-1)*g))^3+1/4*I*e*b*Pi*csgn(I/c^2)*csg 
n(I/c^2*(c^2*f+((c*x-1)^2+2*c*x-1)*g))^2*x-1/4*I*e*b*Pi*ln(-c*x+1)*csgn(I* 
c^2)^3*x+1/4*I*e*b*Pi*csgn(I*(c^2*f+((c*x-1)^2+2*c*x-1)*g))*csgn(I/c^2*(c^ 
2*f+((c*x-1)^2+2*c*x-1)*g))^2*x+1/4*I*e*b*Pi*ln(-c*x+1)*csgn(I/c^2*(c^2*f+ 
((c*x-1)^2+2*c*x-1)*g))^3*x-1/4*I*e*b*Pi*ln(c*x+1)*csgn(I/c^2*(c^2*f+((c*x 
+1)^2-2*c*x-1)*g))^3*x-1/4*I*e*b/c*Pi*csgn(I/c^2)*csgn(I/c^2*(c^2*f+((c*x+ 
1)^2-2*c*x-1)*g))^2-1/4*I*e*b/c*Pi*csgn(I*(c^2*f+((c*x+1)^2-2*c*x-1)*g))*c 
sgn(I/c^2*(c^2*f+((c*x+1)^2-2*c*x-1)*g))^2+1/4*I*e*b/c*Pi*ln(c*x+1)*csg...
 

Fricas [F]

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

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

Output:

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

Sympy [F(-1)]

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

integrate((a+b*atanh(c*x))*(d+e*ln(g*x**2+f)),x)
                                                                                    
                                                                                    
 

Output:

Timed out
 

Maxima [F]

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

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

Output:

(2*g*(f*arctan(g*x/sqrt(f*g))/(sqrt(f*g)*g) - x/g) + x*log(g*x^2 + f))*a*e 
 + a*d*x + 1/2*b*e*(((c*x + 1)*log(c*x + 1) - (c*x - 1)*log(-c*x + 1))*log 
(g*x^2 + f)/c + integrate(-2*((c*g*x^2 + g*x)*log(c*x + 1) - (c*g*x^2 - g* 
x)*log(-c*x + 1))/(c*g*x^2 + c*f), x)) + 1/2*(2*c*x*arctanh(c*x) + log(-c^ 
2*x^2 + 1))*b*d/c
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

(8*sqrt(g)*sqrt(f)*atan((g*x)/(sqrt(g)*sqrt(f)))*a*c*e - 4*atanh(c*x)**2*b 
*c**2*e*f + 4*atanh(c*x)*log(f + g*x**2)*b*c*e*g*x + 4*atanh(c*x)*b*c*d*g* 
x - 8*atanh(c*x)*b*c*e*g*x - 8*int(atanh(c*x)/(c**2*f*x**2 + c**2*g*x**4 - 
 f - g*x**2),x)*b*c**3*e*f**2 - 8*int(atanh(c*x)/(c**2*f*x**2 + c**2*g*x** 
4 - f - g*x**2),x)*b*c*e*f*g + 4*int((log(f + g*x**2)*x)/(c**2*f*x**2 + c* 
*2*g*x**4 - f - g*x**2),x)*b*c**2*e*f*g + 4*int((log(f + g*x**2)*x)/(c**2* 
f*x**2 + c**2*g*x**4 - f - g*x**2),x)*b*e*g**2 + 2*log(c**2*x - c)*b*d*g - 
 4*log(c**2*x - c)*b*e*g + 2*log(c**2*x + c)*b*d*g - 4*log(c**2*x + c)*b*e 
*g + log(f + g*x**2)**2*b*e*g + 4*log(f + g*x**2)*a*c*e*g*x + 4*a*c*d*g*x 
- 8*a*c*e*g*x)/(4*c*g)