\(\int \tanh ^p(a+\log (x)) \, dx\) [169]

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

Optimal result

Integrand size = 7, antiderivative size = 61 \[ \int \tanh ^p(a+\log (x)) \, dx=x \left (1-e^{2 a} x^2\right )^{-p} \left (-1+e^{2 a} x^2\right )^p \operatorname {AppellF1}\left (\frac {1}{2},-p,p,\frac {3}{2},e^{2 a} x^2,-e^{2 a} x^2\right ) \]

[Out]

x*(-1+exp(2*a)*x^2)^p*AppellF1(1/2,-p,p,3/2,exp(2*a)*x^2,-exp(2*a)*x^2)/((1-exp(2*a)*x^2)^p)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {5652, 441, 440} \[ \int \tanh ^p(a+\log (x)) \, dx=x \left (1-e^{2 a} x^2\right )^{-p} \left (e^{2 a} x^2-1\right )^p \operatorname {AppellF1}\left (\frac {1}{2},-p,p,\frac {3}{2},e^{2 a} x^2,-e^{2 a} x^2\right ) \]

[In]

Int[Tanh[a + Log[x]]^p,x]

[Out]

(x*(-1 + E^(2*a)*x^2)^p*AppellF1[1/2, -p, p, 3/2, E^(2*a)*x^2, -(E^(2*a)*x^2)])/(1 - E^(2*a)*x^2)^p

Rule 440

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[a^p*c^q*x*AppellF1[1/n, -p,
 -q, 1 + 1/n, (-b)*(x^n/a), (-d)*(x^n/c)], x] /; FreeQ[{a, b, c, d, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n
, -1] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])

Rule 441

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Dist[a^IntPart[p]*((a + b*x^n)^F
racPart[p]/(1 + b*(x^n/a))^FracPart[p]), Int[(1 + b*(x^n/a))^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, n,
p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n, -1] &&  !(IntegerQ[p] || GtQ[a, 0])

Rule 5652

Int[Tanh[((a_.) + Log[x_]*(b_.))*(d_.)]^(p_.), x_Symbol] :> Int[(-1 + E^(2*a*d)*x^(2*b*d))^p/(1 + E^(2*a*d)*x^
(2*b*d))^p, x] /; FreeQ[{a, b, d, p}, x]

Rubi steps \begin{align*} \text {integral}& = \int \left (-1+e^{2 a} x^2\right )^p \left (1+e^{2 a} x^2\right )^{-p} \, dx \\ & = \left (\left (1-e^{2 a} x^2\right )^{-p} \left (-1+e^{2 a} x^2\right )^p\right ) \int \left (1-e^{2 a} x^2\right )^p \left (1+e^{2 a} x^2\right )^{-p} \, dx \\ & = x \left (1-e^{2 a} x^2\right )^{-p} \left (-1+e^{2 a} x^2\right )^p \operatorname {AppellF1}\left (\frac {1}{2},-p,p,\frac {3}{2},e^{2 a} x^2,-e^{2 a} x^2\right ) \\ \end{align*}

Mathematica [B] (warning: unable to verify)

Leaf count is larger than twice the leaf count of optimal. \(171\) vs. \(2(61)=122\).

Time = 0.68 (sec) , antiderivative size = 171, normalized size of antiderivative = 2.80 \[ \int \tanh ^p(a+\log (x)) \, dx=\frac {3 x \left (\frac {-1+e^{2 a} x^2}{1+e^{2 a} x^2}\right )^p \operatorname {AppellF1}\left (\frac {1}{2},-p,p,\frac {3}{2},e^{2 a} x^2,-e^{2 a} x^2\right )}{3 \operatorname {AppellF1}\left (\frac {1}{2},-p,p,\frac {3}{2},e^{2 a} x^2,-e^{2 a} x^2\right )-2 e^{2 a} p x^2 \left (\operatorname {AppellF1}\left (\frac {3}{2},1-p,p,\frac {5}{2},e^{2 a} x^2,-e^{2 a} x^2\right )+\operatorname {AppellF1}\left (\frac {3}{2},-p,1+p,\frac {5}{2},e^{2 a} x^2,-e^{2 a} x^2\right )\right )} \]

[In]

Integrate[Tanh[a + Log[x]]^p,x]

[Out]

(3*x*((-1 + E^(2*a)*x^2)/(1 + E^(2*a)*x^2))^p*AppellF1[1/2, -p, p, 3/2, E^(2*a)*x^2, -(E^(2*a)*x^2)])/(3*Appel
lF1[1/2, -p, p, 3/2, E^(2*a)*x^2, -(E^(2*a)*x^2)] - 2*E^(2*a)*p*x^2*(AppellF1[3/2, 1 - p, p, 5/2, E^(2*a)*x^2,
 -(E^(2*a)*x^2)] + AppellF1[3/2, -p, 1 + p, 5/2, E^(2*a)*x^2, -(E^(2*a)*x^2)]))

Maple [F]

\[\int \tanh \left (a +\ln \left (x \right )\right )^{p}d x\]

[In]

int(tanh(a+ln(x))^p,x)

[Out]

int(tanh(a+ln(x))^p,x)

Fricas [F]

\[ \int \tanh ^p(a+\log (x)) \, dx=\int { \tanh \left (a + \log \left (x\right )\right )^{p} \,d x } \]

[In]

integrate(tanh(a+log(x))^p,x, algorithm="fricas")

[Out]

integral(tanh(a + log(x))^p, x)

Sympy [F]

\[ \int \tanh ^p(a+\log (x)) \, dx=\int \tanh ^{p}{\left (a + \log {\left (x \right )} \right )}\, dx \]

[In]

integrate(tanh(a+ln(x))**p,x)

[Out]

Integral(tanh(a + log(x))**p, x)

Maxima [F]

\[ \int \tanh ^p(a+\log (x)) \, dx=\int { \tanh \left (a + \log \left (x\right )\right )^{p} \,d x } \]

[In]

integrate(tanh(a+log(x))^p,x, algorithm="maxima")

[Out]

integrate(tanh(a + log(x))^p, x)

Giac [F]

\[ \int \tanh ^p(a+\log (x)) \, dx=\int { \tanh \left (a + \log \left (x\right )\right )^{p} \,d x } \]

[In]

integrate(tanh(a+log(x))^p,x, algorithm="giac")

[Out]

integrate(tanh(a + log(x))^p, x)

Mupad [F(-1)]

Timed out. \[ \int \tanh ^p(a+\log (x)) \, dx=\int {\mathrm {tanh}\left (a+\ln \left (x\right )\right )}^p \,d x \]

[In]

int(tanh(a + log(x))^p,x)

[Out]

int(tanh(a + log(x))^p, x)