\(\int f^{a+b x+c x^2} g^{d+e x+f x^2} \, dx\) [65]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   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 = 25, antiderivative size = 95 \[ \int f^{a+b x+c x^2} g^{d+e x+f x^2} \, dx=\frac {e^{-\frac {(b \log (f)+e \log (g))^2}{4 (c \log (f)+f \log (g))}} f^a g^d \sqrt {\pi } \text {erfi}\left (\frac {b \log (f)+e \log (g)+2 x (c \log (f)+f \log (g))}{2 \sqrt {c \log (f)+f \log (g)}}\right )}{2 \sqrt {c \log (f)+f \log (g)}} \]

[Out]

1/2*f^a*g^d*erfi(1/2*(b*ln(f)+e*ln(g)+2*x*(c*ln(f)+f*ln(g)))/(c*ln(f)+f*ln(g))^(1/2))*Pi^(1/2)/exp(1/4*(b*ln(f
)+e*ln(g))^2/(c*ln(f)+f*ln(g)))/(c*ln(f)+f*ln(g))^(1/2)

Rubi [A] (verified)

Time = 0.11 (sec) , antiderivative size = 95, 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.120, Rules used = {2325, 2266, 2235} \[ \int f^{a+b x+c x^2} g^{d+e x+f x^2} \, dx=\frac {\sqrt {\pi } f^a g^d \exp \left (-\frac {(b \log (f)+e \log (g))^2}{4 (c \log (f)+f \log (g))}\right ) \text {erfi}\left (\frac {b \log (f)+2 x (c \log (f)+f \log (g))+e \log (g)}{2 \sqrt {c \log (f)+f \log (g)}}\right )}{2 \sqrt {c \log (f)+f \log (g)}} \]

[In]

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

[Out]

(f^a*g^d*Sqrt[Pi]*Erfi[(b*Log[f] + e*Log[g] + 2*x*(c*Log[f] + f*Log[g]))/(2*Sqrt[c*Log[f] + f*Log[g]])])/(2*E^
((b*Log[f] + e*Log[g])^2/(4*(c*Log[f] + f*Log[g])))*Sqrt[c*Log[f] + f*Log[g]])

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 2325

Int[(u_.)*(F_)^(v_)*(G_)^(w_), x_Symbol] :> With[{z = v*Log[F] + w*Log[G]}, Int[u*NormalizeIntegrand[E^z, x],
x] /; BinomialQ[z, x] || (PolynomialQ[z, x] && LeQ[Exponent[z, x], 2])] /; FreeQ[{F, G}, x]

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

Mathematica [A] (verified)

Time = 0.25 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.98 \[ \int f^{a+b x+c x^2} g^{d+e x+f x^2} \, dx=\frac {e^{-\frac {(b \log (f)+e \log (g))^2}{4 (c \log (f)+f \log (g))}} f^a g^d \sqrt {\pi } \text {erfi}\left (\frac {(b+2 c x) \log (f)+(e+2 f x) \log (g)}{2 \sqrt {c \log (f)+f \log (g)}}\right )}{2 \sqrt {c \log (f)+f \log (g)}} \]

[In]

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

[Out]

(f^a*g^d*Sqrt[Pi]*Erfi[((b + 2*c*x)*Log[f] + (e + 2*f*x)*Log[g])/(2*Sqrt[c*Log[f] + f*Log[g]])])/(2*E^((b*Log[
f] + e*Log[g])^2/(4*(c*Log[f] + f*Log[g])))*Sqrt[c*Log[f] + f*Log[g]])

Maple [F]

\[\int f^{c \,x^{2}+b x +a} g^{f \,x^{2}+e x +d}d x\]

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [F]

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.37 \[ \int f^{a+b x+c x^2} g^{d+e x+f x^2} \, dx=-\frac {f^a\,g^d\,\sqrt {\pi }\,{\mathrm {e}}^{-\frac {b^2\,{\ln \left (f\right )}^2}{4\,\left (c\,\ln \left (f\right )+f\,\ln \left (g\right )\right )}-\frac {e^2\,{\ln \left (g\right )}^2}{4\,\left (c\,\ln \left (f\right )+f\,\ln \left (g\right )\right )}-\frac {b\,e\,\ln \left (f\right )\,\ln \left (g\right )}{2\,\left (c\,\ln \left (f\right )+f\,\ln \left (g\right )\right )}}\,\mathrm {erf}\left (\frac {x\,\left (c\,\ln \left (f\right )+f\,\ln \left (g\right )\right )\,2{}\mathrm {i}+b\,\ln \left (f\right )\,1{}\mathrm {i}+e\,\ln \left (g\right )\,1{}\mathrm {i}}{2\,\sqrt {c\,\ln \left (f\right )+f\,\ln \left (g\right )}}\right )\,1{}\mathrm {i}}{2\,\sqrt {c\,\ln \left (f\right )+f\,\ln \left (g\right )}} \]

[In]

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

[Out]

-(f^a*g^d*pi^(1/2)*exp(- (b^2*log(f)^2)/(4*(c*log(f) + f*log(g))) - (e^2*log(g)^2)/(4*(c*log(f) + f*log(g))) -
 (b*e*log(f)*log(g))/(2*(c*log(f) + f*log(g))))*erf((x*(c*log(f) + f*log(g))*2i + b*log(f)*1i + e*log(g)*1i)/(
2*(c*log(f) + f*log(g))^(1/2)))*1i)/(2*(c*log(f) + f*log(g))^(1/2))