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

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

Optimal result

Integrand size = 31, antiderivative size = 469 \[ \int \frac {(h+i x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{f+g x} \, dx=-\frac {2 a b i (e h-d i) n x}{e g}-\frac {2 a b i (g h-f i) n x}{g^2}+\frac {2 b^2 i (e h-d i) n^2 x}{e g}+\frac {2 b^2 i (g h-f i) n^2 x}{g^2}+\frac {b^2 i^2 n^2 (d+e x)^2}{4 e^2 g}-\frac {2 b^2 i (e h-d i) n (d+e x) \log \left (c (d+e x)^n\right )}{e^2 g}-\frac {2 b^2 i (g h-f i) n (d+e x) \log \left (c (d+e x)^n\right )}{e g^2}-\frac {b i^2 n (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{2 e^2 g}+\frac {i (e h-d i) (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e^2 g}+\frac {i (g h-f i) (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g^2}+\frac {i^2 (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 e^2 g}+\frac {(g h-f i)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e (f+g x)}{e f-d g}\right )}{g^3}+\frac {2 b (g h-f i)^2 n \left (a+b \log \left (c (d+e x)^n\right )\right ) \operatorname {PolyLog}\left (2,-\frac {g (d+e x)}{e f-d g}\right )}{g^3}-\frac {2 b^2 (g h-f i)^2 n^2 \operatorname {PolyLog}\left (3,-\frac {g (d+e x)}{e f-d g}\right )}{g^3} \] Output:

-2*a*b*i*(-d*i+e*h)*n*x/e/g-2*a*b*i*(-f*i+g*h)*n*x/g^2+2*b^2*i*(-d*i+e*h)* 
n^2*x/e/g+2*b^2*i*(-f*i+g*h)*n^2*x/g^2+1/4*b^2*i^2*n^2*(e*x+d)^2/e^2/g-2*b 
^2*i*(-d*i+e*h)*n*(e*x+d)*ln(c*(e*x+d)^n)/e^2/g-2*b^2*i*(-f*i+g*h)*n*(e*x+ 
d)*ln(c*(e*x+d)^n)/e/g^2-1/2*b*i^2*n*(e*x+d)^2*(a+b*ln(c*(e*x+d)^n))/e^2/g 
+i*(-d*i+e*h)*(e*x+d)*(a+b*ln(c*(e*x+d)^n))^2/e^2/g+i*(-f*i+g*h)*(e*x+d)*( 
a+b*ln(c*(e*x+d)^n))^2/e/g^2+1/2*i^2*(e*x+d)^2*(a+b*ln(c*(e*x+d)^n))^2/e^2 
/g+(-f*i+g*h)^2*(a+b*ln(c*(e*x+d)^n))^2*ln(e*(g*x+f)/(-d*g+e*f))/g^3+2*b*( 
-f*i+g*h)^2*n*(a+b*ln(c*(e*x+d)^n))*polylog(2,-g*(e*x+d)/(-d*g+e*f))/g^3-2 
*b^2*(-f*i+g*h)^2*n^2*polylog(3,-g*(e*x+d)/(-d*g+e*f))/g^3
 

Mathematica [A] (verified)

Time = 0.54 (sec) , antiderivative size = 876, normalized size of antiderivative = 1.87 \[ \int \frac {(h+i x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{f+g x} \, dx =\text {Too large to display} \] Input:

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

Output:

(4*e^2*g*i*(2*g*h - f*i)*x*(a - b*n*Log[d + e*x] + b*Log[c*(d + e*x)^n])^2 
 + 2*e^2*g^2*i^2*x^2*(a - b*n*Log[d + e*x] + b*Log[c*(d + e*x)^n])^2 + 4*e 
^2*(g*h - f*i)^2*(a - b*n*Log[d + e*x] + b*Log[c*(d + e*x)^n])^2*Log[f + g 
*x] + 8*b*e^2*g^2*h^2*n*(a - b*n*Log[d + e*x] + b*Log[c*(d + e*x)^n])*(Log 
[d + e*x]*Log[(e*(f + g*x))/(e*f - d*g)] + PolyLog[2, (g*(d + e*x))/(-(e*f 
) + d*g)]) + 2*b*i^2*n*(a - b*n*Log[d + e*x] + b*Log[c*(d + e*x)^n])*(e*g* 
(e*x*(4*f - g*x) + 2*d*(2*f + g*x)) - 2*Log[d + e*x]*(g*(d + e*x)*(2*e*f + 
 d*g - e*g*x) - 2*e^2*f^2*Log[(e*(f + g*x))/(e*f - d*g)]) + 4*e^2*f^2*Poly 
Log[2, (g*(d + e*x))/(-(e*f) + d*g)]) - 16*b*e*g*h*i*n*(a - b*n*Log[d + e* 
x] + b*Log[c*(d + e*x)^n])*(-(g*(d + e*x)*(-1 + Log[d + e*x])) + e*f*(Log[ 
d + e*x]*Log[(e*(f + g*x))/(e*f - d*g)] + PolyLog[2, (g*(d + e*x))/(-(e*f) 
 + d*g)])) + 8*b^2*e*g*h*i*n^2*(g*(2*e*x - 2*(d + e*x)*Log[d + e*x] + (d + 
 e*x)*Log[d + e*x]^2) - e*f*(Log[d + e*x]^2*Log[(e*(f + g*x))/(e*f - d*g)] 
 + 2*Log[d + e*x]*PolyLog[2, (g*(d + e*x))/(-(e*f) + d*g)] - 2*PolyLog[3, 
(g*(d + e*x))/(-(e*f) + d*g)])) - b^2*i^2*n^2*(4*e*f*g*(2*e*x - 2*(d + e*x 
)*Log[d + e*x] + (d + e*x)*Log[d + e*x]^2) + g^2*(e*x*(6*d - e*x) + (-6*d^ 
2 - 4*d*e*x + 2*e^2*x^2)*Log[d + e*x] + 2*(d^2 - e^2*x^2)*Log[d + e*x]^2) 
- 4*e^2*f^2*(Log[d + e*x]^2*Log[(e*(f + g*x))/(e*f - d*g)] + 2*Log[d + e*x 
]*PolyLog[2, (g*(d + e*x))/(-(e*f) + d*g)] - 2*PolyLog[3, (g*(d + e*x))/(- 
(e*f) + d*g)])) + 4*b^2*e^2*g^2*h^2*n^2*(Log[d + e*x]^2*Log[(e*(f + g*x...
 

Rubi [A] (verified)

Time = 1.52 (sec) , antiderivative size = 469, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {2865, 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 {(h+i x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{f+g x} \, dx\)

\(\Big \downarrow \) 2865

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {i (d+e x) (e h-d i) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e^2 g}-\frac {b i^2 n (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{2 e^2 g}+\frac {i^2 (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 e^2 g}+\frac {2 b n (g h-f i)^2 \operatorname {PolyLog}\left (2,-\frac {g (d+e x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^3}+\frac {(g h-f i)^2 \log \left (\frac {e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{g^3}+\frac {i (d+e x) (g h-f i) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g^2}-\frac {2 a b i n x (e h-d i)}{e g}-\frac {2 a b i n x (g h-f i)}{g^2}-\frac {2 b^2 i n (d+e x) (e h-d i) \log \left (c (d+e x)^n\right )}{e^2 g}-\frac {2 b^2 i n (d+e x) (g h-f i) \log \left (c (d+e x)^n\right )}{e g^2}+\frac {b^2 i^2 n^2 (d+e x)^2}{4 e^2 g}-\frac {2 b^2 n^2 (g h-f i)^2 \operatorname {PolyLog}\left (3,-\frac {g (d+e x)}{e f-d g}\right )}{g^3}+\frac {2 b^2 i n^2 x (e h-d i)}{e g}+\frac {2 b^2 i n^2 x (g h-f i)}{g^2}\)

Input:

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

Output:

(-2*a*b*i*(e*h - d*i)*n*x)/(e*g) - (2*a*b*i*(g*h - f*i)*n*x)/g^2 + (2*b^2* 
i*(e*h - d*i)*n^2*x)/(e*g) + (2*b^2*i*(g*h - f*i)*n^2*x)/g^2 + (b^2*i^2*n^ 
2*(d + e*x)^2)/(4*e^2*g) - (2*b^2*i*(e*h - d*i)*n*(d + e*x)*Log[c*(d + e*x 
)^n])/(e^2*g) - (2*b^2*i*(g*h - f*i)*n*(d + e*x)*Log[c*(d + e*x)^n])/(e*g^ 
2) - (b*i^2*n*(d + e*x)^2*(a + b*Log[c*(d + e*x)^n]))/(2*e^2*g) + (i*(e*h 
- d*i)*(d + e*x)*(a + b*Log[c*(d + e*x)^n])^2)/(e^2*g) + (i*(g*h - f*i)*(d 
 + e*x)*(a + b*Log[c*(d + e*x)^n])^2)/(e*g^2) + (i^2*(d + e*x)^2*(a + b*Lo 
g[c*(d + e*x)^n])^2)/(2*e^2*g) + ((g*h - f*i)^2*(a + b*Log[c*(d + e*x)^n]) 
^2*Log[(e*(f + g*x))/(e*f - d*g)])/g^3 + (2*b*(g*h - f*i)^2*n*(a + b*Log[c 
*(d + e*x)^n])*PolyLog[2, -((g*(d + e*x))/(e*f - d*g))])/g^3 - (2*b^2*(g*h 
 - f*i)^2*n^2*PolyLog[3, -((g*(d + e*x))/(e*f - d*g))])/g^3
 

Defintions of rubi rules used

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

rule 2865
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Sy 
mbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, 
Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunctionQ[ 
RFx, x] && IntegerQ[p]
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

integral((a^2*i^2*x^2 + 2*a^2*h*i*x + a^2*h^2 + (b^2*i^2*x^2 + 2*b^2*h*i*x 
 + b^2*h^2)*log((e*x + d)^n*c)^2 + 2*(a*b*i^2*x^2 + 2*a*b*h*i*x + a*b*h^2) 
*log((e*x + d)^n*c))/(g*x + f), x)
 

Sympy [F]

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

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

Output:

Integral((a + b*log(c*(d + e*x)**n))**2*(h + i*x)**2/(f + g*x), x)
 

Maxima [F]

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

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

Output:

2*a^2*h*i*(x/g - f*log(g*x + f)/g^2) + 1/2*a^2*i^2*(2*f^2*log(g*x + f)/g^3 
 + (g*x^2 - 2*f*x)/g^2) + a^2*h^2*log(g*x + f)/g + integrate((b^2*h^2*log( 
c)^2 + 2*a*b*h^2*log(c) + (b^2*i^2*log(c)^2 + 2*a*b*i^2*log(c))*x^2 + (b^2 
*i^2*x^2 + 2*b^2*h*i*x + b^2*h^2)*log((e*x + d)^n)^2 + 2*(b^2*h*i*log(c)^2 
 + 2*a*b*h*i*log(c))*x + 2*(b^2*h^2*log(c) + a*b*h^2 + (b^2*i^2*log(c) + a 
*b*i^2)*x^2 + 2*(b^2*h*i*log(c) + a*b*h*i)*x)*log((e*x + d)^n))/(g*x + f), 
 x)
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int \frac {(h+i x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{f+g x} \, dx =\text {Too large to display} \] Input:

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

Output:

( - 12*int(log((d + e*x)**n*c)**2/(d*f + d*g*x + e*f*x + e*g*x**2),x)*b**2 
*d*e**2*f**2*g*n - 24*int(log((d + e*x)**n*c)**2/(d*f + d*g*x + e*f*x + e* 
g*x**2),x)*b**2*d*e**2*f*g**2*h*i*n + 12*int(log((d + e*x)**n*c)**2/(d*f + 
 d*g*x + e*f*x + e*g*x**2),x)*b**2*d*e**2*g**3*h**2*n + 12*int(log((d + e* 
x)**n*c)**2/(d*f + d*g*x + e*f*x + e*g*x**2),x)*b**2*e**3*f**3*n + 24*int( 
log((d + e*x)**n*c)**2/(d*f + d*g*x + e*f*x + e*g*x**2),x)*b**2*e**3*f**2* 
g*h*i*n - 12*int(log((d + e*x)**n*c)**2/(d*f + d*g*x + e*f*x + e*g*x**2),x 
)*b**2*e**3*f*g**2*h**2*n - 24*int(log((d + e*x)**n*c)/(d*f + d*g*x + e*f* 
x + e*g*x**2),x)*a*b*d*e**2*f**2*g*n - 48*int(log((d + e*x)**n*c)/(d*f + d 
*g*x + e*f*x + e*g*x**2),x)*a*b*d*e**2*f*g**2*h*i*n + 24*int(log((d + e*x) 
**n*c)/(d*f + d*g*x + e*f*x + e*g*x**2),x)*a*b*d*e**2*g**3*h**2*n + 24*int 
(log((d + e*x)**n*c)/(d*f + d*g*x + e*f*x + e*g*x**2),x)*a*b*e**3*f**3*n + 
 48*int(log((d + e*x)**n*c)/(d*f + d*g*x + e*f*x + e*g*x**2),x)*a*b*e**3*f 
**2*g*h*i*n - 24*int(log((d + e*x)**n*c)/(d*f + d*g*x + e*f*x + e*g*x**2), 
x)*a*b*e**3*f*g**2*h**2*n - 12*log(f + g*x)*a**2*e**2*f**2*n - 24*log(f + 
g*x)*a**2*e**2*f*g*h*i*n + 12*log(f + g*x)*a**2*e**2*g**2*h**2*n - 4*log(( 
d + e*x)**n*c)**3*b**2*e**2*f**2 - 8*log((d + e*x)**n*c)**3*b**2*e**2*f*g* 
h*i + 4*log((d + e*x)**n*c)**3*b**2*e**2*g**2*h**2 - 12*log((d + e*x)**n*c 
)**2*a*b*e**2*f**2 - 24*log((d + e*x)**n*c)**2*a*b*e**2*f*g*h*i + 12*log(( 
d + e*x)**n*c)**2*a*b*e**2*g**2*h**2 + 6*log((d + e*x)**n*c)**2*b**2*d*...