Optimal. Leaf size=88 \[ \frac {x}{4}-\frac {\sinh (2 a+2 b x)}{8 b}+\frac {\sinh (2 (a-c)+2 (b-d) x)}{16 (b-d)}-\frac {\sinh (2 c+2 d x)}{8 d}+\frac {\sinh (2 (a+c)+2 (b+d) x)}{16 (b+d)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {5732, 2717}
\begin {gather*} \frac {\sinh (2 (a-c)+2 x (b-d))}{16 (b-d)}+\frac {\sinh (2 (a+c)+2 x (b+d))}{16 (b+d)}-\frac {\sinh (2 a+2 b x)}{8 b}-\frac {\sinh (2 c+2 d x)}{8 d}+\frac {x}{4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2717
Rule 5732
Rubi steps
\begin {align*} \int \sinh ^2(a+b x) \sinh ^2(c+d x) \, dx &=\int \left (\frac {1}{4}-\frac {1}{4} \cosh (2 a+2 b x)+\frac {1}{8} \cosh (2 (a-c)+2 (b-d) x)-\frac {1}{4} \cosh (2 c+2 d x)+\frac {1}{8} \cosh (2 (a+c)+2 (b+d) x)\right ) \, dx\\ &=\frac {x}{4}+\frac {1}{8} \int \cosh (2 (a-c)+2 (b-d) x) \, dx+\frac {1}{8} \int \cosh (2 (a+c)+2 (b+d) x) \, dx-\frac {1}{4} \int \cosh (2 a+2 b x) \, dx-\frac {1}{4} \int \cosh (2 c+2 d x) \, dx\\ &=\frac {x}{4}-\frac {\sinh (2 a+2 b x)}{8 b}+\frac {\sinh (2 (a-c)+2 (b-d) x)}{16 (b-d)}-\frac {\sinh (2 c+2 d x)}{8 d}+\frac {\sinh (2 (a+c)+2 (b+d) x)}{16 (b+d)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.50, size = 106, normalized size = 1.20 \begin {gather*} \frac {\left (-2 b^2 d+2 d^3\right ) \sinh (2 (a+b x))+b d (b+d) \sinh (2 (a-c+(b-d) x))+b (b-d) (-2 (b+d) \sinh (2 (c+d x))+d (4 (b+d) x+\sinh (2 (a+c+(b+d) x))))}{16 b (b-d) d (b+d)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 2.36, size = 83, normalized size = 0.94
method | result | size |
default | \(\frac {x}{4}-\frac {\sinh \left (2 b x +2 a \right )}{8 b}-\frac {\sinh \left (2 d x +2 c \right )}{8 d}+\frac {\sinh \left (\left (2 b -2 d \right ) x +2 a -2 c \right )}{16 b -16 d}+\frac {\sinh \left (\left (2 b +2 d \right ) x +2 a +2 c \right )}{16 b +16 d}\) | \(83\) |
risch | \(\frac {x}{4}-\frac {{\mathrm e}^{2 b x +2 a}}{16 b}+\frac {{\mathrm e}^{-2 b x -2 a}}{16 b}-\frac {\left (-d \,{\mathrm e}^{4 b x +4 a} b +d^{2} {\mathrm e}^{4 b x +4 a}+2 b^{2} {\mathrm e}^{2 b x +2 a}-2 d^{2} {\mathrm e}^{2 b x +2 a}+b d +d^{2}\right ) {\mathrm e}^{-2 b x +2 d x -2 a +2 c}}{32 \left (b +d \right ) \left (b -d \right ) d}+\frac {\left (d \,{\mathrm e}^{4 b x +4 a} b +d^{2} {\mathrm e}^{4 b x +4 a}+2 b^{2} {\mathrm e}^{2 b x +2 a}-2 d^{2} {\mathrm e}^{2 b x +2 a}-b d +d^{2}\right ) {\mathrm e}^{-2 b x -2 d x -2 a -2 c}}{32 \left (b +d \right ) \left (b -d \right ) d}\) | \(221\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \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. 192 vs.
\(2 (78) = 156\).
time = 0.40, size = 192, normalized size = 2.18 \begin {gather*} \frac {b^{2} d \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) \sinh \left (d x + c\right )^{2} + {\left (b^{3} d - b d^{3}\right )} x + {\left (b^{2} d \cosh \left (b x + a\right ) \cosh \left (d x + c\right )^{2} - {\left (b^{2} d - d^{3}\right )} \cosh \left (b x + a\right )\right )} \sinh \left (b x + a\right ) - {\left (b d^{2} \cosh \left (d x + c\right ) \sinh \left (b x + a\right )^{2} + {\left (b d^{2} \cosh \left (b x + a\right )^{2} + b^{3} - b d^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{4 \, {\left ({\left (b^{3} d - b d^{3}\right )} \cosh \left (b x + a\right )^{2} - {\left (b^{3} d - b d^{3}\right )} \sinh \left (b x + a\right )^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 1027 vs.
\(2 (76) = 152\).
time = 1.95, size = 1027, normalized size = 11.67 \begin {gather*} \begin {cases} x \sinh ^{2}{\left (a \right )} \sinh ^{2}{\left (c \right )} & \text {for}\: b = 0 \wedge d = 0 \\\left (\frac {x \sinh ^{2}{\left (c + d x \right )}}{2} - \frac {x \cosh ^{2}{\left (c + d x \right )}}{2} + \frac {\sinh {\left (c + d x \right )} \cosh {\left (c + d x \right )}}{2 d}\right ) \sinh ^{2}{\left (a \right )} & \text {for}\: b = 0 \\\frac {3 x \sinh ^{2}{\left (a - d x \right )} \sinh ^{2}{\left (c + d x \right )}}{8} - \frac {x \sinh ^{2}{\left (a - d x \right )} \cosh ^{2}{\left (c + d x \right )}}{8} + \frac {x \sinh {\left (a - d x \right )} \sinh {\left (c + d x \right )} \cosh {\left (a - d x \right )} \cosh {\left (c + d x \right )}}{2} - \frac {x \sinh ^{2}{\left (c + d x \right )} \cosh ^{2}{\left (a - d x \right )}}{8} + \frac {3 x \cosh ^{2}{\left (a - d x \right )} \cosh ^{2}{\left (c + d x \right )}}{8} + \frac {\sinh ^{2}{\left (a - d x \right )} \sinh {\left (c + d x \right )} \cosh {\left (c + d x \right )}}{2 d} - \frac {\sinh {\left (a - d x \right )} \sinh ^{2}{\left (c + d x \right )} \cosh {\left (a - d x \right )}}{8 d} + \frac {3 \sinh {\left (a - d x \right )} \cosh {\left (a - d x \right )} \cosh ^{2}{\left (c + d x \right )}}{8 d} & \text {for}\: b = - d \\\frac {3 x \sinh ^{2}{\left (a + d x \right )} \sinh ^{2}{\left (c + d x \right )}}{8} - \frac {x \sinh ^{2}{\left (a + d x \right )} \cosh ^{2}{\left (c + d x \right )}}{8} - \frac {x \sinh {\left (a + d x \right )} \sinh {\left (c + d x \right )} \cosh {\left (a + d x \right )} \cosh {\left (c + d x \right )}}{2} - \frac {x \sinh ^{2}{\left (c + d x \right )} \cosh ^{2}{\left (a + d x \right )}}{8} + \frac {3 x \cosh ^{2}{\left (a + d x \right )} \cosh ^{2}{\left (c + d x \right )}}{8} + \frac {5 \sinh {\left (a + d x \right )} \sinh ^{2}{\left (c + d x \right )} \cosh {\left (a + d x \right )}}{8 d} + \frac {\sinh {\left (a + d x \right )} \cosh {\left (a + d x \right )} \cosh ^{2}{\left (c + d x \right )}}{8 d} - \frac {\sinh {\left (c + d x \right )} \cosh ^{2}{\left (a + d x \right )} \cosh {\left (c + d x \right )}}{2 d} & \text {for}\: b = d \\\left (\frac {x \sinh ^{2}{\left (a + b x \right )}}{2} - \frac {x \cosh ^{2}{\left (a + b x \right )}}{2} + \frac {\sinh {\left (a + b x \right )} \cosh {\left (a + b x \right )}}{2 b}\right ) \sinh ^{2}{\left (c \right )} & \text {for}\: d = 0 \\\frac {b^{3} d x \sinh ^{2}{\left (a + b x \right )} \sinh ^{2}{\left (c + d x \right )}}{4 b^{3} d - 4 b d^{3}} - \frac {b^{3} d x \sinh ^{2}{\left (a + b x \right )} \cosh ^{2}{\left (c + d x \right )}}{4 b^{3} d - 4 b d^{3}} - \frac {b^{3} d x \sinh ^{2}{\left (c + d x \right )} \cosh ^{2}{\left (a + b x \right )}}{4 b^{3} d - 4 b d^{3}} + \frac {b^{3} d x \cosh ^{2}{\left (a + b x \right )} \cosh ^{2}{\left (c + d x \right )}}{4 b^{3} d - 4 b d^{3}} + \frac {b^{3} \sinh ^{2}{\left (a + b x \right )} \sinh {\left (c + d x \right )} \cosh {\left (c + d x \right )}}{4 b^{3} d - 4 b d^{3}} - \frac {b^{3} \sinh {\left (c + d x \right )} \cosh ^{2}{\left (a + b x \right )} \cosh {\left (c + d x \right )}}{4 b^{3} d - 4 b d^{3}} + \frac {2 b^{2} d \sinh {\left (a + b x \right )} \sinh ^{2}{\left (c + d x \right )} \cosh {\left (a + b x \right )}}{4 b^{3} d - 4 b d^{3}} - \frac {b d^{3} x \sinh ^{2}{\left (a + b x \right )} \sinh ^{2}{\left (c + d x \right )}}{4 b^{3} d - 4 b d^{3}} + \frac {b d^{3} x \sinh ^{2}{\left (a + b x \right )} \cosh ^{2}{\left (c + d x \right )}}{4 b^{3} d - 4 b d^{3}} + \frac {b d^{3} x \sinh ^{2}{\left (c + d x \right )} \cosh ^{2}{\left (a + b x \right )}}{4 b^{3} d - 4 b d^{3}} - \frac {b d^{3} x \cosh ^{2}{\left (a + b x \right )} \cosh ^{2}{\left (c + d x \right )}}{4 b^{3} d - 4 b d^{3}} - \frac {2 b d^{2} \sinh ^{2}{\left (a + b x \right )} \sinh {\left (c + d x \right )} \cosh {\left (c + d x \right )}}{4 b^{3} d - 4 b d^{3}} - \frac {d^{3} \sinh {\left (a + b x \right )} \sinh ^{2}{\left (c + d x \right )} \cosh {\left (a + b x \right )}}{4 b^{3} d - 4 b d^{3}} + \frac {d^{3} \sinh {\left (a + b x \right )} \cosh {\left (a + b x \right )} \cosh ^{2}{\left (c + d x \right )}}{4 b^{3} d - 4 b d^{3}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 156, normalized size = 1.77 \begin {gather*} \frac {1}{4} \, x + \frac {e^{\left (2 \, b x + 2 \, d x + 2 \, a + 2 \, c\right )}}{32 \, {\left (b + d\right )}} + \frac {e^{\left (2 \, b x - 2 \, d x + 2 \, a - 2 \, c\right )}}{32 \, {\left (b - d\right )}} - \frac {e^{\left (2 \, b x + 2 \, a\right )}}{16 \, b} - \frac {e^{\left (-2 \, b x + 2 \, d x - 2 \, a + 2 \, c\right )}}{32 \, {\left (b - d\right )}} - \frac {e^{\left (-2 \, b x - 2 \, d x - 2 \, a - 2 \, c\right )}}{32 \, {\left (b + d\right )}} + \frac {e^{\left (-2 \, b x - 2 \, a\right )}}{16 \, b} - \frac {e^{\left (2 \, d x + 2 \, c\right )}}{16 \, d} + \frac {e^{\left (-2 \, d x - 2 \, c\right )}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.92, size = 152, normalized size = 1.73 \begin {gather*} -\frac {d^3\,\mathrm {cosh}\left (a+b\,x\right )\,\mathrm {sinh}\left (a+b\,x\right )-b^3\,\mathrm {cosh}\left (c+d\,x\right )\,\mathrm {sinh}\left (c+d\,x\right )-b\,d^3\,x+b^3\,d\,x-2\,b^2\,d\,\mathrm {cosh}\left (a+b\,x\right )\,\mathrm {sinh}\left (a+b\,x\right )+2\,b\,d^2\,\mathrm {cosh}\left (c+d\,x\right )\,\mathrm {sinh}\left (c+d\,x\right )+2\,b^2\,d\,\mathrm {cosh}\left (a+b\,x\right )\,{\mathrm {cosh}\left (c+d\,x\right )}^2\,\mathrm {sinh}\left (a+b\,x\right )-2\,b\,d^2\,{\mathrm {cosh}\left (a+b\,x\right )}^2\,\mathrm {cosh}\left (c+d\,x\right )\,\mathrm {sinh}\left (c+d\,x\right )}{4\,b\,d^3-4\,b^3\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________