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

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

Optimal result

Integrand size = 22, antiderivative size = 231 \[ \int \left (f+g x^3\right )^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx=-2 f^2 p x+\frac {2 d^3 g^2 p x}{7 e^3}+\frac {d f g p x^2}{2 e}-\frac {2 d^2 g^2 p x^3}{21 e^2}-\frac {1}{4} f g p x^4+\frac {2 d g^2 p x^5}{35 e}-\frac {2}{49} g^2 p x^7+\frac {2 \sqrt {d} f^2 p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {2 d^{7/2} g^2 p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{7 e^{7/2}}-\frac {d^2 f g p \log \left (d+e x^2\right )}{2 e^2}+f^2 x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{2} f g x^4 \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{7} g^2 x^7 \log \left (c \left (d+e x^2\right )^p\right ) \] Output:

-2*f^2*p*x+2/7*d^3*g^2*p*x/e^3+1/2*d*f*g*p*x^2/e-2/21*d^2*g^2*p*x^3/e^2-1/ 
4*f*g*p*x^4+2/35*d*g^2*p*x^5/e-2/49*g^2*p*x^7+2*d^(1/2)*f^2*p*arctan(e^(1/ 
2)*x/d^(1/2))/e^(1/2)-2/7*d^(7/2)*g^2*p*arctan(e^(1/2)*x/d^(1/2))/e^(7/2)- 
1/2*d^2*f*g*p*ln(e*x^2+d)/e^2+f^2*x*ln(c*(e*x^2+d)^p)+1/2*f*g*x^4*ln(c*(e* 
x^2+d)^p)+1/7*g^2*x^7*ln(c*(e*x^2+d)^p)
 

Mathematica [A] (verified)

Time = 0.21 (sec) , antiderivative size = 178, normalized size of antiderivative = 0.77 \[ \int \left (f+g x^3\right )^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\frac {p x \left (840 d^3 g^2-280 d^2 e g^2 x^2+42 d e^2 g x \left (35 f+4 g x^3\right )-15 e^3 \left (392 f^2+49 f g x^3+8 g^2 x^6\right )\right )}{2940 e^3}-\frac {2 \sqrt {d} \left (-7 e^3 f^2+d^3 g^2\right ) p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{7 e^{7/2}}-\frac {d^2 f g p \log \left (d+e x^2\right )}{2 e^2}+\frac {1}{14} x \left (14 f^2+7 f g x^3+2 g^2 x^6\right ) \log \left (c \left (d+e x^2\right )^p\right ) \] Input:

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

Output:

(p*x*(840*d^3*g^2 - 280*d^2*e*g^2*x^2 + 42*d*e^2*g*x*(35*f + 4*g*x^3) - 15 
*e^3*(392*f^2 + 49*f*g*x^3 + 8*g^2*x^6)))/(2940*e^3) - (2*Sqrt[d]*(-7*e^3* 
f^2 + d^3*g^2)*p*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/(7*e^(7/2)) - (d^2*f*g*p*Log 
[d + e*x^2])/(2*e^2) + (x*(14*f^2 + 7*f*g*x^3 + 2*g^2*x^6)*Log[c*(d + e*x^ 
2)^p])/14
 

Rubi [A] (verified)

Time = 0.69 (sec) , antiderivative size = 231, 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.091, Rules used = {2921, 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 \left (f+g x^3\right )^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx\)

\(\Big \downarrow \) 2921

\(\displaystyle \int \left (f^2 \log \left (c \left (d+e x^2\right )^p\right )+2 f g x^3 \log \left (c \left (d+e x^2\right )^p\right )+g^2 x^6 \log \left (c \left (d+e x^2\right )^p\right )\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {2 d^{7/2} g^2 p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{7 e^{7/2}}+\frac {2 \sqrt {d} f^2 p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}+f^2 x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{2} f g x^4 \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{7} g^2 x^7 \log \left (c \left (d+e x^2\right )^p\right )+\frac {2 d^3 g^2 p x}{7 e^3}-\frac {d^2 f g p \log \left (d+e x^2\right )}{2 e^2}-\frac {2 d^2 g^2 p x^3}{21 e^2}+\frac {d f g p x^2}{2 e}+\frac {2 d g^2 p x^5}{35 e}-2 f^2 p x-\frac {1}{4} f g p x^4-\frac {2}{49} g^2 p x^7\)

Input:

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

Output:

-2*f^2*p*x + (2*d^3*g^2*p*x)/(7*e^3) + (d*f*g*p*x^2)/(2*e) - (2*d^2*g^2*p* 
x^3)/(21*e^2) - (f*g*p*x^4)/4 + (2*d*g^2*p*x^5)/(35*e) - (2*g^2*p*x^7)/49 
+ (2*Sqrt[d]*f^2*p*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/Sqrt[e] - (2*d^(7/2)*g^2*p 
*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/(7*e^(7/2)) - (d^2*f*g*p*Log[d + e*x^2])/(2* 
e^2) + f^2*x*Log[c*(d + e*x^2)^p] + (f*g*x^4*Log[c*(d + e*x^2)^p])/2 + (g^ 
2*x^7*Log[c*(d + e*x^2)^p])/7
 

Defintions of rubi rules used

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

rule 2921
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*((f_) + 
 (g_.)*(x_)^(s_))^(r_.), x_Symbol] :> With[{t = ExpandIntegrand[(a + b*Log[ 
c*(d + e*x^n)^p])^q, (f + g*x^s)^r, x]}, Int[t, x] /; SumQ[t]] /; FreeQ[{a, 
 b, c, d, e, f, g, n, p, q, r, s}, x] && IntegerQ[n] && IGtQ[q, 0] && Integ 
erQ[r] && IntegerQ[s] && (EqQ[q, 1] || (GtQ[r, 0] && GtQ[s, 1]) || (LtQ[s, 
0] && LtQ[r, 0]))
 
Maple [A] (verified)

Time = 5.22 (sec) , antiderivative size = 195, normalized size of antiderivative = 0.84

method result size
parts \(\frac {g^{2} x^{7} \ln \left (c \left (e \,x^{2}+d \right )^{p}\right )}{7}+\frac {f g \,x^{4} \ln \left (c \left (e \,x^{2}+d \right )^{p}\right )}{2}+f^{2} x \ln \left (c \left (e \,x^{2}+d \right )^{p}\right )-\frac {e p \left (-\frac {-\frac {2}{7} e^{3} g^{2} x^{7}+\frac {2}{5} d \,e^{2} g^{2} x^{5}-\frac {7}{4} e^{3} f g \,x^{4}-\frac {2}{3} d^{2} e \,g^{2} x^{3}+\frac {7}{2} d f g \,x^{2} e^{2}+2 d^{3} x \,g^{2}-14 x \,e^{3} f^{2}}{e^{4}}+\frac {d \left (\frac {7 d e f g \ln \left (e \,x^{2}+d \right )}{2}+\frac {\left (2 d^{3} g^{2}-14 e^{3} f^{2}\right ) \arctan \left (\frac {x e}{\sqrt {d e}}\right )}{\sqrt {d e}}\right )}{e^{4}}\right )}{7}\) \(195\)
risch \(-\frac {p \ln \left (-d^{4} g^{2}+7 d \,e^{3} f^{2}+\sqrt {-d^{7} e \,g^{4}+14 d^{4} e^{4} f^{2} g^{2}-49 d \,e^{7} f^{4}}\, x \right ) \sqrt {-d^{7} e \,g^{4}+14 d^{4} e^{4} f^{2} g^{2}-49 d \,e^{7} f^{4}}}{7 e^{4}}+\frac {\ln \left (c \right ) f g \,x^{4}}{2}+\frac {p \ln \left (-d^{4} g^{2}+7 d \,e^{3} f^{2}-\sqrt {-d^{7} e \,g^{4}+14 d^{4} e^{4} f^{2} g^{2}-49 d \,e^{7} f^{4}}\, x \right ) \sqrt {-d^{7} e \,g^{4}+14 d^{4} e^{4} f^{2} g^{2}-49 d \,e^{7} f^{4}}}{7 e^{4}}+\frac {i x \pi \,f^{2} \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}}{2}-\frac {f g p \,x^{4}}{4}-\frac {p \ln \left (-d^{4} g^{2}+7 d \,e^{3} f^{2}+\sqrt {-d^{7} e \,g^{4}+14 d^{4} e^{4} f^{2} g^{2}-49 d \,e^{7} f^{4}}\, x \right ) d^{2} f g}{2 e^{2}}-\frac {p \ln \left (-d^{4} g^{2}+7 d \,e^{3} f^{2}-\sqrt {-d^{7} e \,g^{4}+14 d^{4} e^{4} f^{2} g^{2}-49 d \,e^{7} f^{4}}\, x \right ) d^{2} f g}{2 e^{2}}+\frac {d f g p \,x^{2}}{2 e}-\frac {i \pi \,g^{2} x^{7} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{3}}{14}-\frac {i x \pi \,f^{2} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{3}}{2}+\frac {i \pi \,g^{2} x^{7} \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}}{14}+\frac {i \pi \,g^{2} x^{7} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} \operatorname {csgn}\left (i c \right )}{14}-\frac {i \pi f g \,x^{4} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{3}}{4}-\frac {i \pi f g \,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 )}{4}-\frac {i x \pi \,f^{2} \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 )}{2}+\frac {i \pi f g \,x^{4} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} \operatorname {csgn}\left (i c \right )}{4}+\frac {i \pi f g \,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}}{4}-\frac {i \pi \,g^{2} x^{7} \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 )}{14}+\left (\frac {1}{7} g^{2} x^{7}+\frac {1}{2} f g \,x^{4}+f^{2} x \right ) \ln \left (\left (e \,x^{2}+d \right )^{p}\right )+\frac {i x \pi \,f^{2} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} \operatorname {csgn}\left (i c \right )}{2}+x \ln \left (c \right ) f^{2}+\frac {\ln \left (c \right ) g^{2} x^{7}}{7}-2 f^{2} p x +\frac {2 d^{3} g^{2} p x}{7 e^{3}}-\frac {2 d^{2} g^{2} p \,x^{3}}{21 e^{2}}+\frac {2 d \,g^{2} p \,x^{5}}{35 e}-\frac {2 g^{2} p \,x^{7}}{49}\) \(869\)

Input:

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

Output:

1/7*g^2*x^7*ln(c*(e*x^2+d)^p)+1/2*f*g*x^4*ln(c*(e*x^2+d)^p)+f^2*x*ln(c*(e* 
x^2+d)^p)-1/7*e*p*(-1/e^4*(-2/7*e^3*g^2*x^7+2/5*d*e^2*g^2*x^5-7/4*e^3*f*g* 
x^4-2/3*d^2*e*g^2*x^3+7/2*d*f*g*x^2*e^2+2*d^3*x*g^2-14*x*e^3*f^2)+1/e^4*d* 
(7/2*d*e*f*g*ln(e*x^2+d)+(2*d^3*g^2-14*e^3*f^2)/(d*e)^(1/2)*arctan(x*e/(d* 
e)^(1/2))))
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 454, normalized size of antiderivative = 1.97 \[ \int \left (f+g x^3\right )^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\left [-\frac {120 \, e^{3} g^{2} p x^{7} - 168 \, d e^{2} g^{2} p x^{5} + 735 \, e^{3} f g p x^{4} + 280 \, d^{2} e g^{2} p x^{3} - 1470 \, d e^{2} f g p x^{2} + 420 \, {\left (7 \, e^{3} f^{2} - d^{3} g^{2}\right )} p \sqrt {-\frac {d}{e}} \log \left (\frac {e x^{2} - 2 \, e x \sqrt {-\frac {d}{e}} - d}{e x^{2} + d}\right ) + 840 \, {\left (7 \, e^{3} f^{2} - d^{3} g^{2}\right )} p x - 210 \, {\left (2 \, e^{3} g^{2} p x^{7} + 7 \, e^{3} f g p x^{4} + 14 \, e^{3} f^{2} p x - 7 \, d^{2} e f g p\right )} \log \left (e x^{2} + d\right ) - 210 \, {\left (2 \, e^{3} g^{2} x^{7} + 7 \, e^{3} f g x^{4} + 14 \, e^{3} f^{2} x\right )} \log \left (c\right )}{2940 \, e^{3}}, -\frac {120 \, e^{3} g^{2} p x^{7} - 168 \, d e^{2} g^{2} p x^{5} + 735 \, e^{3} f g p x^{4} + 280 \, d^{2} e g^{2} p x^{3} - 1470 \, d e^{2} f g p x^{2} - 840 \, {\left (7 \, e^{3} f^{2} - d^{3} g^{2}\right )} p \sqrt {\frac {d}{e}} \arctan \left (\frac {e x \sqrt {\frac {d}{e}}}{d}\right ) + 840 \, {\left (7 \, e^{3} f^{2} - d^{3} g^{2}\right )} p x - 210 \, {\left (2 \, e^{3} g^{2} p x^{7} + 7 \, e^{3} f g p x^{4} + 14 \, e^{3} f^{2} p x - 7 \, d^{2} e f g p\right )} \log \left (e x^{2} + d\right ) - 210 \, {\left (2 \, e^{3} g^{2} x^{7} + 7 \, e^{3} f g x^{4} + 14 \, e^{3} f^{2} x\right )} \log \left (c\right )}{2940 \, e^{3}}\right ] \] Input:

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

Output:

[-1/2940*(120*e^3*g^2*p*x^7 - 168*d*e^2*g^2*p*x^5 + 735*e^3*f*g*p*x^4 + 28 
0*d^2*e*g^2*p*x^3 - 1470*d*e^2*f*g*p*x^2 + 420*(7*e^3*f^2 - d^3*g^2)*p*sqr 
t(-d/e)*log((e*x^2 - 2*e*x*sqrt(-d/e) - d)/(e*x^2 + d)) + 840*(7*e^3*f^2 - 
 d^3*g^2)*p*x - 210*(2*e^3*g^2*p*x^7 + 7*e^3*f*g*p*x^4 + 14*e^3*f^2*p*x - 
7*d^2*e*f*g*p)*log(e*x^2 + d) - 210*(2*e^3*g^2*x^7 + 7*e^3*f*g*x^4 + 14*e^ 
3*f^2*x)*log(c))/e^3, -1/2940*(120*e^3*g^2*p*x^7 - 168*d*e^2*g^2*p*x^5 + 7 
35*e^3*f*g*p*x^4 + 280*d^2*e*g^2*p*x^3 - 1470*d*e^2*f*g*p*x^2 - 840*(7*e^3 
*f^2 - d^3*g^2)*p*sqrt(d/e)*arctan(e*x*sqrt(d/e)/d) + 840*(7*e^3*f^2 - d^3 
*g^2)*p*x - 210*(2*e^3*g^2*p*x^7 + 7*e^3*f*g*p*x^4 + 14*e^3*f^2*p*x - 7*d^ 
2*e*f*g*p)*log(e*x^2 + d) - 210*(2*e^3*g^2*x^7 + 7*e^3*f*g*x^4 + 14*e^3*f^ 
2*x)*log(c))/e^3]
 

Sympy [A] (verification not implemented)

Time = 126.47 (sec) , antiderivative size = 440, normalized size of antiderivative = 1.90 \[ \int \left (f+g x^3\right )^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\begin {cases} \left (f^{2} x + \frac {f g x^{4}}{2} + \frac {g^{2} x^{7}}{7}\right ) \log {\left (0^{p} c \right )} & \text {for}\: d = 0 \wedge e = 0 \\\left (f^{2} x + \frac {f g x^{4}}{2} + \frac {g^{2} x^{7}}{7}\right ) \log {\left (c d^{p} \right )} & \text {for}\: e = 0 \\- 2 f^{2} p x + f^{2} x \log {\left (c \left (e x^{2}\right )^{p} \right )} - \frac {f g p x^{4}}{4} + \frac {f g x^{4} \log {\left (c \left (e x^{2}\right )^{p} \right )}}{2} - \frac {2 g^{2} p x^{7}}{49} + \frac {g^{2} x^{7} \log {\left (c \left (e x^{2}\right )^{p} \right )}}{7} & \text {for}\: d = 0 \\- \frac {2 d^{4} g^{2} p \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{7 e^{4} \sqrt {- \frac {d}{e}}} + \frac {d^{4} g^{2} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{7 e^{4} \sqrt {- \frac {d}{e}}} + \frac {2 d^{3} g^{2} p x}{7 e^{3}} - \frac {d^{2} f g \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{2 e^{2}} - \frac {2 d^{2} g^{2} p x^{3}}{21 e^{2}} + \frac {2 d f^{2} p \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{e \sqrt {- \frac {d}{e}}} - \frac {d f^{2} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{e \sqrt {- \frac {d}{e}}} + \frac {d f g p x^{2}}{2 e} + \frac {2 d g^{2} p x^{5}}{35 e} - 2 f^{2} p x + f^{2} x \log {\left (c \left (d + e x^{2}\right )^{p} \right )} - \frac {f g p x^{4}}{4} + \frac {f g x^{4} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{2} - \frac {2 g^{2} p x^{7}}{49} + \frac {g^{2} x^{7} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{7} & \text {otherwise} \end {cases} \] Input:

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

Output:

Piecewise(((f**2*x + f*g*x**4/2 + g**2*x**7/7)*log(0**p*c), Eq(d, 0) & Eq( 
e, 0)), ((f**2*x + f*g*x**4/2 + g**2*x**7/7)*log(c*d**p), Eq(e, 0)), (-2*f 
**2*p*x + f**2*x*log(c*(e*x**2)**p) - f*g*p*x**4/4 + f*g*x**4*log(c*(e*x** 
2)**p)/2 - 2*g**2*p*x**7/49 + g**2*x**7*log(c*(e*x**2)**p)/7, Eq(d, 0)), ( 
-2*d**4*g**2*p*log(x - sqrt(-d/e))/(7*e**4*sqrt(-d/e)) + d**4*g**2*log(c*( 
d + e*x**2)**p)/(7*e**4*sqrt(-d/e)) + 2*d**3*g**2*p*x/(7*e**3) - d**2*f*g* 
log(c*(d + e*x**2)**p)/(2*e**2) - 2*d**2*g**2*p*x**3/(21*e**2) + 2*d*f**2* 
p*log(x - sqrt(-d/e))/(e*sqrt(-d/e)) - d*f**2*log(c*(d + e*x**2)**p)/(e*sq 
rt(-d/e)) + d*f*g*p*x**2/(2*e) + 2*d*g**2*p*x**5/(35*e) - 2*f**2*p*x + f** 
2*x*log(c*(d + e*x**2)**p) - f*g*p*x**4/4 + f*g*x**4*log(c*(d + e*x**2)**p 
)/2 - 2*g**2*p*x**7/49 + g**2*x**7*log(c*(d + e*x**2)**p)/7, True))
 

Maxima [F(-2)]

Exception generated. \[ \int \left (f+g x^3\right )^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\text {Exception raised: ValueError} \] Input:

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

Output:

Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(e>0)', see `assume?` for more de 
tails)Is e
 

Giac [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 204, normalized size of antiderivative = 0.88 \[ \int \left (f+g x^3\right )^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\frac {2 \, d g^{2} p x^{5}}{35 \, e} - \frac {1}{49} \, {\left (2 \, g^{2} p - 7 \, g^{2} \log \left (c\right )\right )} x^{7} - \frac {2 \, d^{2} g^{2} p x^{3}}{21 \, e^{2}} + \frac {d f g p x^{2}}{2 \, e} - \frac {1}{4} \, {\left (f g p - 2 \, f g \log \left (c\right )\right )} x^{4} - \frac {d^{2} f g p \log \left (e x^{2} + d\right )}{2 \, e^{2}} + \frac {1}{14} \, {\left (2 \, g^{2} p x^{7} + 7 \, f g p x^{4} + 14 \, f^{2} p x\right )} \log \left (e x^{2} + d\right ) - \frac {{\left (14 \, e^{3} f^{2} p - 2 \, d^{3} g^{2} p - 7 \, e^{3} f^{2} \log \left (c\right )\right )} x}{7 \, e^{3}} + \frac {2 \, {\left (7 \, d e^{3} f^{2} p - d^{4} g^{2} p\right )} \arctan \left (\frac {e x}{\sqrt {d e}}\right )}{7 \, \sqrt {d e} e^{3}} \] Input:

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

Output:

2/35*d*g^2*p*x^5/e - 1/49*(2*g^2*p - 7*g^2*log(c))*x^7 - 2/21*d^2*g^2*p*x^ 
3/e^2 + 1/2*d*f*g*p*x^2/e - 1/4*(f*g*p - 2*f*g*log(c))*x^4 - 1/2*d^2*f*g*p 
*log(e*x^2 + d)/e^2 + 1/14*(2*g^2*p*x^7 + 7*f*g*p*x^4 + 14*f^2*p*x)*log(e* 
x^2 + d) - 1/7*(14*e^3*f^2*p - 2*d^3*g^2*p - 7*e^3*f^2*log(c))*x/e^3 + 2/7 
*(7*d*e^3*f^2*p - d^4*g^2*p)*arctan(e*x/sqrt(d*e))/(sqrt(d*e)*e^3)
 

Mupad [B] (verification not implemented)

Time = 28.45 (sec) , antiderivative size = 317, normalized size of antiderivative = 1.37 \[ \int \left (f+g x^3\right )^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\frac {g^2\,x^7\,\ln \left (c\,{\left (e\,x^2+d\right )}^p\right )}{7}-2\,f^2\,p\,x-\frac {2\,g^2\,p\,x^7}{49}+f^2\,x\,\ln \left (c\,{\left (e\,x^2+d\right )}^p\right )+\frac {f\,g\,x^4\,\ln \left (c\,{\left (e\,x^2+d\right )}^p\right )}{2}-\frac {f\,g\,p\,x^4}{4}+\frac {2\,d\,g^2\,p\,x^5}{35\,e}+\frac {2\,d^3\,g^2\,p\,x}{7\,e^3}-\frac {2\,\sqrt {d}\,f^2\,p\,\mathrm {atan}\left (\frac {7\,\sqrt {d}\,e^{7/2}\,f^2\,p\,x}{d^4\,g^2\,p-7\,d\,e^3\,f^2\,p}-\frac {d^{7/2}\,\sqrt {e}\,g^2\,p\,x}{d^4\,g^2\,p-7\,d\,e^3\,f^2\,p}\right )}{\sqrt {e}}+\frac {2\,d^{7/2}\,g^2\,p\,\mathrm {atan}\left (\frac {7\,\sqrt {d}\,e^{7/2}\,f^2\,p\,x}{d^4\,g^2\,p-7\,d\,e^3\,f^2\,p}-\frac {d^{7/2}\,\sqrt {e}\,g^2\,p\,x}{d^4\,g^2\,p-7\,d\,e^3\,f^2\,p}\right )}{7\,e^{7/2}}-\frac {2\,d^2\,g^2\,p\,x^3}{21\,e^2}+\frac {d\,f\,g\,p\,x^2}{2\,e}-\frac {d^2\,f\,g\,p\,\ln \left (e\,x^2+d\right )}{2\,e^2} \] Input:

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

Output:

(g^2*x^7*log(c*(d + e*x^2)^p))/7 - 2*f^2*p*x - (2*g^2*p*x^7)/49 + f^2*x*lo 
g(c*(d + e*x^2)^p) + (f*g*x^4*log(c*(d + e*x^2)^p))/2 - (f*g*p*x^4)/4 + (2 
*d*g^2*p*x^5)/(35*e) + (2*d^3*g^2*p*x)/(7*e^3) - (2*d^(1/2)*f^2*p*atan((7* 
d^(1/2)*e^(7/2)*f^2*p*x)/(d^4*g^2*p - 7*d*e^3*f^2*p) - (d^(7/2)*e^(1/2)*g^ 
2*p*x)/(d^4*g^2*p - 7*d*e^3*f^2*p)))/e^(1/2) + (2*d^(7/2)*g^2*p*atan((7*d^ 
(1/2)*e^(7/2)*f^2*p*x)/(d^4*g^2*p - 7*d*e^3*f^2*p) - (d^(7/2)*e^(1/2)*g^2* 
p*x)/(d^4*g^2*p - 7*d*e^3*f^2*p)))/(7*e^(7/2)) - (2*d^2*g^2*p*x^3)/(21*e^2 
) + (d*f*g*p*x^2)/(2*e) - (d^2*f*g*p*log(d + e*x^2))/(2*e^2)
 

Reduce [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 228, normalized size of antiderivative = 0.99 \[ \int \left (f+g x^3\right )^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\frac {-840 \sqrt {e}\, \sqrt {d}\, \mathit {atan} \left (\frac {e x}{\sqrt {e}\, \sqrt {d}}\right ) d^{3} g^{2} p +5880 \sqrt {e}\, \sqrt {d}\, \mathit {atan} \left (\frac {e x}{\sqrt {e}\, \sqrt {d}}\right ) e^{3} f^{2} p -1470 \,\mathrm {log}\left (\left (e \,x^{2}+d \right )^{p} c \right ) d^{2} e^{2} f g +2940 \,\mathrm {log}\left (\left (e \,x^{2}+d \right )^{p} c \right ) e^{4} f^{2} x +1470 \,\mathrm {log}\left (\left (e \,x^{2}+d \right )^{p} c \right ) e^{4} f g \,x^{4}+420 \,\mathrm {log}\left (\left (e \,x^{2}+d \right )^{p} c \right ) e^{4} g^{2} x^{7}+840 d^{3} e \,g^{2} p x -280 d^{2} e^{2} g^{2} p \,x^{3}+1470 d \,e^{3} f g p \,x^{2}+168 d \,e^{3} g^{2} p \,x^{5}-5880 e^{4} f^{2} p x -735 e^{4} f g p \,x^{4}-120 e^{4} g^{2} p \,x^{7}}{2940 e^{4}} \] Input:

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

Output:

( - 840*sqrt(e)*sqrt(d)*atan((e*x)/(sqrt(e)*sqrt(d)))*d**3*g**2*p + 5880*s 
qrt(e)*sqrt(d)*atan((e*x)/(sqrt(e)*sqrt(d)))*e**3*f**2*p - 1470*log((d + e 
*x**2)**p*c)*d**2*e**2*f*g + 2940*log((d + e*x**2)**p*c)*e**4*f**2*x + 147 
0*log((d + e*x**2)**p*c)*e**4*f*g*x**4 + 420*log((d + e*x**2)**p*c)*e**4*g 
**2*x**7 + 840*d**3*e*g**2*p*x - 280*d**2*e**2*g**2*p*x**3 + 1470*d*e**3*f 
*g*p*x**2 + 168*d*e**3*g**2*p*x**5 - 5880*e**4*f**2*p*x - 735*e**4*f*g*p*x 
**4 - 120*e**4*g**2*p*x**7)/(2940*e**4)