Optimal. Leaf size=88 \[ \frac {d \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{\sqrt {a} \left (a c^2-d^2\right )}+\frac {c \log (x)}{a c^2-d^2}-\frac {c \log \left (d+c \sqrt {a+b x^2}\right )}{a c^2-d^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.17, antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {2186, 720, 31,
649, 213, 266} \begin {gather*} -\frac {c \log \left (c \sqrt {a+b x^2}+d\right )}{a c^2-d^2}+\frac {d \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{\sqrt {a} \left (a c^2-d^2\right )}+\frac {c \log (x)}{a c^2-d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 213
Rule 266
Rule 649
Rule 720
Rule 2186
Rubi steps
\begin {align*} \int \frac {1}{x \left (a c+b c x^2+d \sqrt {a+b x^2}\right )} \, dx &=\frac {1}{2} \text {Subst}\left (\int \frac {1}{x \left (a c+b c x+d \sqrt {a+b x}\right )} \, dx,x,x^2\right )\\ &=\text {Subst}\left (\int \frac {1}{(d+c x) \left (-a+x^2\right )} \, dx,x,\sqrt {a+b x^2}\right )\\ &=-\frac {c^2 \text {Subst}\left (\int \frac {1}{d+c x} \, dx,x,\sqrt {a+b x^2}\right )}{a c^2-d^2}+\frac {\text {Subst}\left (\int \frac {d-c x}{-a+x^2} \, dx,x,\sqrt {a+b x^2}\right )}{-a c^2+d^2}\\ &=-\frac {c \log \left (d+c \sqrt {a+b x^2}\right )}{a c^2-d^2}+\frac {c \text {Subst}\left (\int \frac {x}{-a+x^2} \, dx,x,\sqrt {a+b x^2}\right )}{a c^2-d^2}-\frac {d \text {Subst}\left (\int \frac {1}{-a+x^2} \, dx,x,\sqrt {a+b x^2}\right )}{a c^2-d^2}\\ &=\frac {d \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{\sqrt {a} \left (a c^2-d^2\right )}+\frac {c \log (x)}{a c^2-d^2}-\frac {c \log \left (d+c \sqrt {a+b x^2}\right )}{a c^2-d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 69, normalized size = 0.78 \begin {gather*} \frac {\frac {2 d \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{\sqrt {a}}+c \log \left (b x^2\right )-2 c \log \left (d+c \sqrt {a+b x^2}\right )}{2 a c^2-2 d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(2174\) vs.
\(2(80)=160\).
time = 0.04, size = 2175, normalized size = 24.72
method | result | size |
default | \(\text {Expression too large to display}\) | \(2175\) |
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 = 316, normalized size = 3.59 \begin {gather*} \left [-\frac {2 \, a c \log \left (b c^{2} x^{2} + a c^{2} - d^{2}\right ) - 4 \, a c \log \left (x\right ) + a c \log \left (-\frac {b c^{2} x^{2} + a c^{2} + 2 \, \sqrt {b x^{2} + a} c d + d^{2}}{x^{2}}\right ) - a c \log \left (-\frac {b c^{2} x^{2} + a c^{2} - 2 \, \sqrt {b x^{2} + a} c d + d^{2}}{x^{2}}\right ) + 2 \, \sqrt {a} d \log \left (-\frac {b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {a} + 2 \, a}{x^{2}}\right )}{4 \, {\left (a^{2} c^{2} - a d^{2}\right )}}, -\frac {2 \, a c \log \left (b c^{2} x^{2} + a c^{2} - d^{2}\right ) - 4 \, a c \log \left (x\right ) + a c \log \left (-\frac {b c^{2} x^{2} + a c^{2} + 2 \, \sqrt {b x^{2} + a} c d + d^{2}}{x^{2}}\right ) - a c \log \left (-\frac {b c^{2} x^{2} + a c^{2} - 2 \, \sqrt {b x^{2} + a} c d + d^{2}}{x^{2}}\right ) + 4 \, \sqrt {-a} d \arctan \left (\frac {\sqrt {-a}}{\sqrt {b x^{2} + a}}\right )}{4 \, {\left (a^{2} c^{2} - a d^{2}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 3.84, size = 88, normalized size = 1.00 \begin {gather*} - \frac {c^{2} \left (\begin {cases} \frac {\sqrt {a + b x^{2}}}{d} & \text {for}\: c = 0 \\\frac {\log {\left (c \sqrt {a + b x^{2}} + d \right )}}{c} & \text {otherwise} \end {cases}\right )}{a c^{2} - d^{2}} - \frac {- \frac {c \log {\left (- b x^{2} \right )}}{2} + \frac {d \operatorname {atan}{\left (\frac {\sqrt {a + b x^{2}}}{\sqrt {- a}} \right )}}{\sqrt {- a}}}{a c^{2} - d^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.41, size = 94, normalized size = 1.07 \begin {gather*} -\frac {c^{2} \log \left ({\left | \sqrt {b x^{2} + a} c + d \right |}\right )}{a c^{3} - c d^{2}} + \frac {c \log \left (b x^{2}\right )}{2 \, {\left (a c^{2} - d^{2}\right )}} - \frac {d \arctan \left (\frac {\sqrt {b x^{2} + a}}{\sqrt {-a}}\right )}{{\left (a c^{2} - d^{2}\right )} \sqrt {-a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.95, size = 1270, normalized size = 14.43 \begin {gather*} \frac {c\,\ln \left (x\right )}{a\,c^2-d^2}-\frac {c\,\mathrm {atan}\left (\frac {\frac {c\,\left (4\,c^6\,d^2\,\sqrt {b\,x^2+a}+\frac {c\,\left (4\,c^4\,d^5-8\,a\,c^6\,d^3+4\,a^2\,c^8\,d-\frac {c\,\sqrt {b\,x^2+a}\,\left (8\,a^3\,c^{10}-8\,a^2\,c^8\,d^2-8\,a\,c^6\,d^4+8\,c^4\,d^6\right )}{2\,\left (a\,c^2-d^2\right )}\right )}{2\,\left (a\,c^2-d^2\right )}\right )\,1{}\mathrm {i}}{2\,\left (a\,c^2-d^2\right )}+\frac {c\,\left (4\,c^6\,d^2\,\sqrt {b\,x^2+a}-\frac {c\,\left (4\,c^4\,d^5-8\,a\,c^6\,d^3+4\,a^2\,c^8\,d+\frac {c\,\sqrt {b\,x^2+a}\,\left (8\,a^3\,c^{10}-8\,a^2\,c^8\,d^2-8\,a\,c^6\,d^4+8\,c^4\,d^6\right )}{2\,\left (a\,c^2-d^2\right )}\right )}{2\,\left (a\,c^2-d^2\right )}\right )\,1{}\mathrm {i}}{2\,\left (a\,c^2-d^2\right )}}{\frac {c\,\left (4\,c^6\,d^2\,\sqrt {b\,x^2+a}+\frac {c\,\left (4\,c^4\,d^5-8\,a\,c^6\,d^3+4\,a^2\,c^8\,d-\frac {c\,\sqrt {b\,x^2+a}\,\left (8\,a^3\,c^{10}-8\,a^2\,c^8\,d^2-8\,a\,c^6\,d^4+8\,c^4\,d^6\right )}{2\,\left (a\,c^2-d^2\right )}\right )}{2\,\left (a\,c^2-d^2\right )}\right )}{2\,\left (a\,c^2-d^2\right )}-\frac {c\,\left (4\,c^6\,d^2\,\sqrt {b\,x^2+a}-\frac {c\,\left (4\,c^4\,d^5-8\,a\,c^6\,d^3+4\,a^2\,c^8\,d+\frac {c\,\sqrt {b\,x^2+a}\,\left (8\,a^3\,c^{10}-8\,a^2\,c^8\,d^2-8\,a\,c^6\,d^4+8\,c^4\,d^6\right )}{2\,\left (a\,c^2-d^2\right )}\right )}{2\,\left (a\,c^2-d^2\right )}\right )}{2\,\left (a\,c^2-d^2\right )}}\right )\,1{}\mathrm {i}}{a\,c^2-d^2}-\frac {c\,\ln \left (b\,c^2\,x^2+a\,c^2-d^2\right )}{2\,a\,c^2-2\,d^2}-\frac {d\,\mathrm {atan}\left (\frac {\frac {d\,\left (4\,c^6\,d^2\,\sqrt {b\,x^2+a}+\frac {d\,\left (4\,c^4\,d^5-8\,a\,c^6\,d^3+4\,a^2\,c^8\,d-\frac {d\,\sqrt {b\,x^2+a}\,\left (8\,a^3\,c^{10}-8\,a^2\,c^8\,d^2-8\,a\,c^6\,d^4+8\,c^4\,d^6\right )}{\sqrt {a}\,\left (2\,a\,c^2-2\,d^2\right )}\right )}{\sqrt {a}\,\left (2\,a\,c^2-2\,d^2\right )}\right )\,1{}\mathrm {i}}{\sqrt {a}\,\left (2\,a\,c^2-2\,d^2\right )}+\frac {d\,\left (4\,c^6\,d^2\,\sqrt {b\,x^2+a}-\frac {d\,\left (4\,c^4\,d^5-8\,a\,c^6\,d^3+4\,a^2\,c^8\,d+\frac {d\,\sqrt {b\,x^2+a}\,\left (8\,a^3\,c^{10}-8\,a^2\,c^8\,d^2-8\,a\,c^6\,d^4+8\,c^4\,d^6\right )}{\sqrt {a}\,\left (2\,a\,c^2-2\,d^2\right )}\right )}{\sqrt {a}\,\left (2\,a\,c^2-2\,d^2\right )}\right )\,1{}\mathrm {i}}{\sqrt {a}\,\left (2\,a\,c^2-2\,d^2\right )}}{\frac {d\,\left (4\,c^6\,d^2\,\sqrt {b\,x^2+a}+\frac {d\,\left (4\,c^4\,d^5-8\,a\,c^6\,d^3+4\,a^2\,c^8\,d-\frac {d\,\sqrt {b\,x^2+a}\,\left (8\,a^3\,c^{10}-8\,a^2\,c^8\,d^2-8\,a\,c^6\,d^4+8\,c^4\,d^6\right )}{\sqrt {a}\,\left (2\,a\,c^2-2\,d^2\right )}\right )}{\sqrt {a}\,\left (2\,a\,c^2-2\,d^2\right )}\right )}{\sqrt {a}\,\left (2\,a\,c^2-2\,d^2\right )}-\frac {d\,\left (4\,c^6\,d^2\,\sqrt {b\,x^2+a}-\frac {d\,\left (4\,c^4\,d^5-8\,a\,c^6\,d^3+4\,a^2\,c^8\,d+\frac {d\,\sqrt {b\,x^2+a}\,\left (8\,a^3\,c^{10}-8\,a^2\,c^8\,d^2-8\,a\,c^6\,d^4+8\,c^4\,d^6\right )}{\sqrt {a}\,\left (2\,a\,c^2-2\,d^2\right )}\right )}{\sqrt {a}\,\left (2\,a\,c^2-2\,d^2\right )}\right )}{\sqrt {a}\,\left (2\,a\,c^2-2\,d^2\right )}}\right )\,1{}\mathrm {i}}{\sqrt {a}\,\left (a\,c^2-d^2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________