\(\int \frac {(g+h x)^2}{\sqrt {a+b \log (c (d (e+f x)^p)^q)}} \, dx\) [489]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [F]
Fricas [F(-2)]
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 30, antiderivative size = 355 \[ \int \frac {(g+h x)^2}{\sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}} \, dx=\frac {e^{-\frac {a}{b p q}} (f g-e h)^2 \sqrt {\pi } (e+f x) \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {1}{p q}} \text {erfi}\left (\frac {\sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{\sqrt {b} \sqrt {p} \sqrt {q}}\right )}{\sqrt {b} f^3 \sqrt {p} \sqrt {q}}+\frac {e^{-\frac {2 a}{b p q}} h (f g-e h) \sqrt {2 \pi } (e+f x)^2 \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {2}{p q}} \text {erfi}\left (\frac {\sqrt {2} \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{\sqrt {b} \sqrt {p} \sqrt {q}}\right )}{\sqrt {b} f^3 \sqrt {p} \sqrt {q}}+\frac {e^{-\frac {3 a}{b p q}} h^2 \sqrt {\frac {\pi }{3}} (e+f x)^3 \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {3}{p q}} \text {erfi}\left (\frac {\sqrt {3} \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{\sqrt {b} \sqrt {p} \sqrt {q}}\right )}{\sqrt {b} f^3 \sqrt {p} \sqrt {q}} \] Output:

(-e*h+f*g)^2*Pi^(1/2)*(f*x+e)*erfi((a+b*ln(c*(d*(f*x+e)^p)^q))^(1/2)/b^(1/ 
2)/p^(1/2)/q^(1/2))/b^(1/2)/exp(a/b/p/q)/f^3/p^(1/2)/q^(1/2)/((c*(d*(f*x+e 
)^p)^q)^(1/p/q))+h*(-e*h+f*g)*2^(1/2)*Pi^(1/2)*(f*x+e)^2*erfi(2^(1/2)*(a+b 
*ln(c*(d*(f*x+e)^p)^q))^(1/2)/b^(1/2)/p^(1/2)/q^(1/2))/b^(1/2)/exp(2*a/b/p 
/q)/f^3/p^(1/2)/q^(1/2)/((c*(d*(f*x+e)^p)^q)^(2/p/q))+1/3*h^2*3^(1/2)*Pi^( 
1/2)*(f*x+e)^3*erfi(3^(1/2)*(a+b*ln(c*(d*(f*x+e)^p)^q))^(1/2)/b^(1/2)/p^(1 
/2)/q^(1/2))/b^(1/2)/exp(3*a/b/p/q)/f^3/p^(1/2)/q^(1/2)/((c*(d*(f*x+e)^p)^ 
q)^(3/p/q))
 

Mathematica [A] (verified)

Time = 0.45 (sec) , antiderivative size = 315, normalized size of antiderivative = 0.89 \[ \int \frac {(g+h x)^2}{\sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}} \, dx=\frac {e^{-\frac {3 a}{b p q}} \sqrt {\pi } (e+f x) \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {3}{p q}} \left (3 e^{\frac {2 a}{b p q}} (f g-e h)^2 \left (c \left (d (e+f x)^p\right )^q\right )^{\frac {2}{p q}} \text {erfi}\left (\frac {\sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{\sqrt {b} \sqrt {p} \sqrt {q}}\right )+3 \sqrt {2} e^{\frac {a}{b p q}} h (f g-e h) (e+f x) \left (c \left (d (e+f x)^p\right )^q\right )^{\frac {1}{p q}} \text {erfi}\left (\frac {\sqrt {2} \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{\sqrt {b} \sqrt {p} \sqrt {q}}\right )+\sqrt {3} h^2 (e+f x)^2 \text {erfi}\left (\frac {\sqrt {3} \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{\sqrt {b} \sqrt {p} \sqrt {q}}\right )\right )}{3 \sqrt {b} f^3 \sqrt {p} \sqrt {q}} \] Input:

Integrate[(g + h*x)^2/Sqrt[a + b*Log[c*(d*(e + f*x)^p)^q]],x]
 

Output:

(Sqrt[Pi]*(e + f*x)*(3*E^((2*a)/(b*p*q))*(f*g - e*h)^2*(c*(d*(e + f*x)^p)^ 
q)^(2/(p*q))*Erfi[Sqrt[a + b*Log[c*(d*(e + f*x)^p)^q]]/(Sqrt[b]*Sqrt[p]*Sq 
rt[q])] + 3*Sqrt[2]*E^(a/(b*p*q))*h*(f*g - e*h)*(e + f*x)*(c*(d*(e + f*x)^ 
p)^q)^(1/(p*q))*Erfi[(Sqrt[2]*Sqrt[a + b*Log[c*(d*(e + f*x)^p)^q]])/(Sqrt[ 
b]*Sqrt[p]*Sqrt[q])] + Sqrt[3]*h^2*(e + f*x)^2*Erfi[(Sqrt[3]*Sqrt[a + b*Lo 
g[c*(d*(e + f*x)^p)^q]])/(Sqrt[b]*Sqrt[p]*Sqrt[q])]))/(3*Sqrt[b]*E^((3*a)/ 
(b*p*q))*f^3*Sqrt[p]*Sqrt[q]*(c*(d*(e + f*x)^p)^q)^(3/(p*q)))
 

Rubi [A] (verified)

Time = 3.08 (sec) , antiderivative size = 355, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2895, 2848, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(g+h x)^2}{\sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}} \, dx\)

\(\Big \downarrow \) 2895

\(\displaystyle \int \frac {(g+h x)^2}{\sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}dx\)

\(\Big \downarrow \) 2848

\(\displaystyle \int \left (\frac {(f g-e h)^2}{f^2 \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}+\frac {2 h (e+f x) (f g-e h)}{f^2 \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}+\frac {h^2 (e+f x)^2}{f^2 \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\sqrt {2 \pi } h (e+f x)^2 e^{-\frac {2 a}{b p q}} (f g-e h) \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {2}{p q}} \text {erfi}\left (\frac {\sqrt {2} \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{\sqrt {b} \sqrt {p} \sqrt {q}}\right )}{\sqrt {b} f^3 \sqrt {p} \sqrt {q}}+\frac {\sqrt {\pi } (e+f x) e^{-\frac {a}{b p q}} (f g-e h)^2 \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {1}{p q}} \text {erfi}\left (\frac {\sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{\sqrt {b} \sqrt {p} \sqrt {q}}\right )}{\sqrt {b} f^3 \sqrt {p} \sqrt {q}}+\frac {\sqrt {\frac {\pi }{3}} h^2 (e+f x)^3 e^{-\frac {3 a}{b p q}} \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {3}{p q}} \text {erfi}\left (\frac {\sqrt {3} \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{\sqrt {b} \sqrt {p} \sqrt {q}}\right )}{\sqrt {b} f^3 \sqrt {p} \sqrt {q}}\)

Input:

Int[(g + h*x)^2/Sqrt[a + b*Log[c*(d*(e + f*x)^p)^q]],x]
 

Output:

((f*g - e*h)^2*Sqrt[Pi]*(e + f*x)*Erfi[Sqrt[a + b*Log[c*(d*(e + f*x)^p)^q] 
]/(Sqrt[b]*Sqrt[p]*Sqrt[q])])/(Sqrt[b]*E^(a/(b*p*q))*f^3*Sqrt[p]*Sqrt[q]*( 
c*(d*(e + f*x)^p)^q)^(1/(p*q))) + (h*(f*g - e*h)*Sqrt[2*Pi]*(e + f*x)^2*Er 
fi[(Sqrt[2]*Sqrt[a + b*Log[c*(d*(e + f*x)^p)^q]])/(Sqrt[b]*Sqrt[p]*Sqrt[q] 
)])/(Sqrt[b]*E^((2*a)/(b*p*q))*f^3*Sqrt[p]*Sqrt[q]*(c*(d*(e + f*x)^p)^q)^( 
2/(p*q))) + (h^2*Sqrt[Pi/3]*(e + f*x)^3*Erfi[(Sqrt[3]*Sqrt[a + b*Log[c*(d* 
(e + f*x)^p)^q]])/(Sqrt[b]*Sqrt[p]*Sqrt[q])])/(Sqrt[b]*E^((3*a)/(b*p*q))*f 
^3*Sqrt[p]*Sqrt[q]*(c*(d*(e + f*x)^p)^q)^(3/(p*q)))
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2848
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_. 
)*(x_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(f + g*x)^q*(a + b*Log[c*(d 
 + e*x)^n])^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[e*f - 
 d*g, 0] && IGtQ[q, 0]
 

rule 2895
Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_. 
)*(u_.), x_Symbol] :> Subst[Int[u*(a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], 
 c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e, f, m, 
 n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[ 
IntHide[u*(a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x]]
 
Maple [F]

\[\int \frac {\left (h x +g \right )^{2}}{\sqrt {a +b \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right )}}d x\]

Input:

int((h*x+g)^2/(a+b*ln(c*(d*(f*x+e)^p)^q))^(1/2),x)
 

Output:

int((h*x+g)^2/(a+b*ln(c*(d*(f*x+e)^p)^q))^(1/2),x)
 

Fricas [F(-2)]

Exception generated. \[ \int \frac {(g+h x)^2}{\sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}} \, dx=\text {Exception raised: TypeError} \] Input:

integrate((h*x+g)^2/(a+b*log(c*(d*(f*x+e)^p)^q))^(1/2),x, algorithm="frica 
s")
 

Output:

Exception raised: TypeError >>  Error detected within library code:   inte 
grate: implementation incomplete (constant residues)
 

Sympy [F]

\[ \int \frac {(g+h x)^2}{\sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}} \, dx=\int \frac {\left (g + h x\right )^{2}}{\sqrt {a + b \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}}}\, dx \] Input:

integrate((h*x+g)**2/(a+b*ln(c*(d*(f*x+e)**p)**q))**(1/2),x)
 

Output:

Integral((g + h*x)**2/sqrt(a + b*log(c*(d*(e + f*x)**p)**q)), x)
 

Maxima [F]

\[ \int \frac {(g+h x)^2}{\sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}} \, dx=\int { \frac {{\left (h x + g\right )}^{2}}{\sqrt {b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a}} \,d x } \] Input:

integrate((h*x+g)^2/(a+b*log(c*(d*(f*x+e)^p)^q))^(1/2),x, algorithm="maxim 
a")
 

Output:

integrate((h*x + g)^2/sqrt(b*log(((f*x + e)^p*d)^q*c) + a), x)
 

Giac [F]

\[ \int \frac {(g+h x)^2}{\sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}} \, dx=\int { \frac {{\left (h x + g\right )}^{2}}{\sqrt {b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a}} \,d x } \] Input:

integrate((h*x+g)^2/(a+b*log(c*(d*(f*x+e)^p)^q))^(1/2),x, algorithm="giac" 
)
 

Output:

integrate((h*x + g)^2/sqrt(b*log(((f*x + e)^p*d)^q*c) + a), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {(g+h x)^2}{\sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}} \, dx=\int \frac {{\left (g+h\,x\right )}^2}{\sqrt {a+b\,\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )}} \,d x \] Input:

int((g + h*x)^2/(a + b*log(c*(d*(e + f*x)^p)^q))^(1/2),x)
 

Output:

int((g + h*x)^2/(a + b*log(c*(d*(e + f*x)^p)^q))^(1/2), x)
 

Reduce [F]

\[ \int \frac {(g+h x)^2}{\sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}} \, dx=\frac {2 \sqrt {\mathrm {log}\left (d^{q} \left (f x +e \right )^{p q} c \right ) b +a}\, e \,g^{2}+\left (\int \frac {\sqrt {\mathrm {log}\left (d^{q} \left (f x +e \right )^{p q} c \right ) b +a}\, x^{3}}{\mathrm {log}\left (d^{q} \left (f x +e \right )^{p q} c \right ) b e +\mathrm {log}\left (d^{q} \left (f x +e \right )^{p q} c \right ) b f x +a e +a f x}d x \right ) b \,f^{2} h^{2} p q +\left (\int \frac {\sqrt {\mathrm {log}\left (d^{q} \left (f x +e \right )^{p q} c \right ) b +a}\, x^{2}}{\mathrm {log}\left (d^{q} \left (f x +e \right )^{p q} c \right ) b e +\mathrm {log}\left (d^{q} \left (f x +e \right )^{p q} c \right ) b f x +a e +a f x}d x \right ) b e f \,h^{2} p q +2 \left (\int \frac {\sqrt {\mathrm {log}\left (d^{q} \left (f x +e \right )^{p q} c \right ) b +a}\, x^{2}}{\mathrm {log}\left (d^{q} \left (f x +e \right )^{p q} c \right ) b e +\mathrm {log}\left (d^{q} \left (f x +e \right )^{p q} c \right ) b f x +a e +a f x}d x \right ) b \,f^{2} g h p q +2 \left (\int \frac {\sqrt {\mathrm {log}\left (d^{q} \left (f x +e \right )^{p q} c \right ) b +a}\, x}{\mathrm {log}\left (d^{q} \left (f x +e \right )^{p q} c \right ) b e +\mathrm {log}\left (d^{q} \left (f x +e \right )^{p q} c \right ) b f x +a e +a f x}d x \right ) b e f g h p q +\left (\int \frac {\sqrt {\mathrm {log}\left (d^{q} \left (f x +e \right )^{p q} c \right ) b +a}\, x}{\mathrm {log}\left (d^{q} \left (f x +e \right )^{p q} c \right ) b e +\mathrm {log}\left (d^{q} \left (f x +e \right )^{p q} c \right ) b f x +a e +a f x}d x \right ) b \,f^{2} g^{2} p q}{b f p q} \] Input:

int((h*x+g)^2/(a+b*log(c*(d*(f*x+e)^p)^q))^(1/2),x)
 

Output:

(2*sqrt(log(d**q*(e + f*x)**(p*q)*c)*b + a)*e*g**2 + int((sqrt(log(d**q*(e 
 + f*x)**(p*q)*c)*b + a)*x**3)/(log(d**q*(e + f*x)**(p*q)*c)*b*e + log(d** 
q*(e + f*x)**(p*q)*c)*b*f*x + a*e + a*f*x),x)*b*f**2*h**2*p*q + int((sqrt( 
log(d**q*(e + f*x)**(p*q)*c)*b + a)*x**2)/(log(d**q*(e + f*x)**(p*q)*c)*b* 
e + log(d**q*(e + f*x)**(p*q)*c)*b*f*x + a*e + a*f*x),x)*b*e*f*h**2*p*q + 
2*int((sqrt(log(d**q*(e + f*x)**(p*q)*c)*b + a)*x**2)/(log(d**q*(e + f*x)* 
*(p*q)*c)*b*e + log(d**q*(e + f*x)**(p*q)*c)*b*f*x + a*e + a*f*x),x)*b*f** 
2*g*h*p*q + 2*int((sqrt(log(d**q*(e + f*x)**(p*q)*c)*b + a)*x)/(log(d**q*( 
e + f*x)**(p*q)*c)*b*e + log(d**q*(e + f*x)**(p*q)*c)*b*f*x + a*e + a*f*x) 
,x)*b*e*f*g*h*p*q + int((sqrt(log(d**q*(e + f*x)**(p*q)*c)*b + a)*x)/(log( 
d**q*(e + f*x)**(p*q)*c)*b*e + log(d**q*(e + f*x)**(p*q)*c)*b*f*x + a*e + 
a*f*x),x)*b*f**2*g**2*p*q)/(b*f*p*q)