### 3.228 $$\int \cosh (x) \cosh (m x) \, dx$$

Optimal. Leaf size=35 $\frac{\sinh ((1-m) x)}{2 (1-m)}+\frac{\sinh ((m+1) x)}{2 (m+1)}$

[Out]

Sinh[(1 - m)*x]/(2*(1 - m)) + Sinh[(1 + m)*x]/(2*(1 + m))

________________________________________________________________________________________

Rubi [A]  time = 0.0286342, antiderivative size = 35, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 2, integrand size = 7, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.286, Rules used = {5614, 2637} $\frac{\sinh ((1-m) x)}{2 (1-m)}+\frac{\sinh ((m+1) x)}{2 (m+1)}$

Antiderivative was successfully veriﬁed.

[In]

Int[Cosh[x]*Cosh[m*x],x]

[Out]

Sinh[(1 - m)*x]/(2*(1 - m)) + Sinh[(1 + m)*x]/(2*(1 + m))

Rule 5614

Int[Cosh[v_]^(p_.)*Cosh[w_]^(q_.), x_Symbol] :> Int[ExpandTrigReduce[Cosh[v]^p*Cosh[w]^q, x], x] /; IGtQ[p, 0]
&& IGtQ[q, 0] && ((PolynomialQ[v, x] && PolynomialQ[w, x]) || (BinomialQ[{v, w}, x] && IndependentQ[Cancel[v/
w], x]))

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \cosh (x) \cosh (m x) \, dx &=\int \left (\frac{1}{2} \cosh ((1-m) x)+\frac{1}{2} \cosh ((1+m) x)\right ) \, dx\\ &=\frac{1}{2} \int \cosh ((1-m) x) \, dx+\frac{1}{2} \int \cosh ((1+m) x) \, dx\\ &=\frac{\sinh ((1-m) x)}{2 (1-m)}+\frac{\sinh ((1+m) x)}{2 (1+m)}\\ \end{align*}

Mathematica [A]  time = 0.0341788, size = 25, normalized size = 0.71 $\frac{m \cosh (x) \sinh (m x)-\sinh (x) \cosh (m x)}{m^2-1}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[Cosh[x]*Cosh[m*x],x]

[Out]

(-(Cosh[m*x]*Sinh[x]) + m*Cosh[x]*Sinh[m*x])/(-1 + m^2)

________________________________________________________________________________________

Maple [A]  time = 0.009, size = 28, normalized size = 0.8 \begin{align*}{\frac{\sinh \left ( \left ( -1+m \right ) x \right ) }{-2+2\,m}}+{\frac{\sinh \left ( \left ( 1+m \right ) x \right ) }{2+2\,m}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(x)*cosh(m*x),x)

[Out]

1/2/(-1+m)*sinh((-1+m)*x)+1/2*sinh((1+m)*x)/(1+m)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)*cosh(m*x),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.06575, size = 117, normalized size = 3.34 \begin{align*} \frac{m \cosh \left (x\right ) \sinh \left (m x\right ) - \cosh \left (m x\right ) \sinh \left (x\right )}{{\left (m^{2} - 1\right )} \cosh \left (x\right )^{2} -{\left (m^{2} - 1\right )} \sinh \left (x\right )^{2}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)*cosh(m*x),x, algorithm="fricas")

[Out]

(m*cosh(x)*sinh(m*x) - cosh(m*x)*sinh(x))/((m^2 - 1)*cosh(x)^2 - (m^2 - 1)*sinh(x)^2)

________________________________________________________________________________________

Sympy [A]  time = 1.26294, size = 56, normalized size = 1.6 \begin{align*} \begin{cases} - \frac{x \sinh ^{2}{\left (x \right )}}{2} + \frac{x \cosh ^{2}{\left (x \right )}}{2} + \frac{\sinh{\left (x \right )} \cosh{\left (x \right )}}{2} & \text{for}\: m = -1 \vee m = 1 \\\frac{m \sinh{\left (m x \right )} \cosh{\left (x \right )}}{m^{2} - 1} - \frac{\sinh{\left (x \right )} \cosh{\left (m x \right )}}{m^{2} - 1} & \text{otherwise} \end{cases} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)*cosh(m*x),x)

[Out]

Piecewise((-x*sinh(x)**2/2 + x*cosh(x)**2/2 + sinh(x)*cosh(x)/2, Eq(m, -1) | Eq(m, 1)), (m*sinh(m*x)*cosh(x)/(
m**2 - 1) - sinh(x)*cosh(m*x)/(m**2 - 1), True))

________________________________________________________________________________________

Giac [B]  time = 1.16816, size = 80, normalized size = 2.29 \begin{align*} \frac{e^{\left (m x + x\right )}}{4 \,{\left (m + 1\right )}} + \frac{e^{\left (m x - x\right )}}{4 \,{\left (m - 1\right )}} - \frac{e^{\left (-m x + x\right )}}{4 \,{\left (m - 1\right )}} - \frac{e^{\left (-m x - x\right )}}{4 \,{\left (m + 1\right )}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)*cosh(m*x),x, algorithm="giac")

[Out]

1/4*e^(m*x + x)/(m + 1) + 1/4*e^(m*x - x)/(m - 1) - 1/4*e^(-m*x + x)/(m - 1) - 1/4*e^(-m*x - x)/(m + 1)