Integrand size = 20, antiderivative size = 117 \[ \int \left (f+g x^2\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=-2 f p x+\frac {2 d g p x}{3 e}-\frac {2}{9} g p x^3+\frac {2 \sqrt {d} f p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {2 d^{3/2} g p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{3 e^{3/2}}+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{3} g x^3 \log \left (c \left (d+e x^2\right )^p\right ) \] Output:
-2*f*p*x+2/3*d*g*p*x/e-2/9*g*p*x^3+2*d^(1/2)*f*p*arctan(e^(1/2)*x/d^(1/2)) /e^(1/2)-2/3*d^(3/2)*g*p*arctan(e^(1/2)*x/d^(1/2))/e^(3/2)+f*x*ln(c*(e*x^2 +d)^p)+1/3*g*x^3*ln(c*(e*x^2+d)^p)
Time = 0.05 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.00 \[ \int \left (f+g x^2\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=-2 f p x+\frac {2 d g p x}{3 e}-\frac {2}{9} g p x^3+\frac {2 \sqrt {d} f p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {2 d^{3/2} g p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{3 e^{3/2}}+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{3} g x^3 \log \left (c \left (d+e x^2\right )^p\right ) \] Input:
Integrate[(f + g*x^2)*Log[c*(d + e*x^2)^p],x]
Output:
-2*f*p*x + (2*d*g*p*x)/(3*e) - (2*g*p*x^3)/9 + (2*Sqrt[d]*f*p*ArcTan[(Sqrt [e]*x)/Sqrt[d]])/Sqrt[e] - (2*d^(3/2)*g*p*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/(3* e^(3/2)) + f*x*Log[c*(d + e*x^2)^p] + (g*x^3*Log[c*(d + e*x^2)^p])/3
Time = 0.46 (sec) , antiderivative size = 117, 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.100, 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^2\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx\) |
\(\Big \downarrow \) 2921 |
\(\displaystyle \int \left (f \log \left (c \left (d+e x^2\right )^p\right )+g x^2 \log \left (c \left (d+e x^2\right )^p\right )\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {2 d^{3/2} g p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{3 e^{3/2}}+\frac {2 \sqrt {d} f p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{3} g x^3 \log \left (c \left (d+e x^2\right )^p\right )+\frac {2 d g p x}{3 e}-2 f p x-\frac {2}{9} g p x^3\) |
Input:
Int[(f + g*x^2)*Log[c*(d + e*x^2)^p],x]
Output:
-2*f*p*x + (2*d*g*p*x)/(3*e) - (2*g*p*x^3)/9 + (2*Sqrt[d]*f*p*ArcTan[(Sqrt [e]*x)/Sqrt[d]])/Sqrt[e] - (2*d^(3/2)*g*p*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/(3* e^(3/2)) + f*x*Log[c*(d + e*x^2)^p] + (g*x^3*Log[c*(d + e*x^2)^p])/3
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]))
Time = 0.88 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.76
method | result | size |
parts | \(\frac {g \,x^{3} \ln \left (c \left (e \,x^{2}+d \right )^{p}\right )}{3}+f x \ln \left (c \left (e \,x^{2}+d \right )^{p}\right )-\frac {2 e p \left (-\frac {-\frac {1}{3} e g \,x^{3}+x d g -3 e f x}{e^{2}}+\frac {d \left (d g -3 e f \right ) \arctan \left (\frac {x e}{\sqrt {d e}}\right )}{e^{2} \sqrt {d e}}\right )}{3}\) | \(89\) |
risch | \(\left (\frac {1}{3} g \,x^{3}+f x \right ) \ln \left (\left (e \,x^{2}+d \right )^{p}\right )+\frac {i \pi g \,x^{3} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} \operatorname {csgn}\left (i c \right )}{6}-\frac {i \pi g \,x^{3} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{3}}{6}-\frac {i x \pi f \,\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 x \pi f {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} \operatorname {csgn}\left (i c \right )}{2}-\frac {i \pi g \,x^{3} \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 )}{6}+\frac {i \pi g \,x^{3} \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}}{6}-\frac {i x \pi f {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{3}}{2}+\frac {i x \pi f \,\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 {\ln \left (c \right ) g \,x^{3}}{3}-\frac {2 g p \,x^{3}}{9}+\frac {\sqrt {-d e}\, p \ln \left (-\sqrt {-d e}\, x -d \right ) d g}{3 e^{2}}-\frac {\sqrt {-d e}\, p \ln \left (-\sqrt {-d e}\, x -d \right ) f}{e}-\frac {\sqrt {-d e}\, p \ln \left (\sqrt {-d e}\, x -d \right ) d g}{3 e^{2}}+\frac {\sqrt {-d e}\, p \ln \left (\sqrt {-d e}\, x -d \right ) f}{e}+\ln \left (c \right ) f x +\frac {2 d g p x}{3 e}-2 f p x\) | \(416\) |
Input:
int((g*x^2+f)*ln(c*(e*x^2+d)^p),x,method=_RETURNVERBOSE)
Output:
1/3*g*x^3*ln(c*(e*x^2+d)^p)+f*x*ln(c*(e*x^2+d)^p)-2/3*e*p*(-1/e^2*(-1/3*e* g*x^3+x*d*g-3*e*f*x)+d*(d*g-3*e*f)/e^2/(d*e)^(1/2)*arctan(x*e/(d*e)^(1/2)) )
Time = 0.10 (sec) , antiderivative size = 220, normalized size of antiderivative = 1.88 \[ \int \left (f+g x^2\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\left [-\frac {2 \, e g p x^{3} + 3 \, {\left (3 \, e f - d g\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 ) + 6 \, {\left (3 \, e f - d g\right )} p x - 3 \, {\left (e g p x^{3} + 3 \, e f p x\right )} \log \left (e x^{2} + d\right ) - 3 \, {\left (e g x^{3} + 3 \, e f x\right )} \log \left (c\right )}{9 \, e}, -\frac {2 \, e g p x^{3} - 6 \, {\left (3 \, e f - d g\right )} p \sqrt {\frac {d}{e}} \arctan \left (\frac {e x \sqrt {\frac {d}{e}}}{d}\right ) + 6 \, {\left (3 \, e f - d g\right )} p x - 3 \, {\left (e g p x^{3} + 3 \, e f p x\right )} \log \left (e x^{2} + d\right ) - 3 \, {\left (e g x^{3} + 3 \, e f x\right )} \log \left (c\right )}{9 \, e}\right ] \] Input:
integrate((g*x^2+f)*log(c*(e*x^2+d)^p),x, algorithm="fricas")
Output:
[-1/9*(2*e*g*p*x^3 + 3*(3*e*f - d*g)*p*sqrt(-d/e)*log((e*x^2 - 2*e*x*sqrt( -d/e) - d)/(e*x^2 + d)) + 6*(3*e*f - d*g)*p*x - 3*(e*g*p*x^3 + 3*e*f*p*x)* log(e*x^2 + d) - 3*(e*g*x^3 + 3*e*f*x)*log(c))/e, -1/9*(2*e*g*p*x^3 - 6*(3 *e*f - d*g)*p*sqrt(d/e)*arctan(e*x*sqrt(d/e)/d) + 6*(3*e*f - d*g)*p*x - 3* (e*g*p*x^3 + 3*e*f*p*x)*log(e*x^2 + d) - 3*(e*g*x^3 + 3*e*f*x)*log(c))/e]
Leaf count of result is larger than twice the leaf count of optimal. 260 vs. \(2 (121) = 242\).
Time = 8.27 (sec) , antiderivative size = 260, normalized size of antiderivative = 2.22 \[ \int \left (f+g x^2\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\begin {cases} \left (f x + \frac {g x^{3}}{3}\right ) \log {\left (0^{p} c \right )} & \text {for}\: d = 0 \wedge e = 0 \\\left (f x + \frac {g x^{3}}{3}\right ) \log {\left (c d^{p} \right )} & \text {for}\: e = 0 \\- 2 f p x + f x \log {\left (c \left (e x^{2}\right )^{p} \right )} - \frac {2 g p x^{3}}{9} + \frac {g x^{3} \log {\left (c \left (e x^{2}\right )^{p} \right )}}{3} & \text {for}\: d = 0 \\- \frac {2 d^{2} g p \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{3 e^{2} \sqrt {- \frac {d}{e}}} + \frac {d^{2} g \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{3 e^{2} \sqrt {- \frac {d}{e}}} + \frac {2 d f p \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{e \sqrt {- \frac {d}{e}}} - \frac {d f \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{e \sqrt {- \frac {d}{e}}} + \frac {2 d g p x}{3 e} - 2 f p x + f x \log {\left (c \left (d + e x^{2}\right )^{p} \right )} - \frac {2 g p x^{3}}{9} + \frac {g x^{3} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{3} & \text {otherwise} \end {cases} \] Input:
integrate((g*x**2+f)*ln(c*(e*x**2+d)**p),x)
Output:
Piecewise(((f*x + g*x**3/3)*log(0**p*c), Eq(d, 0) & Eq(e, 0)), ((f*x + g*x **3/3)*log(c*d**p), Eq(e, 0)), (-2*f*p*x + f*x*log(c*(e*x**2)**p) - 2*g*p* x**3/9 + g*x**3*log(c*(e*x**2)**p)/3, Eq(d, 0)), (-2*d**2*g*p*log(x - sqrt (-d/e))/(3*e**2*sqrt(-d/e)) + d**2*g*log(c*(d + e*x**2)**p)/(3*e**2*sqrt(- d/e)) + 2*d*f*p*log(x - sqrt(-d/e))/(e*sqrt(-d/e)) - d*f*log(c*(d + e*x**2 )**p)/(e*sqrt(-d/e)) + 2*d*g*p*x/(3*e) - 2*f*p*x + f*x*log(c*(d + e*x**2)* *p) - 2*g*p*x**3/9 + g*x**3*log(c*(d + e*x**2)**p)/3, True))
Exception generated. \[ \int \left (f+g x^2\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\text {Exception raised: ValueError} \] Input:
integrate((g*x^2+f)*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
Time = 0.12 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.80 \[ \int \left (f+g x^2\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=-\frac {1}{9} \, {\left (2 \, g p - 3 \, g \log \left (c\right )\right )} x^{3} + \frac {1}{3} \, {\left (g p x^{3} + 3 \, f p x\right )} \log \left (e x^{2} + d\right ) - \frac {{\left (6 \, e f p - 2 \, d g p - 3 \, e f \log \left (c\right )\right )} x}{3 \, e} + \frac {2 \, {\left (3 \, d e f p - d^{2} g p\right )} \arctan \left (\frac {e x}{\sqrt {d e}}\right )}{3 \, \sqrt {d e} e} \] Input:
integrate((g*x^2+f)*log(c*(e*x^2+d)^p),x, algorithm="giac")
Output:
-1/9*(2*g*p - 3*g*log(c))*x^3 + 1/3*(g*p*x^3 + 3*f*p*x)*log(e*x^2 + d) - 1 /3*(6*e*f*p - 2*d*g*p - 3*e*f*log(c))*x/e + 2/3*(3*d*e*f*p - d^2*g*p)*arct an(e*x/sqrt(d*e))/(sqrt(d*e)*e)
Time = 25.95 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.83 \[ \int \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^3}{3}+f\,x\right )-x\,\left (2\,f\,p-\frac {2\,d\,g\,p}{3\,e}\right )-\frac {2\,g\,p\,x^3}{9}-\frac {2\,\sqrt {d}\,p\,\mathrm {atan}\left (\frac {\sqrt {d}\,\sqrt {e}\,p\,x\,\left (d\,g-3\,e\,f\right )}{d^2\,g\,p-3\,d\,e\,f\,p}\right )\,\left (d\,g-3\,e\,f\right )}{3\,e^{3/2}} \] Input:
int(log(c*(d + e*x^2)^p)*(f + g*x^2),x)
Output:
log(c*(d + e*x^2)^p)*(f*x + (g*x^3)/3) - x*(2*f*p - (2*d*g*p)/(3*e)) - (2* g*p*x^3)/9 - (2*d^(1/2)*p*atan((d^(1/2)*e^(1/2)*p*x*(d*g - 3*e*f))/(d^2*g* p - 3*d*e*f*p))*(d*g - 3*e*f))/(3*e^(3/2))
Time = 0.15 (sec) , antiderivative size = 113, normalized size of antiderivative = 0.97 \[ \int \left (f+g x^2\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\frac {-6 \sqrt {e}\, \sqrt {d}\, \mathit {atan} \left (\frac {e x}{\sqrt {e}\, \sqrt {d}}\right ) d g p +18 \sqrt {e}\, \sqrt {d}\, \mathit {atan} \left (\frac {e x}{\sqrt {e}\, \sqrt {d}}\right ) e f p +9 \,\mathrm {log}\left (\left (e \,x^{2}+d \right )^{p} c \right ) e^{2} f x +3 \,\mathrm {log}\left (\left (e \,x^{2}+d \right )^{p} c \right ) e^{2} g \,x^{3}+6 d e g p x -18 e^{2} f p x -2 e^{2} g p \,x^{3}}{9 e^{2}} \] Input:
int((g*x^2+f)*log(c*(e*x^2+d)^p),x)
Output:
( - 6*sqrt(e)*sqrt(d)*atan((e*x)/(sqrt(e)*sqrt(d)))*d*g*p + 18*sqrt(e)*sqr t(d)*atan((e*x)/(sqrt(e)*sqrt(d)))*e*f*p + 9*log((d + e*x**2)**p*c)*e**2*f *x + 3*log((d + e*x**2)**p*c)*e**2*g*x**3 + 6*d*e*g*p*x - 18*e**2*f*p*x - 2*e**2*g*p*x**3)/(9*e**2)