\(\int (a \cosh (c+d x)+a \sinh (c+d x))^2 \, dx\) [597]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 26 \[ \int (a \cosh (c+d x)+a \sinh (c+d x))^2 \, dx=\frac {(a \cosh (c+d x)+a \sinh (c+d x))^2}{2 d} \]

[Out]

1/2*(a*cosh(d*x+c)+a*sinh(d*x+c))^2/d

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.053, Rules used = {3150} \[ \int (a \cosh (c+d x)+a \sinh (c+d x))^2 \, dx=\frac {(a \sinh (c+d x)+a \cosh (c+d x))^2}{2 d} \]

[In]

Int[(a*Cosh[c + d*x] + a*Sinh[c + d*x])^2,x]

[Out]

(a*Cosh[c + d*x] + a*Sinh[c + d*x])^2/(2*d)

Rule 3150

Int[(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[a*((a*Cos[c + d*x]
 + b*Sin[c + d*x])^n/(b*d*n)), x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[a^2 + b^2, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {(a \cosh (c+d x)+a \sinh (c+d x))^2}{2 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.14 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.96 \[ \int (a \cosh (c+d x)+a \sinh (c+d x))^2 \, dx=\frac {a^2 (\cosh (c+d x)+\sinh (c+d x))^2}{2 d} \]

[In]

Integrate[(a*Cosh[c + d*x] + a*Sinh[c + d*x])^2,x]

[Out]

(a^2*(Cosh[c + d*x] + Sinh[c + d*x])^2)/(2*d)

Maple [A] (verified)

Time = 1.28 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.69

method result size
risch \(\frac {a^{2} {\mathrm e}^{2 d x +2 c}}{2 d}\) \(18\)
gosper \(\frac {a^{2} \left (\cosh \left (d x +c \right )+\sinh \left (d x +c \right )\right )^{2}}{2 d}\) \(24\)
derivativedivides \(\frac {a^{2} \left (\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a^{2} \cosh \left (d x +c \right )^{2}+a^{2} \left (\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{2}-\frac {d x}{2}-\frac {c}{2}\right )}{d}\) \(70\)
default \(\frac {a^{2} \left (\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a^{2} \cosh \left (d x +c \right )^{2}+a^{2} \left (\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{2}-\frac {d x}{2}-\frac {c}{2}\right )}{d}\) \(70\)
parts \(\frac {a^{2} \left (\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {a^{2} \left (\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{2}-\frac {d x}{2}-\frac {c}{2}\right )}{d}+\frac {a^{2} \cosh \left (d x +c \right )^{2}}{d}\) \(75\)

[In]

int((a*cosh(d*x+c)+a*sinh(d*x+c))^2,x,method=_RETURNVERBOSE)

[Out]

1/2*a^2/d*exp(2*d*x+2*c)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.65 \[ \int (a \cosh (c+d x)+a \sinh (c+d x))^2 \, dx=\frac {a^{2} \cosh \left (d x + c\right ) + a^{2} \sinh \left (d x + c\right )}{2 \, {\left (d \cosh \left (d x + c\right ) - d \sinh \left (d x + c\right )\right )}} \]

[In]

integrate((a*cosh(d*x+c)+a*sinh(d*x+c))^2,x, algorithm="fricas")

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 44 vs. \(2 (20) = 40\).

Time = 0.12 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.69 \[ \int (a \cosh (c+d x)+a \sinh (c+d x))^2 \, dx=\begin {cases} \frac {a^{2} \sinh ^{2}{\left (c + d x \right )}}{d} + \frac {a^{2} \sinh {\left (c + d x \right )} \cosh {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a \sinh {\left (c \right )} + a \cosh {\left (c \right )}\right )^{2} & \text {otherwise} \end {cases} \]

[In]

integrate((a*cosh(d*x+c)+a*sinh(d*x+c))**2,x)

[Out]

Piecewise((a**2*sinh(c + d*x)**2/d + a**2*sinh(c + d*x)*cosh(c + d*x)/d, Ne(d, 0)), (x*(a*sinh(c) + a*cosh(c))
**2, True))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 88 vs. \(2 (24) = 48\).

Time = 0.20 (sec) , antiderivative size = 88, normalized size of antiderivative = 3.38 \[ \int (a \cosh (c+d x)+a \sinh (c+d x))^2 \, dx=\frac {1}{8} \, a^{2} {\left (4 \, x + \frac {e^{\left (2 \, d x + 2 \, c\right )}}{d} - \frac {e^{\left (-2 \, d x - 2 \, c\right )}}{d}\right )} - \frac {1}{8} \, a^{2} {\left (4 \, x - \frac {e^{\left (2 \, d x + 2 \, c\right )}}{d} + \frac {e^{\left (-2 \, d x - 2 \, c\right )}}{d}\right )} + \frac {a^{2} \cosh \left (d x + c\right )^{2}}{d} \]

[In]

integrate((a*cosh(d*x+c)+a*sinh(d*x+c))^2,x, algorithm="maxima")

[Out]

1/8*a^2*(4*x + e^(2*d*x + 2*c)/d - e^(-2*d*x - 2*c)/d) - 1/8*a^2*(4*x - e^(2*d*x + 2*c)/d + e^(-2*d*x - 2*c)/d
) + a^2*cosh(d*x + c)^2/d

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.65 \[ \int (a \cosh (c+d x)+a \sinh (c+d x))^2 \, dx=\frac {a^{2} e^{\left (2 \, d x + 2 \, c\right )}}{2 \, d} \]

[In]

integrate((a*cosh(d*x+c)+a*sinh(d*x+c))^2,x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.65 \[ \int (a \cosh (c+d x)+a \sinh (c+d x))^2 \, dx=\frac {a^2\,{\mathrm {e}}^{2\,c+2\,d\,x}}{2\,d} \]

[In]

int((a*cosh(c + d*x) + a*sinh(c + d*x))^2,x)

[Out]

(a^2*exp(2*c + 2*d*x))/(2*d)