Integrand size = 20, antiderivative size = 189 \[ \int f^{a+b x+c x^2} (d+e x)^2 \, dx=-\frac {e^2 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} \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 f^{a+b x+c x^2} (d+e x)}{2 c \log (f)}+\frac {(2 c d-b e)^2 f^{a-\frac {b^2}{4 c}} \sqrt {\pi } \text {erfi}\left (\frac {(b+2 c x) \sqrt {\log (f)}}{2 \sqrt {c}}\right )}{8 c^{5/2} \sqrt {\log (f)}} \]
[Out]
Time = 0.07 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2273, 2272, 2266, 2235} \[ \int f^{a+b x+c x^2} (d+e x)^2 \, dx=\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)} \]
[In]
[Out]
Rule 2235
Rule 2266
Rule 2272
Rule 2273
Rubi steps \begin{align*} \text {integral}& = \frac {e f^{a+b x+c x^2} (d+e x)}{2 c \log (f)}-\frac {(-2 c d+b e) \int f^{a+b x+c x^2} (d+e x) \, dx}{2 c}-\frac {e^2 \int f^{a+b x+c x^2} \, dx}{2 c \log (f)} \\ & = \frac {e (2 c d-b e) f^{a+b x+c x^2}}{4 c^2 \log (f)}+\frac {e f^{a+b x+c x^2} (d+e x)}{2 c \log (f)}+\frac {(2 c d-b e)^2 \int f^{a+b x+c x^2} \, dx}{4 c^2}-\frac {\left (e^2 f^{a-\frac {b^2}{4 c}}\right ) \int f^{\frac {(b+2 c x)^2}{4 c}} \, dx}{2 c \log (f)} \\ & = -\frac {e^2 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} \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 f^{a+b x+c x^2} (d+e x)}{2 c \log (f)}+\frac {\left ((2 c d-b e)^2 f^{a-\frac {b^2}{4 c}}\right ) \int f^{\frac {(b+2 c x)^2}{4 c}} \, dx}{4 c^2} \\ & = -\frac {e^2 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} \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 f^{a+b x+c x^2} (d+e x)}{2 c \log (f)}+\frac {(2 c d-b e)^2 f^{a-\frac {b^2}{4 c}} \sqrt {\pi } \text {erfi}\left (\frac {(b+2 c x) \sqrt {\log (f)}}{2 \sqrt {c}}\right )}{8 c^{5/2} \sqrt {\log (f)}} \\ \end{align*}
Time = 0.31 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.65 \[ \int f^{a+b x+c x^2} (d+e x)^2 \, dx=\frac {f^{a-\frac {b^2}{4 c}} \left (2 \sqrt {c} e f^{\frac {(b+2 c x)^2}{4 c}} (4 c d-b e+2 c e x) \sqrt {\log (f)}+\sqrt {\pi } \text {erfi}\left (\frac {(b+2 c x) \sqrt {\log (f)}}{2 \sqrt {c}}\right ) \left (-2 c e^2+(-2 c d+b e)^2 \log (f)\right )\right )}{8 c^{5/2} \log ^{\frac {3}{2}}(f)} \]
[In]
[Out]
Time = 0.36 (sec) , antiderivative size = 307, normalized size of antiderivative = 1.62
method | result | size |
risch | \(-\frac {f^{a} d^{2} \sqrt {\pi }\, 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 )}{2 \sqrt {-c \ln \left (f \right )}}+\frac {e^{2} f^{a} x \,f^{b x} f^{c \,x^{2}}}{2 \ln \left (f \right ) c}-\frac {e^{2} f^{a} b \,f^{b x} f^{c \,x^{2}}}{4 c^{2} \ln \left (f \right )}-\frac {e^{2} f^{a} b^{2} \sqrt {\pi }\, 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 )}{8 c^{2} \sqrt {-c \ln \left (f \right )}}+\frac {e^{2} f^{a} \sqrt {\pi }\, 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 \ln \left (f \right ) c \sqrt {-c \ln \left (f \right )}}+\frac {f^{a} d e \,f^{b x} f^{c \,x^{2}}}{\ln \left (f \right ) c}+\frac {f^{a} d e b \sqrt {\pi }\, 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 )}{2 c \sqrt {-c \ln \left (f \right )}}\) | \(307\) |
[In]
[Out]
none
Time = 0.35 (sec) , antiderivative size = 130, normalized size of antiderivative = 0.69 \[ \int f^{a+b x+c x^2} (d+e x)^2 \, dx=\frac {2 \, {\left (2 \, c^{2} e^{2} x + 4 \, c^{2} d e - b c e^{2}\right )} f^{c x^{2} + b x + a} \log \left (f\right ) + \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 )} \sqrt {-c \log \left (f\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 \, c^{3} \log \left (f\right )^{2}} \]
[In]
[Out]
\[ \int f^{a+b x+c x^2} (d+e x)^2 \, dx=\int f^{a + b x + c x^{2}} \left (d + e x\right )^{2}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 332 vs. \(2 (153) = 306\).
Time = 0.35 (sec) , antiderivative size = 332, normalized size of antiderivative = 1.76 \[ \int f^{a+b x+c x^2} (d+e x)^2 \, 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 )} d e f^{a - \frac {b^{2}}{4 \, c}}}{2 \, \sqrt {c \log \left (f\right )}} + \frac {{\left (\frac {\sqrt {\pi } {\left (2 \, c x + b\right )} b^{2} {\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 )^{3}}{\sqrt {-\frac {{\left (2 \, c x + b\right )}^{2} \log \left (f\right )}{c}} \left (c \log \left (f\right )\right )^{\frac {5}{2}}} - \frac {4 \, {\left (2 \, c x + b\right )}^{3} \Gamma \left (\frac {3}{2}, -\frac {{\left (2 \, c x + b\right )}^{2} \log \left (f\right )}{4 \, c}\right ) \log \left (f\right )^{3}}{\left (-\frac {{\left (2 \, c x + b\right )}^{2} \log \left (f\right )}{c}\right )^{\frac {3}{2}} \left (c \log \left (f\right )\right )^{\frac {5}{2}}} - \frac {4 \, b c f^{\frac {{\left (2 \, c x + b\right )}^{2}}{4 \, c}} \log \left (f\right )^{2}}{\left (c \log \left (f\right )\right )^{\frac {5}{2}}}\right )} e^{2} f^{a - \frac {b^{2}}{4 \, c}}}{8 \, \sqrt {c \log \left (f\right )}} + \frac {\sqrt {\pi } d^{2} f^{a} \operatorname {erf}\left (\sqrt {-c \log \left (f\right )} x - \frac {b \log \left (f\right )}{2 \, \sqrt {-c \log \left (f\right )}}\right )}{2 \, \sqrt {-c \log \left (f\right )} f^{\frac {b^{2}}{4 \, c}}} \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 143, normalized size of antiderivative = 0.76 \[ \int f^{a+b x+c x^2} (d+e x)^2 \, dx=-\frac {\frac {\sqrt {\pi } {\left (4 \, c^{2} d^{2} \log \left (f\right ) - 4 \, b c d e \log \left (f\right ) + b^{2} e^{2} \log \left (f\right ) - 2 \, c e^{2}\right )} \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 )} \log \left (f\right )} - \frac {2 \, {\left (c e^{2} {\left (2 \, x + \frac {b}{c}\right )} + 4 \, c d e - 2 \, b e^{2}\right )} 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 )}}{8 \, c^{2}} \]
[In]
[Out]
Time = 0.49 (sec) , antiderivative size = 153, normalized size of antiderivative = 0.81 \[ \int f^{a+b x+c x^2} (d+e x)^2 \, dx=f^a\,f^{c\,x^2}\,f^{b\,x}\,\left (\frac {d\,e}{c\,\ln \left (f\right )}-\frac {b\,e^2}{4\,c^2\,\ln \left (f\right )}\right )+\frac {e^2\,f^a\,f^{c\,x^2}\,f^{b\,x}\,x}{2\,c\,\ln \left (f\right )}-\frac {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 )\,\left (-\frac {\ln \left (f\right )\,b^2\,e^2}{8}+\frac {\ln \left (f\right )\,b\,c\,d\,e}{2}-\frac {\ln \left (f\right )\,c^2\,d^2}{2}+\frac {c\,e^2}{4}\right )}{c^2\,\ln \left (f\right )\,\sqrt {c\,\ln \left (f\right )}} \]
[In]
[Out]