Optimal. Leaf size=372 \[ \frac {e^{-\frac {1}{b f n^2 \log (F)}} F^{a f} h (e g-d h) \sqrt {\pi } (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n} \text {erfi}\left (\frac {1+b f n \log (F) \log \left (c (d+e x)^n\right )}{\sqrt {b} \sqrt {f} n \sqrt {\log (F)}}\right )}{\sqrt {b} e^3 \sqrt {f} n \sqrt {\log (F)}}+\frac {e^{-\frac {1}{4 b f n^2 \log (F)}} F^{a f} (e g-d h)^2 \sqrt {\pi } (d+e x) \left (c (d+e x)^n\right )^{-1/n} \text {erfi}\left (\frac {1+2 b f n \log (F) \log \left (c (d+e x)^n\right )}{2 \sqrt {b} \sqrt {f} n \sqrt {\log (F)}}\right )}{2 \sqrt {b} e^3 \sqrt {f} n \sqrt {\log (F)}}+\frac {e^{-\frac {9}{4 b f n^2 \log (F)}} F^{a f} h^2 \sqrt {\pi } (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n} \text {erfi}\left (\frac {3+2 b f n \log (F) \log \left (c (d+e x)^n\right )}{2 \sqrt {b} \sqrt {f} n \sqrt {\log (F)}}\right )}{2 \sqrt {b} e^3 \sqrt {f} n \sqrt {\log (F)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.47, antiderivative size = 372, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 5, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {2309, 2307,
2266, 2235, 2308} \begin {gather*} \frac {\sqrt {\pi } h F^{a f} (d+e x)^2 (e g-d h) e^{-\frac {1}{b f n^2 \log (F)}} \left (c (d+e x)^n\right )^{-2/n} \text {Erfi}\left (\frac {b f n \log (F) \log \left (c (d+e x)^n\right )+1}{\sqrt {b} \sqrt {f} n \sqrt {\log (F)}}\right )}{\sqrt {b} e^3 \sqrt {f} n \sqrt {\log (F)}}+\frac {\sqrt {\pi } F^{a f} (d+e x) (e g-d h)^2 e^{-\frac {1}{4 b f n^2 \log (F)}} \left (c (d+e x)^n\right )^{-1/n} \text {Erfi}\left (\frac {2 b f n \log (F) \log \left (c (d+e x)^n\right )+1}{2 \sqrt {b} \sqrt {f} n \sqrt {\log (F)}}\right )}{2 \sqrt {b} e^3 \sqrt {f} n \sqrt {\log (F)}}+\frac {\sqrt {\pi } h^2 F^{a f} (d+e x)^3 e^{-\frac {9}{4 b f n^2 \log (F)}} \left (c (d+e x)^n\right )^{-3/n} \text {Erfi}\left (\frac {2 b f n \log (F) \log \left (c (d+e x)^n\right )+3}{2 \sqrt {b} \sqrt {f} n \sqrt {\log (F)}}\right )}{2 \sqrt {b} e^3 \sqrt {f} n \sqrt {\log (F)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2235
Rule 2266
Rule 2307
Rule 2308
Rule 2309
Rubi steps
\begin {align*} \int F^{f \left (a+b \log ^2\left (c (d+e x)^n\right )\right )} (g+h x)^2 \, dx &=\int \left (F^{f \left (a+b \log ^2\left (c (d+e x)^n\right )\right )} g^2+2 F^{f \left (a+b \log ^2\left (c (d+e x)^n\right )\right )} g h x+F^{f \left (a+b \log ^2\left (c (d+e x)^n\right )\right )} h^2 x^2\right ) \, dx\\ &=g^2 \int F^{f \left (a+b \log ^2\left (c (d+e x)^n\right )\right )} \, dx+(2 g h) \int F^{f \left (a+b \log ^2\left (c (d+e x)^n\right )\right )} x \, dx+h^2 \int F^{f \left (a+b \log ^2\left (c (d+e x)^n\right )\right )} x^2 \, dx\\ &=\frac {g^2 \text {Subst}\left (\int F^{f \left (a+b \log ^2\left (c x^n\right )\right )} \, dx,x,d+e x\right )}{e}+(2 g h) \int F^{f \left (a+b \log ^2\left (c (d+e x)^n\right )\right )} x \, dx+h^2 \int F^{f \left (a+b \log ^2\left (c (d+e x)^n\right )\right )} x^2 \, dx\\ &=(2 g h) \int F^{f \left (a+b \log ^2\left (c (d+e x)^n\right )\right )} x \, dx+h^2 \int F^{f \left (a+b \log ^2\left (c (d+e x)^n\right )\right )} x^2 \, dx+\frac {\left (g^2 (d+e x) \left (c (d+e x)^n\right )^{-1/n}\right ) \text {Subst}\left (\int e^{\frac {x}{n}+a f \log (F)+b f x^2 \log (F)} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{e n}\\ &=(2 g h) \int F^{f \left (a+b \log ^2\left (c (d+e x)^n\right )\right )} x \, dx+h^2 \int F^{f \left (a+b \log ^2\left (c (d+e x)^n\right )\right )} x^2 \, dx+\frac {\left (e^{-\frac {1}{4 b f n^2 \log (F)}} F^{a f} g^2 (d+e x) \left (c (d+e x)^n\right )^{-1/n}\right ) \text {Subst}\left (\int e^{\frac {\left (\frac {1}{n}+2 b f x \log (F)\right )^2}{4 b f \log (F)}} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{e n}\\ &=\frac {e^{-\frac {1}{4 b f n^2 \log (F)}} F^{a f} g^2 \sqrt {\pi } (d+e x) \left (c (d+e x)^n\right )^{-1/n} \text {erfi}\left (\frac {1+2 b f n \log (F) \log \left (c (d+e x)^n\right )}{2 \sqrt {b} \sqrt {f} n \sqrt {\log (F)}}\right )}{2 \sqrt {b} e \sqrt {f} n \sqrt {\log (F)}}+(2 g h) \int F^{f \left (a+b \log ^2\left (c (d+e x)^n\right )\right )} x \, dx+h^2 \int F^{f \left (a+b \log ^2\left (c (d+e x)^n\right )\right )} x^2 \, dx\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.45, size = 303, normalized size = 0.81 \begin {gather*} \frac {e^{-\frac {9}{4 b f n^2 \log (F)}} F^{a f} \sqrt {\pi } (d+e x) \left (c (d+e x)^n\right )^{-3/n} \left (-2 e^{\frac {5}{4 b f n^2 \log (F)}} h (-e g+d h) (d+e x) \left (c (d+e x)^n\right )^{\frac {1}{n}} \text {erfi}\left (\frac {1+b f n \log (F) \log \left (c (d+e x)^n\right )}{\sqrt {b} \sqrt {f} n \sqrt {\log (F)}}\right )+e^{\frac {2}{b f n^2 \log (F)}} (e g-d h)^2 \left (c (d+e x)^n\right )^{2/n} \text {erfi}\left (\frac {1+2 b f n \log (F) \log \left (c (d+e x)^n\right )}{2 \sqrt {b} \sqrt {f} n \sqrt {\log (F)}}\right )+h^2 (d+e x)^2 \text {erfi}\left (\frac {3+2 b f n \log (F) \log \left (c (d+e x)^n\right )}{2 \sqrt {b} \sqrt {f} n \sqrt {\log (F)}}\right )\right )}{2 \sqrt {b} e^3 \sqrt {f} n \sqrt {\log (F)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.03, size = 0, normalized size = 0.00 \[\int F^{f \left (a +b \ln \left (c \left (e x +d \right )^{n}\right )^{2}\right )} \left (h x +g \right )^{2}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 370, normalized size = 0.99 \begin {gather*} -\frac {{\left (\sqrt {\pi } \sqrt {-b f n^{2} \log \left (F\right )} h^{2} \operatorname {erf}\left (\frac {{\left (2 \, b f n^{2} \log \left (x e + d\right ) \log \left (F\right ) + 2 \, b f n \log \left (F\right ) \log \left (c\right ) + 3\right )} \sqrt {-b f n^{2} \log \left (F\right )}}{2 \, b f n^{2} \log \left (F\right )}\right ) e^{\left (\frac {4 \, a b f^{2} n^{2} \log \left (F\right )^{2} - 12 \, b f n \log \left (F\right ) \log \left (c\right ) - 9}{4 \, b f n^{2} \log \left (F\right )}\right )} + \sqrt {\pi } \sqrt {-b f n^{2} \log \left (F\right )} {\left (d^{2} h^{2} - 2 \, d g h e + g^{2} e^{2}\right )} \operatorname {erf}\left (\frac {{\left (2 \, b f n^{2} \log \left (x e + d\right ) \log \left (F\right ) + 2 \, b f n \log \left (F\right ) \log \left (c\right ) + 1\right )} \sqrt {-b f n^{2} \log \left (F\right )}}{2 \, b f n^{2} \log \left (F\right )}\right ) e^{\left (\frac {4 \, a b f^{2} n^{2} \log \left (F\right )^{2} - 4 \, b f n \log \left (F\right ) \log \left (c\right ) - 1}{4 \, b f n^{2} \log \left (F\right )}\right )} - 2 \, \sqrt {\pi } \sqrt {-b f n^{2} \log \left (F\right )} {\left (d h^{2} - g h e\right )} \operatorname {erf}\left (\frac {{\left (b f n^{2} \log \left (x e + d\right ) \log \left (F\right ) + b f n \log \left (F\right ) \log \left (c\right ) + 1\right )} \sqrt {-b f n^{2} \log \left (F\right )}}{b f n^{2} \log \left (F\right )}\right ) e^{\left (\frac {a b f^{2} n^{2} \log \left (F\right )^{2} - 2 \, b f n \log \left (F\right ) \log \left (c\right ) - 1}{b f n^{2} \log \left (F\right )}\right )}\right )} e^{\left (-3\right )}}{2 \, n} \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. 1068 vs.
\(2 (343) = 686\).
time = 117.72, size = 1068, normalized size = 2.87 \begin {gather*} \begin {cases} - \frac {11 F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} b d^{3} f h^{2} n^{2} \log {\left (F \right )}}{9 e^{3}} - \frac {11 F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} b d^{3} f h^{2} n \log {\left (F \right )} \log {\left (c \left (d + e x\right )^{n} \right )}}{9 e^{3}} + \frac {3 F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} b d^{2} f g h n^{2} \log {\left (F \right )}}{e^{2}} + \frac {3 F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} b d^{2} f g h n \log {\left (F \right )} \log {\left (c \left (d + e x\right )^{n} \right )}}{e^{2}} + \frac {11 F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} b d^{2} f h^{2} n^{2} x \log {\left (F \right )}}{9 e^{2}} - \frac {2 F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} b d^{2} f h^{2} n x \log {\left (F \right )} \log {\left (c \left (d + e x\right )^{n} \right )}}{3 e^{2}} - \frac {2 F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} b d f g^{2} n^{2} \log {\left (F \right )}}{e} - \frac {2 F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} b d f g^{2} n \log {\left (F \right )} \log {\left (c \left (d + e x\right )^{n} \right )}}{e} - \frac {3 F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} b d f g h n^{2} x \log {\left (F \right )}}{e} + \frac {2 F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} b d f g h n x \log {\left (F \right )} \log {\left (c \left (d + e x\right )^{n} \right )}}{e} - \frac {5 F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} b d f h^{2} n^{2} x^{2} \log {\left (F \right )}}{18 e} + \frac {F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} b d f h^{2} n x^{2} \log {\left (F \right )} \log {\left (c \left (d + e x\right )^{n} \right )}}{3 e} + 2 F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} b f g^{2} n^{2} x \log {\left (F \right )} - 2 F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} b f g^{2} n x \log {\left (F \right )} \log {\left (c \left (d + e x\right )^{n} \right )} + \frac {F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} b f g h n^{2} x^{2} \log {\left (F \right )}}{2} - F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} b f g h n x^{2} \log {\left (F \right )} \log {\left (c \left (d + e x\right )^{n} \right )} + \frac {2 F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} b f h^{2} n^{2} x^{3} \log {\left (F \right )}}{27} - \frac {2 F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} b f h^{2} n x^{3} \log {\left (F \right )} \log {\left (c \left (d + e x\right )^{n} \right )}}{9} + \frac {F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} d^{3} h^{2}}{3 e^{3}} - \frac {F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} d^{2} g h}{e^{2}} + \frac {F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} d g^{2}}{e} + F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} g^{2} x + F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} g h x^{2} + \frac {F^{a f} F^{b f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}} h^{2} x^{3}}{3} & \text {for}\: e \neq 0 \\F^{f \left (a + b \log {\left (c d^{n} \right )}^{2}\right )} \left (g^{2} x + g h x^{2} + \frac {h^{2} x^{3}}{3}\right ) & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\mathrm {e}}^{f\,\ln \left (F\right )\,\left (b\,{\ln \left (c\,{\left (d+e\,x\right )}^n\right )}^2+a\right )}\,{\left (g+h\,x\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________