\(\int \frac {e^{a+b x+c x^2} (b+2 c x)}{\sqrt {a+b x+c x^2}} \, dx\) [631]

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

Optimal result

Integrand size = 33, antiderivative size = 21 \[ \int \frac {e^{a+b x+c x^2} (b+2 c x)}{\sqrt {a+b x+c x^2}} \, dx=\sqrt {\pi } \text {erfi}\left (\sqrt {a+b x+c x^2}\right ) \]

[Out]

erfi((c*x^2+b*x+a)^(1/2))*Pi^(1/2)

Rubi [A] (verified)

Time = 0.16 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {6839, 2211, 2235} \[ \int \frac {e^{a+b x+c x^2} (b+2 c x)}{\sqrt {a+b x+c x^2}} \, dx=\sqrt {\pi } \text {erfi}\left (\sqrt {a+b x+c x^2}\right ) \]

[In]

Int[(E^(a + b*x + c*x^2)*(b + 2*c*x))/Sqrt[a + b*x + c*x^2],x]

[Out]

Sqrt[Pi]*Erfi[Sqrt[a + b*x + c*x^2]]

Rule 2211

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/Sqrt[(c_.) + (d_.)*(x_)], x_Symbol] :> Dist[2/d, Subst[Int[F^(g*(e - c*(
f/d)) + f*g*(x^2/d)), x], x, Sqrt[c + d*x]], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

Rule 2235

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 6839

Int[(F_)^(v_)*(u_)*(w_)^(m_.), x_Symbol] :> With[{q = DerivativeDivides[v, u, x]}, Dist[q, Subst[Int[x^m*F^x,
x], x, v], x] /;  !FalseQ[q]] /; FreeQ[{F, m}, x] && EqQ[w, v]

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {e^x}{\sqrt {x}} \, dx,x,a+b x+c x^2\right ) \\ & = 2 \text {Subst}\left (\int e^{x^2} \, dx,x,\sqrt {a+b x+c x^2}\right ) \\ & = \sqrt {\pi } \text {erfi}\left (\sqrt {a+b x+c x^2}\right ) \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(46\) vs. \(2(21)=42\).

Time = 1.71 (sec) , antiderivative size = 46, normalized size of antiderivative = 2.19 \[ \int \frac {e^{a+b x+c x^2} (b+2 c x)}{\sqrt {a+b x+c x^2}} \, dx=\frac {\sqrt {-a-x (b+c x)} \Gamma \left (\frac {1}{2},-a-x (b+c x)\right )}{\sqrt {a+x (b+c x)}} \]

[In]

Integrate[(E^(a + b*x + c*x^2)*(b + 2*c*x))/Sqrt[a + b*x + c*x^2],x]

[Out]

(Sqrt[-a - x*(b + c*x)]*Gamma[1/2, -a - x*(b + c*x)])/Sqrt[a + x*(b + c*x)]

Maple [A] (verified)

Time = 0.36 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.86

method result size
derivativedivides \(\operatorname {erfi}\left (\sqrt {c \,x^{2}+b x +a}\right ) \sqrt {\pi }\) \(18\)
default \(\operatorname {erfi}\left (\sqrt {c \,x^{2}+b x +a}\right ) \sqrt {\pi }\) \(18\)

[In]

int(exp(c*x^2+b*x+a)*(2*c*x+b)/(c*x^2+b*x+a)^(1/2),x,method=_RETURNVERBOSE)

[Out]

erfi((c*x^2+b*x+a)^(1/2))*Pi^(1/2)

Fricas [F]

\[ \int \frac {e^{a+b x+c x^2} (b+2 c x)}{\sqrt {a+b x+c x^2}} \, dx=\int { \frac {{\left (2 \, c x + b\right )} e^{\left (c x^{2} + b x + a\right )}}{\sqrt {c x^{2} + b x + a}} \,d x } \]

[In]

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

[Out]

integral((2*c*x + b)*e^(c*x^2 + b*x + a)/sqrt(c*x^2 + b*x + a), x)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 49 vs. \(2 (19) = 38\).

Time = 1.43 (sec) , antiderivative size = 49, normalized size of antiderivative = 2.33 \[ \int \frac {e^{a+b x+c x^2} (b+2 c x)}{\sqrt {a+b x+c x^2}} \, dx=\frac {\sqrt {\pi } \sqrt {- a - b x - c x^{2}} \operatorname {erfc}{\left (\sqrt {- a - b x - c x^{2}} \right )}}{\sqrt {a + b x + c x^{2}}} \]

[In]

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

[Out]

sqrt(pi)*sqrt(-a - b*x - c*x**2)*erfc(sqrt(-a - b*x - c*x**2))/sqrt(a + b*x + c*x**2)

Maxima [F]

\[ \int \frac {e^{a+b x+c x^2} (b+2 c x)}{\sqrt {a+b x+c x^2}} \, dx=\int { \frac {{\left (2 \, c x + b\right )} e^{\left (c x^{2} + b x + a\right )}}{\sqrt {c x^{2} + b x + a}} \,d x } \]

[In]

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

[Out]

integrate((2*c*x + b)*e^(c*x^2 + b*x + a)/sqrt(c*x^2 + b*x + a), x)

Giac [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.32 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.95 \[ \int \frac {e^{a+b x+c x^2} (b+2 c x)}{\sqrt {a+b x+c x^2}} \, dx=i \, \sqrt {\pi } \operatorname {erf}\left (-i \, \sqrt {c x^{2} + b x + a}\right ) \]

[In]

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

[Out]

I*sqrt(pi)*erf(-I*sqrt(c*x^2 + b*x + a))

Mupad [B] (verification not implemented)

Time = 0.52 (sec) , antiderivative size = 49, normalized size of antiderivative = 2.33 \[ \int \frac {e^{a+b x+c x^2} (b+2 c x)}{\sqrt {a+b x+c x^2}} \, dx=\frac {\sqrt {\pi }\,\mathrm {erfc}\left (\sqrt {-c\,x^2-b\,x-a}\right )\,\sqrt {-c\,x^2-b\,x-a}}{\sqrt {c\,x^2+b\,x+a}} \]

[In]

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

[Out]

(pi^(1/2)*erfc((- a - b*x - c*x^2)^(1/2))*(- a - b*x - c*x^2)^(1/2))/(a + b*x + c*x^2)^(1/2)