Optimal. Leaf size=215 \[ \frac {a^3 b x}{\left (a^2-b^2\right )^3}+\frac {a b^3 x}{\left (a^2-b^2\right )^3}+\frac {a b x}{\left (a^2-b^2\right )^2}+\frac {a b \left (a^2+b^2\right ) x}{\left (a^2-b^2\right )^3}-\frac {a^2 b}{\left (a^2-b^2\right )^2 (b+a \coth (x))}-\frac {a^4 \log (a \cosh (x)+b \sinh (x))}{\left (a^2-b^2\right )^3}-\frac {3 a^2 b^2 \log (a \cosh (x)+b \sinh (x))}{\left (a^2-b^2\right )^3}-\frac {a b \cosh (x) \sinh (x)}{\left (a^2-b^2\right )^2}+\frac {a^2 \sinh ^2(x)}{2 \left (a^2-b^2\right )^2}+\frac {b^2 \sinh ^2(x)}{2 \left (a^2-b^2\right )^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.40, antiderivative size = 215, normalized size of antiderivative = 1.00, number of steps
used = 17, number of rules used = 13, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.722, Rules used = {3190, 3188,
2644, 30, 2715, 8, 3176, 3212, 3178, 3164, 3564, 3612, 3611} \begin {gather*} \frac {a b x \left (a^2+b^2\right )}{\left (a^2-b^2\right )^3}+\frac {a b x}{\left (a^2-b^2\right )^2}+\frac {a^2 \sinh ^2(x)}{2 \left (a^2-b^2\right )^2}+\frac {b^2 \sinh ^2(x)}{2 \left (a^2-b^2\right )^2}-\frac {a^2 b}{\left (a^2-b^2\right )^2 (a \coth (x)+b)}-\frac {a b \sinh (x) \cosh (x)}{\left (a^2-b^2\right )^2}-\frac {3 a^2 b^2 \log (a \cosh (x)+b \sinh (x))}{\left (a^2-b^2\right )^3}+\frac {a b^3 x}{\left (a^2-b^2\right )^3}-\frac {a^4 \log (a \cosh (x)+b \sinh (x))}{\left (a^2-b^2\right )^3}+\frac {a^3 b x}{\left (a^2-b^2\right )^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 30
Rule 2644
Rule 2715
Rule 3164
Rule 3176
Rule 3178
Rule 3188
Rule 3190
Rule 3212
Rule 3564
Rule 3611
Rule 3612
Rubi steps
\begin {align*} \int \frac {\cosh (x) \sinh ^3(x)}{(a \cosh (x)+b \sinh (x))^2} \, dx &=\frac {a \int \frac {\sinh ^3(x)}{a \cosh (x)+b \sinh (x)} \, dx}{a^2-b^2}-\frac {b \int \frac {\cosh (x) \sinh ^2(x)}{a \cosh (x)+b \sinh (x)} \, dx}{a^2-b^2}+\frac {(a b) \int \frac {\sinh ^2(x)}{(a \cosh (x)+b \sinh (x))^2} \, dx}{a^2-b^2}\\ &=\frac {a^2 \sinh ^2(x)}{2 \left (a^2-b^2\right )^2}-\frac {a^3 \int \frac {\sinh (x)}{a \cosh (x)+b \sinh (x)} \, dx}{\left (a^2-b^2\right )^2}-2 \frac {(a b) \int \sinh ^2(x) \, dx}{\left (a^2-b^2\right )^2}+\frac {b^2 \int \cosh (x) \sinh (x) \, dx}{\left (a^2-b^2\right )^2}-\frac {\left (a b^2\right ) \int \frac {\sinh (x)}{a \cosh (x)+b \sinh (x)} \, dx}{\left (a^2-b^2\right )^2}-\frac {(a b) \int \frac {1}{(-i b-i a \coth (x))^2} \, dx}{a^2-b^2}\\ &=\frac {a^3 b x}{\left (a^2-b^2\right )^3}+\frac {a b^3 x}{\left (a^2-b^2\right )^3}-\frac {a^2 b}{\left (a^2-b^2\right )^2 (b+a \coth (x))}+\frac {a^2 \sinh ^2(x)}{2 \left (a^2-b^2\right )^2}-\frac {\left (i a^4\right ) \int \frac {-i b \cosh (x)-i a \sinh (x)}{a \cosh (x)+b \sinh (x)} \, dx}{\left (a^2-b^2\right )^3}-\frac {\left (i a^2 b^2\right ) \int \frac {-i b \cosh (x)-i a \sinh (x)}{a \cosh (x)+b \sinh (x)} \, dx}{\left (a^2-b^2\right )^3}-2 \left (\frac {a b \cosh (x) \sinh (x)}{2 \left (a^2-b^2\right )^2}-\frac {(a b) \int 1 \, dx}{2 \left (a^2-b^2\right )^2}\right )-\frac {(a b) \int \frac {-i b+i a \coth (x)}{-i b-i a \coth (x)} \, dx}{\left (a^2-b^2\right )^2}-\frac {b^2 \text {Subst}(\int x \, dx,x,i \sinh (x))}{\left (a^2-b^2\right )^2}\\ &=\frac {a^3 b x}{\left (a^2-b^2\right )^3}+\frac {a b^3 x}{\left (a^2-b^2\right )^3}+\frac {a b \left (a^2+b^2\right ) x}{\left (a^2-b^2\right )^3}-\frac {a^2 b}{\left (a^2-b^2\right )^2 (b+a \coth (x))}-\frac {a^4 \log (a \cosh (x)+b \sinh (x))}{\left (a^2-b^2\right )^3}-\frac {a^2 b^2 \log (a \cosh (x)+b \sinh (x))}{\left (a^2-b^2\right )^3}+\frac {a^2 \sinh ^2(x)}{2 \left (a^2-b^2\right )^2}+\frac {b^2 \sinh ^2(x)}{2 \left (a^2-b^2\right )^2}-2 \left (-\frac {a b x}{2 \left (a^2-b^2\right )^2}+\frac {a b \cosh (x) \sinh (x)}{2 \left (a^2-b^2\right )^2}\right )-\frac {\left (2 i a^2 b^2\right ) \int \frac {-a-b \coth (x)}{-i b-i a \coth (x)} \, dx}{\left (a^2-b^2\right )^3}\\ &=\frac {a^3 b x}{\left (a^2-b^2\right )^3}+\frac {a b^3 x}{\left (a^2-b^2\right )^3}+\frac {a b \left (a^2+b^2\right ) x}{\left (a^2-b^2\right )^3}-\frac {a^2 b}{\left (a^2-b^2\right )^2 (b+a \coth (x))}-\frac {a^4 \log (a \cosh (x)+b \sinh (x))}{\left (a^2-b^2\right )^3}-\frac {3 a^2 b^2 \log (a \cosh (x)+b \sinh (x))}{\left (a^2-b^2\right )^3}+\frac {a^2 \sinh ^2(x)}{2 \left (a^2-b^2\right )^2}+\frac {b^2 \sinh ^2(x)}{2 \left (a^2-b^2\right )^2}-2 \left (-\frac {a b x}{2 \left (a^2-b^2\right )^2}+\frac {a b \cosh (x) \sinh (x)}{2 \left (a^2-b^2\right )^2}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.72, size = 176, normalized size = 0.82 \begin {gather*} \frac {a \left (a^2-b^2\right )^2 \cosh (3 x)+a \cosh (x) \left (a^4+2 a^2 b^2-3 b^4+24 a^3 b x+8 a b^3 x-8 a^2 \left (a^2+3 b^2\right ) \log (a \cosh (x)+b \sinh (x))\right )-2 b \left (\left (a^2-b^2\right )^2 \cosh (2 x)+2 a \left (3 a^3-3 a b^2-6 a^2 b x-2 b^3 x+2 a \left (a^2+3 b^2\right ) \log (a \cosh (x)+b \sinh (x))\right )\right ) \sinh (x)}{8 (a-b)^3 (a+b)^3 (a \cosh (x)+b \sinh (x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.48, size = 177, normalized size = 0.82
method | result | size |
default | \(\frac {1}{2 \left (a -b \right )^{2} \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}-\frac {1}{2 \left (a -b \right )^{2} \left (\tanh \left (\frac {x}{2}\right )+1\right )}+\frac {a \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{\left (a -b \right )^{3}}-\frac {2 a^{2} \left (\frac {b \left (a^{2}-b^{2}\right ) \tanh \left (\frac {x}{2}\right )}{a +2 b \tanh \left (\frac {x}{2}\right )+a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )}+\frac {\left (a^{2}+3 b^{2}\right ) \ln \left (a +2 b \tanh \left (\frac {x}{2}\right )+a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )\right )}{2}\right )}{\left (a +b \right )^{3} \left (a -b \right )^{3}}+\frac {1}{2 \left (a +b \right )^{2} \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}+\frac {1}{2 \left (a +b \right )^{2} \left (\tanh \left (\frac {x}{2}\right )-1\right )}+\frac {a \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{\left (a +b \right )^{3}}\) | \(177\) |
risch | \(-\frac {a x}{\left (a^{2}+2 a b +b^{2}\right ) \left (a +b \right )}+\frac {{\mathrm e}^{2 x}}{8 a^{2}+16 a b +8 b^{2}}+\frac {{\mathrm e}^{-2 x}}{8 a^{2}-16 a b +8 b^{2}}+\frac {2 a^{4} x}{a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}}+\frac {6 a^{2} x \,b^{2}}{a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}}+\frac {2 b \,a^{3}}{\left (a -b \right )^{2} \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right ) \left ({\mathrm e}^{2 x} a +b \,{\mathrm e}^{2 x}+a -b \right )}-\frac {a^{4} \ln \left ({\mathrm e}^{2 x}+\frac {a -b}{a +b}\right )}{a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}}-\frac {3 a^{2} \ln \left ({\mathrm e}^{2 x}+\frac {a -b}{a +b}\right ) b^{2}}{a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}}\) | \(285\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 241, normalized size = 1.12 \begin {gather*} -\frac {a x}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} - \frac {{\left (a^{4} + 3 \, a^{2} b^{2}\right )} \log \left (-{\left (a - b\right )} e^{\left (-2 \, x\right )} - a - b\right )}{a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}} + \frac {a^{4} - 2 \, a^{3} b + 2 \, a b^{3} - b^{4} + {\left (a^{4} - 20 \, a^{3} b + 6 \, a^{2} b^{2} - 4 \, a b^{3} + b^{4}\right )} e^{\left (-2 \, x\right )}}{8 \, {\left ({\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} e^{\left (-2 \, x\right )} + {\left (a^{6} - 2 \, a^{5} b - a^{4} b^{2} + 4 \, a^{3} b^{3} - a^{2} b^{4} - 2 \, a b^{5} + b^{6}\right )} e^{\left (-4 \, x\right )}\right )}} + \frac {e^{\left (-2 \, x\right )}}{8 \, {\left (a^{2} - 2 \, a b + b^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 1655 vs.
\(2 (211) = 422\).
time = 0.42, size = 1655, normalized size = 7.70 \begin {gather*} \frac {{\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 )^{6} + 6 \, {\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 )^{5} + {\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 )^{6} + a^{5} + a^{4} b - 2 \, a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4} + b^{5} + {\left (a^{5} - 3 \, a^{4} b + 2 \, a^{3} b^{2} + 2 \, a^{2} b^{3} - 3 \, a b^{4} + b^{5} + 8 \, {\left (a^{5} + 4 \, a^{4} b + 6 \, a^{3} b^{2} + 4 \, a^{2} b^{3} + a b^{4}\right )} x\right )} \cosh \left (x\right )^{4} + {\left (a^{5} - 3 \, a^{4} b + 2 \, a^{3} b^{2} + 2 \, a^{2} b^{3} - 3 \, a b^{4} + b^{5} + 15 \, {\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} + 8 \, {\left (a^{5} + 4 \, a^{4} b + 6 \, a^{3} b^{2} + 4 \, a^{2} b^{3} + a b^{4}\right )} x\right )} \sinh \left (x\right )^{4} + 4 \, {\left (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 )^{3} + {\left (a^{5} - 3 \, a^{4} b + 2 \, a^{3} b^{2} + 2 \, a^{2} b^{3} - 3 \, a b^{4} + b^{5} + 8 \, {\left (a^{5} + 4 \, a^{4} b + 6 \, a^{3} b^{2} + 4 \, a^{2} b^{3} + a b^{4}\right )} x\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )^{3} + {\left (a^{5} + 19 \, a^{4} b - 14 \, a^{3} b^{2} - 2 \, a^{2} b^{3} - 3 \, a b^{4} - b^{5} + 8 \, {\left (a^{5} + 2 \, a^{4} b - 2 \, a^{2} b^{3} - a b^{4}\right )} x\right )} \cosh \left (x\right )^{2} + {\left (a^{5} + 19 \, a^{4} b - 14 \, a^{3} b^{2} - 2 \, a^{2} b^{3} - 3 \, a b^{4} - b^{5} + 15 \, {\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 )^{4} + 6 \, {\left (a^{5} - 3 \, a^{4} b + 2 \, a^{3} b^{2} + 2 \, a^{2} b^{3} - 3 \, a b^{4} + b^{5} + 8 \, {\left (a^{5} + 4 \, a^{4} b + 6 \, a^{3} b^{2} + 4 \, a^{2} b^{3} + a b^{4}\right )} x\right )} \cosh \left (x\right )^{2} + 8 \, {\left (a^{5} + 2 \, a^{4} b - 2 \, a^{2} b^{3} - a b^{4}\right )} x\right )} \sinh \left (x\right )^{2} - 8 \, {\left ({\left (a^{5} + a^{4} b + 3 \, a^{3} b^{2} + 3 \, a^{2} b^{3}\right )} \cosh \left (x\right )^{4} + 4 \, {\left (a^{5} + a^{4} b + 3 \, a^{3} b^{2} + 3 \, a^{2} b^{3}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{3} + {\left (a^{5} + a^{4} b + 3 \, a^{3} b^{2} + 3 \, a^{2} b^{3}\right )} \sinh \left (x\right )^{4} + {\left (a^{5} - a^{4} b + 3 \, a^{3} b^{2} - 3 \, a^{2} b^{3}\right )} \cosh \left (x\right )^{2} + {\left (a^{5} - a^{4} b + 3 \, a^{3} b^{2} - 3 \, a^{2} b^{3} + 6 \, {\left (a^{5} + a^{4} b + 3 \, a^{3} b^{2} + 3 \, a^{2} b^{3}\right )} \cosh \left (x\right )^{2}\right )} \sinh \left (x\right )^{2} + 2 \, {\left (2 \, {\left (a^{5} + a^{4} b + 3 \, a^{3} b^{2} + 3 \, a^{2} b^{3}\right )} \cosh \left (x\right )^{3} + {\left (a^{5} - a^{4} b + 3 \, a^{3} b^{2} - 3 \, a^{2} b^{3}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )\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 ) + 2 \, {\left (3 \, {\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 )^{5} + 2 \, {\left (a^{5} - 3 \, a^{4} b + 2 \, a^{3} b^{2} + 2 \, a^{2} b^{3} - 3 \, a b^{4} + b^{5} + 8 \, {\left (a^{5} + 4 \, a^{4} b + 6 \, a^{3} b^{2} + 4 \, a^{2} b^{3} + a b^{4}\right )} x\right )} \cosh \left (x\right )^{3} + {\left (a^{5} + 19 \, a^{4} b - 14 \, a^{3} b^{2} - 2 \, a^{2} b^{3} - 3 \, a b^{4} - b^{5} + 8 \, {\left (a^{5} + 2 \, a^{4} b - 2 \, a^{2} b^{3} - a b^{4}\right )} x\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )}{8 \, {\left ({\left (a^{7} + a^{6} b - 3 \, a^{5} b^{2} - 3 \, a^{4} b^{3} + 3 \, a^{3} b^{4} + 3 \, a^{2} b^{5} - a b^{6} - b^{7}\right )} \cosh \left (x\right )^{4} + 4 \, {\left (a^{7} + a^{6} b - 3 \, a^{5} b^{2} - 3 \, a^{4} b^{3} + 3 \, a^{3} b^{4} + 3 \, a^{2} b^{5} - a b^{6} - b^{7}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{3} + {\left (a^{7} + a^{6} b - 3 \, a^{5} b^{2} - 3 \, a^{4} b^{3} + 3 \, a^{3} b^{4} + 3 \, a^{2} b^{5} - a b^{6} - b^{7}\right )} \sinh \left (x\right )^{4} + {\left (a^{7} - a^{6} b - 3 \, a^{5} b^{2} + 3 \, a^{4} b^{3} + 3 \, a^{3} b^{4} - 3 \, a^{2} b^{5} - a b^{6} + b^{7}\right )} \cosh \left (x\right )^{2} + {\left (a^{7} - a^{6} b - 3 \, a^{5} b^{2} + 3 \, a^{4} b^{3} + 3 \, a^{3} b^{4} - 3 \, a^{2} b^{5} - a b^{6} + b^{7} + 6 \, {\left (a^{7} + a^{6} b - 3 \, a^{5} b^{2} - 3 \, a^{4} b^{3} + 3 \, a^{3} b^{4} + 3 \, a^{2} b^{5} - a b^{6} - b^{7}\right )} \cosh \left (x\right )^{2}\right )} \sinh \left (x\right )^{2} + 2 \, {\left (2 \, {\left (a^{7} + a^{6} b - 3 \, a^{5} b^{2} - 3 \, a^{4} b^{3} + 3 \, a^{3} b^{4} + 3 \, a^{2} b^{5} - a b^{6} - b^{7}\right )} \cosh \left (x\right )^{3} + {\left (a^{7} - a^{6} b - 3 \, a^{5} b^{2} + 3 \, a^{4} b^{3} + 3 \, a^{3} b^{4} - 3 \, a^{2} b^{5} - a b^{6} + b^{7}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 238, normalized size = 1.11 \begin {gather*} \frac {a x}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} - \frac {{\left (a^{4} + 3 \, a^{2} b^{2}\right )} \log \left ({\left | a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + a - b \right |}\right )}{a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}} + \frac {e^{\left (2 \, x\right )}}{8 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}} + \frac {2 \, a^{3} e^{\left (4 \, x\right )} - 4 \, a^{2} b e^{\left (4 \, x\right )} + 2 \, a b^{2} e^{\left (4 \, x\right )} + 3 \, a^{3} e^{\left (2 \, x\right )} + 11 \, a^{2} b e^{\left (2 \, x\right )} + a b^{2} e^{\left (2 \, x\right )} + b^{3} e^{\left (2 \, x\right )} + a^{3} + a^{2} b - a b^{2} - b^{3}}{8 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} {\left (a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + a e^{\left (2 \, x\right )} - b e^{\left (2 \, x\right )}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.82, size = 127, normalized size = 0.59 \begin {gather*} \frac {{\mathrm {e}}^{2\,x}}{8\,{\left (a+b\right )}^2}+\frac {{\mathrm {e}}^{-2\,x}}{8\,{\left (a-b\right )}^2}+\frac {a\,x}{{\left (a-b\right )}^3}-\frac {\ln \left (a-b+a\,{\mathrm {e}}^{2\,x}+b\,{\mathrm {e}}^{2\,x}\right )\,\left (a^4+3\,a^2\,b^2\right )}{a^6-3\,a^4\,b^2+3\,a^2\,b^4-b^6}+\frac {2\,a^3\,b}{{\left (a+b\right )}^3\,{\left (a-b\right )}^2\,\left (a-b+{\mathrm {e}}^{2\,x}\,\left (a+b\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________