\(\int F^{f (a+b \log (c (d+e x)^n))^2} (g+h x) \, dx\) [612]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 26, antiderivative size = 257 \[ \int F^{f \left (a+b \log \left (c (d+e x)^n\right )\right )^2} (g+h x) \, dx=\frac {e^{-\frac {1+2 a b f n \log (F)}{b^2 f n^2 \log (F)}} h \sqrt {\pi } (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n} \text {erfi}\left (\frac {\frac {1}{n}+a b f \log (F)+b^2 f \log (F) \log \left (c (d+e x)^n\right )}{b \sqrt {f} \sqrt {\log (F)}}\right )}{2 b e^2 \sqrt {f} n \sqrt {\log (F)}}+\frac {e^{-\frac {1+4 a b f n \log (F)}{4 b^2 f n^2 \log (F)}} (e g-d h) \sqrt {\pi } (d+e x) \left (c (d+e x)^n\right )^{-1/n} \text {erfi}\left (\frac {\frac {1}{n}+2 a b f \log (F)+2 b^2 f \log (F) \log \left (c (d+e x)^n\right )}{2 b \sqrt {f} \sqrt {\log (F)}}\right )}{2 b e^2 \sqrt {f} n \sqrt {\log (F)}} \]

[Out]

1/2*h*(e*x+d)^2*erfi((1/n+a*b*f*ln(F)+b^2*f*ln(F)*ln(c*(e*x+d)^n))/b/f^(1/2)/ln(F)^(1/2))*Pi^(1/2)/b/e^2/exp((
1+2*a*b*f*n*ln(F))/b^2/f/n^2/ln(F))/n/((c*(e*x+d)^n)^(2/n))/f^(1/2)/ln(F)^(1/2)+1/2*(-d*h+e*g)*(e*x+d)*erfi(1/
2*(1/n+2*a*b*f*ln(F)+2*b^2*f*ln(F)*ln(c*(e*x+d)^n))/b/f^(1/2)/ln(F)^(1/2))*Pi^(1/2)/b/e^2/exp(1/4*(1+4*a*b*f*n
*ln(F))/b^2/f/n^2/ln(F))/n/((c*(e*x+d)^n)^(1/n))/f^(1/2)/ln(F)^(1/2)

Rubi [A] (verified)

Time = 0.26 (sec) , antiderivative size = 257, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2315, 2312, 2308, 2266, 2235, 2314} \[ \int F^{f \left (a+b \log \left (c (d+e x)^n\right )\right )^2} (g+h x) \, dx=\frac {\sqrt {\pi } (d+e x) (e g-d h) \left (c (d+e x)^n\right )^{-1/n} e^{-\frac {4 a b f n \log (F)+1}{4 b^2 f n^2 \log (F)}} \text {erfi}\left (\frac {2 a b f \log (F)+2 b^2 f \log (F) \log \left (c (d+e x)^n\right )+\frac {1}{n}}{2 b \sqrt {f} \sqrt {\log (F)}}\right )}{2 b e^2 \sqrt {f} n \sqrt {\log (F)}}+\frac {\sqrt {\pi } h (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n} e^{-\frac {2 a b f n \log (F)+1}{b^2 f n^2 \log (F)}} \text {erfi}\left (\frac {a b f \log (F)+b^2 f \log (F) \log \left (c (d+e x)^n\right )+\frac {1}{n}}{b \sqrt {f} \sqrt {\log (F)}}\right )}{2 b e^2 \sqrt {f} n \sqrt {\log (F)}} \]

[In]

Int[F^(f*(a + b*Log[c*(d + e*x)^n])^2)*(g + h*x),x]

[Out]

(h*Sqrt[Pi]*(d + e*x)^2*Erfi[(n^(-1) + a*b*f*Log[F] + b^2*f*Log[F]*Log[c*(d + e*x)^n])/(b*Sqrt[f]*Sqrt[Log[F]]
)])/(2*b*e^2*E^((1 + 2*a*b*f*n*Log[F])/(b^2*f*n^2*Log[F]))*Sqrt[f]*n*(c*(d + e*x)^n)^(2/n)*Sqrt[Log[F]]) + ((e
*g - d*h)*Sqrt[Pi]*(d + e*x)*Erfi[(n^(-1) + 2*a*b*f*Log[F] + 2*b^2*f*Log[F]*Log[c*(d + e*x)^n])/(2*b*Sqrt[f]*S
qrt[Log[F]])])/(2*b*e^2*E^((1 + 4*a*b*f*n*Log[F])/(4*b^2*f*n^2*Log[F]))*Sqrt[f]*n*(c*(d + e*x)^n)^n^(-1)*Sqrt[
Log[F]])

Rule 2235

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]

Rule 2266

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 2308

Int[(F_)^(((a_.) + Log[(c_.)*((d_.) + (e_.)*(x_))^(n_.)]^2*(b_.))*(f_.))*((g_.) + (h_.)*(x_))^(m_.), x_Symbol]
 :> Dist[(g + h*x)^(m + 1)/(h*n*(c*(d + e*x)^n)^((m + 1)/n)), Subst[Int[E^(a*f*Log[F] + ((m + 1)*x)/n + b*f*Lo
g[F]*x^2), x], x, Log[c*(d + e*x)^n]], x] /; FreeQ[{F, a, b, c, d, e, f, g, h, m, n}, x] && EqQ[e*g - d*h, 0]

Rule 2312

Int[(F_)^(((a_.) + Log[(c_.)*((d_.) + (e_.)*(x_))^(n_.)]*(b_.))^2*(f_.)), x_Symbol] :> Dist[(c*(d + e*x)^n)^(2
*a*b*f*Log[F])/(d + e*x)^(2*a*b*f*n*Log[F]), Int[(d + e*x)^(2*a*b*f*n*Log[F])*F^(a^2*f + b^2*f*Log[c*(d + e*x)
^n]^2), x], x] /; FreeQ[{F, a, b, c, d, e, f, n}, x] &&  !IntegerQ[2*a*b*f*Log[F]]

Rule 2314

Int[(F_)^(((a_.) + Log[(c_.)*((d_.) + (e_.)*(x_))^(n_.)]*(b_.))^2*(f_.))*((g_.) + (h_.)*(x_))^(m_.), x_Symbol]
 :> Dist[(g + h*x)^m*((c*(d + e*x)^n)^(2*a*b*f*Log[F])/(d + e*x)^(m + 2*a*b*f*n*Log[F])), Int[(d + e*x)^(m + 2
*a*b*f*n*Log[F])*F^(a^2*f + b^2*f*Log[c*(d + e*x)^n]^2), x], x] /; FreeQ[{F, a, b, c, d, e, f, g, h, m, n}, x]
 && EqQ[e*g - d*h, 0]

Rule 2315

Int[(F_)^(((a_.) + Log[(c_.)*((d_.) + (e_.)*(x_))^(n_.)]*(b_.))^2*(f_.))*((g_.) + (h_.)*(x_))^(m_.), x_Symbol]
 :> Dist[1/e^(m + 1), Subst[Int[ExpandIntegrand[F^(f*(a + b*Log[c*x^n])^2), (e*g - d*h + h*x)^m, x], x], x, d
+ e*x], x] /; FreeQ[{F, a, b, c, d, e, f, g, h, n}, x] && IGtQ[m, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \left (e F^{f \left (a+b \log \left (c x^n\right )\right )^2} g \left (1-\frac {d h}{e g}\right )+F^{f \left (a+b \log \left (c x^n\right )\right )^2} h x\right ) \, dx,x,d+e x\right )}{e^2} \\ & = \frac {h \text {Subst}\left (\int F^{f \left (a+b \log \left (c x^n\right )\right )^2} x \, dx,x,d+e x\right )}{e^2}+\frac {(e g-d h) \text {Subst}\left (\int F^{f \left (a+b \log \left (c x^n\right )\right )^2} \, dx,x,d+e x\right )}{e^2} \\ & = \frac {\left (h (d+e x)^{-2 a b f n \log (F)} \left (c (d+e x)^n\right )^{2 a b f \log (F)}\right ) \text {Subst}\left (\int F^{a^2 f+b^2 f \log ^2\left (c x^n\right )} x^{1+2 a b f n \log (F)} \, dx,x,d+e x\right )}{e^2}+\frac {\left ((e g-d h) (d+e x)^{-2 a b f n \log (F)} \left (c (d+e x)^n\right )^{2 a b f \log (F)}\right ) \text {Subst}\left (\int F^{a^2 f+b^2 f \log ^2\left (c x^n\right )} x^{2 a b f n \log (F)} \, dx,x,d+e x\right )}{e^2} \\ & = \frac {\left ((e g-d h) (d+e x) \left (c (d+e x)^n\right )^{2 a b f \log (F)-\frac {1+2 a b f n \log (F)}{n}}\right ) \text {Subst}\left (\int \exp \left (a^2 f \log (F)+b^2 f x^2 \log (F)+\frac {x (1+2 a b f n \log (F))}{n}\right ) \, dx,x,\log \left (c (d+e x)^n\right )\right )}{e^2 n}+\frac {\left (h (d+e x)^2 \left (c (d+e x)^n\right )^{2 a b f \log (F)-\frac {2+2 a b f n \log (F)}{n}}\right ) \text {Subst}\left (\int \exp \left (a^2 f \log (F)+b^2 f x^2 \log (F)+\frac {x (2+2 a b f n \log (F))}{n}\right ) \, dx,x,\log \left (c (d+e x)^n\right )\right )}{e^2 n} \\ & = \frac {\left (\exp \left (a^2 f \log (F)-\frac {(1+2 a b f n \log (F))^2}{4 b^2 f n^2 \log (F)}\right ) (e g-d h) (d+e x) \left (c (d+e x)^n\right )^{2 a b f \log (F)-\frac {1+2 a b f n \log (F)}{n}}\right ) \text {Subst}\left (\int \exp \left (\frac {\left (2 b^2 f x \log (F)+\frac {1+2 a b f n \log (F)}{n}\right )^2}{4 b^2 f \log (F)}\right ) \, dx,x,\log \left (c (d+e x)^n\right )\right )}{e^2 n}+\frac {\left (\exp \left (a^2 f \log (F)-\frac {(2+2 a b f n \log (F))^2}{4 b^2 f n^2 \log (F)}\right ) h (d+e x)^2 \left (c (d+e x)^n\right )^{2 a b f \log (F)-\frac {2+2 a b f n \log (F)}{n}}\right ) \text {Subst}\left (\int \exp \left (\frac {\left (2 b^2 f x \log (F)+\frac {2+2 a b f n \log (F)}{n}\right )^2}{4 b^2 f \log (F)}\right ) \, dx,x,\log \left (c (d+e x)^n\right )\right )}{e^2 n} \\ & = \frac {e^{-\frac {1+2 a b f n \log (F)}{b^2 f n^2 \log (F)}} h \sqrt {\pi } (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n} \text {erfi}\left (\frac {\frac {1}{n}+a b f \log (F)+b^2 f \log (F) \log \left (c (d+e x)^n\right )}{b \sqrt {f} \sqrt {\log (F)}}\right )}{2 b e^2 \sqrt {f} n \sqrt {\log (F)}}+\frac {e^{-\frac {1+4 a b f n \log (F)}{4 b^2 f n^2 \log (F)}} (e g-d h) \sqrt {\pi } (d+e x) \left (c (d+e x)^n\right )^{-1/n} \text {erfi}\left (\frac {\frac {1}{n}+2 a b f \log (F)+2 b^2 f \log (F) \log \left (c (d+e x)^n\right )}{2 b \sqrt {f} \sqrt {\log (F)}}\right )}{2 b e^2 \sqrt {f} n \sqrt {\log (F)}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.22 (sec) , antiderivative size = 221, normalized size of antiderivative = 0.86 \[ \int F^{f \left (a+b \log \left (c (d+e x)^n\right )\right )^2} (g+h x) \, dx=\frac {e^{-\frac {1+2 a b f n \log (F)}{b^2 f n^2 \log (F)}} \sqrt {\pi } (d+e x) \left (c (d+e x)^n\right )^{-2/n} \left (h (d+e x) \text {erfi}\left (\frac {1+b f n \log (F) \left (a+b \log \left (c (d+e x)^n\right )\right )}{b \sqrt {f} n \sqrt {\log (F)}}\right )+e^{\frac {3+4 a b f n \log (F)}{4 b^2 f n^2 \log (F)}} (e g-d h) \left (c (d+e x)^n\right )^{\frac {1}{n}} \text {erfi}\left (\frac {1+2 b f n \log (F) \left (a+b \log \left (c (d+e x)^n\right )\right )}{2 b \sqrt {f} n \sqrt {\log (F)}}\right )\right )}{2 b e^2 \sqrt {f} n \sqrt {\log (F)}} \]

[In]

Integrate[F^(f*(a + b*Log[c*(d + e*x)^n])^2)*(g + h*x),x]

[Out]

(Sqrt[Pi]*(d + e*x)*(h*(d + e*x)*Erfi[(1 + b*f*n*Log[F]*(a + b*Log[c*(d + e*x)^n]))/(b*Sqrt[f]*n*Sqrt[Log[F]])
] + E^((3 + 4*a*b*f*n*Log[F])/(4*b^2*f*n^2*Log[F]))*(e*g - d*h)*(c*(d + e*x)^n)^n^(-1)*Erfi[(1 + 2*b*f*n*Log[F
]*(a + b*Log[c*(d + e*x)^n]))/(2*b*Sqrt[f]*n*Sqrt[Log[F]])]))/(2*b*e^2*E^((1 + 2*a*b*f*n*Log[F])/(b^2*f*n^2*Lo
g[F]))*Sqrt[f]*n*(c*(d + e*x)^n)^(2/n)*Sqrt[Log[F]])

Maple [F]

\[\int F^{f {\left (a +b \ln \left (c \left (e x +d \right )^{n}\right )\right )}^{2}} \left (h x +g \right )d x\]

[In]

int(F^(f*(a+b*ln(c*(e*x+d)^n))^2)*(h*x+g),x)

[Out]

int(F^(f*(a+b*ln(c*(e*x+d)^n))^2)*(h*x+g),x)

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 259, normalized size of antiderivative = 1.01 \[ \int F^{f \left (a+b \log \left (c (d+e x)^n\right )\right )^2} (g+h x) \, dx=-\frac {\sqrt {\pi } \sqrt {-b^{2} f n^{2} \log \left (F\right )} {\left (e g - d h\right )} \operatorname {erf}\left (\frac {{\left (2 \, b^{2} f n^{2} \log \left (e x + d\right ) \log \left (F\right ) + 2 \, b^{2} f n \log \left (F\right ) \log \left (c\right ) + 2 \, a b f n \log \left (F\right ) + 1\right )} \sqrt {-b^{2} f n^{2} \log \left (F\right )}}{2 \, b^{2} f n^{2} \log \left (F\right )}\right ) e^{\left (-\frac {4 \, b^{2} f n \log \left (F\right ) \log \left (c\right ) + 4 \, a b f n \log \left (F\right ) + 1}{4 \, b^{2} f n^{2} \log \left (F\right )}\right )} + \sqrt {\pi } \sqrt {-b^{2} f n^{2} \log \left (F\right )} h \operatorname {erf}\left (\frac {{\left (b^{2} f n^{2} \log \left (e x + d\right ) \log \left (F\right ) + b^{2} f n \log \left (F\right ) \log \left (c\right ) + a b f n \log \left (F\right ) + 1\right )} \sqrt {-b^{2} f n^{2} \log \left (F\right )}}{b^{2} f n^{2} \log \left (F\right )}\right ) e^{\left (-\frac {2 \, b^{2} f n \log \left (F\right ) \log \left (c\right ) + 2 \, a b f n \log \left (F\right ) + 1}{b^{2} f n^{2} \log \left (F\right )}\right )}}{2 \, b e^{2} n} \]

[In]

integrate(F^(f*(a+b*log(c*(e*x+d)^n))^2)*(h*x+g),x, algorithm="fricas")

[Out]

-1/2*(sqrt(pi)*sqrt(-b^2*f*n^2*log(F))*(e*g - d*h)*erf(1/2*(2*b^2*f*n^2*log(e*x + d)*log(F) + 2*b^2*f*n*log(F)
*log(c) + 2*a*b*f*n*log(F) + 1)*sqrt(-b^2*f*n^2*log(F))/(b^2*f*n^2*log(F)))*e^(-1/4*(4*b^2*f*n*log(F)*log(c) +
 4*a*b*f*n*log(F) + 1)/(b^2*f*n^2*log(F))) + sqrt(pi)*sqrt(-b^2*f*n^2*log(F))*h*erf((b^2*f*n^2*log(e*x + d)*lo
g(F) + b^2*f*n*log(F)*log(c) + a*b*f*n*log(F) + 1)*sqrt(-b^2*f*n^2*log(F))/(b^2*f*n^2*log(F)))*e^(-(2*b^2*f*n*
log(F)*log(c) + 2*a*b*f*n*log(F) + 1)/(b^2*f*n^2*log(F))))/(b*e^2*n)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1149 vs. \(2 (243) = 486\).

Time = 67.16 (sec) , antiderivative size = 1149, normalized size of antiderivative = 4.47 \[ \int F^{f \left (a+b \log \left (c (d+e x)^n\right )\right )^2} (g+h x) \, dx=\text {Too large to display} \]

[In]

integrate(F**(f*(a+b*ln(c*(e*x+d)**n))**2)*(h*x+g),x)

[Out]

Piecewise((-F**(a**2*f + 2*a*b*f*log(c*(d + e*x)**n) + b**2*f*log(c*(d + e*x)**n)**2)*a*b*d**2*f*h*n*log(F)/e*
*2 + 2*F**(a**2*f + 2*a*b*f*log(c*(d + e*x)**n) + b**2*f*log(c*(d + e*x)**n)**2)*a*b*d*f*g*n*log(F)/e + F**(a*
*2*f + 2*a*b*f*log(c*(d + e*x)**n) + b**2*f*log(c*(d + e*x)**n)**2)*a*b*d*f*h*n*x*log(F)/e - 2*F**(a**2*f + 2*
a*b*f*log(c*(d + e*x)**n) + b**2*f*log(c*(d + e*x)**n)**2)*a*b*f*g*n*x*log(F) - F**(a**2*f + 2*a*b*f*log(c*(d
+ e*x)**n) + b**2*f*log(c*(d + e*x)**n)**2)*a*b*f*h*n*x**2*log(F)/2 + 3*F**(a**2*f + 2*a*b*f*log(c*(d + e*x)**
n) + b**2*f*log(c*(d + e*x)**n)**2)*b**2*d**2*f*h*n**2*log(F)/(2*e**2) + 3*F**(a**2*f + 2*a*b*f*log(c*(d + e*x
)**n) + b**2*f*log(c*(d + e*x)**n)**2)*b**2*d**2*f*h*n*log(F)*log(c*(d + e*x)**n)/(2*e**2) - 2*F**(a**2*f + 2*
a*b*f*log(c*(d + e*x)**n) + b**2*f*log(c*(d + e*x)**n)**2)*b**2*d*f*g*n**2*log(F)/e - 2*F**(a**2*f + 2*a*b*f*l
og(c*(d + e*x)**n) + b**2*f*log(c*(d + e*x)**n)**2)*b**2*d*f*g*n*log(F)*log(c*(d + e*x)**n)/e - 3*F**(a**2*f +
 2*a*b*f*log(c*(d + e*x)**n) + b**2*f*log(c*(d + e*x)**n)**2)*b**2*d*f*h*n**2*x*log(F)/(2*e) + F**(a**2*f + 2*
a*b*f*log(c*(d + e*x)**n) + b**2*f*log(c*(d + e*x)**n)**2)*b**2*d*f*h*n*x*log(F)*log(c*(d + e*x)**n)/e + 2*F**
(a**2*f + 2*a*b*f*log(c*(d + e*x)**n) + b**2*f*log(c*(d + e*x)**n)**2)*b**2*f*g*n**2*x*log(F) - 2*F**(a**2*f +
 2*a*b*f*log(c*(d + e*x)**n) + b**2*f*log(c*(d + e*x)**n)**2)*b**2*f*g*n*x*log(F)*log(c*(d + e*x)**n) + F**(a*
*2*f + 2*a*b*f*log(c*(d + e*x)**n) + b**2*f*log(c*(d + e*x)**n)**2)*b**2*f*h*n**2*x**2*log(F)/4 - F**(a**2*f +
 2*a*b*f*log(c*(d + e*x)**n) + b**2*f*log(c*(d + e*x)**n)**2)*b**2*f*h*n*x**2*log(F)*log(c*(d + e*x)**n)/2 - F
**(a**2*f + 2*a*b*f*log(c*(d + e*x)**n) + b**2*f*log(c*(d + e*x)**n)**2)*d**2*h/(2*e**2) + F**(a**2*f + 2*a*b*
f*log(c*(d + e*x)**n) + b**2*f*log(c*(d + e*x)**n)**2)*d*g/e + F**(a**2*f + 2*a*b*f*log(c*(d + e*x)**n) + b**2
*f*log(c*(d + e*x)**n)**2)*g*x + F**(a**2*f + 2*a*b*f*log(c*(d + e*x)**n) + b**2*f*log(c*(d + e*x)**n)**2)*h*x
**2/2, Ne(e, 0)), (F**(f*(a + b*log(c*d**n))**2)*(g*x + h*x**2/2), True))

Maxima [F]

\[ \int F^{f \left (a+b \log \left (c (d+e x)^n\right )\right )^2} (g+h x) \, dx=\int { {\left (h x + g\right )} F^{{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}^{2} f} \,d x } \]

[In]

integrate(F^(f*(a+b*log(c*(e*x+d)^n))^2)*(h*x+g),x, algorithm="maxima")

[Out]

integrate((h*x + g)*F^((b*log((e*x + d)^n*c) + a)^2*f), x)

Giac [F]

\[ \int F^{f \left (a+b \log \left (c (d+e x)^n\right )\right )^2} (g+h x) \, dx=\int { {\left (h x + g\right )} F^{{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}^{2} f} \,d x } \]

[In]

integrate(F^(f*(a+b*log(c*(e*x+d)^n))^2)*(h*x+g),x, algorithm="giac")

[Out]

integrate((h*x + g)*F^((b*log((e*x + d)^n*c) + a)^2*f), x)

Mupad [F(-1)]

Timed out. \[ \int F^{f \left (a+b \log \left (c (d+e x)^n\right )\right )^2} (g+h x) \, dx=\int {\mathrm {e}}^{f\,\ln \left (F\right )\,{\left (a+b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )\right )}^2}\,\left (g+h\,x\right ) \,d x \]

[In]

int(F^(f*(a + b*log(c*(d + e*x)^n))^2)*(g + h*x),x)

[Out]

int(exp(f*log(F)*(a + b*log(c*(d + e*x)^n))^2)*(g + h*x), x)