3.3.51 \(\int \frac {A+B \text {sech}(x)}{a+b \sinh (x)} \, dx\) [251]

Optimal. Leaf size=89 \[ \frac {a B \text {ArcTan}(\sinh (x))}{a^2+b^2}-\frac {2 A \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2}}-\frac {b B \log (\cosh (x))}{a^2+b^2}+\frac {b B \log (a+b \sinh (x))}{a^2+b^2} \]

[Out]

a*B*arctan(sinh(x))/(a^2+b^2)-b*B*ln(cosh(x))/(a^2+b^2)+b*B*ln(a+b*sinh(x))/(a^2+b^2)-2*A*arctanh((b-a*tanh(1/
2*x))/(a^2+b^2)^(1/2))/(a^2+b^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.18, antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 11, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.733, Rules used = {4311, 4486, 2739, 632, 212, 2747, 720, 31, 649, 210, 266} \begin {gather*} -\frac {2 A \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2}}+\frac {a B \text {ArcTan}(\sinh (x))}{a^2+b^2}+\frac {b B \log (a+b \sinh (x))}{a^2+b^2}-\frac {b B \log (\cosh (x))}{a^2+b^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*Sech[x])/(a + b*Sinh[x]),x]

[Out]

(a*B*ArcTan[Sinh[x]])/(a^2 + b^2) - (2*A*ArcTanh[(b - a*Tanh[x/2])/Sqrt[a^2 + b^2]])/Sqrt[a^2 + b^2] - (b*B*Lo
g[Cosh[x]])/(a^2 + b^2) + (b*B*Log[a + b*Sinh[x]])/(a^2 + b^2)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 210

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

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 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

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 649

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[(-a)*c]

Rule 720

Int[1/(((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)), x_Symbol] :> Dist[e^2/(c*d^2 + a*e^2), Int[1/(d + e*x), x],
 x] + Dist[1/(c*d^2 + a*e^2), Int[(c*d - c*e*x)/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a
*e^2, 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 2747

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^m*(b^2 - x^2)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && Integer
Q[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rule 4311

Int[(u_)*((A_) + (B_.)*sec[(a_.) + (b_.)*(x_)]), x_Symbol] :> Int[ActivateTrig[u]*((B + A*Cos[a + b*x])/Cos[a
+ b*x]), x] /; FreeQ[{a, b, A, B}, x] && KnownSineIntegrandQ[u, x]

Rule 4486

Int[u_, x_Symbol] :> With[{v = ExpandTrig[u, x]}, Int[v, x] /; SumQ[v]] /;  !InertTrigFreeQ[u]

Rubi steps

\begin {align*} \int \frac {A+B \text {sech}(x)}{a+b \sinh (x)} \, dx &=\int \frac {(B+A \cosh (x)) \text {sech}(x)}{a+b \sinh (x)} \, dx\\ &=\int \left (\frac {A}{a+b \sinh (x)}+\frac {B \text {sech}(x)}{a+b \sinh (x)}\right ) \, dx\\ &=A \int \frac {1}{a+b \sinh (x)} \, dx+B \int \frac {\text {sech}(x)}{a+b \sinh (x)} \, dx\\ &=(2 A) \text {Subst}\left (\int \frac {1}{a+2 b x-a x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )-(b B) \text {Subst}\left (\int \frac {1}{(a+x) \left (-b^2-x^2\right )} \, dx,x,b \sinh (x)\right )\\ &=-\left ((4 A) \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 )\right )+\frac {(b B) \text {Subst}\left (\int \frac {1}{a+x} \, dx,x,b \sinh (x)\right )}{a^2+b^2}+\frac {(b B) \text {Subst}\left (\int \frac {-a+x}{-b^2-x^2} \, dx,x,b \sinh (x)\right )}{a^2+b^2}\\ &=-\frac {2 A \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2}}+\frac {b B \log (a+b \sinh (x))}{a^2+b^2}+\frac {(b B) \text {Subst}\left (\int \frac {x}{-b^2-x^2} \, dx,x,b \sinh (x)\right )}{a^2+b^2}-\frac {(a b B) \text {Subst}\left (\int \frac {1}{-b^2-x^2} \, dx,x,b \sinh (x)\right )}{a^2+b^2}\\ &=\frac {a B \tan ^{-1}(\sinh (x))}{a^2+b^2}-\frac {2 A \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2}}-\frac {b B \log (\cosh (x))}{a^2+b^2}+\frac {b B \log (a+b \sinh (x))}{a^2+b^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.19, size = 93, normalized size = 1.04 \begin {gather*} \frac {2 a B \text {ArcTan}\left (\tanh \left (\frac {x}{2}\right )\right )}{a^2+b^2}+\frac {2 A \text {ArcTan}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {-a^2-b^2}}\right )}{\sqrt {-a^2-b^2}}-\frac {b B (\log (\cosh (x))-\log (a+b \sinh (x)))}{a^2+b^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*Sech[x])/(a + b*Sinh[x]),x]

[Out]

(2*a*B*ArcTan[Tanh[x/2]])/(a^2 + b^2) + (2*A*ArcTan[(b - a*Tanh[x/2])/Sqrt[-a^2 - b^2]])/Sqrt[-a^2 - b^2] - (b
*B*(Log[Cosh[x]] - Log[a + b*Sinh[x]]))/(a^2 + b^2)

________________________________________________________________________________________

Maple [A]
time = 0.64, size = 117, normalized size = 1.31

method result size
default \(\frac {2 B \left (-\frac {b \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )}{2}+a \arctan \left (\tanh \left (\frac {x}{2}\right )\right )\right )}{a^{2}+b^{2}}+\frac {b B \ln \left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-2 b \tanh \left (\frac {x}{2}\right )-a \right )-\frac {2 \left (-a^{2} A -A \,b^{2}\right ) \arctanh \left (\frac {2 a \tanh \left (\frac {x}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{\sqrt {a^{2}+b^{2}}}}{a^{2}+b^{2}}\) \(117\)
risch \(\frac {2 x B b}{a^{2}+b^{2}}+\frac {2 x B \,a^{2} b}{-a^{4}-2 a^{2} b^{2}-b^{4}}+\frac {2 x B \,b^{3}}{-a^{4}-2 a^{2} b^{2}-b^{4}}+\frac {i B \ln \left ({\mathrm e}^{x}+i\right ) a}{a^{2}+b^{2}}-\frac {B \ln \left ({\mathrm e}^{x}+i\right ) b}{a^{2}+b^{2}}-\frac {i B \ln \left ({\mathrm e}^{x}-i\right ) a}{a^{2}+b^{2}}-\frac {B \ln \left ({\mathrm e}^{x}-i\right ) b}{a^{2}+b^{2}}+\frac {\ln \left ({\mathrm e}^{x}+\frac {A a -\sqrt {A^{2} a^{2}+A^{2} b^{2}}}{A b}\right ) B b}{a^{2}+b^{2}}+\frac {\ln \left ({\mathrm e}^{x}+\frac {A a -\sqrt {A^{2} a^{2}+A^{2} b^{2}}}{A b}\right ) \sqrt {A^{2} a^{2}+A^{2} b^{2}}}{a^{2}+b^{2}}+\frac {\ln \left ({\mathrm e}^{x}+\frac {A a +\sqrt {A^{2} a^{2}+A^{2} b^{2}}}{A b}\right ) B b}{a^{2}+b^{2}}-\frac {\ln \left ({\mathrm e}^{x}+\frac {A a +\sqrt {A^{2} a^{2}+A^{2} b^{2}}}{A b}\right ) \sqrt {A^{2} a^{2}+A^{2} b^{2}}}{a^{2}+b^{2}}\) \(362\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*sech(x))/(a+b*sinh(x)),x,method=_RETURNVERBOSE)

[Out]

2*B/(a^2+b^2)*(-1/2*b*ln(tanh(1/2*x)^2+1)+a*arctan(tanh(1/2*x)))+2/(a^2+b^2)*(1/2*b*B*ln(a*tanh(1/2*x)^2-2*b*t
anh(1/2*x)-a)-(-A*a^2-A*b^2)/(a^2+b^2)^(1/2)*arctanh(1/2*(2*a*tanh(1/2*x)-2*b)/(a^2+b^2)^(1/2)))

________________________________________________________________________________________

Maxima [A]
time = 0.48, size = 125, normalized size = 1.40 \begin {gather*} -B {\left (\frac {2 \, a \arctan \left (e^{\left (-x\right )}\right )}{a^{2} + b^{2}} - \frac {b \log \left (-2 \, a e^{\left (-x\right )} + b e^{\left (-2 \, x\right )} - b\right )}{a^{2} + b^{2}} + \frac {b \log \left (e^{\left (-2 \, x\right )} + 1\right )}{a^{2} + b^{2}}\right )} + \frac {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 )}{\sqrt {a^{2} + b^{2}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sech(x))/(a+b*sinh(x)),x, algorithm="maxima")

[Out]

-B*(2*a*arctan(e^(-x))/(a^2 + b^2) - b*log(-2*a*e^(-x) + b*e^(-2*x) - b)/(a^2 + b^2) + b*log(e^(-2*x) + 1)/(a^
2 + b^2)) + A*log((b*e^(-x) - a - sqrt(a^2 + b^2))/(b*e^(-x) - a + sqrt(a^2 + b^2)))/sqrt(a^2 + b^2)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 172 vs. \(2 (85) = 170\).
time = 2.11, size = 172, normalized size = 1.93 \begin {gather*} \frac {2 \, B a \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) + B b \log \left (\frac {2 \, {\left (b \sinh \left (x\right ) + a\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) - B b \log \left (\frac {2 \, \cosh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + \sqrt {a^{2} + b^{2}} A \log \left (\frac {b^{2} \cosh \left (x\right )^{2} + b^{2} \sinh \left (x\right )^{2} + 2 \, a b \cosh \left (x\right ) + 2 \, a^{2} + b^{2} + 2 \, {\left (b^{2} \cosh \left (x\right ) + a b\right )} \sinh \left (x\right ) - 2 \, \sqrt {a^{2} + b^{2}} {\left (b \cosh \left (x\right ) + b \sinh \left (x\right ) + a\right )}}{b \cosh \left (x\right )^{2} + b \sinh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) + 2 \, {\left (b \cosh \left (x\right ) + a\right )} \sinh \left (x\right ) - b}\right )}{a^{2} + b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sech(x))/(a+b*sinh(x)),x, algorithm="fricas")

[Out]

(2*B*a*arctan(cosh(x) + sinh(x)) + B*b*log(2*(b*sinh(x) + a)/(cosh(x) - sinh(x))) - B*b*log(2*cosh(x)/(cosh(x)
 - sinh(x))) + sqrt(a^2 + b^2)*A*log((b^2*cosh(x)^2 + b^2*sinh(x)^2 + 2*a*b*cosh(x) + 2*a^2 + b^2 + 2*(b^2*cos
h(x) + a*b)*sinh(x) - 2*sqrt(a^2 + b^2)*(b*cosh(x) + b*sinh(x) + a))/(b*cosh(x)^2 + b*sinh(x)^2 + 2*a*cosh(x)
+ 2*(b*cosh(x) + a)*sinh(x) - b)))/(a^2 + b^2)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {A + B \operatorname {sech}{\left (x \right )}}{a + b \sinh {\left (x \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sech(x))/(a+b*sinh(x)),x)

[Out]

Integral((A + B*sech(x))/(a + b*sinh(x)), x)

________________________________________________________________________________________

Giac [A]
time = 0.44, size = 123, normalized size = 1.38 \begin {gather*} \frac {2 \, B a \arctan \left (e^{x}\right )}{a^{2} + b^{2}} - \frac {B b \log \left (e^{\left (2 \, x\right )} + 1\right )}{a^{2} + b^{2}} + \frac {B b \log \left ({\left | b e^{\left (2 \, x\right )} + 2 \, a e^{x} - b \right |}\right )}{a^{2} + b^{2}} + \frac {A \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 )}{\sqrt {a^{2} + b^{2}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sech(x))/(a+b*sinh(x)),x, algorithm="giac")

[Out]

2*B*a*arctan(e^x)/(a^2 + b^2) - B*b*log(e^(2*x) + 1)/(a^2 + b^2) + B*b*log(abs(b*e^(2*x) + 2*a*e^x - b))/(a^2
+ b^2) + A*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)))/sqrt(a^2 + b^2)

________________________________________________________________________________________

Mupad [B]
time = 10.64, size = 864, normalized size = 9.71 \begin {gather*} \frac {\ln \left (\frac {\left (A\,\sqrt {{\left (a^2+b^2\right )}^3}+B\,b^3+B\,a^2\,b\right )\,\left (b^3\,\left (32\,A^2-96\,{\mathrm {e}}^x\,A\,B+64\,B^2\right )-128\,A^2\,{\mathrm {e}}^x\,\sqrt {{\left (a^2+b^2\right )}^3}-a\,b^2\,\left (96\,{\mathrm {e}}^x\,A^2-192\,A\,B+128\,{\mathrm {e}}^x\,B^2\right )-128\,a^3\,{\mathrm {e}}^x\,\left (A^2+B^2\right )+a^2\,b\,\left (64\,A^2-384\,{\mathrm {e}}^x\,A\,B+64\,B^2\right )+\frac {32\,A\,b^6\,\left (2\,B+3\,A\,{\mathrm {e}}^x\right )}{\sqrt {{\left (a^2+b^2\right )}^3}}+\frac {32\,A\,a^4\,b^2\,\left (5\,B+3\,A\,{\mathrm {e}}^x\right )}{\sqrt {{\left (a^2+b^2\right )}^3}}+\frac {32\,A\,a^2\,b^4\,\left (7\,B+6\,A\,{\mathrm {e}}^x\right )}{\sqrt {{\left (a^2+b^2\right )}^3}}+\frac {32\,A\,a^3\,b^3\,\left (4\,A-19\,B\,{\mathrm {e}}^x\right )}{\sqrt {{\left (a^2+b^2\right )}^3}}+\frac {64\,A\,a\,b^5\,\left (A-4\,B\,{\mathrm {e}}^x\right )}{\sqrt {{\left (a^2+b^2\right )}^3}}+\frac {32\,A\,a^5\,b\,\left (2\,A-11\,B\,{\mathrm {e}}^x\right )}{\sqrt {{\left (a^2+b^2\right )}^3}}\right )}{b^5\,{\left (a^2+b^2\right )}^2}-\frac {32\,B\,\left ({\mathrm {e}}^x\,A^2\,a\,b-A^2\,b^2+4\,{\mathrm {e}}^x\,A\,B\,a^2-2\,A\,B\,a\,b+{\mathrm {e}}^x\,A\,B\,b^2-4\,{\mathrm {e}}^x\,B^2\,a\,b+2\,B^2\,b^2\right )}{b^5}\right )\,\left (A\,\sqrt {{\left (a^2+b^2\right )}^3}+B\,b^3+B\,a^2\,b\right )}{a^4+2\,a^2\,b^2+b^4}-\frac {B\,\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )}{b+a\,1{}\mathrm {i}}+\frac {\ln \left (-\frac {32\,B\,\left ({\mathrm {e}}^x\,A^2\,a\,b-A^2\,b^2+4\,{\mathrm {e}}^x\,A\,B\,a^2-2\,A\,B\,a\,b+{\mathrm {e}}^x\,A\,B\,b^2-4\,{\mathrm {e}}^x\,B^2\,a\,b+2\,B^2\,b^2\right )}{b^5}-\frac {\left (B\,b^3-A\,\sqrt {{\left (a^2+b^2\right )}^3}+B\,a^2\,b\right )\,\left (a\,b^2\,\left (96\,{\mathrm {e}}^x\,A^2-192\,A\,B+128\,{\mathrm {e}}^x\,B^2\right )-128\,A^2\,{\mathrm {e}}^x\,\sqrt {{\left (a^2+b^2\right )}^3}-b^3\,\left (32\,A^2-96\,{\mathrm {e}}^x\,A\,B+64\,B^2\right )+128\,a^3\,{\mathrm {e}}^x\,\left (A^2+B^2\right )-a^2\,b\,\left (64\,A^2-384\,{\mathrm {e}}^x\,A\,B+64\,B^2\right )+\frac {32\,A\,b^6\,\left (2\,B+3\,A\,{\mathrm {e}}^x\right )}{\sqrt {{\left (a^2+b^2\right )}^3}}+\frac {32\,A\,a^4\,b^2\,\left (5\,B+3\,A\,{\mathrm {e}}^x\right )}{\sqrt {{\left (a^2+b^2\right )}^3}}+\frac {32\,A\,a^2\,b^4\,\left (7\,B+6\,A\,{\mathrm {e}}^x\right )}{\sqrt {{\left (a^2+b^2\right )}^3}}+\frac {32\,A\,a^3\,b^3\,\left (4\,A-19\,B\,{\mathrm {e}}^x\right )}{\sqrt {{\left (a^2+b^2\right )}^3}}+\frac {64\,A\,a\,b^5\,\left (A-4\,B\,{\mathrm {e}}^x\right )}{\sqrt {{\left (a^2+b^2\right )}^3}}+\frac {32\,A\,a^5\,b\,\left (2\,A-11\,B\,{\mathrm {e}}^x\right )}{\sqrt {{\left (a^2+b^2\right )}^3}}\right )}{b^5\,{\left (a^2+b^2\right )}^2}\right )\,\left (B\,b^3-A\,\sqrt {{\left (a^2+b^2\right )}^3}+B\,a^2\,b\right )}{a^4+2\,a^2\,b^2+b^4}-\frac {B\,\ln \left ({\mathrm {e}}^x-\mathrm {i}\right )\,1{}\mathrm {i}}{a+b\,1{}\mathrm {i}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B/cosh(x))/(a + b*sinh(x)),x)

[Out]

(log(((A*((a^2 + b^2)^3)^(1/2) + B*b^3 + B*a^2*b)*(b^3*(32*A^2 + 64*B^2 - 96*A*B*exp(x)) - 128*A^2*exp(x)*((a^
2 + b^2)^3)^(1/2) - a*b^2*(96*A^2*exp(x) + 128*B^2*exp(x) - 192*A*B) - 128*a^3*exp(x)*(A^2 + B^2) + a^2*b*(64*
A^2 + 64*B^2 - 384*A*B*exp(x)) + (32*A*b^6*(2*B + 3*A*exp(x)))/((a^2 + b^2)^3)^(1/2) + (32*A*a^4*b^2*(5*B + 3*
A*exp(x)))/((a^2 + b^2)^3)^(1/2) + (32*A*a^2*b^4*(7*B + 6*A*exp(x)))/((a^2 + b^2)^3)^(1/2) + (32*A*a^3*b^3*(4*
A - 19*B*exp(x)))/((a^2 + b^2)^3)^(1/2) + (64*A*a*b^5*(A - 4*B*exp(x)))/((a^2 + b^2)^3)^(1/2) + (32*A*a^5*b*(2
*A - 11*B*exp(x)))/((a^2 + b^2)^3)^(1/2)))/(b^5*(a^2 + b^2)^2) - (32*B*(2*B^2*b^2 - A^2*b^2 + 4*A*B*a^2*exp(x)
 + A*B*b^2*exp(x) + A^2*a*b*exp(x) - 4*B^2*a*b*exp(x) - 2*A*B*a*b))/b^5)*(A*((a^2 + b^2)^3)^(1/2) + B*b^3 + B*
a^2*b))/(a^4 + b^4 + 2*a^2*b^2) - (B*log(exp(x) + 1i))/(a*1i + b) - (B*log(exp(x) - 1i)*1i)/(a + b*1i) + (log(
- (32*B*(2*B^2*b^2 - A^2*b^2 + 4*A*B*a^2*exp(x) + A*B*b^2*exp(x) + A^2*a*b*exp(x) - 4*B^2*a*b*exp(x) - 2*A*B*a
*b))/b^5 - ((B*b^3 - A*((a^2 + b^2)^3)^(1/2) + B*a^2*b)*(a*b^2*(96*A^2*exp(x) + 128*B^2*exp(x) - 192*A*B) - 12
8*A^2*exp(x)*((a^2 + b^2)^3)^(1/2) - b^3*(32*A^2 + 64*B^2 - 96*A*B*exp(x)) + 128*a^3*exp(x)*(A^2 + B^2) - a^2*
b*(64*A^2 + 64*B^2 - 384*A*B*exp(x)) + (32*A*b^6*(2*B + 3*A*exp(x)))/((a^2 + b^2)^3)^(1/2) + (32*A*a^4*b^2*(5*
B + 3*A*exp(x)))/((a^2 + b^2)^3)^(1/2) + (32*A*a^2*b^4*(7*B + 6*A*exp(x)))/((a^2 + b^2)^3)^(1/2) + (32*A*a^3*b
^3*(4*A - 19*B*exp(x)))/((a^2 + b^2)^3)^(1/2) + (64*A*a*b^5*(A - 4*B*exp(x)))/((a^2 + b^2)^3)^(1/2) + (32*A*a^
5*b*(2*A - 11*B*exp(x)))/((a^2 + b^2)^3)^(1/2)))/(b^5*(a^2 + b^2)^2))*(B*b^3 - A*((a^2 + b^2)^3)^(1/2) + B*a^2
*b))/(a^4 + b^4 + 2*a^2*b^2)

________________________________________________________________________________________