3.445 \(\int f^{a+b x+c x^2} (d+e x)^2 \, dx\)

Optimal. Leaf size=189 \[ \frac{\sqrt{\pi } f^{a-\frac{b^2}{4 c}} (2 c d-b e)^2 \text{Erfi}\left (\frac{\sqrt{\log (f)} (b+2 c x)}{2 \sqrt{c}}\right )}{8 c^{5/2} \sqrt{\log (f)}}-\frac{\sqrt{\pi } e^2 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} \log ^{\frac{3}{2}}(f)}+\frac{e (2 c d-b e) f^{a+b x+c x^2}}{4 c^2 \log (f)}+\frac{e (d+e x) f^{a+b x+c x^2}}{2 c \log (f)} \]

[Out]

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

_______________________________________________________________________________________

Rubi [A]  time = 0.234974, antiderivative size = 189, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2 \[ \frac{\sqrt{\pi } f^{a-\frac{b^2}{4 c}} (2 c d-b e)^2 \text{Erfi}\left (\frac{\sqrt{\log (f)} (b+2 c x)}{2 \sqrt{c}}\right )}{8 c^{5/2} \sqrt{\log (f)}}-\frac{\sqrt{\pi } e^2 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} \log ^{\frac{3}{2}}(f)}+\frac{e (2 c d-b e) f^{a+b x+c x^2}}{4 c^2 \log (f)}+\frac{e (d+e x) f^{a+b x+c x^2}}{2 c \log (f)} \]

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ - \frac{e^{2} f^{a - \frac{b^{2}}{4 c}} \int f^{\frac{\left (b + 2 c x\right )^{2}}{4 c}}\, dx}{2 c \log{\left (f \right )}} + \frac{e f^{a + b x + c x^{2}} \left (d + e x\right )}{2 c \log{\left (f \right )}} - \frac{e f^{a + b x + c x^{2}} \left (b e - 2 c d\right )}{4 c^{2} \log{\left (f \right )}} + \frac{f^{a} f^{- \frac{b^{2}}{4 c}} \left (b e - 2 c d\right )^{2} \int f^{\frac{\left (b + 2 c x\right )^{2}}{4 c}}\, dx}{4 c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(f**(c*x**2+b*x+a)*(e*x+d)**2,x)

[Out]

-e**2*f**(a - b**2/(4*c))*Integral(f**((b + 2*c*x)**2/(4*c)), x)/(2*c*log(f)) +
e*f**(a + b*x + c*x**2)*(d + e*x)/(2*c*log(f)) - e*f**(a + b*x + c*x**2)*(b*e -
2*c*d)/(4*c**2*log(f)) + f**a*f**(-b**2/(4*c))*(b*e - 2*c*d)**2*Integral(f**((b
+ 2*c*x)**2/(4*c)), x)/(4*c**2)

_______________________________________________________________________________________

Mathematica [A]  time = 0.195307, size = 123, normalized size = 0.65 \[ \frac{f^{a-\frac{b^2}{4 c}} \left (\sqrt{\pi } \left (\log (f) (b e-2 c d)^2-2 c e^2\right ) \text{Erfi}\left (\frac{\sqrt{\log (f)} (b+2 c x)}{2 \sqrt{c}}\right )+2 \sqrt{c} e \sqrt{\log (f)} f^{\frac{(b+2 c x)^2}{4 c}} (-b e+4 c d+2 c e x)\right )}{8 c^{5/2} \log ^{\frac{3}{2}}(f)} \]

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Maple [B]  time = 0.044, size = 314, normalized size = 1.7 \[ -{\frac{\sqrt{\pi }{d}^{2}}{2}{f}^{{\frac{4\,ac-{b}^{2}}{4\,c}}}{\it Erf} \left ( -\sqrt{-c\ln \left ( f \right ) }x+{\frac{b\ln \left ( f \right ) }{2}{\frac{1}{\sqrt{-c\ln \left ( f \right ) }}}} \right ){\frac{1}{\sqrt{-c\ln \left ( f \right ) }}}}+{\frac{{e}^{2}{f}^{c{x}^{2}+bx+a}x}{2\,c\ln \left ( f \right ) }}-{\frac{b{e}^{2}{f}^{c{x}^{2}+bx+a}}{4\,{c}^{2}\ln \left ( f \right ) }}-{\frac{{b}^{2}{e}^{2}\sqrt{\pi }}{8\,{c}^{2}}{f}^{{\frac{4\,ac-{b}^{2}}{4\,c}}}{\it Erf} \left ( -\sqrt{-c\ln \left ( f \right ) }x+{\frac{b\ln \left ( f \right ) }{2}{\frac{1}{\sqrt{-c\ln \left ( f \right ) }}}} \right ){\frac{1}{\sqrt{-c\ln \left ( f \right ) }}}}+{\frac{{e}^{2}\sqrt{\pi }}{4\,c\ln \left ( f \right ) }{f}^{{\frac{4\,ac-{b}^{2}}{4\,c}}}{\it Erf} \left ( -\sqrt{-c\ln \left ( f \right ) }x+{\frac{b\ln \left ( f \right ) }{2}{\frac{1}{\sqrt{-c\ln \left ( f \right ) }}}} \right ){\frac{1}{\sqrt{-c\ln \left ( f \right ) }}}}+{\frac{ed{f}^{c{x}^{2}+bx+a}}{c\ln \left ( f \right ) }}+{\frac{edb\sqrt{\pi }}{2\,c}{f}^{{\frac{4\,ac-{b}^{2}}{4\,c}}}{\it Erf} \left ( -\sqrt{-c\ln \left ( f \right ) }x+{\frac{b\ln \left ( f \right ) }{2}{\frac{1}{\sqrt{-c\ln \left ( f \right ) }}}} \right ){\frac{1}{\sqrt{-c\ln \left ( f \right ) }}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(f^(c*x^2+b*x+a)*(e*x+d)^2,x)

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 0.928673, size = 547, normalized size = 2.89 \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x + d)^2*f^(c*x^2 + b*x + a),x, algorithm="maxima")

[Out]

1/2*sqrt(pi)*d^2*f^a*erf(sqrt(-c*log(f))*x - 1/2*b*log(f)/sqrt(-c*log(f)))/(sqrt
(-c*log(f))*f^(1/4*b^2/c)) - 1/2*(sqrt(pi)*(2*c*x*log(f) + b*log(f))*b*(erf(1/2*
sqrt(-(2*c*x*log(f) + b*log(f))^2/(c*log(f)))) - 1)*log(f)/((c*log(f))^(3/2)*sqr
t(-(2*c*x*log(f) + b*log(f))^2/(c*log(f)))) - 2*c*e^(1/4*(2*c*x*log(f) + b*log(f
))^2/(c*log(f)))*log(f)/(c*log(f))^(3/2))*d*e*f^a/(sqrt(c*log(f))*f^(1/4*b^2/c))
 + 1/8*(sqrt(pi)*(2*c*x*log(f) + b*log(f))*b^2*(erf(1/2*sqrt(-(2*c*x*log(f) + b*
log(f))^2/(c*log(f)))) - 1)*log(f)^2/((c*log(f))^(5/2)*sqrt(-(2*c*x*log(f) + b*l
og(f))^2/(c*log(f)))) - 4*b*c*e^(1/4*(2*c*x*log(f) + b*log(f))^2/(c*log(f)))*log
(f)^2/(c*log(f))^(5/2) - 4*(2*c*x*log(f) + b*log(f))^3*gamma(3/2, -1/4*(2*c*x*lo
g(f) + b*log(f))^2/(c*log(f)))/((c*log(f))^(5/2)*(-(2*c*x*log(f) + b*log(f))^2/(
c*log(f)))^(3/2)))*e^2*f^a/(sqrt(c*log(f))*f^(1/4*b^2/c))

_______________________________________________________________________________________

Fricas [A]  time = 0.306846, size = 177, normalized size = 0.94 \[ \frac{2 \,{\left (2 \, c e^{2} x + 4 \, c d e - b e^{2}\right )} \sqrt{-c \log \left (f\right )} f^{c x^{2} + b x + a} - \frac{\sqrt{\pi }{\left (2 \, c e^{2} -{\left (4 \, c^{2} d^{2} - 4 \, b c d e + b^{2} e^{2}\right )} \log \left (f\right )\right )} \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}}}}{8 \, \sqrt{-c \log \left (f\right )} c^{2} \log \left (f\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x + d)^2*f^(c*x^2 + b*x + a),x, algorithm="fricas")

[Out]

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

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(f**(c*x**2+b*x+a)*(e*x+d)**2,x)

[Out]

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

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.268567, size = 340, normalized size = 1.8 \[ -\frac{\sqrt{\pi } d^{2} \operatorname{erf}\left (-\frac{1}{2} \, \sqrt{-c{\rm ln}\left (f\right )}{\left (2 \, x + \frac{b}{c}\right )}\right ) e^{\left (-\frac{b^{2}{\rm ln}\left (f\right ) - 4 \, a c{\rm ln}\left (f\right )}{4 \, c}\right )}}{2 \, \sqrt{-c{\rm ln}\left (f\right )}} + \frac{\frac{\sqrt{\pi } b d \operatorname{erf}\left (-\frac{1}{2} \, \sqrt{-c{\rm ln}\left (f\right )}{\left (2 \, x + \frac{b}{c}\right )}\right ) e^{\left (-\frac{b^{2}{\rm ln}\left (f\right ) - 4 \, a c{\rm ln}\left (f\right ) - 4 \, c}{4 \, c}\right )}}{\sqrt{-c{\rm ln}\left (f\right )}} + \frac{2 \, d e^{\left (c x^{2}{\rm ln}\left (f\right ) + b x{\rm ln}\left (f\right ) + a{\rm ln}\left (f\right ) + 1\right )}}{{\rm ln}\left (f\right )}}{2 \, c} - \frac{\frac{\sqrt{\pi }{\left (b^{2}{\rm ln}\left (f\right ) - 2 \, c\right )} \operatorname{erf}\left (-\frac{1}{2} \, \sqrt{-c{\rm ln}\left (f\right )}{\left (2 \, x + \frac{b}{c}\right )}\right ) e^{\left (-\frac{b^{2}{\rm ln}\left (f\right ) - 4 \, a c{\rm ln}\left (f\right ) - 8 \, c}{4 \, c}\right )}}{\sqrt{-c{\rm ln}\left (f\right )}{\rm ln}\left (f\right )} - \frac{2 \,{\left (c{\left (2 \, x + \frac{b}{c}\right )} - 2 \, b\right )} e^{\left (c x^{2}{\rm ln}\left (f\right ) + b x{\rm ln}\left (f\right ) + a{\rm ln}\left (f\right ) + 2\right )}}{{\rm ln}\left (f\right )}}{8 \, c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x + d)^2*f^(c*x^2 + b*x + a),x, algorithm="giac")

[Out]

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