Optimal. Leaf size=53 \[ \frac {(b B-c C) x}{b^2-c^2}-\frac {(B c-b C) \log (b \cosh (x)+c \sinh (x))}{b^2-c^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps
used = 1, number of rules used = 1, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.048, Rules used = {3212}
\begin {gather*} \frac {x (b B-c C)}{b^2-c^2}-\frac {(B c-b C) \log (b \cosh (x)+c \sinh (x))}{b^2-c^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3212
Rubi steps
\begin {align*} \int \frac {B \cosh (x)+C \sinh (x)}{b \cosh (x)+c \sinh (x)} \, dx &=\frac {(b B-c C) x}{b^2-c^2}-\frac {(B c-b C) \log (b \cosh (x)+c \sinh (x))}{b^2-c^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 43, normalized size = 0.81 \begin {gather*} \frac {(b B-c C) x+(-B c+b C) \log (b \cosh (x)+c \sinh (x))}{(b-c) (b+c)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.15, size = 91, normalized size = 1.72
method | result | size |
default | \(\frac {2 \left (-B -C \right ) \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2 b +2 c}+\frac {2 \left (-\frac {B c}{2}+\frac {b C}{2}\right ) \ln \left (b \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+2 c \tanh \left (\frac {x}{2}\right )+b \right )}{\left (b -c \right ) \left (b +c \right )}+\frac {2 \left (B -C \right ) \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{2 b -2 c}\) | \(91\) |
risch | \(\frac {B x}{b +c}+\frac {C x}{b +c}+\frac {2 x B c}{b^{2}-c^{2}}-\frac {2 x b C}{b^{2}-c^{2}}-\frac {\ln \left ({\mathrm e}^{2 x}+\frac {b -c}{b +c}\right ) B c}{b^{2}-c^{2}}+\frac {\ln \left ({\mathrm e}^{2 x}+\frac {b -c}{b +c}\right ) b C}{b^{2}-c^{2}}\) | \(113\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 87, normalized size = 1.64 \begin {gather*} C {\left (\frac {b \log \left (-{\left (b - c\right )} e^{\left (-2 \, x\right )} - b - c\right )}{b^{2} - c^{2}} + \frac {x}{b + c}\right )} - B {\left (\frac {c \log \left (-{\left (b - c\right )} e^{\left (-2 \, x\right )} - b - c\right )}{b^{2} - c^{2}} - \frac {x}{b + c}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 60, normalized size = 1.13 \begin {gather*} \frac {{\left ({\left (B - C\right )} b + {\left (B - C\right )} c\right )} x + {\left (C b - B c\right )} \log \left (\frac {2 \, {\left (b \cosh \left (x\right ) + c \sinh \left (x\right )\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right )}{b^{2} - c^{2}} \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. 326 vs.
\(2 (39) = 78\).
time = 0.35, size = 326, normalized size = 6.15 \begin {gather*} \begin {cases} \tilde {\infty } \left (B \log {\left (\sinh {\left (x \right )} \right )} + C x\right ) & \text {for}\: b = 0 \wedge c = 0 \\\frac {B x \sinh {\left (x \right )}}{- 2 c \sinh {\left (x \right )} + 2 c \cosh {\left (x \right )}} - \frac {B x \cosh {\left (x \right )}}{- 2 c \sinh {\left (x \right )} + 2 c \cosh {\left (x \right )}} - \frac {B \cosh {\left (x \right )}}{- 2 c \sinh {\left (x \right )} + 2 c \cosh {\left (x \right )}} - \frac {C x \sinh {\left (x \right )}}{- 2 c \sinh {\left (x \right )} + 2 c \cosh {\left (x \right )}} + \frac {C x \cosh {\left (x \right )}}{- 2 c \sinh {\left (x \right )} + 2 c \cosh {\left (x \right )}} - \frac {C \cosh {\left (x \right )}}{- 2 c \sinh {\left (x \right )} + 2 c \cosh {\left (x \right )}} & \text {for}\: b = - c \\\frac {B x \sinh {\left (x \right )}}{2 c \sinh {\left (x \right )} + 2 c \cosh {\left (x \right )}} + \frac {B x \cosh {\left (x \right )}}{2 c \sinh {\left (x \right )} + 2 c \cosh {\left (x \right )}} - \frac {B \cosh {\left (x \right )}}{2 c \sinh {\left (x \right )} + 2 c \cosh {\left (x \right )}} + \frac {C x \sinh {\left (x \right )}}{2 c \sinh {\left (x \right )} + 2 c \cosh {\left (x \right )}} + \frac {C x \cosh {\left (x \right )}}{2 c \sinh {\left (x \right )} + 2 c \cosh {\left (x \right )}} + \frac {C \cosh {\left (x \right )}}{2 c \sinh {\left (x \right )} + 2 c \cosh {\left (x \right )}} & \text {for}\: b = c \\\frac {B \log {\left (\sinh {\left (x \right )} \right )} + C x}{c} & \text {for}\: b = 0 \\\frac {B b x}{b^{2} - c^{2}} - \frac {B c \log {\left (\cosh {\left (x \right )} + \frac {c \sinh {\left (x \right )}}{b} \right )}}{b^{2} - c^{2}} + \frac {C b \log {\left (\cosh {\left (x \right )} + \frac {c \sinh {\left (x \right )}}{b} \right )}}{b^{2} - c^{2}} - \frac {C c x}{b^{2} - c^{2}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 54, normalized size = 1.02 \begin {gather*} \frac {{\left (B - C\right )} x}{b - c} + \frac {{\left (C b - B c\right )} \log \left ({\left | b e^{\left (2 \, x\right )} + c e^{\left (2 \, x\right )} + b - c \right |}\right )}{b^{2} - c^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.56, size = 53, normalized size = 1.00 \begin {gather*} \frac {x\,\left (B\,b-C\,c\right )}{b^2-c^2}-\frac {\ln \left (b\,\mathrm {cosh}\left (x\right )+c\,\mathrm {sinh}\left (x\right )\right )\,\left (B\,c-C\,b\right )}{b^2-c^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________