Optimal. Leaf size=27 \[ \frac {\log (x)}{a}-\frac {b \log \left (b+a \log \left (c x^n\right )\right )}{a^2 n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 1, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {45}
\begin {gather*} \frac {\log (x)}{a}-\frac {b \log \left (a \log \left (c x^n\right )+b\right )}{a^2 n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rubi steps
\begin {align*} \int \frac {1}{a x+\frac {b x}{\log \left (c x^n\right )}} \, dx &=\frac {\text {Subst}\left (\int \frac {x}{b+a x} \, dx,x,\log \left (c x^n\right )\right )}{n}\\ &=\frac {\text {Subst}\left (\int \left (\frac {1}{a}-\frac {b}{a (b+a x)}\right ) \, dx,x,\log \left (c x^n\right )\right )}{n}\\ &=\frac {\log (x)}{a}-\frac {b \log \left (b+a \log \left (c x^n\right )\right )}{a^2 n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 34, normalized size = 1.26 \begin {gather*} \frac {\log \left (c x^n\right )}{a n}-\frac {b \log \left (b+a \log \left (c x^n\right )\right )}{a^2 n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.05, size = 33, normalized size = 1.22
method | result | size |
norman | \(\frac {\ln \left (x \right )}{a}-\frac {b \ln \left (a \ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}\right )+b \right )}{a^{2} n}\) | \(30\) |
default | \(\frac {\frac {\ln \left (c \,x^{n}\right )}{a}-\frac {b \ln \left (b +a \ln \left (c \,x^{n}\right )\right )}{a^{2}}}{n}\) | \(33\) |
risch | \(\frac {\ln \left (x \right )}{a}-\frac {b \ln \left (\ln \left (x^{n}\right )-\frac {i \pi a \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )-i \pi a \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-i \pi a \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i \pi a \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-2 \ln \left (c \right ) a -2 b}{2 a}\right )}{a^{2} n}\) | \(119\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 33, normalized size = 1.22 \begin {gather*} \frac {\log \left (x\right )}{a} - \frac {b \log \left (\frac {a \log \left (c\right ) + a \log \left (x^{n}\right ) + b}{a}\right )}{a^{2} n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 28, normalized size = 1.04 \begin {gather*} \frac {a n \log \left (x\right ) - b \log \left (a n \log \left (x\right ) + a \log \left (c\right ) + b\right )}{a^{2} n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 116 vs.
\(2 (22) = 44\).
time = 2.05, size = 116, normalized size = 4.30 \begin {gather*} \begin {cases} \frac {\log {\left (c \right )} \log {\left (x \right )}}{b} & \text {for}\: a = 0 \wedge n = 0 \\\frac {\begin {cases} 0 & \text {for}\: \frac {1}{\left |{c x^{n}}\right |} < 1 \wedge \left |{c x^{n}}\right | < 1 \\\frac {\log {\left (c x^{n} \right )}^{2}}{2 n} & \text {for}\: \left |{c x^{n}}\right | < 1 \\\frac {\log {\left (\frac {x^{- n}}{c} \right )}^{2}}{2 n} & \text {for}\: \frac {1}{\left |{c x^{n}}\right |} < 1 \\\frac {{G_{3, 3}^{3, 0}\left (\begin {matrix} & 1, 1, 1 \\0, 0, 0 & \end {matrix} \middle | {c x^{n}} \right )}}{n} + \frac {{G_{3, 3}^{0, 3}\left (\begin {matrix} 1, 1, 1 & \\ & 0, 0, 0 \end {matrix} \middle | {c x^{n}} \right )}}{n} & \text {otherwise} \end {cases}}{b} & \text {for}\: a = 0 \\\frac {\log {\left (c \right )} \log {\left (x \right )}}{a \log {\left (c \right )} + b} & \text {for}\: n = 0 \\\frac {\log {\left (c x^{n} \right )}}{a n} - \frac {b \log {\left (\log {\left (c x^{n} \right )} + \frac {b}{a} \right )}}{a^{2} n} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.03, size = 53, normalized size = 1.96 \begin {gather*} \frac {\log \left (x\right )}{a} - \frac {b \log \left (\frac {1}{4} \, {\left (\pi a n {\left (\mathrm {sgn}\left (x\right ) - 1\right )} + \pi a {\left (\mathrm {sgn}\left (c\right ) - 1\right )}\right )}^{2} + {\left (a n \log \left ({\left | x \right |}\right ) + a \log \left ({\left | c \right |}\right ) + b\right )}^{2}\right )}{2 \, a^{2} n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.36, size = 27, normalized size = 1.00 \begin {gather*} \frac {\ln \left (x\right )}{a}-\frac {b\,\ln \left (b+a\,\ln \left (c\,x^n\right )\right )}{a^2\,n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________