Optimal. Leaf size=78 \[ -\frac {\sqrt {c} f^{a-\frac {b^2}{4 c}} \sqrt {\pi } \text {erfi}\left (\frac {(b+2 c x) \sqrt {\log (f)}}{2 \sqrt {c}}\right )}{\log ^{\frac {3}{2}}(f)}+\frac {f^{a+b x+c x^2} (b+2 c x)}{\log (f)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2269, 2266,
2235} \begin {gather*} \frac {(b+2 c x) f^{a+b x+c x^2}}{\log (f)}-\frac {\sqrt {\pi } \sqrt {c} f^{a-\frac {b^2}{4 c}} \text {Erfi}\left (\frac {\sqrt {\log (f)} (b+2 c x)}{2 \sqrt {c}}\right )}{\log ^{\frac {3}{2}}(f)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2235
Rule 2266
Rule 2269
Rubi steps
\begin {align*} \int f^{a+b x+c x^2} (b+2 c x)^2 \, dx &=\frac {f^{a+b x+c x^2} (b+2 c x)}{\log (f)}-\frac {(2 c) \int f^{a+b x+c x^2} \, dx}{\log (f)}\\ &=\frac {f^{a+b x+c x^2} (b+2 c x)}{\log (f)}-\frac {\left (2 c f^{a-\frac {b^2}{4 c}}\right ) \int f^{\frac {(b+2 c x)^2}{4 c}} \, dx}{\log (f)}\\ &=-\frac {\sqrt {c} f^{a-\frac {b^2}{4 c}} \sqrt {\pi } \text {erfi}\left (\frac {(b+2 c x) \sqrt {\log (f)}}{2 \sqrt {c}}\right )}{\log ^{\frac {3}{2}}(f)}+\frac {f^{a+b x+c x^2} (b+2 c x)}{\log (f)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.56, size = 86, normalized size = 1.10 \begin {gather*} \frac {f^{a-\frac {b^2}{4 c}} \left (-\sqrt {c} \sqrt {\pi } \text {erfi}\left (\frac {(b+2 c x) \sqrt {\log (f)}}{2 \sqrt {c}}\right )+f^{\frac {(b+2 c x)^2}{4 c}} (b+2 c x) \sqrt {\log (f)}\right )}{\log ^{\frac {3}{2}}(f)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 99, normalized size = 1.27
method | result | size |
risch | \(\frac {2 c x \,f^{c \,x^{2}} f^{b x} f^{a}}{\ln \left (f \right )}+\frac {b \,f^{c \,x^{2}} f^{b x} f^{a}}{\ln \left (f \right )}+\frac {c \sqrt {\pi }\, f^{a} f^{-\frac {b^{2}}{4 c}} \erf \left (-\sqrt {-c \ln \left (f \right )}\, x +\frac {b \ln \left (f \right )}{2 \sqrt {-c \ln \left (f \right )}}\right )}{\ln \left (f \right ) \sqrt {-c \ln \left (f \right )}}\) | \(99\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 332 vs.
\(2 (64) = 128\).
time = 0.41, size = 332, normalized size = 4.26 \begin {gather*} -\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 )} b c f^{a - \frac {b^{2}}{4 \, c}}}{\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 )} c^{2} f^{a - \frac {b^{2}}{4 \, c}}}{2 \, \sqrt {c \log \left (f\right )}} + \frac {\sqrt {\pi } b^{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}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 74, normalized size = 0.95 \begin {gather*} \frac {{\left (2 \, c x + b\right )} f^{c x^{2} + b x + a} \log \left (f\right ) + \frac {\sqrt {\pi } \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}}}}{\log \left (f\right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int f^{a + b x + c x^{2}} \left (b + 2 c x\right )^{2}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.63, size = 88, normalized size = 1.13 \begin {gather*} \frac {c {\left (2 \, x + \frac {b}{c}\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 )} + \frac {\sqrt {\pi } c \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 )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.79, size = 92, normalized size = 1.18 \begin {gather*} \frac {b\,f^a\,f^{c\,x^2}\,f^{b\,x}}{\ln \left (f\right )}-\frac {c\,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 )}{\ln \left (f\right )\,\sqrt {c\,\ln \left (f\right )}}+\frac {2\,c\,f^a\,f^{c\,x^2}\,f^{b\,x}\,x}{\ln \left (f\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________