Integrand size = 13, antiderivative size = 102 \[ \int \frac {\text {sech}^5(x)}{a+b \tanh (x)} \, dx=-\frac {a \left (2 a^2-3 b^2\right ) \arctan (\sinh (x))}{2 b^4}+\frac {\left (a^2-b^2\right )^{3/2} \arctan \left (\frac {\cosh (x) (b+a \tanh (x))}{\sqrt {a^2-b^2}}\right )}{b^4}-\frac {\left (a^2-b^2\right ) \text {sech}(x)}{b^3}+\frac {\text {sech}^3(x)}{3 b}+\frac {a \text {sech}(x) \tanh (x)}{2 b^2} \]
-1/2*a*(2*a^2-3*b^2)*arctan(sinh(x))/b^4+(a^2-b^2)^(3/2)*arctan(cosh(x)*(b +a*tanh(x))/(a^2-b^2)^(1/2))/b^4-(a^2-b^2)*sech(x)/b^3+1/3*sech(x)^3/b+1/2 *a*sech(x)*tanh(x)/b^2
Time = 0.29 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.14 \[ \int \frac {\text {sech}^5(x)}{a+b \tanh (x)} \, dx=\frac {-6 \left (a \left (2 a^2-3 b^2\right ) \arctan \left (\tanh \left (\frac {x}{2}\right )\right )+2 \sqrt {a-b} \sqrt {a+b} \left (-a^2+b^2\right ) \arctan \left (\frac {b+a \tanh \left (\frac {x}{2}\right )}{\sqrt {a-b} \sqrt {a+b}}\right )\right )+2 b^3 \text {sech}^3(x)+3 b \text {sech}(x) \left (-2 a^2+2 b^2+a b \tanh (x)\right )}{6 b^4} \]
(-6*(a*(2*a^2 - 3*b^2)*ArcTan[Tanh[x/2]] + 2*Sqrt[a - b]*Sqrt[a + b]*(-a^2 + b^2)*ArcTan[(b + a*Tanh[x/2])/(Sqrt[a - b]*Sqrt[a + b])]) + 2*b^3*Sech[ x]^3 + 3*b*Sech[x]*(-2*a^2 + 2*b^2 + a*b*Tanh[x]))/(6*b^4)
Time = 0.89 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.01, number of steps used = 15, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.077, Rules used = {3042, 3989, 3042, 3967, 3042, 3989, 3042, 3967, 3042, 3988, 219, 4255, 3042, 4257}
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}^5(x)}{a+b \tanh (x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sec (i x)^5}{a-i b \tan (i x)}dx\) |
\(\Big \downarrow \) 3989 |
\(\displaystyle \frac {\int \text {sech}^3(x) (a-b \tanh (x))dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\text {sech}^3(x)}{a+b \tanh (x)}dx}{b^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \sec (i x)^3 (a+i b \tan (i x))dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\sec (i x)^3}{a-i b \tan (i x)}dx}{b^2}\) |
\(\Big \downarrow \) 3967 |
\(\displaystyle \frac {a \int \text {sech}^3(x)dx+\frac {1}{3} b \text {sech}^3(x)}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\sec (i x)^3}{a-i b \tan (i x)}dx}{b^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} b \text {sech}^3(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )^3dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\sec (i x)^3}{a-i b \tan (i x)}dx}{b^2}\) |
\(\Big \downarrow \) 3989 |
\(\displaystyle -\frac {\left (a^2-b^2\right ) \left (\frac {\int \text {sech}(x) (a-b \tanh (x))dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\text {sech}(x)}{a+b \tanh (x)}dx}{b^2}\right )}{b^2}+\frac {\frac {1}{3} b \text {sech}^3(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )^3dx}{b^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} b \text {sech}^3(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )^3dx}{b^2}-\frac {\left (a^2-b^2\right ) \left (\frac {\int \sec (i x) (a+i b \tan (i x))dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\sec (i x)}{a-i b \tan (i x)}dx}{b^2}\right )}{b^2}\) |
\(\Big \downarrow \) 3967 |
\(\displaystyle \frac {\frac {1}{3} b \text {sech}^3(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )^3dx}{b^2}-\frac {\left (a^2-b^2\right ) \left (\frac {a \int \text {sech}(x)dx+b \text {sech}(x)}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\sec (i x)}{a-i b \tan (i x)}dx}{b^2}\right )}{b^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} b \text {sech}^3(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )^3dx}{b^2}-\frac {\left (a^2-b^2\right ) \left (\frac {b \text {sech}(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\sec (i x)}{a-i b \tan (i x)}dx}{b^2}\right )}{b^2}\) |
\(\Big \downarrow \) 3988 |
\(\displaystyle \frac {\frac {1}{3} b \text {sech}^3(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )^3dx}{b^2}-\frac {\left (a^2-b^2\right ) \left (\frac {b \text {sech}(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )dx}{b^2}-\frac {i \left (a^2-b^2\right ) \int \frac {1}{a^2-b^2+\cosh ^2(x) (b+a \tanh (x))^2}d(-i \cosh (x) (b+a \tanh (x)))}{b^2}\right )}{b^2}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\frac {1}{3} b \text {sech}^3(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )^3dx}{b^2}-\frac {\left (a^2-b^2\right ) \left (-\frac {\sqrt {a^2-b^2} \arctan \left (\frac {\cosh (x) (a \tanh (x)+b)}{\sqrt {a^2-b^2}}\right )}{b^2}+\frac {b \text {sech}(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )dx}{b^2}\right )}{b^2}\) |
\(\Big \downarrow \) 4255 |
\(\displaystyle \frac {a \left (\frac {\int \text {sech}(x)dx}{2}+\frac {1}{2} \tanh (x) \text {sech}(x)\right )+\frac {1}{3} b \text {sech}^3(x)}{b^2}-\frac {\left (a^2-b^2\right ) \left (-\frac {\sqrt {a^2-b^2} \arctan \left (\frac {\cosh (x) (a \tanh (x)+b)}{\sqrt {a^2-b^2}}\right )}{b^2}+\frac {b \text {sech}(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )dx}{b^2}\right )}{b^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} b \text {sech}^3(x)+a \left (\frac {1}{2} \tanh (x) \text {sech}(x)+\frac {1}{2} \int \csc \left (i x+\frac {\pi }{2}\right )dx\right )}{b^2}-\frac {\left (a^2-b^2\right ) \left (-\frac {\sqrt {a^2-b^2} \arctan \left (\frac {\cosh (x) (a \tanh (x)+b)}{\sqrt {a^2-b^2}}\right )}{b^2}+\frac {b \text {sech}(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )dx}{b^2}\right )}{b^2}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {a \left (\frac {1}{2} \arctan (\sinh (x))+\frac {1}{2} \tanh (x) \text {sech}(x)\right )+\frac {1}{3} b \text {sech}^3(x)}{b^2}-\frac {\left (a^2-b^2\right ) \left (\frac {a \arctan (\sinh (x))+b \text {sech}(x)}{b^2}-\frac {\sqrt {a^2-b^2} \arctan \left (\frac {\cosh (x) (a \tanh (x)+b)}{\sqrt {a^2-b^2}}\right )}{b^2}\right )}{b^2}\) |
-(((a^2 - b^2)*(-((Sqrt[a^2 - b^2]*ArcTan[(Cosh[x]*(b + a*Tanh[x]))/Sqrt[a ^2 - b^2]])/b^2) + (a*ArcTan[Sinh[x]] + b*Sech[x])/b^2))/b^2) + ((b*Sech[x ]^3)/3 + a*(ArcTan[Sinh[x]]/2 + (Sech[x]*Tanh[x])/2))/b^2
3.2.10.3.1 Defintions of rubi rules used
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] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)]), x_Symbol] :> Simp[b*((d*Sec[e + f*x])^m/(f*m)), x] + Simp[a Int[(d *Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2*m] || NeQ[a^2 + b^2, 0])
Int[sec[(e_.) + (f_.)*(x_)]/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbo l] :> Simp[-f^(-1) Subst[Int[1/(a^2 + b^2 - x^2), x], x, (b - a*Tan[e + f *x])/Sec[e + f*x]], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 + b^2, 0]
Int[sec[(e_.) + (f_.)*(x_)]^(m_)/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_ Symbol] :> Simp[-(b^2)^(-1) Int[Sec[e + f*x]^(m - 2)*(a - b*Tan[e + f*x]) , x], x] + Simp[(a^2 + b^2)/b^2 Int[Sec[e + f*x]^(m - 2)/(a + b*Tan[e + f *x]), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 + b^2, 0] && IGtQ[(m - 1) /2, 0]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 29.88 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.61
method | result | size |
default | \(\frac {2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \arctan \left (\frac {2 a \tanh \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{b^{4} \sqrt {a^{2}-b^{2}}}-\frac {2 \left (\frac {\frac {a \,b^{2} \tanh \left (\frac {x}{2}\right )^{5}}{2}+\left (a^{2} b -2 b^{3}\right ) \tanh \left (\frac {x}{2}\right )^{4}+\left (2 a^{2} b -2 b^{3}\right ) \tanh \left (\frac {x}{2}\right )^{2}-\frac {a \,b^{2} \tanh \left (\frac {x}{2}\right )}{2}+a^{2} b -\frac {4 b^{3}}{3}}{\left (1+\tanh \left (\frac {x}{2}\right )^{2}\right )^{3}}+\frac {a \left (2 a^{2}-3 b^{2}\right ) \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{2}\right )}{b^{4}}\) | \(164\) |
risch | \(-\frac {{\mathrm e}^{x} \left (6 a^{2} {\mathrm e}^{4 x}-3 a b \,{\mathrm e}^{4 x}-6 b^{2} {\mathrm e}^{4 x}+12 a^{2} {\mathrm e}^{2 x}-20 b^{2} {\mathrm e}^{2 x}+6 a^{2}+3 a b -6 b^{2}\right )}{3 b^{3} \left (1+{\mathrm e}^{2 x}\right )^{3}}+\frac {i a^{3} \ln \left ({\mathrm e}^{x}-i\right )}{b^{4}}-\frac {3 i a \ln \left ({\mathrm e}^{x}-i\right )}{2 b^{2}}-\frac {i a^{3} \ln \left ({\mathrm e}^{x}+i\right )}{b^{4}}+\frac {3 i a \ln \left ({\mathrm e}^{x}+i\right )}{2 b^{2}}+\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}+\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right ) a^{2}}{b^{4}}-\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}+\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right )}{b^{2}}-\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}-\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right ) a^{2}}{b^{4}}+\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}-\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right )}{b^{2}}\) | \(286\) |
2*(a^4-2*a^2*b^2+b^4)/b^4/(a^2-b^2)^(1/2)*arctan(1/2*(2*a*tanh(1/2*x)+2*b) /(a^2-b^2)^(1/2))-2/b^4*((1/2*a*b^2*tanh(1/2*x)^5+(a^2*b-2*b^3)*tanh(1/2*x )^4+(2*a^2*b-2*b^3)*tanh(1/2*x)^2-1/2*a*b^2*tanh(1/2*x)+a^2*b-4/3*b^3)/(1+ tanh(1/2*x)^2)^3+1/2*a*(2*a^2-3*b^2)*arctan(tanh(1/2*x)))
Leaf count of result is larger than twice the leaf count of optimal. 994 vs. \(2 (92) = 184\).
Time = 0.31 (sec) , antiderivative size = 2043, normalized size of antiderivative = 20.03 \[ \int \frac {\text {sech}^5(x)}{a+b \tanh (x)} \, dx=\text {Too large to display} \]
[-1/3*(3*(2*a^2*b - a*b^2 - 2*b^3)*cosh(x)^5 + 15*(2*a^2*b - a*b^2 - 2*b^3 )*cosh(x)*sinh(x)^4 + 3*(2*a^2*b - a*b^2 - 2*b^3)*sinh(x)^5 + 4*(3*a^2*b - 5*b^3)*cosh(x)^3 + 2*(6*a^2*b - 10*b^3 + 15*(2*a^2*b - a*b^2 - 2*b^3)*cos h(x)^2)*sinh(x)^3 + 6*(5*(2*a^2*b - a*b^2 - 2*b^3)*cosh(x)^3 + 2*(3*a^2*b - 5*b^3)*cosh(x))*sinh(x)^2 + 3*((a^2 - b^2)*cosh(x)^6 + 6*(a^2 - b^2)*cos h(x)*sinh(x)^5 + (a^2 - b^2)*sinh(x)^6 + 3*(a^2 - b^2)*cosh(x)^4 + 3*(5*(a ^2 - b^2)*cosh(x)^2 + a^2 - b^2)*sinh(x)^4 + 4*(5*(a^2 - b^2)*cosh(x)^3 + 3*(a^2 - b^2)*cosh(x))*sinh(x)^3 + 3*(a^2 - b^2)*cosh(x)^2 + 3*(5*(a^2 - b ^2)*cosh(x)^4 + 6*(a^2 - b^2)*cosh(x)^2 + a^2 - b^2)*sinh(x)^2 + a^2 - b^2 + 6*((a^2 - b^2)*cosh(x)^5 + 2*(a^2 - b^2)*cosh(x)^3 + (a^2 - b^2)*cosh(x ))*sinh(x))*sqrt(-a^2 + b^2)*log(((a + b)*cosh(x)^2 + 2*(a + b)*cosh(x)*si nh(x) + (a + b)*sinh(x)^2 - 2*sqrt(-a^2 + b^2)*(cosh(x) + sinh(x)) - a + b )/((a + b)*cosh(x)^2 + 2*(a + b)*cosh(x)*sinh(x) + (a + b)*sinh(x)^2 + a - b)) + 3*((2*a^3 - 3*a*b^2)*cosh(x)^6 + 6*(2*a^3 - 3*a*b^2)*cosh(x)*sinh(x )^5 + (2*a^3 - 3*a*b^2)*sinh(x)^6 + 3*(2*a^3 - 3*a*b^2)*cosh(x)^4 + 3*(2*a ^3 - 3*a*b^2 + 5*(2*a^3 - 3*a*b^2)*cosh(x)^2)*sinh(x)^4 + 4*(5*(2*a^3 - 3* a*b^2)*cosh(x)^3 + 3*(2*a^3 - 3*a*b^2)*cosh(x))*sinh(x)^3 + 2*a^3 - 3*a*b^ 2 + 3*(2*a^3 - 3*a*b^2)*cosh(x)^2 + 3*(5*(2*a^3 - 3*a*b^2)*cosh(x)^4 + 2*a ^3 - 3*a*b^2 + 6*(2*a^3 - 3*a*b^2)*cosh(x)^2)*sinh(x)^2 + 6*((2*a^3 - 3*a* b^2)*cosh(x)^5 + 2*(2*a^3 - 3*a*b^2)*cosh(x)^3 + (2*a^3 - 3*a*b^2)*cosh...
\[ \int \frac {\text {sech}^5(x)}{a+b \tanh (x)} \, dx=\int \frac {\operatorname {sech}^{5}{\left (x \right )}}{a + b \tanh {\left (x \right )}}\, dx \]
Exception generated. \[ \int \frac {\text {sech}^5(x)}{a+b \tanh (x)} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?` f or more de
Time = 0.26 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.49 \[ \int \frac {\text {sech}^5(x)}{a+b \tanh (x)} \, dx=-\frac {{\left (2 \, a^{3} - 3 \, a b^{2}\right )} \arctan \left (e^{x}\right )}{b^{4}} + \frac {2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \arctan \left (\frac {a e^{x} + b e^{x}}{\sqrt {a^{2} - b^{2}}}\right )}{\sqrt {a^{2} - b^{2}} b^{4}} - \frac {6 \, a^{2} e^{\left (5 \, x\right )} - 3 \, a b e^{\left (5 \, x\right )} - 6 \, b^{2} e^{\left (5 \, x\right )} + 12 \, a^{2} e^{\left (3 \, x\right )} - 20 \, b^{2} e^{\left (3 \, x\right )} + 6 \, a^{2} e^{x} + 3 \, a b e^{x} - 6 \, b^{2} e^{x}}{3 \, b^{3} {\left (e^{\left (2 \, x\right )} + 1\right )}^{3}} \]
-(2*a^3 - 3*a*b^2)*arctan(e^x)/b^4 + 2*(a^4 - 2*a^2*b^2 + b^4)*arctan((a*e ^x + b*e^x)/sqrt(a^2 - b^2))/(sqrt(a^2 - b^2)*b^4) - 1/3*(6*a^2*e^(5*x) - 3*a*b*e^(5*x) - 6*b^2*e^(5*x) + 12*a^2*e^(3*x) - 20*b^2*e^(3*x) + 6*a^2*e^ x + 3*a*b*e^x - 6*b^2*e^x)/(b^3*(e^(2*x) + 1)^3)
Time = 5.44 (sec) , antiderivative size = 265, normalized size of antiderivative = 2.60 \[ \int \frac {\text {sech}^5(x)}{a+b \tanh (x)} \, dx=\frac {\ln \left (\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}+a^3\,{\mathrm {e}}^x-b^3\,{\mathrm {e}}^x-a\,b^2\,{\mathrm {e}}^x+a^2\,b\,{\mathrm {e}}^x\right )\,\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}}{b^4}-\frac {8\,{\mathrm {e}}^x}{3\,b\,\left (3\,{\mathrm {e}}^{2\,x}+3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}+1\right )}-\frac {\ln \left (\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}-a^3\,{\mathrm {e}}^x+b^3\,{\mathrm {e}}^x+a\,b^2\,{\mathrm {e}}^x-a^2\,b\,{\mathrm {e}}^x\right )\,\sqrt {-{\left (a+b\right )}^3\,{\left (a-b\right )}^3}}{b^4}-\frac {2\,{\mathrm {e}}^x\,\left (3\,a-4\,b\right )}{3\,b^2\,\left (2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1\right )}+\frac {{\mathrm {e}}^x\,\left (-2\,a^2+a\,b+2\,b^2\right )}{b^3\,\left ({\mathrm {e}}^{2\,x}+1\right )}+\frac {a\,\ln \left ({\mathrm {e}}^x-\mathrm {i}\right )\,\left (2\,a^2-3\,b^2\right )\,1{}\mathrm {i}}{2\,b^4}-\frac {a\,\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,\left (2\,a^2-3\,b^2\right )\,1{}\mathrm {i}}{2\,b^4} \]
(log((-(a + b)^3*(a - b)^3)^(1/2) + a^3*exp(x) - b^3*exp(x) - a*b^2*exp(x) + a^2*b*exp(x))*(-(a + b)^3*(a - b)^3)^(1/2))/b^4 - (8*exp(x))/(3*b*(3*ex p(2*x) + 3*exp(4*x) + exp(6*x) + 1)) - (log((-(a + b)^3*(a - b)^3)^(1/2) - a^3*exp(x) + b^3*exp(x) + a*b^2*exp(x) - a^2*b*exp(x))*(-(a + b)^3*(a - b )^3)^(1/2))/b^4 - (2*exp(x)*(3*a - 4*b))/(3*b^2*(2*exp(2*x) + exp(4*x) + 1 )) + (exp(x)*(a*b - 2*a^2 + 2*b^2))/(b^3*(exp(2*x) + 1)) + (a*log(exp(x) - 1i)*(2*a^2 - 3*b^2)*1i)/(2*b^4) - (a*log(exp(x) + 1i)*(2*a^2 - 3*b^2)*1i) /(2*b^4)