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

Optimal. Leaf size=95 \[ \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)}} \]

[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]])

________________________________________________________________________________________

Rubi [A]  time = 0.180561, antiderivative size = 95, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.12, Rules used = {2287, 2234, 2204} \[ \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)}} \]

Antiderivative was successfully verified.

[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 2287

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]

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 f^{a+b x+c x^2} g^{d+e x+f x^2} \, dx &=\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]  time = 0.0646792, size = 93, normalized size = 0.98 \[ \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{\log (f) (b+2 c x)+\log (g) (e+2 f x)}{2 \sqrt{c \log (f)+f \log (g)}}\right )}{2 \sqrt{c \log (f)+f \log (g)}} \]

Antiderivative was successfully verified.

[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]  time = 0.027, size = 0, normalized size = 0. \begin{align*} \int{f}^{c{x}^{2}+bx+a}{g}^{f{x}^{2}+ex+d}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

Maxima [A]  time = 1.07988, size = 122, normalized size = 1.28 \begin{align*} \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 )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[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))

________________________________________________________________________________________

Fricas [A]  time = 1.55353, size = 385, normalized size = 4.05 \begin{align*} -\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 )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[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]  time = 0., size = 0, normalized size = 0. \begin{align*} \int f^{a + b x + c x^{2}} g^{d + e x + f x^{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

Giac [A]  time = 1.19354, size = 177, normalized size = 1.86 \begin{align*} -\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 ) - 4 \, a f \log \left (f\right ) \log \left (g\right ) + 2 \, b e \log \left (f\right ) \log \left (g\right ) - 4 \, d f \log \left (g\right )^{2} + e^{2} \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 )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[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) - 4*a*f*log(f)*log(g) + 2*b*e*log(f)*log(g) - 4*d*f*log(
g)^2 + e^2*log(g)^2)/(c*log(f) + f*log(g)))/sqrt(-c*log(f) - f*log(g))