\(\int \frac {1}{(a \text {sech}(x)+b \tanh (x))^4} \, dx\) [622]
Optimal result
Integrand size = 11, antiderivative size = 146 \[
\int \frac {1}{(a \text {sech}(x)+b \tanh (x))^4} \, dx=\frac {x}{b^4}+\frac {a \left (2 a^2+3 b^2\right ) \text {arctanh}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{b^4 \left (a^2+b^2\right )^{3/2}}-\frac {\cosh ^3(x)}{3 b (a+b \sinh (x))^3}+\frac {a \cosh ^3(x)}{2 b \left (a^2+b^2\right ) (a+b \sinh (x))^2}-\frac {\cosh (x) \left (2 \left (a^2+b^2\right )+a b \sinh (x)\right )}{2 b^3 \left (a^2+b^2\right ) (a+b \sinh (x))}
\]
[Out]
x/b^4+a*(2*a^2+3*b^2)*arctanh((b-a*tanh(1/2*x))/(a^2+b^2)^(1/2))/b^4/(a^2+b^2)^(3/2)-1/3*cosh(x)^3/b/(a+b*sinh
(x))^3+1/2*a*cosh(x)^3/b/(a^2+b^2)/(a+b*sinh(x))^2-1/2*cosh(x)*(2*a^2+2*b^2+a*b*sinh(x))/b^3/(a^2+b^2)/(a+b*si
nh(x))
Rubi [A] (verified)
Time = 0.26 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.00, number of
steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.727, Rules used = {4476, 2772, 2943, 2942, 2814,
2739, 632, 212} \[
\int \frac {1}{(a \text {sech}(x)+b \tanh (x))^4} \, dx=\frac {a \left (2 a^2+3 b^2\right ) \text {arctanh}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{b^4 \left (a^2+b^2\right )^{3/2}}+\frac {a \cosh ^3(x)}{2 b \left (a^2+b^2\right ) (a+b \sinh (x))^2}-\frac {\cosh (x) \left (2 \left (a^2+b^2\right )+a b \sinh (x)\right )}{2 b^3 \left (a^2+b^2\right ) (a+b \sinh (x))}-\frac {\cosh ^3(x)}{3 b (a+b \sinh (x))^3}+\frac {x}{b^4}
\]
[In]
Int[(a*Sech[x] + b*Tanh[x])^(-4),x]
[Out]
x/b^4 + (a*(2*a^2 + 3*b^2)*ArcTanh[(b - a*Tanh[x/2])/Sqrt[a^2 + b^2]])/(b^4*(a^2 + b^2)^(3/2)) - Cosh[x]^3/(3*
b*(a + b*Sinh[x])^3) + (a*Cosh[x]^3)/(2*b*(a^2 + b^2)*(a + b*Sinh[x])^2) - (Cosh[x]*(2*(a^2 + b^2) + a*b*Sinh[
x]))/(2*b^3*(a^2 + b^2)*(a + b*Sinh[x]))
Rule 212
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
/; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])
Rule 632
Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]
Rule 2739
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x]}, Dis
t[2*(e/d), Subst[Int[1/(a + 2*b*e*x + a*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] &&
NeQ[a^2 - b^2, 0]
Rule 2772
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[g*(g*C
os[e + f*x])^(p - 1)*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Dist[g^2*((p - 1)/(b*(m + 1))), Int[(g
*Cos[e + f*x])^(p - 2)*(a + b*Sin[e + f*x])^(m + 1)*Sin[e + f*x], x], x] /; FreeQ[{a, b, e, f, g}, x] && NeQ[a
^2 - b^2, 0] && LtQ[m, -1] && GtQ[p, 1] && IntegersQ[2*m, 2*p]
Rule 2814
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[b*(x/d)
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]
Rule 2942
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.)
+ (f_.)*(x_)]), x_Symbol] :> Simp[g*(g*Cos[e + f*x])^(p - 1)*(a + b*Sin[e + f*x])^(m + 1)*((b*c*(m + p + 1) -
a*d*p + b*d*(m + 1)*Sin[e + f*x])/(b^2*f*(m + 1)*(m + p + 1))), x] + Dist[g^2*((p - 1)/(b^2*(m + 1)*(m + p + 1
))), Int[(g*Cos[e + f*x])^(p - 2)*(a + b*Sin[e + f*x])^(m + 1)*Simp[b*d*(m + 1) + (b*c*(m + p + 1) - a*d*p)*Si
n[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && GtQ[p, 1] && N
eQ[m + p + 1, 0] && IntegerQ[2*m]
Rule 2943
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.)
+ (f_.)*(x_)]), x_Symbol] :> Simp[(-(b*c - a*d))*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^(m + 1)/(f*g*(
a^2 - b^2)*(m + 1))), x] + Dist[1/((a^2 - b^2)*(m + 1)), Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^(m + 1)*S
imp[(a*c - b*d)*(m + 1) - (b*c - a*d)*(m + p + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p},
x] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && IntegerQ[2*m]
Rule 4476
Int[(u_.)*((b_.)*sec[(c_.) + (d_.)*(x_)]^(n_.) + (a_.)*tan[(c_.) + (d_.)*(x_)]^(n_.))^(p_), x_Symbol] :> Int[A
ctivateTrig[u]*Sec[c + d*x]^(n*p)*(b + a*Sin[c + d*x]^n)^p, x] /; FreeQ[{a, b, c, d}, x] && IntegersQ[n, p]
Rubi steps \begin{align*}
\text {integral}& = \int \frac {\cosh ^4(x)}{(a+b \sinh (x))^4} \, dx \\ & = -\frac {\cosh ^3(x)}{3 b (a+b \sinh (x))^3}+\frac {\int \frac {\cosh ^2(x) \sinh (x)}{(a+b \sinh (x))^3} \, dx}{b} \\ & = -\frac {\cosh ^3(x)}{3 b (a+b \sinh (x))^3}+\frac {a \cosh ^3(x)}{2 b \left (a^2+b^2\right ) (a+b \sinh (x))^2}+\frac {i \int \frac {\cosh ^2(x) (-2 i b+i a \sinh (x))}{(a+b \sinh (x))^2} \, dx}{2 b \left (a^2+b^2\right )} \\ & = -\frac {\cosh ^3(x)}{3 b (a+b \sinh (x))^3}+\frac {a \cosh ^3(x)}{2 b \left (a^2+b^2\right ) (a+b \sinh (x))^2}-\frac {\cosh (x) \left (2 \left (a^2+b^2\right )+a b \sinh (x)\right )}{2 b^3 \left (a^2+b^2\right ) (a+b \sinh (x))}+\frac {i \int \frac {i a b-2 i \left (a^2+b^2\right ) \sinh (x)}{a+b \sinh (x)} \, dx}{2 b^3 \left (a^2+b^2\right )} \\ & = \frac {x}{b^4}-\frac {\cosh ^3(x)}{3 b (a+b \sinh (x))^3}+\frac {a \cosh ^3(x)}{2 b \left (a^2+b^2\right ) (a+b \sinh (x))^2}-\frac {\cosh (x) \left (2 \left (a^2+b^2\right )+a b \sinh (x)\right )}{2 b^3 \left (a^2+b^2\right ) (a+b \sinh (x))}-\frac {\left (a \left (2 a^2+3 b^2\right )\right ) \int \frac {1}{a+b \sinh (x)} \, dx}{2 b^4 \left (a^2+b^2\right )} \\ & = \frac {x}{b^4}-\frac {\cosh ^3(x)}{3 b (a+b \sinh (x))^3}+\frac {a \cosh ^3(x)}{2 b \left (a^2+b^2\right ) (a+b \sinh (x))^2}-\frac {\cosh (x) \left (2 \left (a^2+b^2\right )+a b \sinh (x)\right )}{2 b^3 \left (a^2+b^2\right ) (a+b \sinh (x))}-\frac {\left (a \left (2 a^2+3 b^2\right )\right ) \text {Subst}\left (\int \frac {1}{a+2 b x-a x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{b^4 \left (a^2+b^2\right )} \\ & = \frac {x}{b^4}-\frac {\cosh ^3(x)}{3 b (a+b \sinh (x))^3}+\frac {a \cosh ^3(x)}{2 b \left (a^2+b^2\right ) (a+b \sinh (x))^2}-\frac {\cosh (x) \left (2 \left (a^2+b^2\right )+a b \sinh (x)\right )}{2 b^3 \left (a^2+b^2\right ) (a+b \sinh (x))}+\frac {\left (2 a \left (2 a^2+3 b^2\right )\right ) \text {Subst}\left (\int \frac {1}{4 \left (a^2+b^2\right )-x^2} \, dx,x,2 b-2 a \tanh \left (\frac {x}{2}\right )\right )}{b^4 \left (a^2+b^2\right )} \\ & = \frac {x}{b^4}+\frac {a \left (2 a^2+3 b^2\right ) \text {arctanh}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{b^4 \left (a^2+b^2\right )^{3/2}}-\frac {\cosh ^3(x)}{3 b (a+b \sinh (x))^3}+\frac {a \cosh ^3(x)}{2 b \left (a^2+b^2\right ) (a+b \sinh (x))^2}-\frac {\cosh (x) \left (2 \left (a^2+b^2\right )+a b \sinh (x)\right )}{2 b^3 \left (a^2+b^2\right ) (a+b \sinh (x))} \\
\end{align*}
Mathematica [C] (warning: unable to verify)
Result contains complex when optimal does not.
Time = 7.17 (sec) , antiderivative size = 3430, normalized size of antiderivative = 23.49
\[
\int \frac {1}{(a \text {sech}(x)+b \tanh (x))^4} \, dx=\text {Result too large to show}
\]
[In]
Integrate[(a*Sech[x] + b*Tanh[x])^(-4),x]
[Out]
((-I)*Sech[x]*(a + b*Sinh[x])^4*(((I/3)*b*(((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b))^(5/2)*((I*b)/(a + I*b)
- (b*Sinh[x])/(a + I*b))^(5/2))/((((-I)*a*b)/(a - I*b) - b^2/(a - I*b))*(((-I)*a*b)/(a + I*b) + b^2/(a + I*b))
*(a + b*Sinh[x])^3) - (((I/2)*a*b^3*(((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b))^(5/2)*((I*b)/(a + I*b) - (b*S
inh[x])/(a + I*b))^(5/2))/((a^2 + b^2)*(((-I)*a*b)/(a - I*b) - b^2/(a - I*b))*(((-I)*a*b)/(a + I*b) + b^2/(a +
I*b))*(a + b*Sinh[x])^2) - (-(((((3*I)*a^2*b^5)/(a^2 + b^2)^2 - ((2*I)*b^5*(3*a^2 + 2*b^2))/(a^2 + b^2)^2)*((
(-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b))^(5/2)*((I*b)/(a + I*b) - (b*Sinh[x])/(a + I*b))^(5/2))/((((-I)*a*b)
/(a - I*b) - b^2/(a - I*b))*(((-I)*a*b)/(a + I*b) + b^2/(a + I*b))*(a + b*Sinh[x]))) - ((16*Sqrt[2]*(a - I*b)*
b^6*(3*a^2 + 4*b^2)*(((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b))^(5/2)*Sqrt[(I*b)/(a + I*b) - (b*Sinh[x])/(a +
I*b)]*(1 - ((I/2)*(a - I*b)*(((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b)))/b)^(5/2)*((5*(1/(2*(1 - ((I/2)*(a -
I*b)*(((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b)))/b)^2) + (1 - ((I/2)*(a - I*b)*(((-I)*b)/(a - I*b) - (b*Sin
h[x])/(a - I*b)))/b)^(-1)))/8 + (((15*I)/32)*b^3*(((-I)*(a - I*b)*(((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b))
)/b + ((a - I*b)^2*(((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b))^2)/(3*b^2) + ((-1)^(1/4)*Sqrt[2]*Sqrt[a - I*b]
*ArcSin[((-1)^(1/4)*Sqrt[a - I*b]*Sqrt[((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b)])/(Sqrt[2]*Sqrt[b])]*Sqrt[((
-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b)])/(Sqrt[b]*Sqrt[1 - ((I/2)*(a - I*b)*(((-I)*b)/(a - I*b) - (b*Sinh[x]
)/(a - I*b)))/b])))/((a - I*b)^3*(((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b))^3*(1 - ((I/2)*(a - I*b)*(((-I)*b
)/(a - I*b) - (b*Sinh[x])/(a - I*b)))/b)^2)))/(5*(a + I*b)*(a^2 + b^2)^3*Sqrt[((-I)*(a + I*b)*((I*b)/(a + I*b)
- (b*Sinh[x])/(a + I*b)))/b]) + (I*(((4*I)*a*b^7*(3*a^2 + 4*b^2))/(a^2 + b^2)^3 - (I*a*b^7*(6*a^2 + 7*b^2))/(
a^2 + b^2)^3)*((-4*Sqrt[2]*(((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b))^(3/2)*Sqrt[(I*b)/(a + I*b) - (b*Sinh[x
])/(a + I*b)]*(1 - ((I/2)*(a - I*b)*(((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b)))/b)^(5/2)*((3/(4*(1 - ((I/2)*
(a - I*b)*(((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b)))/b)^2) + (1 - ((I/2)*(a - I*b)*(((-I)*b)/(a - I*b) - (b
*Sinh[x])/(a - I*b)))/b)^(-1))/2 - (3*b^2*(((-I)*(a - I*b)*(((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b)))/b + (
(-1)^(1/4)*Sqrt[2]*Sqrt[a - I*b]*ArcSin[((-1)^(1/4)*Sqrt[a - I*b]*Sqrt[((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I
*b)])/(Sqrt[2]*Sqrt[b])]*Sqrt[((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b)])/(Sqrt[b]*Sqrt[1 - ((I/2)*(a - I*b)*
(((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b)))/b])))/(8*(a - I*b)^2*(((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b)
)^2*(1 - ((I/2)*(a - I*b)*(((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b)))/b)^2)))/(3*(a + I*b)*Sqrt[((-I)*(a + I
*b)*((I*b)/(a + I*b) - (b*Sinh[x])/(a + I*b)))/b]) - (I*((I*a*b)/(a - I*b) + b^2/(a - I*b))*(((-I)*((I*a*b)/(a
- I*b) + b^2/(a - I*b))*(((-I)*((I*a*b)/(a + I*b) - b^2/(a + I*b))*(((2*I)*Sqrt[a - I*b]*ArcTanh[(Sqrt[a - I*
b]*Sqrt[((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b)])/(Sqrt[a + I*b]*Sqrt[(I*b)/(a + I*b) - (b*Sinh[x])/(a + I*
b)])])/(Sqrt[a + I*b]*b) - ((2*I)*Sqrt[(I*a*b)/(a + I*b) - b^2/(a + I*b)]*ArcTanh[(Sqrt[(I*a*b)/(a + I*b) - b^
2/(a + I*b)]*Sqrt[((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b)])/(Sqrt[(I*a*b)/(a - I*b) + b^2/(a - I*b)]*Sqrt[(
I*b)/(a + I*b) - (b*Sinh[x])/(a + I*b)])])/(b*Sqrt[(I*a*b)/(a - I*b) + b^2/(a - I*b)])))/b + ((2*I)*Sqrt[2]*(a
- I*b)*Sqrt[((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b)]*Sqrt[(I*b)/(a + I*b) - (b*Sinh[x])/(a + I*b)]*(1 - ((
I/2)*(a - I*b)*(((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b)))/b)^(3/2)*(-(((-1)^(3/4)*Sqrt[b]*ArcSin[((-1)^(1/4
)*Sqrt[a - I*b]*Sqrt[((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b)])/(Sqrt[2]*Sqrt[b])])/(Sqrt[2]*Sqrt[a - I*b]*S
qrt[((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b)]*(1 - ((I/2)*(a - I*b)*(((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I
*b)))/b)^(3/2))) + 1/(2*(1 - ((I/2)*(a - I*b)*(((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b)))/b))))/((a + I*b)*b
*Sqrt[((-I)*(a + I*b)*((I*b)/(a + I*b) - (b*Sinh[x])/(a + I*b)))/b])))/b - (4*Sqrt[2]*Sqrt[((-I)*b)/(a - I*b)
- (b*Sinh[x])/(a - I*b)]*Sqrt[(I*b)/(a + I*b) - (b*Sinh[x])/(a + I*b)]*(1 - ((I/2)*(a - I*b)*(((-I)*b)/(a - I*
b) - (b*Sinh[x])/(a - I*b)))/b)^(5/2)*((-3*(-1)^(3/4)*Sqrt[b]*ArcSin[((-1)^(1/4)*Sqrt[a - I*b]*Sqrt[((-I)*b)/(
a - I*b) - (b*Sinh[x])/(a - I*b)])/(Sqrt[2]*Sqrt[b])])/(4*Sqrt[2]*Sqrt[a - I*b]*Sqrt[((-I)*b)/(a - I*b) - (b*S
inh[x])/(a - I*b)]*(1 - ((I/2)*(a - I*b)*(((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b)))/b)^(5/2)) + (3/(2*(1 -
((I/2)*(a - I*b)*(((-I)*b)/(a - I*b) - (b*Sinh[x])/(a - I*b)))/b)^2) + (1 - ((I/2)*(a - I*b)*(((-I)*b)/(a - I*
b) - (b*Sinh[x])/(a - I*b)))/b)^(-1))/4))/((a + I*b)*Sqrt[((-I)*(a + I*b)*((I*b)/(a + I*b) - (b*Sinh[x])/(a +
I*b)))/b])))/b))/b)/((((-I)*a*b)/(a - I*b) - b^2/(a - I*b))*(((-I)*a*b)/(a + I*b) + b^2/(a + I*b))))/(2*(((-I)
*a*b)/(a - I*b) - b^2/(a - I*b))*(((-I)*a*b)/(a + I*b) + b^2/(a + I*b))))/(3*(((-I)*a*b)/(a - I*b) - b^2/(a -
I*b))*(((-I)*a*b)/(a + I*b) + b^2/(a + I*b)))))/((1 - (a + b*Sinh[x])/(a - I*b))^(3/2)*(1 - (a + b*Sinh[x])/(a
+ I*b))^(3/2)*(a*Sech[x] + b*Tanh[x])^4)
Maple [B] (verified)
Leaf count of result is larger than twice the leaf count of optimal. \(356\) vs. \(2(135)=270\).
Time = 90.76 (sec) , antiderivative size = 357, normalized size of antiderivative =
2.45
| | |
method | result | size |
| | |
default |
\(\frac {\frac {2 \left (\frac {b^{2} \left (a^{4}+2 a^{2} b^{2}+2 b^{4}\right ) \tanh \left (\frac {x}{2}\right )^{5}}{2 a \left (a^{2}+b^{2}\right )}+\frac {b \left (2 a^{6}-3 a^{4} b^{2}-4 a^{2} b^{4}-4 b^{6}\right ) \tanh \left (\frac {x}{2}\right )^{4}}{2 \left (a^{2}+b^{2}\right ) a^{2}}-\frac {b^{2} \left (18 a^{6}+3 a^{4} b^{2}-4 a^{2} b^{4}-4 b^{6}\right ) \tanh \left (\frac {x}{2}\right )^{3}}{3 a^{3} \left (a^{2}+b^{2}\right )}-\frac {b \left (2 a^{6}-8 a^{4} b^{2}-7 a^{2} b^{4}-2 b^{6}\right ) \tanh \left (\frac {x}{2}\right )^{2}}{a^{2} \left (a^{2}+b^{2}\right )}+\frac {b^{2} \left (11 a^{4}+8 a^{2} b^{2}+2 b^{4}\right ) \tanh \left (\frac {x}{2}\right )}{2 a \left (a^{2}+b^{2}\right )}+\frac {b \left (6 a^{4}+5 a^{2} b^{2}+2 b^{4}\right )}{6 a^{2}+6 b^{2}}\right )}{\left (\tanh \left (\frac {x}{2}\right )^{2} a -2 b \tanh \left (\frac {x}{2}\right )-a \right )^{3}}-\frac {a \left (2 a^{2}+3 b^{2}\right ) \operatorname {arctanh}\left (\frac {2 a \tanh \left (\frac {x}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{\left (a^{2}+b^{2}\right )^{\frac {3}{2}}}}{b^{4}}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{b^{4}}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{b^{4}}\) |
\(357\) |
risch |
\(\frac {x}{b^{4}}+\frac {18 \,{\mathrm e}^{5 x} a^{3} b^{2}+15 a \,b^{4} {\mathrm e}^{5 x}+54 a^{4} b \,{\mathrm e}^{4 x}+27 a^{2} b^{3} {\mathrm e}^{4 x}-12 b^{5} {\mathrm e}^{4 x}+44 \,{\mathrm e}^{3 x} a^{5}-34 a^{3} b^{2} {\mathrm e}^{3 x}-48 \,{\mathrm e}^{3 x} a \,b^{4}-78 a^{4} b \,{\mathrm e}^{2 x}-36 a^{2} b^{3} {\mathrm e}^{2 x}+12 b^{5} {\mathrm e}^{2 x}+48 a^{3} b^{2} {\mathrm e}^{x}+33 \,{\mathrm e}^{x} a \,b^{4}-11 a^{2} b^{3}-8 b^{5}}{3 b^{4} \left (a^{2}+b^{2}\right ) \left (b \,{\mathrm e}^{2 x}+2 a \,{\mathrm e}^{x}-b \right )^{3}}+\frac {a^{3} \ln \left ({\mathrm e}^{x}+\frac {\left (a^{2}+b^{2}\right )^{\frac {3}{2}} a +a^{4}+2 a^{2} b^{2}+b^{4}}{b \left (a^{2}+b^{2}\right )^{\frac {3}{2}}}\right )}{\left (a^{2}+b^{2}\right )^{\frac {3}{2}} b^{4}}+\frac {3 a \ln \left ({\mathrm e}^{x}+\frac {\left (a^{2}+b^{2}\right )^{\frac {3}{2}} a +a^{4}+2 a^{2} b^{2}+b^{4}}{b \left (a^{2}+b^{2}\right )^{\frac {3}{2}}}\right )}{2 \left (a^{2}+b^{2}\right )^{\frac {3}{2}} b^{2}}-\frac {a^{3} \ln \left ({\mathrm e}^{x}+\frac {\left (a^{2}+b^{2}\right )^{\frac {3}{2}} a -a^{4}-2 a^{2} b^{2}-b^{4}}{b \left (a^{2}+b^{2}\right )^{\frac {3}{2}}}\right )}{\left (a^{2}+b^{2}\right )^{\frac {3}{2}} b^{4}}-\frac {3 a \ln \left ({\mathrm e}^{x}+\frac {\left (a^{2}+b^{2}\right )^{\frac {3}{2}} a -a^{4}-2 a^{2} b^{2}-b^{4}}{b \left (a^{2}+b^{2}\right )^{\frac {3}{2}}}\right )}{2 \left (a^{2}+b^{2}\right )^{\frac {3}{2}} b^{2}}\) |
\(428\) |
| | |
|
|
|
[In]
int(1/(a*sech(x)+b*tanh(x))^4,x,method=_RETURNVERBOSE)
[Out]
2/b^4*((1/2*b^2*(a^4+2*a^2*b^2+2*b^4)/a/(a^2+b^2)*tanh(1/2*x)^5+1/2*b*(2*a^6-3*a^4*b^2-4*a^2*b^4-4*b^6)/(a^2+b
^2)/a^2*tanh(1/2*x)^4-1/3/a^3*b^2*(18*a^6+3*a^4*b^2-4*a^2*b^4-4*b^6)/(a^2+b^2)*tanh(1/2*x)^3-1/a^2*b*(2*a^6-8*
a^4*b^2-7*a^2*b^4-2*b^6)/(a^2+b^2)*tanh(1/2*x)^2+1/2/a*b^2*(11*a^4+8*a^2*b^2+2*b^4)/(a^2+b^2)*tanh(1/2*x)+1/6*
b*(6*a^4+5*a^2*b^2+2*b^4)/(a^2+b^2))/(tanh(1/2*x)^2*a-2*b*tanh(1/2*x)-a)^3-1/2*a*(2*a^2+3*b^2)/(a^2+b^2)^(3/2)
*arctanh(1/2*(2*a*tanh(1/2*x)-2*b)/(a^2+b^2)^(1/2)))+1/b^4*ln(tanh(1/2*x)+1)-1/b^4*ln(tanh(1/2*x)-1)
Fricas [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 2978 vs. \(2 (137) = 274\).
Time = 0.29 (sec) , antiderivative size = 2978, normalized size of antiderivative = 20.40
\[
\int \frac {1}{(a \text {sech}(x)+b \tanh (x))^4} \, dx=\text {Too large to display}
\]
[In]
integrate(1/(a*sech(x)+b*tanh(x))^4,x, algorithm="fricas")
[Out]
-1/6*(6*(a^4*b^3 + 2*a^2*b^5 + b^7)*x*cosh(x)^6 + 6*(a^4*b^3 + 2*a^2*b^5 + b^7)*x*sinh(x)^6 - 22*a^4*b^3 - 38*
a^2*b^5 - 16*b^7 + 6*(6*a^5*b^2 + 11*a^3*b^4 + 5*a*b^6 + 6*(a^5*b^2 + 2*a^3*b^4 + a*b^6)*x)*cosh(x)^5 + 6*(6*a
^5*b^2 + 11*a^3*b^4 + 5*a*b^6 + 6*(a^4*b^3 + 2*a^2*b^5 + b^7)*x*cosh(x) + 6*(a^5*b^2 + 2*a^3*b^4 + a*b^6)*x)*s
inh(x)^5 + 6*(18*a^6*b + 27*a^4*b^3 + 5*a^2*b^5 - 4*b^7 + 3*(4*a^6*b + 7*a^4*b^3 + 2*a^2*b^5 - b^7)*x)*cosh(x)
^4 + 6*(18*a^6*b + 27*a^4*b^3 + 5*a^2*b^5 - 4*b^7 + 15*(a^4*b^3 + 2*a^2*b^5 + b^7)*x*cosh(x)^2 + 3*(4*a^6*b +
7*a^4*b^3 + 2*a^2*b^5 - b^7)*x + 5*(6*a^5*b^2 + 11*a^3*b^4 + 5*a*b^6 + 6*(a^5*b^2 + 2*a^3*b^4 + a*b^6)*x)*cosh
(x))*sinh(x)^4 + 4*(22*a^7 + 5*a^5*b^2 - 41*a^3*b^4 - 24*a*b^6 + 6*(2*a^7 + a^5*b^2 - 4*a^3*b^4 - 3*a*b^6)*x)*
cosh(x)^3 + 4*(22*a^7 + 5*a^5*b^2 - 41*a^3*b^4 - 24*a*b^6 + 30*(a^4*b^3 + 2*a^2*b^5 + b^7)*x*cosh(x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b^4 + a^5*b^6 - 4*a^3*b^8 - 3*a*b^10 + 5*(a^4*b^7 +
2*a^2*b^9 + b^11)*cosh(x)^3 + 15*(a^5*b^6 + 2*a^3*b^8 + a*b^10)*cosh(x)^2 + 3*(4*a^6*b^5 + 7*a^4*b^7 + 2*a^2*
b^9 - b^11)*cosh(x))*sinh(x)^3 + 3*(4*a^6*b^5 + 7*a^4*b^7 + 2*a^2*b^9 - b^11)*cosh(x)^2 + 3*(4*a^6*b^5 + 7*a^4
*b^7 + 2*a^2*b^9 - b^11 - 5*(a^4*b^7 + 2*a^2*b^9 + b^11)*cosh(x)^4 - 20*(a^5*b^6 + 2*a^3*b^8 + a*b^10)*cosh(x)
^3 - 6*(4*a^6*b^5 + 7*a^4*b^7 + 2*a^2*b^9 - b^11)*cosh(x)^2 - 4*(2*a^7*b^4 + a^5*b^6 - 4*a^3*b^8 - 3*a*b^10)*c
osh(x))*sinh(x)^2 - 6*(a^5*b^6 + 2*a^3*b^8 + a*b^10)*cosh(x) - 6*(a^5*b^6 + 2*a^3*b^8 + a*b^10 + (a^4*b^7 + 2*
a^2*b^9 + b^11)*cosh(x)^5 + 5*(a^5*b^6 + 2*a^3*b^8 + a*b^10)*cosh(x)^4 + 2*(4*a^6*b^5 + 7*a^4*b^7 + 2*a^2*b^9
- b^11)*cosh(x)^3 + 2*(2*a^7*b^4 + a^5*b^6 - 4*a^3*b^8 - 3*a*b^10)*cosh(x)^2 - (4*a^6*b^5 + 7*a^4*b^7 + 2*a^2*
b^9 - b^11)*cosh(x))*sinh(x))
Sympy [F]
\[
\int \frac {1}{(a \text {sech}(x)+b \tanh (x))^4} \, dx=\int \frac {1}{\left (a \operatorname {sech}{\left (x \right )} + b \tanh {\left (x \right )}\right )^{4}}\, dx
\]
[In]
integrate(1/(a*sech(x)+b*tanh(x))**4,x)
[Out]
Integral((a*sech(x) + b*tanh(x))**(-4), x)
Maxima [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 375 vs. \(2 (137) = 274\).
Time = 0.32 (sec) , antiderivative size = 375, normalized size of antiderivative = 2.57
\[
\int \frac {1}{(a \text {sech}(x)+b \tanh (x))^4} \, dx=-\frac {{\left (2 \, a^{2} + 3 \, b^{2}\right )} a \log \left (\frac {b e^{\left (-x\right )} - a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-x\right )} - a + \sqrt {a^{2} + b^{2}}}\right )}{2 \, {\left (a^{2} b^{4} + b^{6}\right )} \sqrt {a^{2} + b^{2}}} - \frac {11 \, a^{2} b^{3} + 8 \, b^{5} + 3 \, {\left (16 \, a^{3} b^{2} + 11 \, a b^{4}\right )} e^{\left (-x\right )} + 6 \, {\left (13 \, a^{4} b + 6 \, a^{2} b^{3} - 2 \, b^{5}\right )} e^{\left (-2 \, x\right )} + 2 \, {\left (22 \, a^{5} - 17 \, a^{3} b^{2} - 24 \, a b^{4}\right )} e^{\left (-3 \, x\right )} - 3 \, {\left (18 \, a^{4} b + 9 \, a^{2} b^{3} - 4 \, b^{5}\right )} e^{\left (-4 \, x\right )} + 3 \, {\left (6 \, a^{3} b^{2} + 5 \, a b^{4}\right )} e^{\left (-5 \, x\right )}}{3 \, {\left (a^{2} b^{7} + b^{9} + 6 \, {\left (a^{3} b^{6} + a b^{8}\right )} e^{\left (-x\right )} + 3 \, {\left (4 \, a^{4} b^{5} + 3 \, a^{2} b^{7} - b^{9}\right )} e^{\left (-2 \, x\right )} + 4 \, {\left (2 \, a^{5} b^{4} - a^{3} b^{6} - 3 \, a b^{8}\right )} e^{\left (-3 \, x\right )} - 3 \, {\left (4 \, a^{4} b^{5} + 3 \, a^{2} b^{7} - b^{9}\right )} e^{\left (-4 \, x\right )} + 6 \, {\left (a^{3} b^{6} + a b^{8}\right )} e^{\left (-5 \, x\right )} - {\left (a^{2} b^{7} + b^{9}\right )} e^{\left (-6 \, x\right )}\right )}} + \frac {x}{b^{4}}
\]
[In]
integrate(1/(a*sech(x)+b*tanh(x))^4,x, algorithm="maxima")
[Out]
-1/2*(2*a^2 + 3*b^2)*a*log((b*e^(-x) - a - sqrt(a^2 + b^2))/(b*e^(-x) - a + sqrt(a^2 + b^2)))/((a^2*b^4 + b^6)
*sqrt(a^2 + b^2)) - 1/3*(11*a^2*b^3 + 8*b^5 + 3*(16*a^3*b^2 + 11*a*b^4)*e^(-x) + 6*(13*a^4*b + 6*a^2*b^3 - 2*b
^5)*e^(-2*x) + 2*(22*a^5 - 17*a^3*b^2 - 24*a*b^4)*e^(-3*x) - 3*(18*a^4*b + 9*a^2*b^3 - 4*b^5)*e^(-4*x) + 3*(6*
a^3*b^2 + 5*a*b^4)*e^(-5*x))/(a^2*b^7 + b^9 + 6*(a^3*b^6 + a*b^8)*e^(-x) + 3*(4*a^4*b^5 + 3*a^2*b^7 - b^9)*e^(
-2*x) + 4*(2*a^5*b^4 - a^3*b^6 - 3*a*b^8)*e^(-3*x) - 3*(4*a^4*b^5 + 3*a^2*b^7 - b^9)*e^(-4*x) + 6*(a^3*b^6 + a
*b^8)*e^(-5*x) - (a^2*b^7 + b^9)*e^(-6*x)) + x/b^4
Giac [A] (verification not implemented)
none
Time = 0.28 (sec) , antiderivative size = 267, normalized size of antiderivative = 1.83
\[
\int \frac {1}{(a \text {sech}(x)+b \tanh (x))^4} \, dx=-\frac {{\left (2 \, a^{3} + 3 \, a b^{2}\right )} \log \left (\frac {{\left | 2 \, b e^{x} + 2 \, a - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, b e^{x} + 2 \, a + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{2 \, {\left (a^{2} b^{4} + b^{6}\right )} \sqrt {a^{2} + b^{2}}} + \frac {18 \, a^{3} b^{2} e^{\left (5 \, x\right )} + 15 \, a b^{4} e^{\left (5 \, x\right )} + 54 \, a^{4} b e^{\left (4 \, x\right )} + 27 \, a^{2} b^{3} e^{\left (4 \, x\right )} - 12 \, b^{5} e^{\left (4 \, x\right )} + 44 \, a^{5} e^{\left (3 \, x\right )} - 34 \, a^{3} b^{2} e^{\left (3 \, x\right )} - 48 \, a b^{4} e^{\left (3 \, x\right )} - 78 \, a^{4} b e^{\left (2 \, x\right )} - 36 \, a^{2} b^{3} e^{\left (2 \, x\right )} + 12 \, b^{5} e^{\left (2 \, x\right )} + 48 \, a^{3} b^{2} e^{x} + 33 \, a b^{4} e^{x} - 11 \, a^{2} b^{3} - 8 \, b^{5}}{3 \, {\left (a^{2} b^{4} + b^{6}\right )} {\left (b e^{\left (2 \, x\right )} + 2 \, a e^{x} - b\right )}^{3}} + \frac {x}{b^{4}}
\]
[In]
integrate(1/(a*sech(x)+b*tanh(x))^4,x, algorithm="giac")
[Out]
-1/2*(2*a^3 + 3*a*b^2)*log(abs(2*b*e^x + 2*a - 2*sqrt(a^2 + b^2))/abs(2*b*e^x + 2*a + 2*sqrt(a^2 + b^2)))/((a^
2*b^4 + b^6)*sqrt(a^2 + b^2)) + 1/3*(18*a^3*b^2*e^(5*x) + 15*a*b^4*e^(5*x) + 54*a^4*b*e^(4*x) + 27*a^2*b^3*e^(
4*x) - 12*b^5*e^(4*x) + 44*a^5*e^(3*x) - 34*a^3*b^2*e^(3*x) - 48*a*b^4*e^(3*x) - 78*a^4*b*e^(2*x) - 36*a^2*b^3
*e^(2*x) + 12*b^5*e^(2*x) + 48*a^3*b^2*e^x + 33*a*b^4*e^x - 11*a^2*b^3 - 8*b^5)/((a^2*b^4 + b^6)*(b*e^(2*x) +
2*a*e^x - b)^3) + x/b^4
Mupad [F(-1)]
Timed out. \[
\int \frac {1}{(a \text {sech}(x)+b \tanh (x))^4} \, dx=\int \frac {1}{{\left (b\,\mathrm {tanh}\left (x\right )+\frac {a}{\mathrm {cosh}\left (x\right )}\right )}^4} \,d x
\]
[In]
int(1/(b*tanh(x) + a/cosh(x))^4,x)
[Out]
int(1/(b*tanh(x) + a/cosh(x))^4, x)