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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0820021, antiderivative size = 15, normalized size of antiderivative = 1., 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 = {2561, 2541} \[ \log \left (a x+b \log ^2\left (c x^n\right )\right ) \]

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 2561

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]

Rule 2541

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]

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.0953352, size = 15, normalized size = 1. \[ \log \left (a x+b \log ^2\left (c x^n\right )\right ) \]

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]  time = 0.066, size = 428, normalized size = 28.5 \begin{align*} \text{result too large to display} \end{align*}

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)

[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]  time = 1.18479, size = 43, normalized size = 2.87 \begin{align*} \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{align*}

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 = 1.81171, size = 84, normalized size = 5.6 \begin{align*} \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{align*}

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 [A]  time = 2.39266, size = 48, normalized size = 3.2 \begin{align*} \begin{cases} \log{\left (x + \frac{b n^{2} \log{\left (x \right )}^{2}}{a} + \frac{2 b n \log{\left (c \right )} \log{\left (x \right )}}{a} + \frac{b \log{\left (c \right )}^{2}}{a} \right )} & \text{for}\: a \neq 0 \\2 \log{\left (n \log{\left (x \right )} + \log{\left (c \right )} \right )} & \text{otherwise} \end{cases} \end{align*}

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]

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

________________________________________________________________________________________

Giac [A]  time = 1.14868, size = 38, normalized size = 2.53 \begin{align*} \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{align*}

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)