Optimal. Leaf size=49 \[ \frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right )}{a f}-\frac {2 d \log \left (\cosh \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a f^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3318, 4184, 3475} \[ \frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right )}{a f}-\frac {2 d \log \left (\cosh \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a f^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3318
Rule 3475
Rule 4184
Rubi steps
\begin {align*} \int \frac {c+d x}{a+a \cosh (e+f x)} \, dx &=\frac {\int (c+d x) \csc ^2\left (\frac {1}{2} (i e+\pi )+\frac {i f x}{2}\right ) \, dx}{2 a}\\ &=\frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right )}{a f}-\frac {d \int \tanh \left (\frac {e}{2}+\frac {f x}{2}\right ) \, dx}{a f}\\ &=-\frac {2 d \log \left (\cosh \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a f^2}+\frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}\right )}{a f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.27, size = 70, normalized size = 1.43 \[ \frac {2 \cosh \left (\frac {1}{2} (e+f x)\right ) \left (f (c+d x) \sinh \left (\frac {1}{2} (e+f x)\right )-2 d \cosh \left (\frac {1}{2} (e+f x)\right ) \log \left (\cosh \left (\frac {1}{2} (e+f x)\right )\right )\right )}{a f^2 (\cosh (e+f x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.54, size = 92, normalized size = 1.88 \[ \frac {2 \, {\left (d f x \cosh \left (f x + e\right ) + d f x \sinh \left (f x + e\right ) - c f - {\left (d \cosh \left (f x + e\right ) + d \sinh \left (f x + e\right ) + d\right )} \log \left (\cosh \left (f x + e\right ) + \sinh \left (f x + e\right ) + 1\right )\right )}}{a f^{2} \cosh \left (f x + e\right ) + a f^{2} \sinh \left (f x + e\right ) + a f^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 71, normalized size = 1.45 \[ \frac {2 \, {\left (d f x e^{\left (f x + e\right )} - d e^{\left (f x + e\right )} \log \left (e^{\left (f x + e\right )} + 1\right ) - c f - d \log \left (e^{\left (f x + e\right )} + 1\right )\right )}}{a f^{2} e^{\left (f x + e\right )} + a f^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.13, size = 63, normalized size = 1.29 \[ \frac {2 d x}{a f}+\frac {2 d e}{a \,f^{2}}-\frac {2 \left (d x +c \right )}{f a \left ({\mathrm e}^{f x +e}+1\right )}-\frac {2 d \ln \left ({\mathrm e}^{f x +e}+1\right )}{a \,f^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.37, size = 71, normalized size = 1.45 \[ 2 \, d {\left (\frac {x e^{\left (f x + e\right )}}{a f e^{\left (f x + e\right )} + a f} - \frac {\log \left ({\left (e^{\left (f x + e\right )} + 1\right )} e^{\left (-e\right )}\right )}{a f^{2}}\right )} + \frac {2 \, c}{{\left (a e^{\left (-f x - e\right )} + a\right )} f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.90, size = 53, normalized size = 1.08 \[ \frac {2\,d\,x}{a\,f}-\frac {2\,\left (c+d\,x\right )}{a\,f\,\left ({\mathrm {e}}^{e+f\,x}+1\right )}-\frac {2\,d\,\ln \left ({\mathrm {e}}^{f\,x}\,{\mathrm {e}}^e+1\right )}{a\,f^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.72, size = 76, normalized size = 1.55 \[ \begin {cases} \frac {c \tanh {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{a f} + \frac {d x \tanh {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{a f} - \frac {d x}{a f} + \frac {2 d \log {\left (\tanh {\left (\frac {e}{2} + \frac {f x}{2} \right )} + 1 \right )}}{a f^{2}} & \text {for}\: f \neq 0 \\\frac {c x + \frac {d x^{2}}{2}}{a \cosh {\relax (e )} + a} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________