Optimal. Leaf size=45 \[ -\frac {4 c f^{a+b x+c x^2}}{\log ^2(f)}+\frac {f^{a+b x+c x^2} (b+2 c x)^2}{\log (f)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2269, 2268}
\begin {gather*} \frac {(b+2 c x)^2 f^{a+b x+c x^2}}{\log (f)}-\frac {4 c f^{a+b x+c x^2}}{\log ^2(f)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2268
Rule 2269
Rubi steps
\begin {align*} \int f^{a+b x+c x^2} (b+2 c x)^3 \, dx &=\frac {f^{a+b x+c x^2} (b+2 c x)^2}{\log (f)}-\frac {(4 c) \int f^{a+b x+c x^2} (b+2 c x) \, dx}{\log (f)}\\ &=-\frac {4 c f^{a+b x+c x^2}}{\log ^2(f)}+\frac {f^{a+b x+c x^2} (b+2 c x)^2}{\log (f)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.59, size = 31, normalized size = 0.69 \begin {gather*} \frac {f^{a+x (b+c x)} \left (-4 c+(b+2 c x)^2 \log (f)\right )}{\log ^2(f)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 45, normalized size = 1.00
method | result | size |
gosper | \(\frac {\left (4 \ln \left (f \right ) c^{2} x^{2}+4 b c x \ln \left (f \right )+\ln \left (f \right ) b^{2}-4 c \right ) f^{c \,x^{2}+b x +a}}{\ln \left (f \right )^{2}}\) | \(45\) |
risch | \(\frac {\left (4 \ln \left (f \right ) c^{2} x^{2}+4 b c x \ln \left (f \right )+\ln \left (f \right ) b^{2}-4 c \right ) f^{c \,x^{2}+b x +a}}{\ln \left (f \right )^{2}}\) | \(45\) |
norman | \(\frac {\left (\ln \left (f \right ) b^{2}-4 c \right ) {\mathrm e}^{\left (c \,x^{2}+b x +a \right ) \ln \left (f \right )}}{\ln \left (f \right )^{2}}+\frac {4 c^{2} x^{2} {\mathrm e}^{\left (c \,x^{2}+b x +a \right ) \ln \left (f \right )}}{\ln \left (f \right )}+\frac {4 c b x \,{\mathrm e}^{\left (c \,x^{2}+b x +a \right ) \ln \left (f \right )}}{\ln \left (f \right )}\) | \(80\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains higher order function than in optimal. Order 4 vs. order
3.
time = 0.47, size = 539, normalized size = 11.98 \begin {gather*} -\frac {3 \, {\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^{2} c f^{a - \frac {b^{2}}{4 \, c}}}{2 \, \sqrt {c \log \left (f\right )}} + \frac {3 \, {\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 )} b c^{2} 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^{3} {\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 )^{4}}{\sqrt {-\frac {{\left (2 \, c x + b\right )}^{2} \log \left (f\right )}{c}} \left (c \log \left (f\right )\right )^{\frac {7}{2}}} - \frac {12 \, {\left (2 \, c x + b\right )}^{3} b \Gamma \left (\frac {3}{2}, -\frac {{\left (2 \, c x + b\right )}^{2} \log \left (f\right )}{4 \, c}\right ) \log \left (f\right )^{4}}{\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 {7}{2}}} - \frac {6 \, b^{2} c f^{\frac {{\left (2 \, c x + b\right )}^{2}}{4 \, c}} \log \left (f\right )^{3}}{\left (c \log \left (f\right )\right )^{\frac {7}{2}}} + \frac {8 \, c^{2} \Gamma \left (2, -\frac {{\left (2 \, c x + b\right )}^{2} \log \left (f\right )}{4 \, c}\right ) \log \left (f\right )^{2}}{\left (c \log \left (f\right )\right )^{\frac {7}{2}}}\right )} c^{3} f^{a - \frac {b^{2}}{4 \, c}}}{2 \, \sqrt {c \log \left (f\right )}} + \frac {\sqrt {\pi } b^{3} 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.38, size = 41, normalized size = 0.91 \begin {gather*} \frac {{\left ({\left (4 \, c^{2} x^{2} + 4 \, b c x + b^{2}\right )} \log \left (f\right ) - 4 \, c\right )} f^{c x^{2} + b x + a}}{\log \left (f\right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 85 vs.
\(2 (42) = 84\).
time = 0.06, size = 85, normalized size = 1.89 \begin {gather*} \begin {cases} \frac {f^{a + b x + c x^{2}} \left (b^{2} \log {\left (f \right )} + 4 b c x \log {\left (f \right )} + 4 c^{2} x^{2} \log {\left (f \right )} - 4 c\right )}{\log {\left (f \right )}^{2}} & \text {for}\: \log {\left (f \right )}^{2} \neq 0 \\b^{3} x + 3 b^{2} c x^{2} + 4 b c^{2} x^{3} + 2 c^{3} x^{4} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] Result contains complex when optimal does not.
time = 2.85, size = 798, normalized size = 17.73 \begin {gather*} {\left (2 \, {\left (\frac {{\left (b^{2} \log \left ({\left | f \right |}\right ) + 4 \, {\left (c x^{2} + b x\right )} c \log \left ({\left | f \right |}\right ) - 4 \, c\right )} {\left (\pi ^{2} \mathrm {sgn}\left (f\right ) - \pi ^{2} + 2 \, \log \left ({\left | f \right |}\right )^{2}\right )}}{{\left (\pi ^{2} \mathrm {sgn}\left (f\right ) - \pi ^{2} + 2 \, \log \left ({\left | f \right |}\right )^{2}\right )}^{2} + 4 \, {\left (\pi \log \left ({\left | f \right |}\right ) \mathrm {sgn}\left (f\right ) - \pi \log \left ({\left | f \right |}\right )\right )}^{2}} + \frac {{\left (\pi b^{2} \mathrm {sgn}\left (f\right ) + 4 \, \pi {\left (c x^{2} + b x\right )} c \mathrm {sgn}\left (f\right ) - \pi b^{2} - 4 \, \pi {\left (c x^{2} + b x\right )} c\right )} {\left (\pi \log \left ({\left | f \right |}\right ) \mathrm {sgn}\left (f\right ) - \pi \log \left ({\left | f \right |}\right )\right )}}{{\left (\pi ^{2} \mathrm {sgn}\left (f\right ) - \pi ^{2} + 2 \, \log \left ({\left | f \right |}\right )^{2}\right )}^{2} + 4 \, {\left (\pi \log \left ({\left | f \right |}\right ) \mathrm {sgn}\left (f\right ) - \pi \log \left ({\left | f \right |}\right )\right )}^{2}}\right )} \cos \left (-\frac {1}{2} \, \pi c x^{2} \mathrm {sgn}\left (f\right ) + \frac {1}{2} \, \pi c x^{2} - \frac {1}{2} \, \pi b x \mathrm {sgn}\left (f\right ) + \frac {1}{2} \, \pi b x - \frac {1}{2} \, \pi a \mathrm {sgn}\left (f\right ) + \frac {1}{2} \, \pi a\right ) + {\left (\frac {{\left (\pi b^{2} \mathrm {sgn}\left (f\right ) + 4 \, \pi {\left (c x^{2} + b x\right )} c \mathrm {sgn}\left (f\right ) - \pi b^{2} - 4 \, \pi {\left (c x^{2} + b x\right )} c\right )} {\left (\pi ^{2} \mathrm {sgn}\left (f\right ) - \pi ^{2} + 2 \, \log \left ({\left | f \right |}\right )^{2}\right )}}{{\left (\pi ^{2} \mathrm {sgn}\left (f\right ) - \pi ^{2} + 2 \, \log \left ({\left | f \right |}\right )^{2}\right )}^{2} + 4 \, {\left (\pi \log \left ({\left | f \right |}\right ) \mathrm {sgn}\left (f\right ) - \pi \log \left ({\left | f \right |}\right )\right )}^{2}} - \frac {4 \, {\left (b^{2} \log \left ({\left | f \right |}\right ) + 4 \, {\left (c x^{2} + b x\right )} c \log \left ({\left | f \right |}\right ) - 4 \, c\right )} {\left (\pi \log \left ({\left | f \right |}\right ) \mathrm {sgn}\left (f\right ) - \pi \log \left ({\left | f \right |}\right )\right )}}{{\left (\pi ^{2} \mathrm {sgn}\left (f\right ) - \pi ^{2} + 2 \, \log \left ({\left | f \right |}\right )^{2}\right )}^{2} + 4 \, {\left (\pi \log \left ({\left | f \right |}\right ) \mathrm {sgn}\left (f\right ) - \pi \log \left ({\left | f \right |}\right )\right )}^{2}}\right )} \sin \left (-\frac {1}{2} \, \pi c x^{2} \mathrm {sgn}\left (f\right ) + \frac {1}{2} \, \pi c x^{2} - \frac {1}{2} \, \pi b x \mathrm {sgn}\left (f\right ) + \frac {1}{2} \, \pi b x - \frac {1}{2} \, \pi a \mathrm {sgn}\left (f\right ) + \frac {1}{2} \, \pi a\right )\right )} e^{\left ({\left (c x^{2} + b x\right )} \log \left ({\left | f \right |}\right ) + a \log \left ({\left | f \right |}\right )\right )} - \frac {1}{2} i \, {\left (\frac {{\left (\pi b^{2} \mathrm {sgn}\left (f\right ) + 4 \, \pi {\left (c x^{2} + b x\right )} c \mathrm {sgn}\left (f\right ) - \pi b^{2} - 4 \, \pi {\left (c x^{2} + b x\right )} c - 2 i \, b^{2} \log \left ({\left | f \right |}\right ) + 8 \, {\left (-i \, c x^{2} - i \, b x\right )} c \log \left ({\left | f \right |}\right ) + 8 i \, c\right )} e^{\left (\frac {1}{2} i \, \pi c x^{2} \mathrm {sgn}\left (f\right ) - \frac {1}{2} i \, \pi c x^{2} + \frac {1}{2} i \, \pi b x \mathrm {sgn}\left (f\right ) - \frac {1}{2} i \, \pi b x + \frac {1}{2} i \, \pi a \mathrm {sgn}\left (f\right ) - \frac {1}{2} i \, \pi a\right )}}{\pi ^{2} \mathrm {sgn}\left (f\right ) + 2 i \, \pi \log \left ({\left | f \right |}\right ) \mathrm {sgn}\left (f\right ) - \pi ^{2} - 2 i \, \pi \log \left ({\left | f \right |}\right ) + 2 \, \log \left ({\left | f \right |}\right )^{2}} + \frac {{\left (\pi b^{2} \mathrm {sgn}\left (f\right ) + 4 \, \pi {\left (c x^{2} + b x\right )} c \mathrm {sgn}\left (f\right ) - \pi b^{2} - 4 \, \pi {\left (c x^{2} + b x\right )} c + 2 i \, b^{2} \log \left ({\left | f \right |}\right ) - 8 \, {\left (-i \, c x^{2} - i \, b x\right )} c \log \left ({\left | f \right |}\right ) - 8 i \, c\right )} e^{\left (-\frac {1}{2} i \, \pi c x^{2} \mathrm {sgn}\left (f\right ) + \frac {1}{2} i \, \pi c x^{2} - \frac {1}{2} i \, \pi b x \mathrm {sgn}\left (f\right ) + \frac {1}{2} i \, \pi b x - \frac {1}{2} i \, \pi a \mathrm {sgn}\left (f\right ) + \frac {1}{2} i \, \pi a\right )}}{\pi ^{2} \mathrm {sgn}\left (f\right ) - 2 i \, \pi \log \left ({\left | f \right |}\right ) \mathrm {sgn}\left (f\right ) - \pi ^{2} + 2 i \, \pi \log \left ({\left | f \right |}\right ) + 2 \, \log \left ({\left | f \right |}\right )^{2}}\right )} e^{\left ({\left (c x^{2} + b x\right )} \log \left ({\left | f \right |}\right ) + a \log \left ({\left | f \right |}\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.81, size = 44, normalized size = 0.98 \begin {gather*} \frac {f^{c\,x^2+b\,x+a}\,\left (\ln \left (f\right )\,b^2+4\,\ln \left (f\right )\,b\,c\,x+4\,\ln \left (f\right )\,c^2\,x^2-4\,c\right )}{{\ln \left (f\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________