\(\int f^{a+b x+c x^2} x \, dx\) [428]

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

Optimal result

Integrand size = 14, antiderivative size = 81 \[ \int f^{a+b x+c x^2} x \, dx=\frac {f^{a+b x+c x^2}}{2 c \log (f)}-\frac {b f^{a-\frac {b^2}{4 c}} \sqrt {\pi } \text {erfi}\left (\frac {(b+2 c x) \sqrt {\log (f)}}{2 \sqrt {c}}\right )}{4 c^{3/2} \sqrt {\log (f)}} \]

[Out]

1/2*f^(c*x^2+b*x+a)/c/ln(f)-1/4*b*f^(a-1/4*b^2/c)*erfi(1/2*(2*c*x+b)*ln(f)^(1/2)/c^(1/2))*Pi^(1/2)/c^(3/2)/ln(
f)^(1/2)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 81, 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.214, Rules used = {2272, 2266, 2235} \[ \int f^{a+b x+c x^2} x \, dx=\frac {f^{a+b x+c x^2}}{2 c \log (f)}-\frac {\sqrt {\pi } b f^{a-\frac {b^2}{4 c}} \text {erfi}\left (\frac {\sqrt {\log (f)} (b+2 c x)}{2 \sqrt {c}}\right )}{4 c^{3/2} \sqrt {\log (f)}} \]

[In]

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

[Out]

f^(a + b*x + c*x^2)/(2*c*Log[f]) - (b*f^(a - b^2/(4*c))*Sqrt[Pi]*Erfi[((b + 2*c*x)*Sqrt[Log[f]])/(2*Sqrt[c])])
/(4*c^(3/2)*Sqrt[Log[f]])

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 2266

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 2272

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

Rubi steps \begin{align*} \text {integral}& = \frac {f^{a+b x+c x^2}}{2 c \log (f)}-\frac {b \int f^{a+b x+c x^2} \, dx}{2 c} \\ & = \frac {f^{a+b x+c x^2}}{2 c \log (f)}-\frac {\left (b f^{a-\frac {b^2}{4 c}}\right ) \int f^{\frac {(b+2 c x)^2}{4 c}} \, dx}{2 c} \\ & = \frac {f^{a+b x+c x^2}}{2 c \log (f)}-\frac {b f^{a-\frac {b^2}{4 c}} \sqrt {\pi } \text {erfi}\left (\frac {(b+2 c x) \sqrt {\log (f)}}{2 \sqrt {c}}\right )}{4 c^{3/2} \sqrt {\log (f)}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.00 \[ \int f^{a+b x+c x^2} x \, dx=\frac {f^{a+b x+c x^2}}{2 c \log (f)}-\frac {b f^{a-\frac {b^2}{4 c}} \sqrt {\pi } \text {erfi}\left (\frac {(b+2 c x) \sqrt {\log (f)}}{2 \sqrt {c}}\right )}{4 c^{3/2} \sqrt {\log (f)}} \]

[In]

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

[Out]

f^(a + b*x + c*x^2)/(2*c*Log[f]) - (b*f^(a - b^2/(4*c))*Sqrt[Pi]*Erfi[((b + 2*c*x)*Sqrt[Log[f]])/(2*Sqrt[c])])
/(4*c^(3/2)*Sqrt[Log[f]])

Maple [A] (verified)

Time = 0.03 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.98

method result size
risch \(\frac {f^{c \,x^{2}} f^{b x} f^{a}}{2 c \ln \left (f \right )}+\frac {b \sqrt {\pi }\, f^{a} f^{-\frac {b^{2}}{4 c}} \operatorname {erf}\left (-\sqrt {-c \ln \left (f \right )}\, x +\frac {b \ln \left (f \right )}{2 \sqrt {-c \ln \left (f \right )}}\right )}{4 c \sqrt {-c \ln \left (f \right )}}\) \(79\)

[In]

int(f^(c*x^2+b*x+a)*x,x,method=_RETURNVERBOSE)

[Out]

1/2/c/ln(f)*f^(c*x^2)*f^(b*x)*f^a+1/4*b/c*Pi^(1/2)*f^a*f^(-1/4*b^2/c)/(-c*ln(f))^(1/2)*erf(-(-c*ln(f))^(1/2)*x
+1/2*b*ln(f)/(-c*ln(f))^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.90 \[ \int f^{a+b x+c x^2} x \, dx=\frac {2 \, c f^{c x^{2} + b x + a} + \frac {\sqrt {\pi } \sqrt {-c \log \left (f\right )} b \operatorname {erf}\left (\frac {{\left (2 \, c x + b\right )} \sqrt {-c \log \left (f\right )}}{2 \, c}\right )}{f^{\frac {b^{2} - 4 \, a c}{4 \, c}}}}{4 \, c^{2} \log \left (f\right )} \]

[In]

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

[Out]

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

Sympy [F]

\[ \int f^{a+b x+c x^2} x \, dx=\int f^{a + b x + c x^{2}} x\, dx \]

[In]

integrate(f**(c*x**2+b*x+a)*x,x)

[Out]

Integral(f**(a + b*x + c*x**2)*x, x)

Maxima [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.32 \[ \int f^{a+b x+c x^2} x \, dx=-\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} \log \left (f\right )}{c}}\right ) - 1\right )} \log \left (f\right )^{2}}{\sqrt {-\frac {{\left (2 \, c x + b\right )}^{2} \log \left (f\right )}{c}} \left (c \log \left (f\right )\right )^{\frac {3}{2}}} - \frac {2 \, c f^{\frac {{\left (2 \, c x + b\right )}^{2}}{4 \, c}} \log \left (f\right )}{\left (c \log \left (f\right )\right )^{\frac {3}{2}}}\right )} f^{a - \frac {b^{2}}{4 \, c}}}{4 \, \sqrt {c \log \left (f\right )}} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.99 \[ \int f^{a+b x+c x^2} x \, dx=\frac {\frac {\sqrt {\pi } b \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {-c \log \left (f\right )} {\left (2 \, x + \frac {b}{c}\right )}\right ) e^{\left (-\frac {b^{2} \log \left (f\right ) - 4 \, a c \log \left (f\right )}{4 \, c}\right )}}{\sqrt {-c \log \left (f\right )}} + \frac {2 \, e^{\left (c x^{2} \log \left (f\right ) + b x \log \left (f\right ) + a \log \left (f\right )\right )}}{\log \left (f\right )}}{4 \, c} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.33 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.88 \[ \int f^{a+b x+c x^2} x \, dx=\frac {f^a\,f^{c\,x^2}\,f^{b\,x}}{2\,c\,\ln \left (f\right )}-\frac {b\,f^{a-\frac {b^2}{4\,c}}\,\sqrt {\pi }\,\mathrm {erfi}\left (\frac {\frac {b\,\ln \left (f\right )}{2}+c\,x\,\ln \left (f\right )}{\sqrt {c\,\ln \left (f\right )}}\right )}{4\,c\,\sqrt {c\,\ln \left (f\right )}} \]

[In]

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

[Out]

(f^a*f^(c*x^2)*f^(b*x))/(2*c*log(f)) - (b*f^(a - b^2/(4*c))*pi^(1/2)*erfi(((b*log(f))/2 + c*x*log(f))/(c*log(f
))^(1/2)))/(4*c*(c*log(f))^(1/2))