Optimal. Leaf size=40 \[ -\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \log \left (c x^n\right )}{\sqrt {b}}\right )}{a^{3/2} n}+\frac {\log (x)}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {327, 211}
\begin {gather*} \frac {\log (x)}{a}-\frac {\sqrt {b} \text {ArcTan}\left (\frac {\sqrt {a} \log \left (c x^n\right )}{\sqrt {b}}\right )}{a^{3/2} n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 327
Rubi steps
\begin {align*} \int \frac {1}{a x+\frac {b x}{\log ^2\left (c x^n\right )}} \, dx &=\frac {\text {Subst}\left (\int \frac {x^2}{b+a x^2} \, dx,x,\log \left (c x^n\right )\right )}{n}\\ &=\frac {\log (x)}{a}-\frac {b \text {Subst}\left (\int \frac {1}{b+a x^2} \, dx,x,\log \left (c x^n\right )\right )}{a n}\\ &=-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \log \left (c x^n\right )}{\sqrt {b}}\right )}{a^{3/2} n}+\frac {\log (x)}{a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 47, normalized size = 1.18 \begin {gather*} -\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \log \left (c x^n\right )}{\sqrt {b}}\right )}{a^{3/2} n}+\frac {\log \left (c x^n\right )}{a n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 41, normalized size = 1.02
method | result | size |
default | \(\frac {\frac {\ln \left (c \,x^{n}\right )}{a}-\frac {b \arctan \left (\frac {a \ln \left (c \,x^{n}\right )}{\sqrt {a b}}\right )}{a \sqrt {a b}}}{n}\) | \(41\) |
risch | \(\frac {\ln \left (x \right )}{a}+\frac {\sqrt {-a 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 \sqrt {-a b}}{2 a}\right )}{2 a^{2} n}-\frac {\sqrt {-a 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 \sqrt {-a b}}{2 a}\right )}{2 a^{2} n}\) | \(250\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.42, size = 143, normalized size = 3.58 \begin {gather*} \left [\frac {2 \, n \log \left (x\right ) + \sqrt {-\frac {b}{a}} \log \left (\frac {a n^{2} \log \left (x\right )^{2} + 2 \, a n \log \left (c\right ) \log \left (x\right ) + a \log \left (c\right )^{2} - 2 \, {\left (a n \log \left (x\right ) + a \log \left (c\right )\right )} \sqrt {-\frac {b}{a}} - b}{a n^{2} \log \left (x\right )^{2} + 2 \, a n \log \left (c\right ) \log \left (x\right ) + a \log \left (c\right )^{2} + b}\right )}{2 \, a n}, \frac {n \log \left (x\right ) - \sqrt {\frac {b}{a}} \arctan \left (\frac {{\left (a n \log \left (x\right ) + a \log \left (c\right )\right )} \sqrt {\frac {b}{a}}}{b}\right )}{a n}\right ] \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. 204 vs.
\(2 (34) = 68\).
time = 6.14, size = 204, normalized size = 5.10 \begin {gather*} \begin {cases} \tilde {\infty } \log {\left (c \right )}^{2} \log {\left (x \right )} & \text {for}\: a = 0 \wedge b = 0 \wedge n = 0 \\\frac {\begin {cases} - \frac {\log {\left (\frac {x^{- n}}{c} \right )}^{3}}{3 n} + \frac {\log {\left (c x^{n} \right )}^{3}}{3 n} & \text {for}\: \frac {1}{\left |{c x^{n}}\right |} < 1 \wedge \left |{c x^{n}}\right | < 1 \\\frac {\log {\left (c x^{n} \right )}^{3}}{3 n} & \text {for}\: \left |{c x^{n}}\right | < 1 \\- \frac {\log {\left (\frac {x^{- n}}{c} \right )}^{3}}{3 n} & \text {for}\: \frac {1}{\left |{c x^{n}}\right |} < 1 \\- \frac {2 {G_{4, 4}^{4, 0}\left (\begin {matrix} & 1, 1, 1, 1 \\0, 0, 0, 0 & \end {matrix} \middle | {c x^{n}} \right )}}{n} + \frac {2 {G_{4, 4}^{0, 4}\left (\begin {matrix} 1, 1, 1, 1 & \\ & 0, 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 )}^{2} \log {\left (x \right )}}{a \log {\left (c \right )}^{2} + b} & \text {for}\: n = 0 \\\frac {\log {\left (x \right )}}{a} & \text {for}\: b = 0 \\\frac {\log {\left (c x^{n} \right )}}{a n} - \frac {b \log {\left (- \sqrt {- \frac {b}{a}} + \log {\left (c x^{n} \right )} \right )}}{2 a^{2} n \sqrt {- \frac {b}{a}}} + \frac {b \log {\left (\sqrt {- \frac {b}{a}} + \log {\left (c x^{n} \right )} \right )}}{2 a^{2} n \sqrt {- \frac {b}{a}}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.80, size = 38, normalized size = 0.95 \begin {gather*} \frac {\log \left (x\right )}{a} - \frac {b \arctan \left (\frac {a n \log \left (x\right ) + a \log \left (c\right )}{\sqrt {a b}}\right )}{\sqrt {a b} a n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.38, size = 45, normalized size = 1.12 \begin {gather*} \frac {\ln \left (x\right )}{a}-\frac {\sqrt {b}\,\mathrm {atan}\left (\frac {a^2\,n\,\ln \left (c\,x^n\right )}{\sqrt {b}\,\sqrt {a^3\,n^2}}\right )}{\sqrt {a^3\,n^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________