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

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

Optimal result

Integrand size = 34, antiderivative size = 15 \[ \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=\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] (verified)

Time = 0.05 (sec) , antiderivative size = 15, 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.059, Rules used = {2641, 2621} \[ \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=\log \left (a x+b \log ^2\left (c x^n\right )\right ) \]

[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*} \text {integral}& = \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] (verified)

Time = 0.08 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.00 \[ \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=\log \left (a x+b \log ^2\left (c x^n\right )\right ) \]

[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 [A] (verified)

Time = 0.26 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.07

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

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.87 \[ \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=\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 ) \]

[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 [A] (verification not implemented)

Time = 0.73 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.60 \[ \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=\begin {cases} \log {\left (x + \frac {b \log {\left (c x^{n} \right )}^{2}}{a} \right )} & \text {for}\: a \neq 0 \\2 \log {\left (\log {\left (c x^{n} \right )} \right )} & \text {otherwise} \end {cases} \]

[In]

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

[Out]

Piecewise((log(x + b*log(c*x**n)**2/a), Ne(a, 0)), (2*log(log(c*x**n)), True))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 32 vs. \(2 (15) = 30\).

Time = 0.23 (sec) , antiderivative size = 32, normalized size of antiderivative = 2.13 \[ \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=\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 ) \]

[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)

Giac [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.87 \[ \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=\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 ) \]

[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] (verification not implemented)

Time = 1.65 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.07 \[ \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=\ln \left ({\ln \left (c\,x^n\right )}^2+\frac {a\,x}{b}\right ) \]

[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)