Optimal. Leaf size=73 \[ \frac {c \sqrt {1-a^2 x^2}}{a}+\frac {c \sqrt {1-a^2 x^2}}{a^2 x}-\frac {3 c \text {ArcSin}(a x)}{a}+\frac {3 c \tanh ^{-1}\left (\sqrt {1-a^2 x^2}\right )}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 9, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.450, Rules used = {6292, 6283,
1821, 1823, 858, 222, 272, 65, 214} \begin {gather*} \frac {c \sqrt {1-a^2 x^2}}{a}+\frac {c \sqrt {1-a^2 x^2}}{a^2 x}+\frac {3 c \tanh ^{-1}\left (\sqrt {1-a^2 x^2}\right )}{a}-\frac {3 c \text {ArcSin}(a x)}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 214
Rule 222
Rule 272
Rule 858
Rule 1821
Rule 1823
Rule 6283
Rule 6292
Rubi steps
\begin {align*} \int e^{3 \tanh ^{-1}(a x)} \left (c-\frac {c}{a^2 x^2}\right ) \, dx &=-\frac {c \int \frac {e^{3 \tanh ^{-1}(a x)} \left (1-a^2 x^2\right )}{x^2} \, dx}{a^2}\\ &=-\frac {c \int \frac {(1+a x)^3}{x^2 \sqrt {1-a^2 x^2}} \, dx}{a^2}\\ &=\frac {c \sqrt {1-a^2 x^2}}{a^2 x}+\frac {c \int \frac {-3 a-3 a^2 x-a^3 x^2}{x \sqrt {1-a^2 x^2}} \, dx}{a^2}\\ &=\frac {c \sqrt {1-a^2 x^2}}{a}+\frac {c \sqrt {1-a^2 x^2}}{a^2 x}-\frac {c \int \frac {3 a^3+3 a^4 x}{x \sqrt {1-a^2 x^2}} \, dx}{a^4}\\ &=\frac {c \sqrt {1-a^2 x^2}}{a}+\frac {c \sqrt {1-a^2 x^2}}{a^2 x}-(3 c) \int \frac {1}{\sqrt {1-a^2 x^2}} \, dx-\frac {(3 c) \int \frac {1}{x \sqrt {1-a^2 x^2}} \, dx}{a}\\ &=\frac {c \sqrt {1-a^2 x^2}}{a}+\frac {c \sqrt {1-a^2 x^2}}{a^2 x}-\frac {3 c \sin ^{-1}(a x)}{a}-\frac {(3 c) \text {Subst}\left (\int \frac {1}{x \sqrt {1-a^2 x}} \, dx,x,x^2\right )}{2 a}\\ &=\frac {c \sqrt {1-a^2 x^2}}{a}+\frac {c \sqrt {1-a^2 x^2}}{a^2 x}-\frac {3 c \sin ^{-1}(a x)}{a}+\frac {(3 c) \text {Subst}\left (\int \frac {1}{\frac {1}{a^2}-\frac {x^2}{a^2}} \, dx,x,\sqrt {1-a^2 x^2}\right )}{a^3}\\ &=\frac {c \sqrt {1-a^2 x^2}}{a}+\frac {c \sqrt {1-a^2 x^2}}{a^2 x}-\frac {3 c \sin ^{-1}(a x)}{a}+\frac {3 c \tanh ^{-1}\left (\sqrt {1-a^2 x^2}\right )}{a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 56, normalized size = 0.77 \begin {gather*} \frac {c \left ((1+a x) \sqrt {1-a^2 x^2}-3 a x \text {ArcSin}(a x)+3 a x \tanh ^{-1}\left (\sqrt {1-a^2 x^2}\right )\right )}{a^2 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(181\) vs.
\(2(67)=134\).
time = 0.87, size = 182, normalized size = 2.49
method | result | size |
risch | \(-\frac {\left (a^{2} x^{2}-1\right ) c}{x \sqrt {-a^{2} x^{2}+1}\, a^{2}}-\frac {\left (-a \sqrt {-a^{2} x^{2}+1}+\frac {3 a^{2} \arctan \left (\frac {\sqrt {a^{2}}\, x}{\sqrt {-a^{2} x^{2}+1}}\right )}{\sqrt {a^{2}}}-3 a \arctanh \left (\frac {1}{\sqrt {-a^{2} x^{2}+1}}\right )\right ) c}{a^{2}}\) | \(100\) |
default | \(\frac {c \left (a^{5} \left (-\frac {x^{2}}{a^{2} \sqrt {-a^{2} x^{2}+1}}+\frac {2}{a^{4} \sqrt {-a^{2} x^{2}+1}}\right )+3 a^{4} \left (\frac {x}{a^{2} \sqrt {-a^{2} x^{2}+1}}-\frac {\arctan \left (\frac {\sqrt {a^{2}}\, x}{\sqrt {-a^{2} x^{2}+1}}\right )}{a^{2} \sqrt {a^{2}}}\right )+\frac {2 a}{\sqrt {-a^{2} x^{2}+1}}-\frac {4 a^{2} x}{\sqrt {-a^{2} x^{2}+1}}+\frac {1}{x \sqrt {-a^{2} x^{2}+1}}-3 a \left (\frac {1}{\sqrt {-a^{2} x^{2}+1}}-\arctanh \left (\frac {1}{\sqrt {-a^{2} x^{2}+1}}\right )\right )\right )}{a^{2}}\) | \(182\) |
meijerg | \(-\frac {2 c x}{\sqrt {-a^{2} x^{2}+1}}+\frac {c \left (-2 a^{2} x^{2}+1\right )}{a^{2} x \sqrt {-a^{2} x^{2}+1}}+\frac {c \left (-2 \sqrt {\pi }+\frac {\sqrt {\pi }\, \left (-4 a^{2} x^{2}+8\right )}{4 \sqrt {-a^{2} x^{2}+1}}\right )}{a \sqrt {\pi }}-\frac {2 c \left (\sqrt {\pi }-\frac {\sqrt {\pi }}{\sqrt {-a^{2} x^{2}+1}}\right )}{a \sqrt {\pi }}-\frac {3 c \left (\frac {\sqrt {\pi }\, x \left (-a^{2}\right )^{\frac {3}{2}}}{a^{2} \sqrt {-a^{2} x^{2}+1}}-\frac {\sqrt {\pi }\, \left (-a^{2}\right )^{\frac {3}{2}} \arcsin \left (a x \right )}{a^{3}}\right )}{\sqrt {\pi }\, \sqrt {-a^{2}}}-\frac {3 c \left (-\sqrt {\pi }+\frac {\sqrt {\pi }}{\sqrt {-a^{2} x^{2}+1}}-\sqrt {\pi }\, \ln \left (\frac {1}{2}+\frac {\sqrt {-a^{2} x^{2}+1}}{2}\right )+\frac {\left (2-2 \ln \left (2\right )+2 \ln \left (x \right )+\ln \left (-a^{2}\right )\right ) \sqrt {\pi }}{2}\right )}{\sqrt {\pi }\, a}\) | \(253\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 200 vs.
\(2 (67) = 134\).
time = 0.47, size = 200, normalized size = 2.74 \begin {gather*} -a^{3} c {\left (\frac {x^{2}}{\sqrt {-a^{2} x^{2} + 1} a^{2}} - \frac {2}{\sqrt {-a^{2} x^{2} + 1} a^{4}}\right )} + 3 \, a^{2} c {\left (\frac {x}{\sqrt {-a^{2} x^{2} + 1} a^{2}} - \frac {\arcsin \left (a x\right )}{a^{3}}\right )} - \frac {2 \, c x}{\sqrt {-a^{2} x^{2} + 1}} - \frac {3 \, c {\left (\frac {1}{\sqrt {-a^{2} x^{2} + 1}} - \log \left (\frac {2 \, \sqrt {-a^{2} x^{2} + 1}}{{\left | x \right |}} + \frac {2}{{\left | x \right |}}\right )\right )}}{a} - \frac {{\left (\frac {2 \, a^{2} x}{\sqrt {-a^{2} x^{2} + 1}} - \frac {1}{\sqrt {-a^{2} x^{2} + 1} x}\right )} c}{a^{2}} + \frac {2 \, c}{\sqrt {-a^{2} x^{2} + 1} a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 82, normalized size = 1.12 \begin {gather*} \frac {6 \, a c x \arctan \left (\frac {\sqrt {-a^{2} x^{2} + 1} - 1}{a x}\right ) - 3 \, a c x \log \left (\frac {\sqrt {-a^{2} x^{2} + 1} - 1}{x}\right ) + a c x + \sqrt {-a^{2} x^{2} + 1} {\left (a c x + c\right )}}{a^{2} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 7.01, size = 150, normalized size = 2.05 \begin {gather*} - a c \left (\begin {cases} \frac {x^{2}}{2} & \text {for}\: a^{2} = 0 \\- \frac {\sqrt {- a^{2} x^{2} + 1}}{a^{2}} & \text {otherwise} \end {cases}\right ) - 3 c \left (\begin {cases} \sqrt {\frac {1}{a^{2}}} \operatorname {asin}{\left (x \sqrt {a^{2}} \right )} & \text {for}\: a^{2} > 0 \\\sqrt {- \frac {1}{a^{2}}} \operatorname {asinh}{\left (x \sqrt {- a^{2}} \right )} & \text {for}\: a^{2} < 0 \end {cases}\right ) - \frac {3 c \left (\begin {cases} - \operatorname {acosh}{\left (\frac {1}{a x} \right )} & \text {for}\: \frac {1}{\left |{a^{2} x^{2}}\right |} > 1 \\i \operatorname {asin}{\left (\frac {1}{a x} \right )} & \text {otherwise} \end {cases}\right )}{a} - \frac {c \left (\begin {cases} - \frac {i \sqrt {a^{2} x^{2} - 1}}{x} & \text {for}\: \left |{a^{2} x^{2}}\right | > 1 \\- \frac {\sqrt {- a^{2} x^{2} + 1}}{x} & \text {otherwise} \end {cases}\right )}{a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 129, normalized size = 1.77 \begin {gather*} -\frac {a^{2} c x}{2 \, {\left (\sqrt {-a^{2} x^{2} + 1} {\left | a \right |} + a\right )} {\left | a \right |}} - \frac {3 \, c \arcsin \left (a x\right ) \mathrm {sgn}\left (a\right )}{{\left | a \right |}} + \frac {3 \, c \log \left (\frac {{\left | -2 \, \sqrt {-a^{2} x^{2} + 1} {\left | a \right |} - 2 \, a \right |}}{2 \, a^{2} {\left | x \right |}}\right )}{{\left | a \right |}} + \frac {\sqrt {-a^{2} x^{2} + 1} c}{a} + \frac {{\left (\sqrt {-a^{2} x^{2} + 1} {\left | a \right |} + a\right )} c}{2 \, a^{2} x {\left | a \right |}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.04, size = 81, normalized size = 1.11 \begin {gather*} \frac {c\,\sqrt {1-a^2\,x^2}}{a}-\frac {3\,c\,\mathrm {asinh}\left (x\,\sqrt {-a^2}\right )}{\sqrt {-a^2}}+\frac {c\,\sqrt {1-a^2\,x^2}}{a^2\,x}-\frac {c\,\mathrm {atan}\left (\sqrt {1-a^2\,x^2}\,1{}\mathrm {i}\right )\,3{}\mathrm {i}}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________