Integrand size = 13, antiderivative size = 71 \[ \int x^m \text {arctanh}(\tanh (a+b x))^2 \, dx=\frac {2 b^2 x^{3+m}}{6+11 m+6 m^2+m^3}-\frac {2 b x^{2+m} \text {arctanh}(\tanh (a+b x))}{2+3 m+m^2}+\frac {x^{1+m} \text {arctanh}(\tanh (a+b x))^2}{1+m} \]
2*b^2*x^(3+m)/(m^3+6*m^2+11*m+6)-2*b*x^(2+m)*arctanh(tanh(b*x+a))/(m^2+3*m +2)+x^(1+m)*arctanh(tanh(b*x+a))^2/(1+m)
Time = 0.12 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.87 \[ \int x^m \text {arctanh}(\tanh (a+b x))^2 \, dx=\frac {x^{1+m} \left (2 b^2 x^2-2 b (3+m) x \text {arctanh}(\tanh (a+b x))+\left (6+5 m+m^2\right ) \text {arctanh}(\tanh (a+b x))^2\right )}{(1+m) (2+m) (3+m)} \]
(x^(1 + m)*(2*b^2*x^2 - 2*b*(3 + m)*x*ArcTanh[Tanh[a + b*x]] + (6 + 5*m + m^2)*ArcTanh[Tanh[a + b*x]]^2))/((1 + m)*(2 + m)*(3 + m))
Time = 0.23 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.93, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2599, 2599, 15}
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 x^m \text {arctanh}(\tanh (a+b x))^2 \, dx\) |
\(\Big \downarrow \) 2599 |
\(\displaystyle \frac {x^{m+1} \text {arctanh}(\tanh (a+b x))^2}{m+1}-\frac {2 b \int x^{m+1} \text {arctanh}(\tanh (a+b x))dx}{m+1}\) |
\(\Big \downarrow \) 2599 |
\(\displaystyle \frac {x^{m+1} \text {arctanh}(\tanh (a+b x))^2}{m+1}-\frac {2 b \left (\frac {x^{m+2} \text {arctanh}(\tanh (a+b x))}{m+2}-\frac {b \int x^{m+2}dx}{m+2}\right )}{m+1}\) |
\(\Big \downarrow \) 15 |
\(\displaystyle \frac {x^{m+1} \text {arctanh}(\tanh (a+b x))^2}{m+1}-\frac {2 b \left (\frac {x^{m+2} \text {arctanh}(\tanh (a+b x))}{m+2}-\frac {b x^{m+3}}{(m+2) (m+3)}\right )}{m+1}\) |
(x^(1 + m)*ArcTanh[Tanh[a + b*x]]^2)/(1 + m) - (2*b*(-((b*x^(3 + m))/((2 + m)*(3 + m))) + (x^(2 + m)*ArcTanh[Tanh[a + b*x]])/(2 + m)))/(1 + m)
3.1.44.3.1 Defintions of rubi rules used
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ {a, m}, x] && NeQ[m, -1]
Int[(u_)^(m_)*(v_)^(n_.), x_Symbol] :> With[{a = Simplify[D[u, x]], b = Sim plify[D[v, x]]}, Simp[u^(m + 1)*(v^n/(a*(m + 1))), x] - Simp[b*(n/(a*(m + 1 ))) Int[u^(m + 1)*v^(n - 1), x], x] /; NeQ[b*u - a*v, 0]] /; FreeQ[{m, n} , x] && PiecewiseLinearQ[u, v, x] && NeQ[m, -1] && ((LtQ[m, -1] && GtQ[n, 0 ] && !(ILtQ[m + n, -2] && (FractionQ[m] || GeQ[2*n + m + 1, 0]))) || (IGtQ [n, 0] && IGtQ[m, 0] && LeQ[n, m]) || (IGtQ[n, 0] && !IntegerQ[m]) || (ILt Q[m, 0] && !IntegerQ[n]))
Time = 0.46 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.38
method | result | size |
default | \(\frac {b^{2} x^{3} {\mathrm e}^{m \ln \left (x \right )}}{3+m}+\frac {\left (a^{2}+2 a \left (\operatorname {arctanh}\left (\tanh \left (b x +a \right )\right )-b x -a \right )+\left (\operatorname {arctanh}\left (\tanh \left (b x +a \right )\right )-b x -a \right )^{2}\right ) x \,{\mathrm e}^{m \ln \left (x \right )}}{1+m}+\frac {2 b \left (\operatorname {arctanh}\left (\tanh \left (b x +a \right )\right )-b x \right ) x^{2} {\mathrm e}^{m \ln \left (x \right )}}{2+m}\) | \(98\) |
parallelrisch | \(-\frac {-6 \operatorname {arctanh}\left (\tanh \left (b x +a \right )\right )^{2} x^{m} x +2 x^{2} x^{m} \operatorname {arctanh}\left (\tanh \left (b x +a \right )\right ) b m -2 b^{2} x^{m} x^{3}+6 b \,\operatorname {arctanh}\left (\tanh \left (b x +a \right )\right ) x^{2} x^{m}-x \,x^{m} \operatorname {arctanh}\left (\tanh \left (b x +a \right )\right )^{2} m^{2}-5 x \,x^{m} \operatorname {arctanh}\left (\tanh \left (b x +a \right )\right )^{2} m}{\left (1+m \right ) \left (2+m \right ) \left (3+m \right )}\) | \(112\) |
risch | \(\text {Expression too large to display}\) | \(5450\) |
b^2/(3+m)*x^3*exp(m*ln(x))+(a^2+2*a*(arctanh(tanh(b*x+a))-b*x-a)+(arctanh( tanh(b*x+a))-b*x-a)^2)/(1+m)*x*exp(m*ln(x))+2*b*(arctanh(tanh(b*x+a))-b*x) /(2+m)*x^2*exp(m*ln(x))
Leaf count of result is larger than twice the leaf count of optimal. 161 vs. \(2 (71) = 142\).
Time = 0.25 (sec) , antiderivative size = 161, normalized size of antiderivative = 2.27 \[ \int x^m \text {arctanh}(\tanh (a+b x))^2 \, dx=\frac {{\left ({\left (b^{2} m^{2} + 3 \, b^{2} m + 2 \, b^{2}\right )} x^{3} + 2 \, {\left (a b m^{2} + 4 \, a b m + 3 \, a b\right )} x^{2} + {\left (a^{2} m^{2} + 5 \, a^{2} m + 6 \, a^{2}\right )} x\right )} \cosh \left (m \log \left (x\right )\right ) + {\left ({\left (b^{2} m^{2} + 3 \, b^{2} m + 2 \, b^{2}\right )} x^{3} + 2 \, {\left (a b m^{2} + 4 \, a b m + 3 \, a b\right )} x^{2} + {\left (a^{2} m^{2} + 5 \, a^{2} m + 6 \, a^{2}\right )} x\right )} \sinh \left (m \log \left (x\right )\right )}{m^{3} + 6 \, m^{2} + 11 \, m + 6} \]
(((b^2*m^2 + 3*b^2*m + 2*b^2)*x^3 + 2*(a*b*m^2 + 4*a*b*m + 3*a*b)*x^2 + (a ^2*m^2 + 5*a^2*m + 6*a^2)*x)*cosh(m*log(x)) + ((b^2*m^2 + 3*b^2*m + 2*b^2) *x^3 + 2*(a*b*m^2 + 4*a*b*m + 3*a*b)*x^2 + (a^2*m^2 + 5*a^2*m + 6*a^2)*x)* sinh(m*log(x)))/(m^3 + 6*m^2 + 11*m + 6)
\[ \int x^m \text {arctanh}(\tanh (a+b x))^2 \, dx=\begin {cases} b^{2} \log {\left (x \right )} - \frac {b \operatorname {atanh}{\left (\tanh {\left (a + b x \right )} \right )}}{x} - \frac {\operatorname {atanh}^{2}{\left (\tanh {\left (a + b x \right )} \right )}}{2 x^{2}} & \text {for}\: m = -3 \\\int \frac {\operatorname {atanh}^{2}{\left (\tanh {\left (a + b x \right )} \right )}}{x^{2}}\, dx & \text {for}\: m = -2 \\\int \frac {\operatorname {atanh}^{2}{\left (\tanh {\left (a + b x \right )} \right )}}{x}\, dx & \text {for}\: m = -1 \\\frac {2 b^{2} x^{3} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} - \frac {2 b m x^{2} x^{m} \operatorname {atanh}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{3} + 6 m^{2} + 11 m + 6} - \frac {6 b x^{2} x^{m} \operatorname {atanh}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {m^{2} x x^{m} \operatorname {atanh}^{2}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {5 m x x^{m} \operatorname {atanh}^{2}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {6 x x^{m} \operatorname {atanh}^{2}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{3} + 6 m^{2} + 11 m + 6} & \text {otherwise} \end {cases} \]
Piecewise((b**2*log(x) - b*atanh(tanh(a + b*x))/x - atanh(tanh(a + b*x))** 2/(2*x**2), Eq(m, -3)), (Integral(atanh(tanh(a + b*x))**2/x**2, x), Eq(m, -2)), (Integral(atanh(tanh(a + b*x))**2/x, x), Eq(m, -1)), (2*b**2*x**3*x* *m/(m**3 + 6*m**2 + 11*m + 6) - 2*b*m*x**2*x**m*atanh(tanh(a + b*x))/(m**3 + 6*m**2 + 11*m + 6) - 6*b*x**2*x**m*atanh(tanh(a + b*x))/(m**3 + 6*m**2 + 11*m + 6) + m**2*x*x**m*atanh(tanh(a + b*x))**2/(m**3 + 6*m**2 + 11*m + 6) + 5*m*x*x**m*atanh(tanh(a + b*x))**2/(m**3 + 6*m**2 + 11*m + 6) + 6*x*x **m*atanh(tanh(a + b*x))**2/(m**3 + 6*m**2 + 11*m + 6), True))
Time = 0.26 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.03 \[ \int x^m \text {arctanh}(\tanh (a+b x))^2 \, dx=\frac {2 \, b^{2} x^{3} x^{m}}{{\left (m + 3\right )} {\left (m + 2\right )} {\left (m + 1\right )}} - \frac {2 \, b x^{2} x^{m} \operatorname {artanh}\left (\tanh \left (b x + a\right )\right )}{{\left (m + 2\right )} {\left (m + 1\right )}} + \frac {x^{m + 1} \operatorname {artanh}\left (\tanh \left (b x + a\right )\right )^{2}}{m + 1} \]
2*b^2*x^3*x^m/((m + 3)*(m + 2)*(m + 1)) - 2*b*x^2*x^m*arctanh(tanh(b*x + a ))/((m + 2)*(m + 1)) + x^(m + 1)*arctanh(tanh(b*x + a))^2/(m + 1)
\[ \int x^m \text {arctanh}(\tanh (a+b x))^2 \, dx=\int { x^{m} \operatorname {artanh}\left (\tanh \left (b x + a\right )\right )^{2} \,d x } \]
Time = 3.64 (sec) , antiderivative size = 203, normalized size of antiderivative = 2.86 \[ \int x^m \text {arctanh}(\tanh (a+b x))^2 \, dx=\frac {4\,b^2\,x^m\,x^3\,\left (m^2+3\,m+2\right )}{4\,m^3+24\,m^2+44\,m+24}+\frac {x\,x^m\,{\left (\ln \left (\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )-\ln \left (\frac {2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )+2\,b\,x\right )}^2\,\left (m^2+5\,m+6\right )}{4\,m^3+24\,m^2+44\,m+24}-\frac {4\,b\,x^m\,x^2\,\left (\ln \left (\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )-\ln \left (\frac {2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )+2\,b\,x\right )\,\left (m^2+4\,m+3\right )}{4\,m^3+24\,m^2+44\,m+24} \]
(4*b^2*x^m*x^3*(3*m + m^2 + 2))/(44*m + 24*m^2 + 4*m^3 + 24) + (x*x^m*(log (2/(exp(2*a)*exp(2*b*x) + 1)) - log((2*exp(2*a)*exp(2*b*x))/(exp(2*a)*exp( 2*b*x) + 1)) + 2*b*x)^2*(5*m + m^2 + 6))/(44*m + 24*m^2 + 4*m^3 + 24) - (4 *b*x^m*x^2*(log(2/(exp(2*a)*exp(2*b*x) + 1)) - log((2*exp(2*a)*exp(2*b*x)) /(exp(2*a)*exp(2*b*x) + 1)) + 2*b*x)*(4*m + m^2 + 3))/(44*m + 24*m^2 + 4*m ^3 + 24)