\(\int x^3 (f+g x^2) \log (c (d+e x^2)^p) \, dx\) [311]

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

Optimal result

Integrand size = 23, antiderivative size = 119 \[ \int x^3 \left (f+g x^2\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\frac {d (3 e f-2 d g) p x^2}{12 e^2}-\frac {(3 e f-2 d g) p x^4}{24 e}-\frac {1}{18} g p x^6-\frac {d^2 (3 e f-2 d g) p \log \left (d+e x^2\right )}{12 e^3}+\frac {1}{4} f x^4 \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{6} g x^6 \log \left (c \left (d+e x^2\right )^p\right ) \] Output:

1/12*d*(-2*d*g+3*e*f)*p*x^2/e^2-1/24*(-2*d*g+3*e*f)*p*x^4/e-1/18*g*p*x^6-1 
/12*d^2*(-2*d*g+3*e*f)*p*ln(e*x^2+d)/e^3+1/4*f*x^4*ln(c*(e*x^2+d)^p)+1/6*g 
*x^6*ln(c*(e*x^2+d)^p)
 

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.18 \[ \int x^3 \left (f+g x^2\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\frac {d f p x^2}{4 e}-\frac {d^2 g p x^2}{6 e^2}-\frac {1}{8} f p x^4+\frac {d g p x^4}{12 e}-\frac {1}{18} g p x^6-\frac {d^2 f p \log \left (d+e x^2\right )}{4 e^2}+\frac {d^3 g p \log \left (d+e x^2\right )}{6 e^3}+\frac {1}{4} f x^4 \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{6} g x^6 \log \left (c \left (d+e x^2\right )^p\right ) \] Input:

Integrate[x^3*(f + g*x^2)*Log[c*(d + e*x^2)^p],x]
 

Output:

(d*f*p*x^2)/(4*e) - (d^2*g*p*x^2)/(6*e^2) - (f*p*x^4)/8 + (d*g*p*x^4)/(12* 
e) - (g*p*x^6)/18 - (d^2*f*p*Log[d + e*x^2])/(4*e^2) + (d^3*g*p*Log[d + e* 
x^2])/(6*e^3) + (f*x^4*Log[c*(d + e*x^2)^p])/4 + (g*x^6*Log[c*(d + e*x^2)^ 
p])/6
 

Rubi [A] (verified)

Time = 0.60 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.04, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {2925, 2861, 27, 86, 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 x^3 \left (f+g x^2\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx\)

\(\Big \downarrow \) 2925

\(\displaystyle \frac {1}{2} \int x^2 \left (g x^2+f\right ) \log \left (c \left (e x^2+d\right )^p\right )dx^2\)

\(\Big \downarrow \) 2861

\(\displaystyle \frac {1}{2} \left (-e p \int \frac {x^4 \left (2 g x^2+3 f\right )}{6 \left (e x^2+d\right )}dx^2+\frac {1}{2} f x^4 \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{3} g x^6 \log \left (c \left (d+e x^2\right )^p\right )\right )\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {1}{2} \left (-\frac {1}{6} e p \int \frac {x^4 \left (2 g x^2+3 f\right )}{e x^2+d}dx^2+\frac {1}{2} f x^4 \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{3} g x^6 \log \left (c \left (d+e x^2\right )^p\right )\right )\)

\(\Big \downarrow \) 86

\(\displaystyle \frac {1}{2} \left (-\frac {1}{6} e p \int \left (\frac {2 g x^4}{e}+\frac {(3 e f-2 d g) x^2}{e^2}+\frac {d (2 d g-3 e f)}{e^3}-\frac {d^2 (2 d g-3 e f)}{e^3 \left (e x^2+d\right )}\right )dx^2+\frac {1}{2} f x^4 \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{3} g x^6 \log \left (c \left (d+e x^2\right )^p\right )\right )\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {1}{2} \left (\frac {1}{2} f x^4 \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{3} g x^6 \log \left (c \left (d+e x^2\right )^p\right )-\frac {1}{6} e p \left (\frac {d^2 (3 e f-2 d g) \log \left (d+e x^2\right )}{e^4}-\frac {d x^2 (3 e f-2 d g)}{e^3}+\frac {x^4 (3 e f-2 d g)}{2 e^2}+\frac {2 g x^6}{3 e}\right )\right )\)

Input:

Int[x^3*(f + g*x^2)*Log[c*(d + e*x^2)^p],x]
 

Output:

(-1/6*(e*p*(-((d*(3*e*f - 2*d*g)*x^2)/e^3) + ((3*e*f - 2*d*g)*x^4)/(2*e^2) 
 + (2*g*x^6)/(3*e) + (d^2*(3*e*f - 2*d*g)*Log[d + e*x^2])/e^4)) + (f*x^4*L 
og[c*(d + e*x^2)^p])/2 + (g*x^6*Log[c*(d + e*x^2)^p])/3)/2
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 86
Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ 
.), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; 
 FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 
] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p 
+ 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
 

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

rule 2861
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*(x_)^(m_.)*((f_) + 
 (g_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = IntHide[x^m*(f + g*x^r)^q, 
 x]}, Simp[(a + b*Log[c*(d + e*x)^n])   u, x] - Simp[b*e*n   Int[SimplifyIn 
tegrand[u/(d + e*x), x], x], x] /; InverseFunctionFreeQ[u, x]] /; FreeQ[{a, 
 b, c, d, e, f, g, m, n, q, r}, x] && IntegerQ[m] && IntegerQ[q] && Integer 
Q[r]
 

rule 2925
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m 
_.)*((f_) + (g_.)*(x_)^(s_))^(r_.), x_Symbol] :> Simp[1/n   Subst[Int[x^(Si 
mplify[(m + 1)/n] - 1)*(f + g*x^(s/n))^r*(a + b*Log[c*(d + e*x)^p])^q, x], 
x, x^n], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, q, r, s}, x] && Integer 
Q[r] && IntegerQ[s/n] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0 
] || IGtQ[q, 0])
 
Maple [A] (verified)

Time = 2.25 (sec) , antiderivative size = 117, normalized size of antiderivative = 0.98

method result size
parts \(\frac {g \,x^{6} \ln \left (c \left (e \,x^{2}+d \right )^{p}\right )}{6}+\frac {f \,x^{4} \ln \left (c \left (e \,x^{2}+d \right )^{p}\right )}{4}-\frac {e p \left (\frac {\frac {2}{3} e^{2} g \,x^{6}-x^{4} d g e +\frac {3}{2} f \,x^{4} e^{2}+2 d^{2} g \,x^{2}-3 d e f \,x^{2}}{2 e^{3}}-\frac {d^{2} \left (2 d g -3 e f \right ) \ln \left (e \,x^{2}+d \right )}{2 e^{4}}\right )}{6}\) \(117\)
parallelrisch \(\frac {12 x^{6} \ln \left (c \left (e \,x^{2}+d \right )^{p}\right ) e^{3} g -4 x^{6} e^{3} g p +18 x^{4} \ln \left (c \left (e \,x^{2}+d \right )^{p}\right ) e^{3} f +6 x^{4} d \,e^{2} g p -9 x^{4} e^{3} f p -12 x^{2} d^{2} e g p +18 x^{2} d \,e^{2} f p +12 \ln \left (e \,x^{2}+d \right ) d^{3} g p -18 \ln \left (e \,x^{2}+d \right ) d^{2} e f p +12 d^{3} g p -18 d^{2} e f p}{72 e^{3}}\) \(148\)
risch \(\left (\frac {1}{6} g \,x^{6}+\frac {1}{4} f \,x^{4}\right ) \ln \left (\left (e \,x^{2}+d \right )^{p}\right )+\frac {i \pi f \,x^{4} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2}}{8}+\frac {i \pi g \,x^{6} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} \operatorname {csgn}\left (i c \right )}{12}-\frac {i \pi g \,x^{6} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{3}}{12}+\frac {i \pi g \,x^{6} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2}}{12}-\frac {i \pi f \,x^{4} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{3}}{8}+\frac {i \pi f \,x^{4} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} \operatorname {csgn}\left (i c \right )}{8}-\frac {i \pi f \,x^{4} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \right )}{8}-\frac {i \pi g \,x^{6} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \right )}{12}+\frac {\ln \left (c \right ) g \,x^{6}}{6}-\frac {g p \,x^{6}}{18}+\frac {\ln \left (c \right ) f \,x^{4}}{4}+\frac {x^{4} d g p}{12 e}-\frac {x^{4} f p}{8}-\frac {x^{2} d^{2} g p}{6 e^{2}}+\frac {x^{2} d f p}{4 e}+\frac {\ln \left (e \,x^{2}+d \right ) d^{3} g p}{6 e^{3}}-\frac {\ln \left (e \,x^{2}+d \right ) d^{2} f p}{4 e^{2}}\) \(387\)

Input:

int(x^3*(g*x^2+f)*ln(c*(e*x^2+d)^p),x,method=_RETURNVERBOSE)
 

Output:

1/6*g*x^6*ln(c*(e*x^2+d)^p)+1/4*f*x^4*ln(c*(e*x^2+d)^p)-1/6*e*p*(1/2/e^3*( 
2/3*e^2*g*x^6-x^4*d*g*e+3/2*f*x^4*e^2+2*d^2*g*x^2-3*d*e*f*x^2)-1/2*d^2*(2* 
d*g-3*e*f)/e^4*ln(e*x^2+d))
 

Fricas [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.08 \[ \int x^3 \left (f+g x^2\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=-\frac {4 \, e^{3} g p x^{6} + 3 \, {\left (3 \, e^{3} f - 2 \, d e^{2} g\right )} p x^{4} - 6 \, {\left (3 \, d e^{2} f - 2 \, d^{2} e g\right )} p x^{2} - 6 \, {\left (2 \, e^{3} g p x^{6} + 3 \, e^{3} f p x^{4} - {\left (3 \, d^{2} e f - 2 \, d^{3} g\right )} p\right )} \log \left (e x^{2} + d\right ) - 6 \, {\left (2 \, e^{3} g x^{6} + 3 \, e^{3} f x^{4}\right )} \log \left (c\right )}{72 \, e^{3}} \] Input:

integrate(x^3*(g*x^2+f)*log(c*(e*x^2+d)^p),x, algorithm="fricas")
 

Output:

-1/72*(4*e^3*g*p*x^6 + 3*(3*e^3*f - 2*d*e^2*g)*p*x^4 - 6*(3*d*e^2*f - 2*d^ 
2*e*g)*p*x^2 - 6*(2*e^3*g*p*x^6 + 3*e^3*f*p*x^4 - (3*d^2*e*f - 2*d^3*g)*p) 
*log(e*x^2 + d) - 6*(2*e^3*g*x^6 + 3*e^3*f*x^4)*log(c))/e^3
                                                                                    
                                                                                    
 

Sympy [A] (verification not implemented)

Time = 63.91 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.31 \[ \int x^3 \left (f+g x^2\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\begin {cases} \frac {d^{3} g \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{6 e^{3}} - \frac {d^{2} f \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{4 e^{2}} - \frac {d^{2} g p x^{2}}{6 e^{2}} + \frac {d f p x^{2}}{4 e} + \frac {d g p x^{4}}{12 e} - \frac {f p x^{4}}{8} + \frac {f x^{4} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{4} - \frac {g p x^{6}}{18} + \frac {g x^{6} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{6} & \text {for}\: e \neq 0 \\\left (\frac {f x^{4}}{4} + \frac {g x^{6}}{6}\right ) \log {\left (c d^{p} \right )} & \text {otherwise} \end {cases} \] Input:

integrate(x**3*(g*x**2+f)*ln(c*(e*x**2+d)**p),x)
 

Output:

Piecewise((d**3*g*log(c*(d + e*x**2)**p)/(6*e**3) - d**2*f*log(c*(d + e*x* 
*2)**p)/(4*e**2) - d**2*g*p*x**2/(6*e**2) + d*f*p*x**2/(4*e) + d*g*p*x**4/ 
(12*e) - f*p*x**4/8 + f*x**4*log(c*(d + e*x**2)**p)/4 - g*p*x**6/18 + g*x* 
*6*log(c*(d + e*x**2)**p)/6, Ne(e, 0)), ((f*x**4/4 + g*x**6/6)*log(c*d**p) 
, True))
 

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.91 \[ \int x^3 \left (f+g x^2\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=-\frac {1}{72} \, e p {\left (\frac {4 \, e^{2} g x^{6} + 3 \, {\left (3 \, e^{2} f - 2 \, d e g\right )} x^{4} - 6 \, {\left (3 \, d e f - 2 \, d^{2} g\right )} x^{2}}{e^{3}} + \frac {6 \, {\left (3 \, d^{2} e f - 2 \, d^{3} g\right )} \log \left (e x^{2} + d\right )}{e^{4}}\right )} + \frac {1}{12} \, {\left (2 \, g x^{6} + 3 \, f x^{4}\right )} \log \left ({\left (e x^{2} + d\right )}^{p} c\right ) \] Input:

integrate(x^3*(g*x^2+f)*log(c*(e*x^2+d)^p),x, algorithm="maxima")
 

Output:

-1/72*e*p*((4*e^2*g*x^6 + 3*(3*e^2*f - 2*d*e*g)*x^4 - 6*(3*d*e*f - 2*d^2*g 
)*x^2)/e^3 + 6*(3*d^2*e*f - 2*d^3*g)*log(e*x^2 + d)/e^4) + 1/12*(2*g*x^6 + 
 3*f*x^4)*log((e*x^2 + d)^p*c)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 269 vs. \(2 (107) = 214\).

Time = 0.13 (sec) , antiderivative size = 269, normalized size of antiderivative = 2.26 \[ \int x^3 \left (f+g x^2\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\frac {{\left (e x^{2} + d\right )}^{2} f p \log \left (e x^{2} + d\right )}{4 \, e^{2}} + \frac {{\left (e x^{2} + d\right )}^{3} g p \log \left (e x^{2} + d\right )}{6 \, e^{3}} - \frac {{\left (e x^{2} + d\right )}^{2} d g p \log \left (e x^{2} + d\right )}{2 \, e^{3}} - \frac {{\left (e x^{2} + d\right )}^{2} f p}{8 \, e^{2}} - \frac {{\left (e x^{2} + d\right )}^{3} g p}{18 \, e^{3}} + \frac {{\left (e x^{2} + d\right )}^{2} d g p}{4 \, e^{3}} + \frac {{\left (e x^{2} + d\right )}^{2} f \log \left (c\right )}{4 \, e^{2}} + \frac {{\left (e x^{2} + d\right )}^{3} g \log \left (c\right )}{6 \, e^{3}} - \frac {{\left (e x^{2} + d\right )}^{2} d g \log \left (c\right )}{2 \, e^{3}} + \frac {{\left (e x^{2} - {\left (e x^{2} + d\right )} \log \left (e x^{2} + d\right ) + d\right )} d e f p - {\left (e x^{2} - {\left (e x^{2} + d\right )} \log \left (e x^{2} + d\right ) + d\right )} d^{2} g p - {\left (e x^{2} + d\right )} d e f \log \left (c\right ) + {\left (e x^{2} + d\right )} d^{2} g \log \left (c\right )}{2 \, e^{3}} \] Input:

integrate(x^3*(g*x^2+f)*log(c*(e*x^2+d)^p),x, algorithm="giac")
 

Output:

1/4*(e*x^2 + d)^2*f*p*log(e*x^2 + d)/e^2 + 1/6*(e*x^2 + d)^3*g*p*log(e*x^2 
 + d)/e^3 - 1/2*(e*x^2 + d)^2*d*g*p*log(e*x^2 + d)/e^3 - 1/8*(e*x^2 + d)^2 
*f*p/e^2 - 1/18*(e*x^2 + d)^3*g*p/e^3 + 1/4*(e*x^2 + d)^2*d*g*p/e^3 + 1/4* 
(e*x^2 + d)^2*f*log(c)/e^2 + 1/6*(e*x^2 + d)^3*g*log(c)/e^3 - 1/2*(e*x^2 + 
 d)^2*d*g*log(c)/e^3 + 1/2*((e*x^2 - (e*x^2 + d)*log(e*x^2 + d) + d)*d*e*f 
*p - (e*x^2 - (e*x^2 + d)*log(e*x^2 + d) + d)*d^2*g*p - (e*x^2 + d)*d*e*f* 
log(c) + (e*x^2 + d)*d^2*g*log(c))/e^3
 

Mupad [B] (verification not implemented)

Time = 25.94 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.87 \[ \int x^3 \left (f+g x^2\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\ln \left (c\,{\left (e\,x^2+d\right )}^p\right )\,\left (\frac {g\,x^6}{6}+\frac {f\,x^4}{4}\right )-x^4\,\left (\frac {f\,p}{8}-\frac {d\,g\,p}{12\,e}\right )-\frac {g\,p\,x^6}{18}+\frac {\ln \left (e\,x^2+d\right )\,\left (2\,d^3\,g\,p-3\,d^2\,e\,f\,p\right )}{12\,e^3}+\frac {d\,x^2\,\left (\frac {f\,p}{2}-\frac {d\,g\,p}{3\,e}\right )}{2\,e} \] Input:

int(x^3*log(c*(d + e*x^2)^p)*(f + g*x^2),x)
 

Output:

log(c*(d + e*x^2)^p)*((f*x^4)/4 + (g*x^6)/6) - x^4*((f*p)/8 - (d*g*p)/(12* 
e)) - (g*p*x^6)/18 + (log(d + e*x^2)*(2*d^3*g*p - 3*d^2*e*f*p))/(12*e^3) + 
 (d*x^2*((f*p)/2 - (d*g*p)/(3*e)))/(2*e)
 

Reduce [B] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.16 \[ \int x^3 \left (f+g x^2\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\frac {12 \,\mathrm {log}\left (\left (e \,x^{2}+d \right )^{p} c \right ) d^{3} g -18 \,\mathrm {log}\left (\left (e \,x^{2}+d \right )^{p} c \right ) d^{2} e f +18 \,\mathrm {log}\left (\left (e \,x^{2}+d \right )^{p} c \right ) e^{3} f \,x^{4}+12 \,\mathrm {log}\left (\left (e \,x^{2}+d \right )^{p} c \right ) e^{3} g \,x^{6}-12 d^{2} e g p \,x^{2}+18 d \,e^{2} f p \,x^{2}+6 d \,e^{2} g p \,x^{4}-9 e^{3} f p \,x^{4}-4 e^{3} g p \,x^{6}}{72 e^{3}} \] Input:

int(x^3*(g*x^2+f)*log(c*(e*x^2+d)^p),x)
 

Output:

(12*log((d + e*x**2)**p*c)*d**3*g - 18*log((d + e*x**2)**p*c)*d**2*e*f + 1 
8*log((d + e*x**2)**p*c)*e**3*f*x**4 + 12*log((d + e*x**2)**p*c)*e**3*g*x* 
*6 - 12*d**2*e*g*p*x**2 + 18*d*e**2*f*p*x**2 + 6*d*e**2*g*p*x**4 - 9*e**3* 
f*p*x**4 - 4*e**3*g*p*x**6)/(72*e**3)