Optimal. Leaf size=169 \[ \frac {\left (a^4+6 a^2 b^2+b^4\right ) x}{\left (a^2-b^2\right )^4}+\frac {b}{3 \left (a^2-b^2\right ) d (a+b \coth (c+d x))^3}+\frac {a b}{\left (a^2-b^2\right )^2 d (a+b \coth (c+d x))^2}+\frac {b \left (3 a^2+b^2\right )}{\left (a^2-b^2\right )^3 d (a+b \coth (c+d x))}-\frac {4 a b \left (a^2+b^2\right ) \log (b \cosh (c+d x)+a \sinh (c+d x))}{\left (a^2-b^2\right )^4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 169, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3564, 3610,
3612, 3611} \begin {gather*} \frac {b \left (3 a^2+b^2\right )}{d \left (a^2-b^2\right )^3 (a+b \coth (c+d x))}+\frac {a b}{d \left (a^2-b^2\right )^2 (a+b \coth (c+d x))^2}+\frac {b}{3 d \left (a^2-b^2\right ) (a+b \coth (c+d x))^3}-\frac {4 a b \left (a^2+b^2\right ) \log (a \sinh (c+d x)+b \cosh (c+d x))}{d \left (a^2-b^2\right )^4}+\frac {x \left (a^4+6 a^2 b^2+b^4\right )}{\left (a^2-b^2\right )^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3564
Rule 3610
Rule 3611
Rule 3612
Rubi steps
\begin {align*} \int \frac {1}{(a+b \coth (c+d x))^4} \, dx &=\frac {b}{3 \left (a^2-b^2\right ) d (a+b \coth (c+d x))^3}+\frac {\int \frac {a-b \coth (c+d x)}{(a+b \coth (c+d x))^3} \, dx}{a^2-b^2}\\ &=\frac {b}{3 \left (a^2-b^2\right ) d (a+b \coth (c+d x))^3}+\frac {a b}{\left (a^2-b^2\right )^2 d (a+b \coth (c+d x))^2}+\frac {\int \frac {a^2+b^2-2 a b \coth (c+d x)}{(a+b \coth (c+d x))^2} \, dx}{\left (a^2-b^2\right )^2}\\ &=\frac {b}{3 \left (a^2-b^2\right ) d (a+b \coth (c+d x))^3}+\frac {a b}{\left (a^2-b^2\right )^2 d (a+b \coth (c+d x))^2}+\frac {b \left (3 a^2+b^2\right )}{\left (a^2-b^2\right )^3 d (a+b \coth (c+d x))}+\frac {\int \frac {a \left (a^2+3 b^2\right )-b \left (3 a^2+b^2\right ) \coth (c+d x)}{a+b \coth (c+d x)} \, dx}{\left (a^2-b^2\right )^3}\\ &=\frac {\left (a^4+6 a^2 b^2+b^4\right ) x}{\left (a^2-b^2\right )^4}+\frac {b}{3 \left (a^2-b^2\right ) d (a+b \coth (c+d x))^3}+\frac {a b}{\left (a^2-b^2\right )^2 d (a+b \coth (c+d x))^2}+\frac {b \left (3 a^2+b^2\right )}{\left (a^2-b^2\right )^3 d (a+b \coth (c+d x))}-\frac {\left (4 i a b \left (a^2+b^2\right )\right ) \int \frac {-i b-i a \coth (c+d x)}{a+b \coth (c+d x)} \, dx}{\left (a^2-b^2\right )^4}\\ &=\frac {\left (a^4+6 a^2 b^2+b^4\right ) x}{\left (a^2-b^2\right )^4}+\frac {b}{3 \left (a^2-b^2\right ) d (a+b \coth (c+d x))^3}+\frac {a b}{\left (a^2-b^2\right )^2 d (a+b \coth (c+d x))^2}+\frac {b \left (3 a^2+b^2\right )}{\left (a^2-b^2\right )^3 d (a+b \coth (c+d x))}-\frac {4 a b \left (a^2+b^2\right ) \log (b \cosh (c+d x)+a \sinh (c+d x))}{\left (a^2-b^2\right )^4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 6.15, size = 214, normalized size = 1.27 \begin {gather*} -\frac {\log (1-\tanh (c+d x))}{2 (a+b)^4 d}+\frac {\log (1+\tanh (c+d x))}{2 (a-b)^4 d}-\frac {4 a b \left (a^2+b^2\right ) \log (b+a \tanh (c+d x))}{\left (a^2-b^2\right )^4 d}-\frac {b^4}{3 a^3 \left (a^2-b^2\right ) d (b+a \tanh (c+d x))^3}+\frac {b^3 \left (2 a^2-b^2\right )}{a^3 \left (a^2-b^2\right )^2 d (b+a \tanh (c+d x))^2}-\frac {b^2 \left (6 a^4-3 a^2 b^2+b^4\right )}{a^3 \left (a^2-b^2\right )^3 d (b+a \tanh (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.93, size = 163, normalized size = 0.96
method | result | size |
derivativedivides | \(\frac {\frac {b}{3 \left (a -b \right ) \left (a +b \right ) \left (a +b \coth \left (d x +c \right )\right )^{3}}+\frac {a b}{\left (a +b \right )^{2} \left (a -b \right )^{2} \left (a +b \coth \left (d x +c \right )\right )^{2}}+\frac {b \left (3 a^{2}+b^{2}\right )}{\left (a +b \right )^{3} \left (a -b \right )^{3} \left (a +b \coth \left (d x +c \right )\right )}-\frac {4 b a \left (a^{2}+b^{2}\right ) \ln \left (a +b \coth \left (d x +c \right )\right )}{\left (a +b \right )^{4} \left (a -b \right )^{4}}+\frac {\ln \left (\coth \left (d x +c \right )+1\right )}{2 \left (a -b \right )^{4}}-\frac {\ln \left (\coth \left (d x +c \right )-1\right )}{2 \left (a +b \right )^{4}}}{d}\) | \(163\) |
default | \(\frac {\frac {b}{3 \left (a -b \right ) \left (a +b \right ) \left (a +b \coth \left (d x +c \right )\right )^{3}}+\frac {a b}{\left (a +b \right )^{2} \left (a -b \right )^{2} \left (a +b \coth \left (d x +c \right )\right )^{2}}+\frac {b \left (3 a^{2}+b^{2}\right )}{\left (a +b \right )^{3} \left (a -b \right )^{3} \left (a +b \coth \left (d x +c \right )\right )}-\frac {4 b a \left (a^{2}+b^{2}\right ) \ln \left (a +b \coth \left (d x +c \right )\right )}{\left (a +b \right )^{4} \left (a -b \right )^{4}}+\frac {\ln \left (\coth \left (d x +c \right )+1\right )}{2 \left (a -b \right )^{4}}-\frac {\ln \left (\coth \left (d x +c \right )-1\right )}{2 \left (a +b \right )^{4}}}{d}\) | \(163\) |
risch | \(\frac {x}{a^{4}+4 a^{3} b +6 a^{2} b^{2}+4 a \,b^{3}+b^{4}}+\frac {8 b \,a^{3} x}{a^{8}-4 a^{6} b^{2}+6 b^{4} a^{4}-4 a^{2} b^{6}+b^{8}}+\frac {8 b^{3} a x}{a^{8}-4 a^{6} b^{2}+6 b^{4} a^{4}-4 a^{2} b^{6}+b^{8}}+\frac {8 b \,a^{3} c}{d \left (a^{8}-4 a^{6} b^{2}+6 b^{4} a^{4}-4 a^{2} b^{6}+b^{8}\right )}+\frac {8 b^{3} a c}{d \left (a^{8}-4 a^{6} b^{2}+6 b^{4} a^{4}-4 a^{2} b^{6}+b^{8}\right )}-\frac {4 \left (9 a^{4} {\mathrm e}^{4 d x +4 c}+12 a^{3} b \,{\mathrm e}^{4 d x +4 c}+3 b^{4} {\mathrm e}^{4 d x +4 c}-18 a^{4} {\mathrm e}^{2 d x +2 c}+6 a^{3} b \,{\mathrm e}^{2 d x +2 c}+15 a^{2} b^{2} {\mathrm e}^{2 d x +2 c}-6 a \,b^{3} {\mathrm e}^{2 d x +2 c}+3 b^{4} {\mathrm e}^{2 d x +2 c}+9 a^{4}-18 a^{3} b +11 a^{2} b^{2}-4 a \,b^{3}+2 b^{4}\right ) b^{2}}{3 \left (a^{2}+2 a b +b^{2}\right ) \left (a +b \right )^{2} \left (a \,{\mathrm e}^{2 d x +2 c}+b \,{\mathrm e}^{2 d x +2 c}-a +b \right )^{3} d \left (a -b \right )^{3}}-\frac {4 b \,a^{3} \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {a -b}{a +b}\right )}{d \left (a^{8}-4 a^{6} b^{2}+6 b^{4} a^{4}-4 a^{2} b^{6}+b^{8}\right )}-\frac {4 b^{3} a \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {a -b}{a +b}\right )}{d \left (a^{8}-4 a^{6} b^{2}+6 b^{4} a^{4}-4 a^{2} b^{6}+b^{8}\right )}\) | \(540\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 522 vs.
\(2 (167) = 334\).
time = 0.33, size = 522, normalized size = 3.09 \begin {gather*} -\frac {4 \, {\left (a^{3} b + a b^{3}\right )} \log \left (-{\left (a - b\right )} e^{\left (-2 \, d x - 2 \, c\right )} + a + b\right )}{{\left (a^{8} - 4 \, a^{6} b^{2} + 6 \, a^{4} b^{4} - 4 \, a^{2} b^{6} + b^{8}\right )} d} - \frac {4 \, {\left (9 \, a^{4} b^{2} + 18 \, a^{3} b^{3} + 11 \, a^{2} b^{4} + 4 \, a b^{5} + 2 \, b^{6} - 3 \, {\left (6 \, a^{4} b^{2} + 2 \, a^{3} b^{3} - 5 \, a^{2} b^{4} - 2 \, a b^{5} - b^{6}\right )} e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, {\left (3 \, a^{4} b^{2} - 4 \, a^{3} b^{3} + b^{6}\right )} e^{\left (-4 \, d x - 4 \, c\right )}\right )}}{3 \, {\left (a^{10} + 2 \, a^{9} b - 3 \, a^{8} b^{2} - 8 \, a^{7} b^{3} + 2 \, a^{6} b^{4} + 12 \, a^{5} b^{5} + 2 \, a^{4} b^{6} - 8 \, a^{3} b^{7} - 3 \, a^{2} b^{8} + 2 \, a b^{9} + b^{10} - 3 \, {\left (a^{10} - 5 \, a^{8} b^{2} + 10 \, a^{6} b^{4} - 10 \, a^{4} b^{6} + 5 \, a^{2} b^{8} - b^{10}\right )} e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, {\left (a^{10} - 2 \, a^{9} b - 3 \, a^{8} b^{2} + 8 \, a^{7} b^{3} + 2 \, a^{6} b^{4} - 12 \, a^{5} b^{5} + 2 \, a^{4} b^{6} + 8 \, a^{3} b^{7} - 3 \, a^{2} b^{8} - 2 \, a b^{9} + b^{10}\right )} e^{\left (-4 \, d x - 4 \, c\right )} - {\left (a^{10} - 4 \, a^{9} b + 3 \, a^{8} b^{2} + 8 \, a^{7} b^{3} - 14 \, a^{6} b^{4} + 14 \, a^{4} b^{6} - 8 \, a^{3} b^{7} - 3 \, a^{2} b^{8} + 4 \, a b^{9} - b^{10}\right )} e^{\left (-6 \, d x - 6 \, c\right )}\right )} d} + \frac {d x + c}{{\left (a^{4} + 4 \, a^{3} b + 6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}\right )} d} \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. 3698 vs.
\(2 (167) = 334\).
time = 0.41, size = 3698, normalized size = 21.88 \begin {gather*} \text {Too large to display} \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.43, size = 303, normalized size = 1.79 \begin {gather*} -\frac {\frac {12 \, {\left (a^{3} b + a b^{3}\right )} \log \left ({\left | a e^{\left (2 \, d x + 2 \, c\right )} + b e^{\left (2 \, d x + 2 \, c\right )} - a + b \right |}\right )}{a^{8} - 4 \, a^{6} b^{2} + 6 \, a^{4} b^{4} - 4 \, a^{2} b^{6} + b^{8}} - \frac {3 \, {\left (d x + c\right )}}{a^{4} - 4 \, a^{3} b + 6 \, a^{2} b^{2} - 4 \, a b^{3} + b^{4}} + \frac {4 \, {\left (3 \, {\left (3 \, a^{4} b^{2} - 2 \, a^{3} b^{3} - 2 \, a^{2} b^{4} + 2 \, a b^{5} - b^{6}\right )} e^{\left (4 \, d x + 4 \, c\right )} - 3 \, {\left (6 \, a^{4} b^{2} - 14 \, a^{3} b^{3} + 11 \, a^{2} b^{4} - 4 \, a b^{5} + b^{6}\right )} e^{\left (2 \, d x + 2 \, c\right )} + \frac {9 \, a^{5} b^{2} - 27 \, a^{4} b^{3} + 29 \, a^{3} b^{4} - 15 \, a^{2} b^{5} + 6 \, a b^{6} - 2 \, b^{7}}{a + b}\right )}}{{\left (a e^{\left (2 \, d x + 2 \, c\right )} + b e^{\left (2 \, d x + 2 \, c\right )} - a + b\right )}^{3} {\left (a + b\right )}^{3} {\left (a - b\right )}^{4}}}{3 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.39, size = 310, normalized size = 1.83 \begin {gather*} \frac {x}{{\left (a-b\right )}^4}-\frac {\ln \left (b-a+a\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+b\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}\right )\,\left (4\,a^3\,b+4\,a\,b^3\right )}{d\,a^8-4\,d\,a^6\,b^2+6\,d\,a^4\,b^4-4\,d\,a^2\,b^6+d\,b^8}-\frac {4\,\left (3\,a^2\,b^2-2\,a\,b^3+b^4\right )}{d\,{\left (a+b\right )}^4\,{\left (a-b\right )}^3\,\left (b-a+{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (a+b\right )\right )}-\frac {8\,b^4}{3\,d\,{\left (a+b\right )}^4\,\left (a-b\right )\,\left ({\mathrm {e}}^{6\,c+6\,d\,x}\,{\left (a+b\right )}^3-{\left (a-b\right )}^3+3\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (a+b\right )\,{\left (a-b\right )}^2-3\,{\mathrm {e}}^{4\,c+4\,d\,x}\,{\left (a+b\right )}^2\,\left (a-b\right )\right )}+\frac {4\,\left (2\,a\,b^3-b^4\right )}{d\,{\left (a+b\right )}^4\,{\left (a-b\right )}^2\,\left ({\mathrm {e}}^{4\,c+4\,d\,x}\,{\left (a+b\right )}^2+{\left (a-b\right )}^2-2\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (a+b\right )\,\left (a-b\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________