3.341 \(\int e^{x^2} \sinh (a+b x+c x^2) \, dx\)

Optimal. Leaf size=115 \[ \frac{\sqrt{\pi } e^{-a-\frac{b^2}{4 (1-c)}} \text{Erfi}\left (\frac{b-2 (1-c) x}{2 \sqrt{1-c}}\right )}{4 \sqrt{1-c}}+\frac{\sqrt{\pi } e^{a-\frac{b^2}{4 (c+1)}} \text{Erfi}\left (\frac{b+2 (c+1) x}{2 \sqrt{c+1}}\right )}{4 \sqrt{c+1}} \]

[Out]

(E^(-a - b^2/(4*(1 - c)))*Sqrt[Pi]*Erfi[(b - 2*(1 - c)*x)/(2*Sqrt[1 - c])])/(4*Sqrt[1 - c]) + (E^(a - b^2/(4*(
1 + c)))*Sqrt[Pi]*Erfi[(b + 2*(1 + c)*x)/(2*Sqrt[1 + c])])/(4*Sqrt[1 + c])

________________________________________________________________________________________

Rubi [A]  time = 0.167993, antiderivative size = 115, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 3, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.176, Rules used = {5512, 2234, 2204} \[ \frac{\sqrt{\pi } e^{-a-\frac{b^2}{4 (1-c)}} \text{Erfi}\left (\frac{b-2 (1-c) x}{2 \sqrt{1-c}}\right )}{4 \sqrt{1-c}}+\frac{\sqrt{\pi } e^{a-\frac{b^2}{4 (c+1)}} \text{Erfi}\left (\frac{b+2 (c+1) x}{2 \sqrt{c+1}}\right )}{4 \sqrt{c+1}} \]

Antiderivative was successfully verified.

[In]

Int[E^x^2*Sinh[a + b*x + c*x^2],x]

[Out]

(E^(-a - b^2/(4*(1 - c)))*Sqrt[Pi]*Erfi[(b - 2*(1 - c)*x)/(2*Sqrt[1 - c])])/(4*Sqrt[1 - c]) + (E^(a - b^2/(4*(
1 + c)))*Sqrt[Pi]*Erfi[(b + 2*(1 + c)*x)/(2*Sqrt[1 + c])])/(4*Sqrt[1 + c])

Rule 5512

Int[(F_)^(u_)*Sinh[v_]^(n_.), x_Symbol] :> Int[ExpandTrigToExp[F^u, Sinh[v]^n, x], x] /; FreeQ[F, x] && (Linea
rQ[u, x] || PolyQ[u, x, 2]) && (LinearQ[v, x] || PolyQ[v, x, 2]) && IGtQ[n, 0]

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]

Rubi steps

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

Mathematica [A]  time = 0.396314, size = 123, normalized size = 1.07 \[ \frac{\sqrt{\pi } e^{-\frac{b^2}{4 c+4}} \left ((c-1) \sqrt{c+1} (\sinh (a)+\cosh (a)) \text{Erfi}\left (\frac{b+2 (c+1) x}{2 \sqrt{c+1}}\right )-\sqrt{c-1} (c+1) e^{\frac{b^2 c}{2 \left (c^2-1\right )}} (\cosh (a)-\sinh (a)) \text{Erf}\left (\frac{b+2 (c-1) x}{2 \sqrt{c-1}}\right )\right )}{4 \left (c^2-1\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[E^x^2*Sinh[a + b*x + c*x^2],x]

[Out]

(Sqrt[Pi]*(-(Sqrt[-1 + c]*(1 + c)*E^((b^2*c)/(2*(-1 + c^2)))*Erf[(b + 2*(-1 + c)*x)/(2*Sqrt[-1 + c])]*(Cosh[a]
 - Sinh[a])) + (-1 + c)*Sqrt[1 + c]*Erfi[(b + 2*(1 + c)*x)/(2*Sqrt[1 + c])]*(Cosh[a] + Sinh[a])))/(4*(-1 + c^2
)*E^(b^2/(4 + 4*c)))

________________________________________________________________________________________

Maple [A]  time = 0.145, size = 105, normalized size = 0.9 \begin{align*} -{\frac{\sqrt{\pi }}{4}{{\rm e}^{-{\frac{4\,ac-{b}^{2}-4\,a}{4\,c-4}}}}{\it Erf} \left ( \sqrt{c-1}x+{\frac{b}{2}{\frac{1}{\sqrt{c-1}}}} \right ){\frac{1}{\sqrt{c-1}}}}-{\frac{\sqrt{\pi }}{4}{{\rm e}^{{\frac{4\,ac-{b}^{2}+4\,a}{4+4\,c}}}}{\it Erf} \left ( -\sqrt{-1-c}x+{\frac{b}{2}{\frac{1}{\sqrt{-1-c}}}} \right ){\frac{1}{\sqrt{-1-c}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(exp(x^2)*sinh(c*x^2+b*x+a),x)

[Out]

-1/4*Pi^(1/2)*exp(-1/4*(4*a*c-b^2-4*a)/(c-1))/(c-1)^(1/2)*erf((c-1)^(1/2)*x+1/2*b/(c-1)^(1/2))-1/4*Pi^(1/2)*ex
p(1/4*(4*a*c-b^2+4*a)/(1+c))/(-1-c)^(1/2)*erf(-(-1-c)^(1/2)*x+1/2*b/(-1-c)^(1/2))

________________________________________________________________________________________

Maxima [A]  time = 1.06368, size = 120, normalized size = 1.04 \begin{align*} \frac{\sqrt{\pi } \operatorname{erf}\left (\sqrt{-c - 1} x - \frac{b}{2 \, \sqrt{-c - 1}}\right ) e^{\left (a - \frac{b^{2}}{4 \,{\left (c + 1\right )}}\right )}}{4 \, \sqrt{-c - 1}} - \frac{\sqrt{\pi } \operatorname{erf}\left (\sqrt{c - 1} x + \frac{b}{2 \, \sqrt{c - 1}}\right ) e^{\left (-a + \frac{b^{2}}{4 \,{\left (c - 1\right )}}\right )}}{4 \, \sqrt{c - 1}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.82426, size = 467, normalized size = 4.06 \begin{align*} -\frac{\sqrt{\pi }{\left ({\left (c + 1\right )} \cosh \left (-\frac{b^{2} - 4 \, a c + 4 \, a}{4 \,{\left (c - 1\right )}}\right ) -{\left (c + 1\right )} \sinh \left (-\frac{b^{2} - 4 \, a c + 4 \, a}{4 \,{\left (c - 1\right )}}\right )\right )} \sqrt{c - 1} \operatorname{erf}\left (\frac{2 \,{\left (c - 1\right )} x + b}{2 \, \sqrt{c - 1}}\right ) + \sqrt{\pi }{\left ({\left (c - 1\right )} \cosh \left (-\frac{b^{2} - 4 \, a c - 4 \, a}{4 \,{\left (c + 1\right )}}\right ) +{\left (c - 1\right )} \sinh \left (-\frac{b^{2} - 4 \, a c - 4 \, a}{4 \,{\left (c + 1\right )}}\right )\right )} \sqrt{-c - 1} \operatorname{erf}\left (\frac{{\left (2 \,{\left (c + 1\right )} x + b\right )} \sqrt{-c - 1}}{2 \,{\left (c + 1\right )}}\right )}{4 \,{\left (c^{2} - 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/4*(sqrt(pi)*((c + 1)*cosh(-1/4*(b^2 - 4*a*c + 4*a)/(c - 1)) - (c + 1)*sinh(-1/4*(b^2 - 4*a*c + 4*a)/(c - 1)
))*sqrt(c - 1)*erf(1/2*(2*(c - 1)*x + b)/sqrt(c - 1)) + sqrt(pi)*((c - 1)*cosh(-1/4*(b^2 - 4*a*c - 4*a)/(c + 1
)) + (c - 1)*sinh(-1/4*(b^2 - 4*a*c - 4*a)/(c + 1)))*sqrt(-c - 1)*erf(1/2*(2*(c + 1)*x + b)*sqrt(-c - 1)/(c +
1)))/(c^2 - 1)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x**2)*sinh(c*x**2+b*x+a),x)

[Out]

Integral(exp(x**2)*sinh(a + b*x + c*x**2), x)

________________________________________________________________________________________

Giac [A]  time = 1.24533, size = 136, normalized size = 1.18 \begin{align*} -\frac{\sqrt{\pi } \operatorname{erf}\left (-\frac{1}{2} \, \sqrt{-c - 1}{\left (2 \, x + \frac{b}{c + 1}\right )}\right ) e^{\left (-\frac{b^{2} - 4 \, a c - 4 \, a}{4 \,{\left (c + 1\right )}}\right )}}{4 \, \sqrt{-c - 1}} + \frac{\sqrt{\pi } \operatorname{erf}\left (-\frac{1}{2} \, \sqrt{c - 1}{\left (2 \, x + \frac{b}{c - 1}\right )}\right ) e^{\left (\frac{b^{2} - 4 \, a c + 4 \, a}{4 \,{\left (c - 1\right )}}\right )}}{4 \, \sqrt{c - 1}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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