\(\int \frac {\text {sech}^4(x)}{a+b \cosh ^2(x)} \, dx\) [31]

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

Optimal result

Integrand size = 15, antiderivative size = 55 \[ \int \frac {\text {sech}^4(x)}{a+b \cosh ^2(x)} \, dx=\frac {b^2 \text {arctanh}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{a^{5/2} \sqrt {a+b}}+\frac {(a-b) \tanh (x)}{a^2}-\frac {\tanh ^3(x)}{3 a} \] Output:

b^2*arctanh(a^(1/2)*tanh(x)/(a+b)^(1/2))/a^(5/2)/(a+b)^(1/2)+(a-b)*tanh(x) 
/a^2-1/3*tanh(x)^3/a
 

Mathematica [A] (verified)

Time = 0.36 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.00 \[ \int \frac {\text {sech}^4(x)}{a+b \cosh ^2(x)} \, dx=\frac {b^2 \text {arctanh}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{a^{5/2} \sqrt {a+b}}+\frac {\left (2 a-3 b+a \text {sech}^2(x)\right ) \tanh (x)}{3 a^2} \] Input:

Integrate[Sech[x]^4/(a + b*Cosh[x]^2),x]
 

Output:

(b^2*ArcTanh[(Sqrt[a]*Tanh[x])/Sqrt[a + b]])/(a^(5/2)*Sqrt[a + b]) + ((2*a 
 - 3*b + a*Sech[x]^2)*Tanh[x])/(3*a^2)
 

Rubi [A] (verified)

Time = 0.29 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {3042, 3666, 364, 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 \frac {\text {sech}^4(x)}{a+b \cosh ^2(x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\sin \left (\frac {\pi }{2}+i x\right )^4 \left (a+b \sin \left (\frac {\pi }{2}+i x\right )^2\right )}dx\)

\(\Big \downarrow \) 3666

\(\displaystyle \int \frac {\tanh ^4(x) \left (1-\coth ^2(x)\right )^2}{a-(a+b) \coth ^2(x)}d\coth (x)\)

\(\Big \downarrow \) 364

\(\displaystyle \int \left (\frac {b^2}{a^2 \left (a-(a+b) \coth ^2(x)\right )}+\frac {(b-a) \tanh ^2(x)}{a^2}+\frac {\tanh ^4(x)}{a}\right )d\coth (x)\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {b^2 \text {arctanh}\left (\frac {\sqrt {a+b} \coth (x)}{\sqrt {a}}\right )}{a^{5/2} \sqrt {a+b}}+\frac {(a-b) \tanh (x)}{a^2}-\frac {\tanh ^3(x)}{3 a}\)

Input:

Int[Sech[x]^4/(a + b*Cosh[x]^2),x]
 

Output:

(b^2*ArcTanh[(Sqrt[a + b]*Coth[x])/Sqrt[a]])/(a^(5/2)*Sqrt[a + b]) + ((a - 
 b)*Tanh[x])/a^2 - Tanh[x]^3/(3*a)
 

Defintions of rubi rules used

rule 364
Int[(((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_))/((c_) + (d_.)*(x_)^2), 
x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*((a + b*x^2)^p/(c + d*x^2)), x], x 
] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && (In 
tegerQ[m] || IGtQ[2*(m + 1), 0] ||  !RationalQ[m])
 

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

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3666
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^( 
p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff^(m + 1 
)/f   Subst[Int[x^m*((a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1)) 
, x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] & 
& IntegerQ[p]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(138\) vs. \(2(45)=90\).

Time = 2.34 (sec) , antiderivative size = 139, normalized size of antiderivative = 2.53

method result size
default \(-\frac {2 b^{2} \left (-\frac {\ln \left (\sqrt {a +b}\, \tanh \left (\frac {x}{2}\right )^{2}+2 \tanh \left (\frac {x}{2}\right ) \sqrt {a}+\sqrt {a +b}\right )}{4 \sqrt {a}\, \sqrt {a +b}}+\frac {\ln \left (\sqrt {a +b}\, \tanh \left (\frac {x}{2}\right )^{2}-2 \tanh \left (\frac {x}{2}\right ) \sqrt {a}+\sqrt {a +b}\right )}{4 \sqrt {a}\, \sqrt {a +b}}\right )}{a^{2}}-\frac {2 \left (\left (-a +b \right ) \tanh \left (\frac {x}{2}\right )^{5}+\left (-\frac {2 a}{3}+2 b \right ) \tanh \left (\frac {x}{2}\right )^{3}+\left (-a +b \right ) \tanh \left (\frac {x}{2}\right )\right )}{a^{2} \left (\tanh \left (\frac {x}{2}\right )^{2}+1\right )^{3}}\) \(139\)
risch \(-\frac {2 \left (-3 \,{\mathrm e}^{4 x} b +6 \,{\mathrm e}^{2 x} a -6 \,{\mathrm e}^{2 x} b +2 a -3 b \right )}{3 \left ({\mathrm e}^{2 x}+1\right )^{3} a^{2}}+\frac {b^{2} \ln \left ({\mathrm e}^{2 x}+\frac {2 a \sqrt {a^{2}+a b}+b \sqrt {a^{2}+a b}-2 a^{2}-2 a b}{b \sqrt {a^{2}+a b}}\right )}{2 \sqrt {a^{2}+a b}\, a^{2}}-\frac {b^{2} \ln \left ({\mathrm e}^{2 x}+\frac {2 a \sqrt {a^{2}+a b}+b \sqrt {a^{2}+a b}+2 a^{2}+2 a b}{b \sqrt {a^{2}+a b}}\right )}{2 \sqrt {a^{2}+a b}\, a^{2}}\) \(181\)

Input:

int(sech(x)^4/(a+b*cosh(x)^2),x,method=_RETURNVERBOSE)
 

Output:

-2*b^2/a^2*(-1/4/a^(1/2)/(a+b)^(1/2)*ln((a+b)^(1/2)*tanh(1/2*x)^2+2*tanh(1 
/2*x)*a^(1/2)+(a+b)^(1/2))+1/4/a^(1/2)/(a+b)^(1/2)*ln((a+b)^(1/2)*tanh(1/2 
*x)^2-2*tanh(1/2*x)*a^(1/2)+(a+b)^(1/2)))-2/a^2*((-a+b)*tanh(1/2*x)^5+(-2/ 
3*a+2*b)*tanh(1/2*x)^3+(-a+b)*tanh(1/2*x))/(tanh(1/2*x)^2+1)^3
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 608 vs. \(2 (45) = 90\).

Time = 0.11 (sec) , antiderivative size = 1377, normalized size of antiderivative = 25.04 \[ \int \frac {\text {sech}^4(x)}{a+b \cosh ^2(x)} \, dx=\text {Too large to display} \] Input:

integrate(sech(x)^4/(a+b*cosh(x)^2),x, algorithm="fricas")
 

Output:

[1/6*(12*(a^2*b + a*b^2)*cosh(x)^4 + 48*(a^2*b + a*b^2)*cosh(x)*sinh(x)^3 
+ 12*(a^2*b + a*b^2)*sinh(x)^4 - 8*a^3 + 4*a^2*b + 12*a*b^2 - 24*(a^3 - a* 
b^2)*cosh(x)^2 - 24*(a^3 - a*b^2 - 3*(a^2*b + a*b^2)*cosh(x)^2)*sinh(x)^2 
+ 3*(b^2*cosh(x)^6 + 6*b^2*cosh(x)*sinh(x)^5 + b^2*sinh(x)^6 + 3*b^2*cosh( 
x)^4 + 3*(5*b^2*cosh(x)^2 + b^2)*sinh(x)^4 + 3*b^2*cosh(x)^2 + 4*(5*b^2*co 
sh(x)^3 + 3*b^2*cosh(x))*sinh(x)^3 + 3*(5*b^2*cosh(x)^4 + 6*b^2*cosh(x)^2 
+ b^2)*sinh(x)^2 + b^2 + 6*(b^2*cosh(x)^5 + 2*b^2*cosh(x)^3 + b^2*cosh(x)) 
*sinh(x))*sqrt(a^2 + a*b)*log((b^2*cosh(x)^4 + 4*b^2*cosh(x)*sinh(x)^3 + b 
^2*sinh(x)^4 + 2*(2*a*b + b^2)*cosh(x)^2 + 2*(3*b^2*cosh(x)^2 + 2*a*b + b^ 
2)*sinh(x)^2 + 8*a^2 + 8*a*b + b^2 + 4*(b^2*cosh(x)^3 + (2*a*b + b^2)*cosh 
(x))*sinh(x) - 4*(b*cosh(x)^2 + 2*b*cosh(x)*sinh(x) + b*sinh(x)^2 + 2*a + 
b)*sqrt(a^2 + a*b))/(b*cosh(x)^4 + 4*b*cosh(x)*sinh(x)^3 + b*sinh(x)^4 + 2 
*(2*a + b)*cosh(x)^2 + 2*(3*b*cosh(x)^2 + 2*a + b)*sinh(x)^2 + 4*(b*cosh(x 
)^3 + (2*a + b)*cosh(x))*sinh(x) + b)) + 48*((a^2*b + a*b^2)*cosh(x)^3 - ( 
a^3 - a*b^2)*cosh(x))*sinh(x))/((a^4 + a^3*b)*cosh(x)^6 + 6*(a^4 + a^3*b)* 
cosh(x)*sinh(x)^5 + (a^4 + a^3*b)*sinh(x)^6 + 3*(a^4 + a^3*b)*cosh(x)^4 + 
3*(a^4 + a^3*b + 5*(a^4 + a^3*b)*cosh(x)^2)*sinh(x)^4 + a^4 + a^3*b + 4*(5 
*(a^4 + a^3*b)*cosh(x)^3 + 3*(a^4 + a^3*b)*cosh(x))*sinh(x)^3 + 3*(a^4 + a 
^3*b)*cosh(x)^2 + 3*(5*(a^4 + a^3*b)*cosh(x)^4 + a^4 + a^3*b + 6*(a^4 + a^ 
3*b)*cosh(x)^2)*sinh(x)^2 + 6*((a^4 + a^3*b)*cosh(x)^5 + 2*(a^4 + a^3*b...
 

Sympy [F]

\[ \int \frac {\text {sech}^4(x)}{a+b \cosh ^2(x)} \, dx=\int \frac {\operatorname {sech}^{4}{\left (x \right )}}{a + b \cosh ^{2}{\left (x \right )}}\, dx \] Input:

integrate(sech(x)**4/(a+b*cosh(x)**2),x)
 

Output:

Integral(sech(x)**4/(a + b*cosh(x)**2), x)
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 119 vs. \(2 (45) = 90\).

Time = 0.13 (sec) , antiderivative size = 119, normalized size of antiderivative = 2.16 \[ \int \frac {\text {sech}^4(x)}{a+b \cosh ^2(x)} \, dx=-\frac {b^{2} \log \left (\frac {b e^{\left (-2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (-2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{2 \, \sqrt {{\left (a + b\right )} a} a^{2}} + \frac {2 \, {\left (6 \, {\left (a - b\right )} e^{\left (-2 \, x\right )} - 3 \, b e^{\left (-4 \, x\right )} + 2 \, a - 3 \, b\right )}}{3 \, {\left (3 \, a^{2} e^{\left (-2 \, x\right )} + 3 \, a^{2} e^{\left (-4 \, x\right )} + a^{2} e^{\left (-6 \, x\right )} + a^{2}\right )}} \] Input:

integrate(sech(x)^4/(a+b*cosh(x)^2),x, algorithm="maxima")
 

Output:

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

Giac [A] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.58 \[ \int \frac {\text {sech}^4(x)}{a+b \cosh ^2(x)} \, dx=\frac {b^{2} \arctan \left (\frac {b e^{\left (2 \, x\right )} + 2 \, a + b}{2 \, \sqrt {-a^{2} - a b}}\right )}{\sqrt {-a^{2} - a b} a^{2}} + \frac {2 \, {\left (3 \, b e^{\left (4 \, x\right )} - 6 \, a e^{\left (2 \, x\right )} + 6 \, b e^{\left (2 \, x\right )} - 2 \, a + 3 \, b\right )}}{3 \, a^{2} {\left (e^{\left (2 \, x\right )} + 1\right )}^{3}} \] Input:

integrate(sech(x)^4/(a+b*cosh(x)^2),x, algorithm="giac")
 

Output:

b^2*arctan(1/2*(b*e^(2*x) + 2*a + b)/sqrt(-a^2 - a*b))/(sqrt(-a^2 - a*b)*a 
^2) + 2/3*(3*b*e^(4*x) - 6*a*e^(2*x) + 6*b*e^(2*x) - 2*a + 3*b)/(a^2*(e^(2 
*x) + 1)^3)
 

Mupad [B] (verification not implemented)

Time = 2.81 (sec) , antiderivative size = 239, normalized size of antiderivative = 4.35 \[ \int \frac {\text {sech}^4(x)}{a+b \cosh ^2(x)} \, dx=\frac {8}{3\,a\,\left (3\,{\mathrm {e}}^{2\,x}+3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}+1\right )}-\frac {4}{a\,\left (2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1\right )}+\frac {2\,b}{a^2\,\left ({\mathrm {e}}^{2\,x}+1\right )}-\frac {b^2\,\ln \left (\frac {4\,b^2\,\left (2\,a\,b+8\,a^2\,{\mathrm {e}}^{2\,x}+b^2\,{\mathrm {e}}^{2\,x}+b^2+8\,a\,b\,{\mathrm {e}}^{2\,x}\right )}{a^5\,\left (a+b\right )}-\frac {8\,b^2\,\left (b+4\,a\,{\mathrm {e}}^{2\,x}+2\,b\,{\mathrm {e}}^{2\,x}\right )}{a^{9/2}\,\sqrt {a+b}}\right )}{2\,a^{5/2}\,\sqrt {a+b}}+\frac {b^2\,\ln \left (\frac {8\,b^2\,\left (b+4\,a\,{\mathrm {e}}^{2\,x}+2\,b\,{\mathrm {e}}^{2\,x}\right )}{a^{9/2}\,\sqrt {a+b}}+\frac {4\,b^2\,\left (2\,a\,b+8\,a^2\,{\mathrm {e}}^{2\,x}+b^2\,{\mathrm {e}}^{2\,x}+b^2+8\,a\,b\,{\mathrm {e}}^{2\,x}\right )}{a^5\,\left (a+b\right )}\right )}{2\,a^{5/2}\,\sqrt {a+b}} \] Input:

int(1/(cosh(x)^4*(a + b*cosh(x)^2)),x)
 

Output:

8/(3*a*(3*exp(2*x) + 3*exp(4*x) + exp(6*x) + 1)) - 4/(a*(2*exp(2*x) + exp( 
4*x) + 1)) + (2*b)/(a^2*(exp(2*x) + 1)) - (b^2*log((4*b^2*(2*a*b + 8*a^2*e 
xp(2*x) + b^2*exp(2*x) + b^2 + 8*a*b*exp(2*x)))/(a^5*(a + b)) - (8*b^2*(b 
+ 4*a*exp(2*x) + 2*b*exp(2*x)))/(a^(9/2)*(a + b)^(1/2))))/(2*a^(5/2)*(a + 
b)^(1/2)) + (b^2*log((8*b^2*(b + 4*a*exp(2*x) + 2*b*exp(2*x)))/(a^(9/2)*(a 
 + b)^(1/2)) + (4*b^2*(2*a*b + 8*a^2*exp(2*x) + b^2*exp(2*x) + b^2 + 8*a*b 
*exp(2*x)))/(a^5*(a + b))))/(2*a^(5/2)*(a + b)^(1/2))
 

Reduce [B] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 583, normalized size of antiderivative = 10.60 \[ \int \frac {\text {sech}^4(x)}{a+b \cosh ^2(x)} \, dx=\frac {3 e^{6 x} \sqrt {a}\, \sqrt {a +b}\, \mathrm {log}\left (-\sqrt {2 \sqrt {a}\, \sqrt {a +b}-2 a -b}+e^{x} \sqrt {b}\right ) b^{2}+3 e^{6 x} \sqrt {a}\, \sqrt {a +b}\, \mathrm {log}\left (\sqrt {2 \sqrt {a}\, \sqrt {a +b}-2 a -b}+e^{x} \sqrt {b}\right ) b^{2}-3 e^{6 x} \sqrt {a}\, \sqrt {a +b}\, \mathrm {log}\left (2 \sqrt {a}\, \sqrt {a +b}+e^{2 x} b +2 a +b \right ) b^{2}+9 e^{4 x} \sqrt {a}\, \sqrt {a +b}\, \mathrm {log}\left (-\sqrt {2 \sqrt {a}\, \sqrt {a +b}-2 a -b}+e^{x} \sqrt {b}\right ) b^{2}+9 e^{4 x} \sqrt {a}\, \sqrt {a +b}\, \mathrm {log}\left (\sqrt {2 \sqrt {a}\, \sqrt {a +b}-2 a -b}+e^{x} \sqrt {b}\right ) b^{2}-9 e^{4 x} \sqrt {a}\, \sqrt {a +b}\, \mathrm {log}\left (2 \sqrt {a}\, \sqrt {a +b}+e^{2 x} b +2 a +b \right ) b^{2}+9 e^{2 x} \sqrt {a}\, \sqrt {a +b}\, \mathrm {log}\left (-\sqrt {2 \sqrt {a}\, \sqrt {a +b}-2 a -b}+e^{x} \sqrt {b}\right ) b^{2}+9 e^{2 x} \sqrt {a}\, \sqrt {a +b}\, \mathrm {log}\left (\sqrt {2 \sqrt {a}\, \sqrt {a +b}-2 a -b}+e^{x} \sqrt {b}\right ) b^{2}-9 e^{2 x} \sqrt {a}\, \sqrt {a +b}\, \mathrm {log}\left (2 \sqrt {a}\, \sqrt {a +b}+e^{2 x} b +2 a +b \right ) b^{2}+3 \sqrt {a}\, \sqrt {a +b}\, \mathrm {log}\left (-\sqrt {2 \sqrt {a}\, \sqrt {a +b}-2 a -b}+e^{x} \sqrt {b}\right ) b^{2}+3 \sqrt {a}\, \sqrt {a +b}\, \mathrm {log}\left (\sqrt {2 \sqrt {a}\, \sqrt {a +b}-2 a -b}+e^{x} \sqrt {b}\right ) b^{2}-3 \sqrt {a}\, \sqrt {a +b}\, \mathrm {log}\left (2 \sqrt {a}\, \sqrt {a +b}+e^{2 x} b +2 a +b \right ) b^{2}-4 e^{6 x} a^{2} b -4 e^{6 x} a \,b^{2}-24 e^{2 x} a^{3}-12 e^{2 x} a^{2} b +12 e^{2 x} a \,b^{2}-8 a^{3}+8 a \,b^{2}}{6 a^{3} \left (e^{6 x} a +e^{6 x} b +3 e^{4 x} a +3 e^{4 x} b +3 e^{2 x} a +3 e^{2 x} b +a +b \right )} \] Input:

int(sech(x)^4/(a+b*cosh(x)^2),x)
 

Output:

(3*e**(6*x)*sqrt(a)*sqrt(a + b)*log( - sqrt(2*sqrt(a)*sqrt(a + b) - 2*a - 
b) + e**x*sqrt(b))*b**2 + 3*e**(6*x)*sqrt(a)*sqrt(a + b)*log(sqrt(2*sqrt(a 
)*sqrt(a + b) - 2*a - b) + e**x*sqrt(b))*b**2 - 3*e**(6*x)*sqrt(a)*sqrt(a 
+ b)*log(2*sqrt(a)*sqrt(a + b) + e**(2*x)*b + 2*a + b)*b**2 + 9*e**(4*x)*s 
qrt(a)*sqrt(a + b)*log( - sqrt(2*sqrt(a)*sqrt(a + b) - 2*a - b) + e**x*sqr 
t(b))*b**2 + 9*e**(4*x)*sqrt(a)*sqrt(a + b)*log(sqrt(2*sqrt(a)*sqrt(a + b) 
 - 2*a - b) + e**x*sqrt(b))*b**2 - 9*e**(4*x)*sqrt(a)*sqrt(a + b)*log(2*sq 
rt(a)*sqrt(a + b) + e**(2*x)*b + 2*a + b)*b**2 + 9*e**(2*x)*sqrt(a)*sqrt(a 
 + b)*log( - sqrt(2*sqrt(a)*sqrt(a + b) - 2*a - b) + e**x*sqrt(b))*b**2 + 
9*e**(2*x)*sqrt(a)*sqrt(a + b)*log(sqrt(2*sqrt(a)*sqrt(a + b) - 2*a - b) + 
 e**x*sqrt(b))*b**2 - 9*e**(2*x)*sqrt(a)*sqrt(a + b)*log(2*sqrt(a)*sqrt(a 
+ b) + e**(2*x)*b + 2*a + b)*b**2 + 3*sqrt(a)*sqrt(a + b)*log( - sqrt(2*sq 
rt(a)*sqrt(a + b) - 2*a - b) + e**x*sqrt(b))*b**2 + 3*sqrt(a)*sqrt(a + b)* 
log(sqrt(2*sqrt(a)*sqrt(a + b) - 2*a - b) + e**x*sqrt(b))*b**2 - 3*sqrt(a) 
*sqrt(a + b)*log(2*sqrt(a)*sqrt(a + b) + e**(2*x)*b + 2*a + b)*b**2 - 4*e* 
*(6*x)*a**2*b - 4*e**(6*x)*a*b**2 - 24*e**(2*x)*a**3 - 12*e**(2*x)*a**2*b 
+ 12*e**(2*x)*a*b**2 - 8*a**3 + 8*a*b**2)/(6*a**3*(e**(6*x)*a + e**(6*x)*b 
 + 3*e**(4*x)*a + 3*e**(4*x)*b + 3*e**(2*x)*a + 3*e**(2*x)*b + a + b))