### 3.697 $$\int \frac{\sinh ^2(x)}{(a \cosh (x)+b \sinh (x))^2} \, dx$$

Optimal. Leaf size=68 $\frac{x \left (a^2+b^2\right )}{\left (a^2-b^2\right )^2}-\frac{a}{\left (a^2-b^2\right ) (a \coth (x)+b)}-\frac{2 a b \log (a \cosh (x)+b \sinh (x))}{\left (a^2-b^2\right )^2}$

[Out]

((a^2 + b^2)*x)/(a^2 - b^2)^2 - a/((a^2 - b^2)*(b + a*Coth[x])) - (2*a*b*Log[a*Cosh[x] + b*Sinh[x]])/(a^2 - b^
2)^2

________________________________________________________________________________________

Rubi [A]  time = 0.138031, antiderivative size = 68, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 16, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.25, Rules used = {3085, 3483, 3531, 3530} $\frac{x \left (a^2+b^2\right )}{\left (a^2-b^2\right )^2}-\frac{a}{\left (a^2-b^2\right ) (a \coth (x)+b)}-\frac{2 a b \log (a \cosh (x)+b \sinh (x))}{\left (a^2-b^2\right )^2}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

((a^2 + b^2)*x)/(a^2 - b^2)^2 - a/((a^2 - b^2)*(b + a*Coth[x])) - (2*a*b*Log[a*Cosh[x] + b*Sinh[x]])/(a^2 - b^
2)^2

Rule 3085

Int[sin[(c_.) + (d_.)*(x_)]^(m_)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_.), x_Symb
ol] :> Int[(b + a*Cot[c + d*x])^n, x] /; FreeQ[{a, b, c, d}, x] && EqQ[m + n, 0] && IntegerQ[n] && NeQ[a^2 + b
^2, 0]

Rule 3483

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a + b*Tan[c + d*x])^(n + 1))/(d*(n + 1)
*(a^2 + b^2)), x] + Dist[1/(a^2 + b^2), Int[(a - b*Tan[c + d*x])*(a + b*Tan[c + d*x])^(n + 1), x], x] /; FreeQ
[{a, b, c, d}, x] && NeQ[a^2 + b^2, 0] && LtQ[n, -1]

Rule 3531

Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((a*c +
b*d)*x)/(a^2 + b^2), x] + Dist[(b*c - a*d)/(a^2 + b^2), Int[(b - a*Tan[e + f*x])/(a + b*Tan[e + f*x]), x], x]
/; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[a*c + b*d, 0]

Rule 3530

Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(c*Log[Re
moveContent[a*Cos[e + f*x] + b*Sin[e + f*x], x]])/(b*f), x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d,
0] && NeQ[a^2 + b^2, 0] && EqQ[a*c + b*d, 0]

Rubi steps

\begin{align*} \int \frac{\sinh ^2(x)}{(a \cosh (x)+b \sinh (x))^2} \, dx &=-\int \frac{1}{(-i b-i a \coth (x))^2} \, dx\\ &=-\frac{a}{\left (a^2-b^2\right ) (b+a \coth (x))}-\frac{\int \frac{-i b+i a \coth (x)}{-i b-i a \coth (x)} \, dx}{a^2-b^2}\\ &=\frac{\left (a^2+b^2\right ) x}{\left (a^2-b^2\right )^2}-\frac{a}{\left (a^2-b^2\right ) (b+a \coth (x))}-\frac{(2 i a b) \int \frac{-a-b \coth (x)}{-i b-i a \coth (x)} \, dx}{\left (a^2-b^2\right )^2}\\ &=\frac{\left (a^2+b^2\right ) x}{\left (a^2-b^2\right )^2}-\frac{a}{\left (a^2-b^2\right ) (b+a \coth (x))}-\frac{2 a b \log (a \cosh (x)+b \sinh (x))}{\left (a^2-b^2\right )^2}\\ \end{align*}

Mathematica [A]  time = 0.229815, size = 61, normalized size = 0.9 $\frac{x \left (a^2+b^2\right )-\frac{a (a-b) (a+b) \sinh (x)}{a \cosh (x)+b \sinh (x)}-2 a b \log (a \cosh (x)+b \sinh (x))}{(a-b)^2 (a+b)^2}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

((a^2 + b^2)*x - 2*a*b*Log[a*Cosh[x] + b*Sinh[x]] - (a*(a - b)*(a + b)*Sinh[x])/(a*Cosh[x] + b*Sinh[x]))/((a -
b)^2*(a + b)^2)

________________________________________________________________________________________

Maple [B]  time = 0.074, size = 146, normalized size = 2.2 \begin{align*}{\frac{1}{ \left ( a-b \right ) ^{2}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }-2\,{\frac{{a}^{3}\tanh \left ( x/2 \right ) }{ \left ( a-b \right ) ^{2} \left ( a+b \right ) ^{2} \left ( a+2\,\tanh \left ( x/2 \right ) b+a \left ( \tanh \left ( x/2 \right ) \right ) ^{2} \right ) }}+2\,{\frac{a\tanh \left ( x/2 \right ){b}^{2}}{ \left ( a-b \right ) ^{2} \left ( a+b \right ) ^{2} \left ( a+2\,\tanh \left ( x/2 \right ) b+a \left ( \tanh \left ( x/2 \right ) \right ) ^{2} \right ) }}-2\,{\frac{ab\ln \left ( a+2\,\tanh \left ( x/2 \right ) b+a \left ( \tanh \left ( x/2 \right ) \right ) ^{2} \right ) }{ \left ( a-b \right ) ^{2} \left ( a+b \right ) ^{2}}}-{\frac{1}{ \left ( a+b \right ) ^{2}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) } \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.25772, size = 140, normalized size = 2.06 \begin{align*} -\frac{2 \, a b \log \left (-{\left (a - b\right )} e^{\left (-2 \, x\right )} - a - b\right )}{a^{4} - 2 \, a^{2} b^{2} + b^{4}} - \frac{2 \, a^{2}}{a^{4} - 2 \, a^{2} b^{2} + b^{4} +{\left (a^{4} - 2 \, a^{3} b + 2 \, a b^{3} - b^{4}\right )} e^{\left (-2 \, x\right )}} + \frac{x}{a^{2} + 2 \, a b + b^{2}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 1.82946, size = 826, normalized size = 12.15 \begin{align*} \frac{{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} x \cosh \left (x\right )^{2} + 2 \,{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} x \cosh \left (x\right ) \sinh \left (x\right ) +{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} x \sinh \left (x\right )^{2} + 2 \, a^{3} - 2 \, a^{2} b +{\left (a^{3} + a^{2} b - a b^{2} - b^{3}\right )} x - 2 \,{\left (a^{2} b - a b^{2} +{\left (a^{2} b + a b^{2}\right )} \cosh \left (x\right )^{2} + 2 \,{\left (a^{2} b + a b^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right ) +{\left (a^{2} b + a b^{2}\right )} \sinh \left (x\right )^{2}\right )} \log \left (\frac{2 \,{\left (a \cosh \left (x\right ) + b \sinh \left (x\right )\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right )}{a^{5} - a^{4} b - 2 \, a^{3} b^{2} + 2 \, a^{2} b^{3} + a b^{4} - b^{5} +{\left (a^{5} + a^{4} b - 2 \, a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4} + b^{5}\right )} \cosh \left (x\right )^{2} + 2 \,{\left (a^{5} + a^{4} b - 2 \, a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4} + b^{5}\right )} \cosh \left (x\right ) \sinh \left (x\right ) +{\left (a^{5} + a^{4} b - 2 \, a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4} + b^{5}\right )} \sinh \left (x\right )^{2}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

((a^3 + 3*a^2*b + 3*a*b^2 + b^3)*x*cosh(x)^2 + 2*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*x*cosh(x)*sinh(x) + (a^3 + 3*
a^2*b + 3*a*b^2 + b^3)*x*sinh(x)^2 + 2*a^3 - 2*a^2*b + (a^3 + a^2*b - a*b^2 - b^3)*x - 2*(a^2*b - a*b^2 + (a^2
*b + a*b^2)*cosh(x)^2 + 2*(a^2*b + a*b^2)*cosh(x)*sinh(x) + (a^2*b + a*b^2)*sinh(x)^2)*log(2*(a*cosh(x) + b*si
nh(x))/(cosh(x) - sinh(x))))/(a^5 - a^4*b - 2*a^3*b^2 + 2*a^2*b^3 + a*b^4 - b^5 + (a^5 + a^4*b - 2*a^3*b^2 - 2
*a^2*b^3 + a*b^4 + b^5)*cosh(x)^2 + 2*(a^5 + a^4*b - 2*a^3*b^2 - 2*a^2*b^3 + a*b^4 + b^5)*cosh(x)*sinh(x) + (a
^5 + a^4*b - 2*a^3*b^2 - 2*a^2*b^3 + a*b^4 + b^5)*sinh(x)^2)

________________________________________________________________________________________

Sympy [A]  time = 143.99, size = 2574, normalized size = 37.85 \begin{align*} \text{result too large to display} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((zoo*x, Eq(a, 0) & Eq(b, 0)), ((x - sinh(x)/cosh(x))/a**2, Eq(b, 0)), (x*sinh(x)**2/(4*b**2*sinh(x)*
*2 - 8*b**2*sinh(x)*cosh(x) + 4*b**2*cosh(x)**2) - 2*x*sinh(x)*cosh(x)/(4*b**2*sinh(x)**2 - 8*b**2*sinh(x)*cos
h(x) + 4*b**2*cosh(x)**2) + x*cosh(x)**2/(4*b**2*sinh(x)**2 - 8*b**2*sinh(x)*cosh(x) + 4*b**2*cosh(x)**2) + 3*
sinh(x)*cosh(x)/(4*b**2*sinh(x)**2 - 8*b**2*sinh(x)*cosh(x) + 4*b**2*cosh(x)**2) - 2*cosh(x)**2/(4*b**2*sinh(x
)**2 - 8*b**2*sinh(x)*cosh(x) + 4*b**2*cosh(x)**2), Eq(a, -b)), (x*sinh(x)**2/(4*b**2*sinh(x)**2 + 8*b**2*sinh
(x)*cosh(x) + 4*b**2*cosh(x)**2) + 2*x*sinh(x)*cosh(x)/(4*b**2*sinh(x)**2 + 8*b**2*sinh(x)*cosh(x) + 4*b**2*co
sh(x)**2) + x*cosh(x)**2/(4*b**2*sinh(x)**2 + 8*b**2*sinh(x)*cosh(x) + 4*b**2*cosh(x)**2) + 3*sinh(x)*cosh(x)/
(4*b**2*sinh(x)**2 + 8*b**2*sinh(x)*cosh(x) + 4*b**2*cosh(x)**2) + 2*cosh(x)**2/(4*b**2*sinh(x)**2 + 8*b**2*si
nh(x)*cosh(x) + 4*b**2*cosh(x)**2), Eq(a, b)), (x*exp(4*x)*sinh(x)**2/(4*b**2*exp(4*x)*sinh(x)**2 - 8*b**2*exp
(4*x)*sinh(x)*cosh(x) + 4*b**2*exp(4*x)*cosh(x)**2 + 8*b**2*exp(2*x)*sinh(x)**2 - 8*b**2*exp(2*x)*cosh(x)**2 +
4*b**2*sinh(x)**2 + 8*b**2*sinh(x)*cosh(x) + 4*b**2*cosh(x)**2) - 2*x*exp(4*x)*sinh(x)*cosh(x)/(4*b**2*exp(4*
x)*sinh(x)**2 - 8*b**2*exp(4*x)*sinh(x)*cosh(x) + 4*b**2*exp(4*x)*cosh(x)**2 + 8*b**2*exp(2*x)*sinh(x)**2 - 8*
b**2*exp(2*x)*cosh(x)**2 + 4*b**2*sinh(x)**2 + 8*b**2*sinh(x)*cosh(x) + 4*b**2*cosh(x)**2) + x*exp(4*x)*cosh(x
)**2/(4*b**2*exp(4*x)*sinh(x)**2 - 8*b**2*exp(4*x)*sinh(x)*cosh(x) + 4*b**2*exp(4*x)*cosh(x)**2 + 8*b**2*exp(2
*x)*sinh(x)**2 - 8*b**2*exp(2*x)*cosh(x)**2 + 4*b**2*sinh(x)**2 + 8*b**2*sinh(x)*cosh(x) + 4*b**2*cosh(x)**2)
+ 4*x*exp(2*x)*sinh(x)**2/(4*b**2*exp(4*x)*sinh(x)**2 - 8*b**2*exp(4*x)*sinh(x)*cosh(x) + 4*b**2*exp(4*x)*cosh
(x)**2 + 8*b**2*exp(2*x)*sinh(x)**2 - 8*b**2*exp(2*x)*cosh(x)**2 + 4*b**2*sinh(x)**2 + 8*b**2*sinh(x)*cosh(x)
+ 4*b**2*cosh(x)**2) - 4*x*exp(2*x)*cosh(x)**2/(4*b**2*exp(4*x)*sinh(x)**2 - 8*b**2*exp(4*x)*sinh(x)*cosh(x) +
4*b**2*exp(4*x)*cosh(x)**2 + 8*b**2*exp(2*x)*sinh(x)**2 - 8*b**2*exp(2*x)*cosh(x)**2 + 4*b**2*sinh(x)**2 + 8*
b**2*sinh(x)*cosh(x) + 4*b**2*cosh(x)**2) + x*sinh(x)**2/(4*b**2*exp(4*x)*sinh(x)**2 - 8*b**2*exp(4*x)*sinh(x)
*cosh(x) + 4*b**2*exp(4*x)*cosh(x)**2 + 8*b**2*exp(2*x)*sinh(x)**2 - 8*b**2*exp(2*x)*cosh(x)**2 + 4*b**2*sinh(
x)**2 + 8*b**2*sinh(x)*cosh(x) + 4*b**2*cosh(x)**2) + 2*x*sinh(x)*cosh(x)/(4*b**2*exp(4*x)*sinh(x)**2 - 8*b**2
*exp(4*x)*sinh(x)*cosh(x) + 4*b**2*exp(4*x)*cosh(x)**2 + 8*b**2*exp(2*x)*sinh(x)**2 - 8*b**2*exp(2*x)*cosh(x)*
*2 + 4*b**2*sinh(x)**2 + 8*b**2*sinh(x)*cosh(x) + 4*b**2*cosh(x)**2) + x*cosh(x)**2/(4*b**2*exp(4*x)*sinh(x)**
2 - 8*b**2*exp(4*x)*sinh(x)*cosh(x) + 4*b**2*exp(4*x)*cosh(x)**2 + 8*b**2*exp(2*x)*sinh(x)**2 - 8*b**2*exp(2*x
)*cosh(x)**2 + 4*b**2*sinh(x)**2 + 8*b**2*sinh(x)*cosh(x) + 4*b**2*cosh(x)**2) + 3*exp(4*x)*sinh(x)*cosh(x)/(4
*b**2*exp(4*x)*sinh(x)**2 - 8*b**2*exp(4*x)*sinh(x)*cosh(x) + 4*b**2*exp(4*x)*cosh(x)**2 + 8*b**2*exp(2*x)*sin
h(x)**2 - 8*b**2*exp(2*x)*cosh(x)**2 + 4*b**2*sinh(x)**2 + 8*b**2*sinh(x)*cosh(x) + 4*b**2*cosh(x)**2) - 2*exp
(4*x)*cosh(x)**2/(4*b**2*exp(4*x)*sinh(x)**2 - 8*b**2*exp(4*x)*sinh(x)*cosh(x) + 4*b**2*exp(4*x)*cosh(x)**2 +
8*b**2*exp(2*x)*sinh(x)**2 - 8*b**2*exp(2*x)*cosh(x)**2 + 4*b**2*sinh(x)**2 + 8*b**2*sinh(x)*cosh(x) + 4*b**2*
cosh(x)**2) + 4*exp(2*x)*sinh(x)*cosh(x)/(4*b**2*exp(4*x)*sinh(x)**2 - 8*b**2*exp(4*x)*sinh(x)*cosh(x) + 4*b**
2*exp(4*x)*cosh(x)**2 + 8*b**2*exp(2*x)*sinh(x)**2 - 8*b**2*exp(2*x)*cosh(x)**2 + 4*b**2*sinh(x)**2 + 8*b**2*s
inh(x)*cosh(x) + 4*b**2*cosh(x)**2) + 3*sinh(x)*cosh(x)/(4*b**2*exp(4*x)*sinh(x)**2 - 8*b**2*exp(4*x)*sinh(x)*
cosh(x) + 4*b**2*exp(4*x)*cosh(x)**2 + 8*b**2*exp(2*x)*sinh(x)**2 - 8*b**2*exp(2*x)*cosh(x)**2 + 4*b**2*sinh(x
)**2 + 8*b**2*sinh(x)*cosh(x) + 4*b**2*cosh(x)**2) + 2*cosh(x)**2/(4*b**2*exp(4*x)*sinh(x)**2 - 8*b**2*exp(4*x
)*sinh(x)*cosh(x) + 4*b**2*exp(4*x)*cosh(x)**2 + 8*b**2*exp(2*x)*sinh(x)**2 - 8*b**2*exp(2*x)*cosh(x)**2 + 4*b
**2*sinh(x)**2 + 8*b**2*sinh(x)*cosh(x) + 4*b**2*cosh(x)**2), Eq(a, -(b*exp(2*x) - b)/(exp(2*x) + 1))), (a**4*
cosh(x)/(a**5*b*cosh(x) + a**4*b**2*sinh(x) - 2*a**3*b**3*cosh(x) - 2*a**2*b**4*sinh(x) + a*b**5*cosh(x) + b**
6*sinh(x)) + a**3*b*x*cosh(x)/(a**5*b*cosh(x) + a**4*b**2*sinh(x) - 2*a**3*b**3*cosh(x) - 2*a**2*b**4*sinh(x)
+ a*b**5*cosh(x) + b**6*sinh(x)) + a**2*b**2*x*sinh(x)/(a**5*b*cosh(x) + a**4*b**2*sinh(x) - 2*a**3*b**3*cosh(
x) - 2*a**2*b**4*sinh(x) + a*b**5*cosh(x) + b**6*sinh(x)) - 2*a**2*b**2*log(a*cosh(x)/b + sinh(x))*cosh(x)/(a*
*5*b*cosh(x) + a**4*b**2*sinh(x) - 2*a**3*b**3*cosh(x) - 2*a**2*b**4*sinh(x) + a*b**5*cosh(x) + b**6*sinh(x))
- a**2*b**2*cosh(x)/(a**5*b*cosh(x) + a**4*b**2*sinh(x) - 2*a**3*b**3*cosh(x) - 2*a**2*b**4*sinh(x) + a*b**5*c
osh(x) + b**6*sinh(x)) + a*b**3*x*cosh(x)/(a**5*b*cosh(x) + a**4*b**2*sinh(x) - 2*a**3*b**3*cosh(x) - 2*a**2*b
**4*sinh(x) + a*b**5*cosh(x) + b**6*sinh(x)) - 2*a*b**3*log(a*cosh(x)/b + sinh(x))*sinh(x)/(a**5*b*cosh(x) + a
**4*b**2*sinh(x) - 2*a**3*b**3*cosh(x) - 2*a**2*b**4*sinh(x) + a*b**5*cosh(x) + b**6*sinh(x)) + b**4*x*sinh(x)
/(a**5*b*cosh(x) + a**4*b**2*sinh(x) - 2*a**3*b**3*cosh(x) - 2*a**2*b**4*sinh(x) + a*b**5*cosh(x) + b**6*sinh(
x)), True))

________________________________________________________________________________________

Giac [A]  time = 1.13107, size = 153, normalized size = 2.25 \begin{align*} -\frac{2 \, a b \log \left ({\left | a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + a - b \right |}\right )}{a^{4} - 2 \, a^{2} b^{2} + b^{4}} + \frac{x}{a^{2} - 2 \, a b + b^{2}} + \frac{2 \,{\left (a b e^{\left (2 \, x\right )} + a^{2} - a b\right )}}{{\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )}{\left (a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + a - b\right )}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*a*b*log(abs(a*e^(2*x) + b*e^(2*x) + a - b))/(a^4 - 2*a^2*b^2 + b^4) + x/(a^2 - 2*a*b + b^2) + 2*(a*b*e^(2*x
) + a^2 - a*b)/((a^3 - a^2*b - a*b^2 + b^3)*(a*e^(2*x) + b*e^(2*x) + a - b))