3.113 \(\int \frac {c+d x}{a+a \cosh (e+f x)} \, dx\)

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]

-2*d*ln(cosh(1/2*e+1/2*f*x))/a/f^2+(d*x+c)*tanh(1/2*e+1/2*f*x)/a/f

________________________________________________________________________________________

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]

Int[(c + d*x)/(a + a*Cosh[e + f*x]),x]

[Out]

(-2*d*Log[Cosh[e/2 + (f*x)/2]])/(a*f^2) + ((c + d*x)*Tanh[e/2 + (f*x)/2])/(a*f)

Rule 3318

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(2*a)^n, Int[(c
 + d*x)^m*Sin[(1*(e + (Pi*a)/(2*b)))/2 + (f*x)/2]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2
- b^2, 0] && IntegerQ[n] && (GtQ[n, 0] || IGtQ[m, 0])

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4184

Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> -Simp[((c + d*x)^m*Cot[e + f*x])/f, x]
+ Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

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]

Integrate[(c + d*x)/(a + a*Cosh[e + f*x]),x]

[Out]

(2*Cosh[(e + f*x)/2]*(-2*d*Cosh[(e + f*x)/2]*Log[Cosh[(e + f*x)/2]] + f*(c + d*x)*Sinh[(e + f*x)/2]))/(a*f^2*(
1 + Cosh[e + f*x]))

________________________________________________________________________________________

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]

integrate((d*x+c)/(a+a*cosh(f*x+e)),x, algorithm="fricas")

[Out]

2*(d*f*x*cosh(f*x + e) + d*f*x*sinh(f*x + e) - c*f - (d*cosh(f*x + e) + d*sinh(f*x + e) + d)*log(cosh(f*x + e)
 + sinh(f*x + e) + 1))/(a*f^2*cosh(f*x + e) + a*f^2*sinh(f*x + e) + a*f^2)

________________________________________________________________________________________

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]

integrate((d*x+c)/(a+a*cosh(f*x+e)),x, algorithm="giac")

[Out]

2*(d*f*x*e^(f*x + e) - d*e^(f*x + e)*log(e^(f*x + e) + 1) - c*f - d*log(e^(f*x + e) + 1))/(a*f^2*e^(f*x + e) +
 a*f^2)

________________________________________________________________________________________

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]

int((d*x+c)/(a+a*cosh(f*x+e)),x)

[Out]

2*d/a/f*x+2*d/a/f^2*e-2/f*(d*x+c)/a/(exp(f*x+e)+1)-2*d/a/f^2*ln(exp(f*x+e)+1)

________________________________________________________________________________________

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]

integrate((d*x+c)/(a+a*cosh(f*x+e)),x, algorithm="maxima")

[Out]

2*d*(x*e^(f*x + e)/(a*f*e^(f*x + e) + a*f) - log((e^(f*x + e) + 1)*e^(-e))/(a*f^2)) + 2*c/((a*e^(-f*x - e) + a
)*f)

________________________________________________________________________________________

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]

int((c + d*x)/(a + a*cosh(e + f*x)),x)

[Out]

(2*d*x)/(a*f) - (2*(c + d*x))/(a*f*(exp(e + f*x) + 1)) - (2*d*log(exp(f*x)*exp(e) + 1))/(a*f^2)

________________________________________________________________________________________

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]

integrate((d*x+c)/(a+a*cosh(f*x+e)),x)

[Out]

Piecewise((c*tanh(e/2 + f*x/2)/(a*f) + d*x*tanh(e/2 + f*x/2)/(a*f) - d*x/(a*f) + 2*d*log(tanh(e/2 + f*x/2) + 1
)/(a*f**2), Ne(f, 0)), ((c*x + d*x**2/2)/(a*cosh(e) + a), True))

________________________________________________________________________________________