3.65 \(\int (a+b \cosh (c+d x))^2 \, dx\)

Optimal. Leaf size=50 \[ \frac {1}{2} x \left (2 a^2+b^2\right )+\frac {2 a b \sinh (c+d x)}{d}+\frac {b^2 \sinh (c+d x) \cosh (c+d x)}{2 d} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {2644} \[ \frac {1}{2} x \left (2 a^2+b^2\right )+\frac {2 a b \sinh (c+d x)}{d}+\frac {b^2 \sinh (c+d x) \cosh (c+d x)}{2 d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2644

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

Rubi steps

\begin {align*} \int (a+b \cosh (c+d x))^2 \, dx &=\frac {1}{2} \left (2 a^2+b^2\right ) x+\frac {2 a b \sinh (c+d x)}{d}+\frac {b^2 \cosh (c+d x) \sinh (c+d x)}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 46, normalized size = 0.92 \[ \frac {2 \left (2 a^2+b^2\right ) (c+d x)+8 a b \sinh (c+d x)+b^2 \sinh (2 (c+d x))}{4 d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(2*(2*a^2 + b^2)*(c + d*x) + 8*a*b*Sinh[c + d*x] + b^2*Sinh[2*(c + d*x)])/(4*d)

________________________________________________________________________________________

fricas [A]  time = 0.52, size = 40, normalized size = 0.80 \[ \frac {{\left (2 \, a^{2} + b^{2}\right )} d x + {\left (b^{2} \cosh \left (d x + c\right ) + 4 \, a b\right )} \sinh \left (d x + c\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.14, size = 75, normalized size = 1.50 \[ \frac {1}{2} \, {\left (2 \, a^{2} + b^{2}\right )} x + \frac {b^{2} e^{\left (2 \, d x + 2 \, c\right )}}{8 \, d} + \frac {a b e^{\left (d x + c\right )}}{d} - \frac {a b e^{\left (-d x - c\right )}}{d} - \frac {b^{2} e^{\left (-2 \, d x - 2 \, c\right )}}{8 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.07, size = 51, normalized size = 1.02 \[ \frac {b^{2} \left (\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+2 a b \sinh \left (d x +c \right )+a^{2} \left (d x +c \right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.50, size = 55, normalized size = 1.10 \[ \frac {1}{8} \, b^{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 )} + a^{2} x + \frac {2 \, a b \sinh \left (d x + c\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.92, size = 41, normalized size = 0.82 \[ \frac {\frac {\mathrm {sinh}\left (2\,c+2\,d\,x\right )\,b^2}{4}+2\,a\,\mathrm {sinh}\left (c+d\,x\right )\,b}{d}+a^2\,x+\frac {b^2\,x}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

((b^2*sinh(2*c + 2*d*x))/4 + 2*a*b*sinh(c + d*x))/d + a^2*x + (b^2*x)/2

________________________________________________________________________________________

sympy [A]  time = 0.26, size = 78, normalized size = 1.56 \[ \begin {cases} a^{2} x + \frac {2 a b \sinh {\left (c + d x \right )}}{d} - \frac {b^{2} x \sinh ^{2}{\left (c + d x \right )}}{2} + \frac {b^{2} x \cosh ^{2}{\left (c + d x \right )}}{2} + \frac {b^{2} \sinh {\left (c + d x \right )} \cosh {\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\x \left (a + b \cosh {\relax (c )}\right )^{2} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________