3.33 \(\int \frac{(d x^m+e \log ^{-1+q}(c x^n)) (a x^m+b \log ^q(c x^n))}{x} \, dx\)

Optimal. Leaf size=139 \[ x^m \left (c x^n\right )^{-\frac{m}{n}} \log ^q\left (c x^n\right ) \left (-\frac{m \log \left (c x^n\right )}{n}\right )^{-q} \left (\frac{b d}{m}-\frac{a e}{n q}\right ) \text{Gamma}\left (q+1,-\frac{m \log \left (c x^n\right )}{n}\right )+\frac{e \left (a x^m+b \log ^q\left (c x^n\right )\right )^2}{2 b n q}-\frac{a x^{2 m} (a e m-b d n q)}{2 b m n q} \]

[Out]

-(a*(a*e*m - b*d*n*q)*x^(2*m))/(2*b*m*n*q) + (((b*d)/m - (a*e)/(n*q))*x^m*Gamma[1 + q, -((m*Log[c*x^n])/n)]*Lo
g[c*x^n]^q)/((c*x^n)^(m/n)*(-((m*Log[c*x^n])/n))^q) + (e*(a*x^m + b*Log[c*x^n]^q)^2)/(2*b*n*q)

________________________________________________________________________________________

Rubi [A]  time = 0.170908, antiderivative size = 139, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 38, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {2545, 14, 2310, 2181} \[ x^m \left (c x^n\right )^{-\frac{m}{n}} \log ^q\left (c x^n\right ) \left (-\frac{m \log \left (c x^n\right )}{n}\right )^{-q} \left (\frac{b d}{m}-\frac{a e}{n q}\right ) \text{Gamma}\left (q+1,-\frac{m \log \left (c x^n\right )}{n}\right )+\frac{e \left (a x^m+b \log ^q\left (c x^n\right )\right )^2}{2 b n q}-\frac{a x^{2 m} (a e m-b d n q)}{2 b m n q} \]

Antiderivative was successfully verified.

[In]

Int[((d*x^m + e*Log[c*x^n]^(-1 + q))*(a*x^m + b*Log[c*x^n]^q))/x,x]

[Out]

-(a*(a*e*m - b*d*n*q)*x^(2*m))/(2*b*m*n*q) + (((b*d)/m - (a*e)/(n*q))*x^m*Gamma[1 + q, -((m*Log[c*x^n])/n)]*Lo
g[c*x^n]^q)/((c*x^n)^(m/n)*(-((m*Log[c*x^n])/n))^q) + (e*(a*x^m + b*Log[c*x^n]^q)^2)/(2*b*n*q)

Rule 2545

Int[((Log[(c_.)*(x_)^(n_.)]^(q_)*(b_.) + (a_.)*(x_)^(m_.))^(p_.)*(Log[(c_.)*(x_)^(n_.)]^(r_.)*(e_.) + (d_.)*(x
_)^(m_.)))/(x_), x_Symbol] :> Simp[(e*(a*x^m + b*Log[c*x^n]^q)^(p + 1))/(b*n*q*(p + 1)), x] - Dist[(a*e*m - b*
d*n*q)/(b*n*q), Int[x^(m - 1)*(a*x^m + b*Log[c*x^n]^q)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p, q, r}, x] &
& EqQ[r, q - 1] && NeQ[p, -1] && NeQ[a*e*m - b*d*n*q, 0]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2310

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_)*((d_.)*(x_))^(m_.), x_Symbol] :> Dist[(d*x)^(m + 1)/(d*n*(c*x^n
)^((m + 1)/n)), Subst[Int[E^(((m + 1)*x)/n)*(a + b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, d, m, n, p}
, x]

Rule 2181

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> -Simp[(F^(g*(e - (c*f)/d))*(c +
d*x)^FracPart[m]*Gamma[m + 1, (-((f*g*Log[F])/d))*(c + d*x)])/(d*(-((f*g*Log[F])/d))^(IntPart[m] + 1)*(-((f*g*
Log[F]*(c + d*x))/d))^FracPart[m]), x] /; FreeQ[{F, c, d, e, f, g, m}, x] &&  !IntegerQ[m]

Rubi steps

\begin{align*} \int \frac{\left (d x^m+e \log ^{-1+q}\left (c x^n\right )\right ) \left (a x^m+b \log ^q\left (c x^n\right )\right )}{x} \, dx &=\frac{e \left (a x^m+b \log ^q\left (c x^n\right )\right )^2}{2 b n q}-\left (-d+\frac{a e m}{b n q}\right ) \int x^{-1+m} \left (a x^m+b \log ^q\left (c x^n\right )\right ) \, dx\\ &=\frac{e \left (a x^m+b \log ^q\left (c x^n\right )\right )^2}{2 b n q}-\left (-d+\frac{a e m}{b n q}\right ) \int \left (a x^{-1+2 m}+b x^{-1+m} \log ^q\left (c x^n\right )\right ) \, dx\\ &=\frac{a \left (d-\frac{a e m}{b n q}\right ) x^{2 m}}{2 m}+\frac{e \left (a x^m+b \log ^q\left (c x^n\right )\right )^2}{2 b n q}-\left (b \left (-d+\frac{a e m}{b n q}\right )\right ) \int x^{-1+m} \log ^q\left (c x^n\right ) \, dx\\ &=\frac{a \left (d-\frac{a e m}{b n q}\right ) x^{2 m}}{2 m}+\frac{e \left (a x^m+b \log ^q\left (c x^n\right )\right )^2}{2 b n q}-\frac{\left (b \left (-d+\frac{a e m}{b n q}\right ) x^m \left (c x^n\right )^{-\frac{m}{n}}\right ) \operatorname{Subst}\left (\int e^{\frac{m x}{n}} x^q \, dx,x,\log \left (c x^n\right )\right )}{n}\\ &=\frac{a \left (d-\frac{a e m}{b n q}\right ) x^{2 m}}{2 m}+\left (\frac{b d}{m}-\frac{a e}{n q}\right ) x^m \left (c x^n\right )^{-\frac{m}{n}} \Gamma \left (1+q,-\frac{m \log \left (c x^n\right )}{n}\right ) \log ^q\left (c x^n\right ) \left (-\frac{m \log \left (c x^n\right )}{n}\right )^{-q}+\frac{e \left (a x^m+b \log ^q\left (c x^n\right )\right )^2}{2 b n q}\\ \end{align*}

Mathematica [A]  time = 0.385985, size = 157, normalized size = 1.13 \[ \frac{\left (c x^n\right )^{-\frac{m}{n}} \left (-\frac{m \log \left (c x^n\right )}{n}\right )^{-q} \left (-2 a e m q x^m \log ^q\left (c x^n\right ) \text{Gamma}\left (q,-\frac{m \log \left (c x^n\right )}{n}\right )+2 b d n q x^m \log ^q\left (c x^n\right ) \text{Gamma}\left (q+1,-\frac{m \log \left (c x^n\right )}{n}\right )+\left (c x^n\right )^{m/n} \left (-\frac{m \log \left (c x^n\right )}{n}\right )^q \left (a d n q x^{2 m}+b e m \log ^{2 q}\left (c x^n\right )\right )\right )}{2 m n q} \]

Antiderivative was successfully verified.

[In]

Integrate[((d*x^m + e*Log[c*x^n]^(-1 + q))*(a*x^m + b*Log[c*x^n]^q))/x,x]

[Out]

(-2*a*e*m*q*x^m*Gamma[q, -((m*Log[c*x^n])/n)]*Log[c*x^n]^q + 2*b*d*n*q*x^m*Gamma[1 + q, -((m*Log[c*x^n])/n)]*L
og[c*x^n]^q + (c*x^n)^(m/n)*(-((m*Log[c*x^n])/n))^q*(a*d*n*q*x^(2*m) + b*e*m*Log[c*x^n]^(2*q)))/(2*m*n*q*(c*x^
n)^(m/n)*(-((m*Log[c*x^n])/n))^q)

________________________________________________________________________________________

Maple [F]  time = 10.297, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( d{x}^{m}+e \left ( \ln \left ( c{x}^{n} \right ) \right ) ^{-1+q} \right ) \left ( a{x}^{m}+b \left ( \ln \left ( c{x}^{n} \right ) \right ) ^{q} \right ) }{x}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x^m+e*ln(c*x^n)^(-1+q))*(a*x^m+b*ln(c*x^n)^q)/x,x)

[Out]

int((d*x^m+e*ln(c*x^n)^(-1+q))*(a*x^m+b*ln(c*x^n)^q)/x,x)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x^m+e*log(c*x^n)^(-1+q))*(a*x^m+b*log(c*x^n)^q)/x,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{a e x^{m} \log \left (c x^{n}\right )^{q - 1} + a d x^{2 \, m} +{\left (b d x^{m} + b e \log \left (c x^{n}\right )^{q - 1}\right )} \log \left (c x^{n}\right )^{q}}{x}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x^m+e*log(c*x^n)^(-1+q))*(a*x^m+b*log(c*x^n)^q)/x,x, algorithm="fricas")

[Out]

integral((a*e*x^m*log(c*x^n)^(q - 1) + a*d*x^(2*m) + (b*d*x^m + b*e*log(c*x^n)^(q - 1))*log(c*x^n)^q)/x, x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x**m+e*ln(c*x**n)**(-1+q))*(a*x**m+b*ln(c*x**n)**q)/x,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (a x^{m} + b \log \left (c x^{n}\right )^{q}\right )}{\left (d x^{m} + e \log \left (c x^{n}\right )^{q - 1}\right )}}{x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x^m+e*log(c*x^n)^(-1+q))*(a*x^m+b*log(c*x^n)^q)/x,x, algorithm="giac")

[Out]

integrate((a*x^m + b*log(c*x^n)^q)*(d*x^m + e*log(c*x^n)^(q - 1))/x, x)