3.1.26 \(\int \frac {a x+2 b n \log (c x^n)}{a x^2+b x \log ^2(c x^n)} \, dx\) [26]

Optimal. Leaf size=15 \[ \log \left (a x+b \log ^2\left (c x^n\right )\right ) \]

[Out]

ln(a*x+b*ln(c*x^n)^2)

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {2641, 2621} \begin {gather*} \log \left (a x+b \log ^2\left (c x^n\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a*x + 2*b*n*Log[c*x^n])/(a*x^2 + b*x*Log[c*x^n]^2),x]

[Out]

Log[a*x + b*Log[c*x^n]^2]

Rule 2621

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

Rule 2641

Int[(u_.)*((a_.)*(x_)^(m_.) + Log[(c_.)*(x_)^(n_.)]^(q_.)*(b_.)*(x_)^(r_.))^(p_.), x_Symbol] :> Int[u*x^(p*r)*
(a*x^(m - r) + b*Log[c*x^n]^q)^p, x] /; FreeQ[{a, b, c, m, n, p, q, r}, x] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {a x+2 b n \log \left (c x^n\right )}{a x^2+b x \log ^2\left (c x^n\right )} \, dx &=\int \frac {a x+2 b n \log \left (c x^n\right )}{x \left (a x+b \log ^2\left (c x^n\right )\right )} \, dx\\ &=\log \left (a x+b \log ^2\left (c x^n\right )\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 15, normalized size = 1.00 \begin {gather*} \log \left (a x+b \log ^2\left (c x^n\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a*x + 2*b*n*Log[c*x^n])/(a*x^2 + b*x*Log[c*x^n]^2),x]

[Out]

Log[a*x + b*Log[c*x^n]^2]

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.05, size = 428, normalized size = 28.53

method result size
risch \(\ln \left (\ln \left (x^{n}\right )^{2}+\left (-i \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+i \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-i \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+2 \ln \left (c \right )\right ) \ln \left (x^{n}\right )-\frac {b \,\pi ^{2} \mathrm {csgn}\left (i c \right )^{2} \mathrm {csgn}\left (i x^{n}\right )^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-2 b \,\pi ^{2} \mathrm {csgn}\left (i c \right )^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+b \,\pi ^{2} \mathrm {csgn}\left (i c \right )^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{4}-2 b \,\pi ^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right )^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+4 b \,\pi ^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{4}-2 b \,\pi ^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{5}+b \,\pi ^{2} \mathrm {csgn}\left (i x^{n}\right )^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{4}-2 b \,\pi ^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{5}+b \,\pi ^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{6}+4 i b \ln \left (c \right ) \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )-4 i b \ln \left (c \right ) \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-4 i b \ln \left (c \right ) \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+4 i b \ln \left (c \right ) \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-4 b \ln \left (c \right )^{2}-4 a x}{4 b}\right )\) \(428\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*x+2*b*n*ln(c*x^n))/(a*x^2+b*x*ln(c*x^n)^2),x,method=_RETURNVERBOSE)

[Out]

ln(ln(x^n)^2+(-I*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+I*Pi*csgn(I*c)*csgn(I*c*x^n)^2+I*Pi*csgn(I*x^n)*csgn(I
*c*x^n)^2-I*Pi*csgn(I*c*x^n)^3+2*ln(c))*ln(x^n)-1/4*(b*Pi^2*csgn(I*c)^2*csgn(I*x^n)^2*csgn(I*c*x^n)^2-2*b*Pi^2
*csgn(I*c)^2*csgn(I*x^n)*csgn(I*c*x^n)^3+b*Pi^2*csgn(I*c)^2*csgn(I*c*x^n)^4-2*b*Pi^2*csgn(I*c)*csgn(I*x^n)^2*c
sgn(I*c*x^n)^3+4*b*Pi^2*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)^4-2*b*Pi^2*csgn(I*c)*csgn(I*c*x^n)^5+b*Pi^2*csgn(I
*x^n)^2*csgn(I*c*x^n)^4-2*b*Pi^2*csgn(I*x^n)*csgn(I*c*x^n)^5+b*Pi^2*csgn(I*c*x^n)^6+4*I*b*ln(c)*Pi*csgn(I*c)*c
sgn(I*x^n)*csgn(I*c*x^n)-4*I*b*ln(c)*Pi*csgn(I*c)*csgn(I*c*x^n)^2-4*I*b*ln(c)*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2+4
*I*b*ln(c)*Pi*csgn(I*c*x^n)^3-4*b*ln(c)^2-4*a*x)/b)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 32 vs. \(2 (15) = 30\).
time = 0.32, size = 32, normalized size = 2.13 \begin {gather*} \log \left (\frac {b \log \left (c\right )^{2} + 2 \, b \log \left (c\right ) \log \left (x^{n}\right ) + b \log \left (x^{n}\right )^{2} + a x}{b}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+2*b*n*log(c*x^n))/(a*x^2+b*x*log(c*x^n)^2),x, algorithm="maxima")

[Out]

log((b*log(c)^2 + 2*b*log(c)*log(x^n) + b*log(x^n)^2 + a*x)/b)

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 28, normalized size = 1.87 \begin {gather*} \log \left (b n^{2} \log \left (x\right )^{2} + 2 \, b n \log \left (c\right ) \log \left (x\right ) + b \log \left (c\right )^{2} + a x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+2*b*n*log(c*x^n))/(a*x^2+b*x*log(c*x^n)^2),x, algorithm="fricas")

[Out]

log(b*n^2*log(x)^2 + 2*b*n*log(c)*log(x) + b*log(c)^2 + a*x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a x + 2 b n \log {\left (c x^{n} \right )}}{x \left (a x + b \log {\left (c x^{n} \right )}^{2}\right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+2*b*n*ln(c*x**n))/(a*x**2+b*x*ln(c*x**n)**2),x)

[Out]

Integral((a*x + 2*b*n*log(c*x**n))/(x*(a*x + b*log(c*x**n)**2)), x)

________________________________________________________________________________________

Giac [A]
time = 3.53, size = 28, normalized size = 1.87 \begin {gather*} \log \left (b n^{2} \log \left (x\right )^{2} + 2 \, b n \log \left (c\right ) \log \left (x\right ) + b \log \left (c\right )^{2} + a x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+2*b*n*log(c*x^n))/(a*x^2+b*x*log(c*x^n)^2),x, algorithm="giac")

[Out]

log(b*n^2*log(x)^2 + 2*b*n*log(c)*log(x) + b*log(c)^2 + a*x)

________________________________________________________________________________________

Mupad [B]
time = 0.35, size = 16, normalized size = 1.07 \begin {gather*} \ln \left ({\ln \left (c\,x^n\right )}^2+\frac {a\,x}{b}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*x + 2*b*n*log(c*x^n))/(a*x^2 + b*x*log(c*x^n)^2),x)

[Out]

log(log(c*x^n)^2 + (a*x)/b)

________________________________________________________________________________________