### 3.29 $$\int (d+e x) \cosh (a+b x+c x^2) \, dx$$

Optimal. Leaf size=128 $\frac{\sqrt{\pi } e^{\frac{b^2}{4 c}-a} (2 c d-b e) \text{Erf}\left (\frac{b+2 c x}{2 \sqrt{c}}\right )}{8 c^{3/2}}+\frac{\sqrt{\pi } e^{a-\frac{b^2}{4 c}} (2 c d-b e) \text{Erfi}\left (\frac{b+2 c x}{2 \sqrt{c}}\right )}{8 c^{3/2}}+\frac{e \sinh \left (a+b x+c x^2\right )}{2 c}$

[Out]

((2*c*d - b*e)*E^(-a + b^2/(4*c))*Sqrt[Pi]*Erf[(b + 2*c*x)/(2*Sqrt[c])])/(8*c^(3/2)) + ((2*c*d - b*e)*E^(a - b
^2/(4*c))*Sqrt[Pi]*Erfi[(b + 2*c*x)/(2*Sqrt[c])])/(8*c^(3/2)) + (e*Sinh[a + b*x + c*x^2])/(2*c)

________________________________________________________________________________________

Rubi [A]  time = 0.0599674, antiderivative size = 128, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 17, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.294, Rules used = {5383, 5375, 2234, 2204, 2205} $\frac{\sqrt{\pi } e^{\frac{b^2}{4 c}-a} (2 c d-b e) \text{Erf}\left (\frac{b+2 c x}{2 \sqrt{c}}\right )}{8 c^{3/2}}+\frac{\sqrt{\pi } e^{a-\frac{b^2}{4 c}} (2 c d-b e) \text{Erfi}\left (\frac{b+2 c x}{2 \sqrt{c}}\right )}{8 c^{3/2}}+\frac{e \sinh \left (a+b x+c x^2\right )}{2 c}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

((2*c*d - b*e)*E^(-a + b^2/(4*c))*Sqrt[Pi]*Erf[(b + 2*c*x)/(2*Sqrt[c])])/(8*c^(3/2)) + ((2*c*d - b*e)*E^(a - b
^2/(4*c))*Sqrt[Pi]*Erfi[(b + 2*c*x)/(2*Sqrt[c])])/(8*c^(3/2)) + (e*Sinh[a + b*x + c*x^2])/(2*c)

Rule 5383

Int[Cosh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]*((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[(e*Sinh[a + b*x + c*x^2])/
(2*c), x] - Dist[(b*e - 2*c*d)/(2*c), Int[Cosh[a + b*x + c*x^2], x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b*
e - 2*c*d, 0]

Rule 5375

Int[Cosh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[1/2, Int[E^(a + b*x + c*x^2), x], x] + Dist[1/2
, Int[E^(-a - b*x - c*x^2), x], x] /; FreeQ[{a, b, c}, x]

Rule 2234

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[F^(a - b^2/(4*c)), Int[F^((b + 2*c*x)^2/(4*c))
, x], x] /; FreeQ[{F, a, b, c}, x]

Rule 2204

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erfi[(c + d*x)*Rt[b*Log[F], 2
]])/(2*d*Rt[b*Log[F], 2]), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2205

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erf[(c + d*x)*Rt[-(b*Log[F]),
2]])/(2*d*Rt[-(b*Log[F]), 2]), x] /; FreeQ[{F, a, b, c, d}, x] && NegQ[b]

Rubi steps

\begin{align*} \int (d+e x) \cosh \left (a+b x+c x^2\right ) \, dx &=\frac{e \sinh \left (a+b x+c x^2\right )}{2 c}-\frac{(-2 c d+b e) \int \cosh \left (a+b x+c x^2\right ) \, dx}{2 c}\\ &=\frac{e \sinh \left (a+b x+c x^2\right )}{2 c}+\frac{(2 c d-b e) \int e^{-a-b x-c x^2} \, dx}{4 c}+\frac{(2 c d-b e) \int e^{a+b x+c x^2} \, dx}{4 c}\\ &=\frac{e \sinh \left (a+b x+c x^2\right )}{2 c}+\frac{\left ((2 c d-b e) e^{a-\frac{b^2}{4 c}}\right ) \int e^{\frac{(b+2 c x)^2}{4 c}} \, dx}{4 c}+\frac{\left ((2 c d-b e) e^{-a+\frac{b^2}{4 c}}\right ) \int e^{-\frac{(-b-2 c x)^2}{4 c}} \, dx}{4 c}\\ &=\frac{(2 c d-b e) e^{-a+\frac{b^2}{4 c}} \sqrt{\pi } \text{erf}\left (\frac{b+2 c x}{2 \sqrt{c}}\right )}{8 c^{3/2}}+\frac{(2 c d-b e) e^{a-\frac{b^2}{4 c}} \sqrt{\pi } \text{erfi}\left (\frac{b+2 c x}{2 \sqrt{c}}\right )}{8 c^{3/2}}+\frac{e \sinh \left (a+b x+c x^2\right )}{2 c}\\ \end{align*}

Mathematica [A]  time = 0.232393, size = 146, normalized size = 1.14 $\frac{\sqrt{\pi } (2 c d-b e) \text{Erf}\left (\frac{b+2 c x}{2 \sqrt{c}}\right ) \left (\cosh \left (a-\frac{b^2}{4 c}\right )-\sinh \left (a-\frac{b^2}{4 c}\right )\right )+\sqrt{\pi } (2 c d-b e) \text{Erfi}\left (\frac{b+2 c x}{2 \sqrt{c}}\right ) \left (\sinh \left (a-\frac{b^2}{4 c}\right )+\cosh \left (a-\frac{b^2}{4 c}\right )\right )+4 \sqrt{c} e \sinh (a+x (b+c x))}{8 c^{3/2}}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

((2*c*d - b*e)*Sqrt[Pi]*Erf[(b + 2*c*x)/(2*Sqrt[c])]*(Cosh[a - b^2/(4*c)] - Sinh[a - b^2/(4*c)]) + (2*c*d - b*
e)*Sqrt[Pi]*Erfi[(b + 2*c*x)/(2*Sqrt[c])]*(Cosh[a - b^2/(4*c)] + Sinh[a - b^2/(4*c)]) + 4*Sqrt[c]*e*Sinh[a + x
*(b + c*x)])/(8*c^(3/2))

________________________________________________________________________________________

Maple [B]  time = 0.036, size = 211, normalized size = 1.7 \begin{align*}{\frac{d\sqrt{\pi }}{4}{{\rm e}^{-{\frac{4\,ac-{b}^{2}}{4\,c}}}}{\it Erf} \left ( \sqrt{c}x+{\frac{b}{2}{\frac{1}{\sqrt{c}}}} \right ){\frac{1}{\sqrt{c}}}}-{\frac{e{{\rm e}^{-c{x}^{2}-bx-a}}}{4\,c}}-{\frac{be\sqrt{\pi }}{8}{{\rm e}^{-{\frac{4\,ac-{b}^{2}}{4\,c}}}}{\it Erf} \left ( \sqrt{c}x+{\frac{b}{2}{\frac{1}{\sqrt{c}}}} \right ){c}^{-{\frac{3}{2}}}}-{\frac{d\sqrt{\pi }}{4}{{\rm e}^{{\frac{4\,ac-{b}^{2}}{4\,c}}}}{\it Erf} \left ( -\sqrt{-c}x+{\frac{b}{2}{\frac{1}{\sqrt{-c}}}} \right ){\frac{1}{\sqrt{-c}}}}+{\frac{e{{\rm e}^{c{x}^{2}+bx+a}}}{4\,c}}+{\frac{be\sqrt{\pi }}{8\,c}{{\rm e}^{{\frac{4\,ac-{b}^{2}}{4\,c}}}}{\it Erf} \left ( -\sqrt{-c}x+{\frac{b}{2}{\frac{1}{\sqrt{-c}}}} \right ){\frac{1}{\sqrt{-c}}}} \end{align*}

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

[In]

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

[Out]

1/4*d*Pi^(1/2)*exp(-1/4*(4*a*c-b^2)/c)/c^(1/2)*erf(c^(1/2)*x+1/2*b/c^(1/2))-1/4*e/c*exp(-c*x^2-b*x-a)-1/8*e*b/
c^(3/2)*Pi^(1/2)*exp(-1/4*(4*a*c-b^2)/c)*erf(c^(1/2)*x+1/2*b/c^(1/2))-1/4*d*Pi^(1/2)*exp(1/4*(4*a*c-b^2)/c)/(-
c)^(1/2)*erf(-(-c)^(1/2)*x+1/2*b/(-c)^(1/2))+1/4*e/c*exp(c*x^2+b*x+a)+1/8*e*b/c*Pi^(1/2)*exp(1/4*(4*a*c-b^2)/c
)/(-c)^(1/2)*erf(-(-c)^(1/2)*x+1/2*b/(-c)^(1/2))

________________________________________________________________________________________

Maxima [B]  time = 1.37208, size = 343, normalized size = 2.68 \begin{align*} \frac{\sqrt{\pi } d \operatorname{erf}\left (\sqrt{-c} x - \frac{b}{2 \, \sqrt{-c}}\right ) e^{\left (a - \frac{b^{2}}{4 \, c}\right )}}{4 \, \sqrt{-c}} + \frac{\sqrt{\pi } d \operatorname{erf}\left (\sqrt{c} x + \frac{b}{2 \, \sqrt{c}}\right ) e^{\left (-a + \frac{b^{2}}{4 \, c}\right )}}{4 \, \sqrt{c}} - \frac{{\left (\frac{\sqrt{\pi }{\left (2 \, c x + b\right )} b{\left (\operatorname{erf}\left (\frac{1}{2} \, \sqrt{-\frac{{\left (2 \, c x + b\right )}^{2}}{c}}\right ) - 1\right )}}{\sqrt{-\frac{{\left (2 \, c x + b\right )}^{2}}{c}} c^{\frac{3}{2}}} - \frac{2 \, e^{\left (\frac{{\left (2 \, c x + b\right )}^{2}}{4 \, c}\right )}}{\sqrt{c}}\right )} e e^{\left (a - \frac{b^{2}}{4 \, c}\right )}}{8 \, \sqrt{c}} - \frac{{\left (\frac{\sqrt{\pi }{\left (2 \, c x + b\right )} b{\left (\operatorname{erf}\left (\frac{1}{2} \, \sqrt{\frac{{\left (2 \, c x + b\right )}^{2}}{c}}\right ) - 1\right )}}{\sqrt{\frac{{\left (2 \, c x + b\right )}^{2}}{c}} \left (-c\right )^{\frac{3}{2}}} + \frac{2 \, c e^{\left (-\frac{{\left (2 \, c x + b\right )}^{2}}{4 \, c}\right )}}{\left (-c\right )^{\frac{3}{2}}}\right )} e e^{\left (-a + \frac{b^{2}}{4 \, c}\right )}}{8 \, \sqrt{-c}} \end{align*}

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

[In]

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

[Out]

1/4*sqrt(pi)*d*erf(sqrt(-c)*x - 1/2*b/sqrt(-c))*e^(a - 1/4*b^2/c)/sqrt(-c) + 1/4*sqrt(pi)*d*erf(sqrt(c)*x + 1/
2*b/sqrt(c))*e^(-a + 1/4*b^2/c)/sqrt(c) - 1/8*(sqrt(pi)*(2*c*x + b)*b*(erf(1/2*sqrt(-(2*c*x + b)^2/c)) - 1)/(s
qrt(-(2*c*x + b)^2/c)*c^(3/2)) - 2*e^(1/4*(2*c*x + b)^2/c)/sqrt(c))*e*e^(a - 1/4*b^2/c)/sqrt(c) - 1/8*(sqrt(pi
)*(2*c*x + b)*b*(erf(1/2*sqrt((2*c*x + b)^2/c)) - 1)/(sqrt((2*c*x + b)^2/c)*(-c)^(3/2)) + 2*c*e^(-1/4*(2*c*x +
b)^2/c)/(-c)^(3/2))*e*e^(-a + 1/4*b^2/c)/sqrt(-c)

________________________________________________________________________________________

Fricas [B]  time = 2.24789, size = 1033, normalized size = 8.07 \begin{align*} \frac{2 \, c e \cosh \left (c x^{2} + b x + a\right )^{2} + 4 \, c e \cosh \left (c x^{2} + b x + a\right ) \sinh \left (c x^{2} + b x + a\right ) + 2 \, c e \sinh \left (c x^{2} + b x + a\right )^{2} - \sqrt{\pi }{\left ({\left (2 \, c d - b e\right )} \cosh \left (c x^{2} + b x + a\right ) \cosh \left (-\frac{b^{2} - 4 \, a c}{4 \, c}\right ) +{\left (2 \, c d - b e\right )} \cosh \left (c x^{2} + b x + a\right ) \sinh \left (-\frac{b^{2} - 4 \, a c}{4 \, c}\right ) +{\left ({\left (2 \, c d - b e\right )} \cosh \left (-\frac{b^{2} - 4 \, a c}{4 \, c}\right ) +{\left (2 \, c d - b e\right )} \sinh \left (-\frac{b^{2} - 4 \, a c}{4 \, c}\right )\right )} \sinh \left (c x^{2} + b x + a\right )\right )} \sqrt{-c} \operatorname{erf}\left (\frac{{\left (2 \, c x + b\right )} \sqrt{-c}}{2 \, c}\right ) + \sqrt{\pi }{\left ({\left (2 \, c d - b e\right )} \cosh \left (c x^{2} + b x + a\right ) \cosh \left (-\frac{b^{2} - 4 \, a c}{4 \, c}\right ) -{\left (2 \, c d - b e\right )} \cosh \left (c x^{2} + b x + a\right ) \sinh \left (-\frac{b^{2} - 4 \, a c}{4 \, c}\right ) +{\left ({\left (2 \, c d - b e\right )} \cosh \left (-\frac{b^{2} - 4 \, a c}{4 \, c}\right ) -{\left (2 \, c d - b e\right )} \sinh \left (-\frac{b^{2} - 4 \, a c}{4 \, c}\right )\right )} \sinh \left (c x^{2} + b x + a\right )\right )} \sqrt{c} \operatorname{erf}\left (\frac{2 \, c x + b}{2 \, \sqrt{c}}\right ) - 2 \, c e}{8 \,{\left (c^{2} \cosh \left (c x^{2} + b x + a\right ) + c^{2} \sinh \left (c x^{2} + b x + a\right )\right )}} \end{align*}

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

[In]

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

[Out]

1/8*(2*c*e*cosh(c*x^2 + b*x + a)^2 + 4*c*e*cosh(c*x^2 + b*x + a)*sinh(c*x^2 + b*x + a) + 2*c*e*sinh(c*x^2 + b*
x + a)^2 - sqrt(pi)*((2*c*d - b*e)*cosh(c*x^2 + b*x + a)*cosh(-1/4*(b^2 - 4*a*c)/c) + (2*c*d - b*e)*cosh(c*x^2
+ b*x + a)*sinh(-1/4*(b^2 - 4*a*c)/c) + ((2*c*d - b*e)*cosh(-1/4*(b^2 - 4*a*c)/c) + (2*c*d - b*e)*sinh(-1/4*(
b^2 - 4*a*c)/c))*sinh(c*x^2 + b*x + a))*sqrt(-c)*erf(1/2*(2*c*x + b)*sqrt(-c)/c) + sqrt(pi)*((2*c*d - b*e)*cos
h(c*x^2 + b*x + a)*cosh(-1/4*(b^2 - 4*a*c)/c) - (2*c*d - b*e)*cosh(c*x^2 + b*x + a)*sinh(-1/4*(b^2 - 4*a*c)/c)
+ ((2*c*d - b*e)*cosh(-1/4*(b^2 - 4*a*c)/c) - (2*c*d - b*e)*sinh(-1/4*(b^2 - 4*a*c)/c))*sinh(c*x^2 + b*x + a)
)*sqrt(c)*erf(1/2*(2*c*x + b)/sqrt(c)) - 2*c*e)/(c^2*cosh(c*x^2 + b*x + a) + c^2*sinh(c*x^2 + b*x + a))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (d + e x\right ) \cosh{\left (a + b x + c x^{2} \right )}\, dx \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.23379, size = 282, normalized size = 2.2 \begin{align*} -\frac{\sqrt{\pi } d \operatorname{erf}\left (-\frac{1}{2} \, \sqrt{c}{\left (2 \, x + \frac{b}{c}\right )}\right ) e^{\left (\frac{b^{2} - 4 \, a c}{4 \, c}\right )}}{4 \, \sqrt{c}} - \frac{\sqrt{\pi } d \operatorname{erf}\left (-\frac{1}{2} \, \sqrt{-c}{\left (2 \, x + \frac{b}{c}\right )}\right ) e^{\left (-\frac{b^{2} - 4 \, a c}{4 \, c}\right )}}{4 \, \sqrt{-c}} + \frac{\frac{\sqrt{\pi } b \operatorname{erf}\left (-\frac{1}{2} \, \sqrt{c}{\left (2 \, x + \frac{b}{c}\right )}\right ) e^{\left (\frac{b^{2} - 4 \, a c + 4 \, c}{4 \, c}\right )}}{\sqrt{c}} - 2 \, e^{\left (-c x^{2} - b x - a + 1\right )}}{8 \, c} + \frac{\frac{\sqrt{\pi } b \operatorname{erf}\left (-\frac{1}{2} \, \sqrt{-c}{\left (2 \, x + \frac{b}{c}\right )}\right ) e^{\left (-\frac{b^{2} - 4 \, a c - 4 \, c}{4 \, c}\right )}}{\sqrt{-c}} + 2 \, e^{\left (c x^{2} + b x + a + 1\right )}}{8 \, c} \end{align*}

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

[In]

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

[Out]

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