Optimal. Leaf size=59 \[ \frac {1}{2} c^2 (2-a x) \sqrt {1-a^2 x^2}-\frac {1}{2} c^2 \text {ArcSin}(a x)-c^2 \tanh ^{-1}\left (\sqrt {1-a^2 x^2}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {6263, 829, 858,
222, 272, 65, 214} \begin {gather*} \frac {1}{2} c^2 (2-a x) \sqrt {1-a^2 x^2}-c^2 \tanh ^{-1}\left (\sqrt {1-a^2 x^2}\right )-\frac {1}{2} c^2 \text {ArcSin}(a x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 214
Rule 222
Rule 272
Rule 829
Rule 858
Rule 6263
Rubi steps
\begin {align*} \int \frac {e^{\tanh ^{-1}(a x)} (c-a c x)^2}{x} \, dx &=c \int \frac {(c-a c x) \sqrt {1-a^2 x^2}}{x} \, dx\\ &=\frac {1}{2} c^2 (2-a x) \sqrt {1-a^2 x^2}-\frac {c \int \frac {-2 a^2 c+a^3 c x}{x \sqrt {1-a^2 x^2}} \, dx}{2 a^2}\\ &=\frac {1}{2} c^2 (2-a x) \sqrt {1-a^2 x^2}+c^2 \int \frac {1}{x \sqrt {1-a^2 x^2}} \, dx-\frac {1}{2} \left (a c^2\right ) \int \frac {1}{\sqrt {1-a^2 x^2}} \, dx\\ &=\frac {1}{2} c^2 (2-a x) \sqrt {1-a^2 x^2}-\frac {1}{2} c^2 \sin ^{-1}(a x)+\frac {1}{2} c^2 \text {Subst}\left (\int \frac {1}{x \sqrt {1-a^2 x}} \, dx,x,x^2\right )\\ &=\frac {1}{2} c^2 (2-a x) \sqrt {1-a^2 x^2}-\frac {1}{2} c^2 \sin ^{-1}(a x)-\frac {c^2 \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^2}\\ &=\frac {1}{2} c^2 (2-a x) \sqrt {1-a^2 x^2}-\frac {1}{2} c^2 \sin ^{-1}(a x)-c^2 \tanh ^{-1}\left (\sqrt {1-a^2 x^2}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(125\) vs. \(2(59)=118\).
time = 0.05, size = 125, normalized size = 2.12 \begin {gather*} \frac {c^2 \left (2-a x-2 a^2 x^2+a^3 x^3+\sqrt {1-a^2 x^2} \text {ArcSin}(a x)+4 \sqrt {1-a^2 x^2} \text {ArcSin}\left (\frac {\sqrt {1-a x}}{\sqrt {2}}\right )-2 \sqrt {1-a^2 x^2} \tanh ^{-1}\left (\sqrt {1-a^2 x^2}\right )\right )}{2 \sqrt {1-a^2 x^2}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(113\) vs.
\(2(51)=102\).
time = 0.90, size = 114, normalized size = 1.93
method | result | size |
default | \(c^{2} \left (a^{3} \left (-\frac {x \sqrt {-a^{2} x^{2}+1}}{2 a^{2}}+\frac {\arctan \left (\frac {\sqrt {a^{2}}\, x}{\sqrt {-a^{2} x^{2}+1}}\right )}{2 a^{2} \sqrt {a^{2}}}\right )+\sqrt {-a^{2} x^{2}+1}-\frac {a \arctan \left (\frac {\sqrt {a^{2}}\, x}{\sqrt {-a^{2} x^{2}+1}}\right )}{\sqrt {a^{2}}}-\arctanh \left (\frac {1}{\sqrt {-a^{2} x^{2}+1}}\right )\right )\) | \(114\) |
meijerg | \(-\frac {a \,c^{2} \left (-\frac {\sqrt {\pi }\, x \left (-a^{2}\right )^{\frac {3}{2}} \sqrt {-a^{2} x^{2}+1}}{a^{2}}+\frac {\sqrt {\pi }\, \left (-a^{2}\right )^{\frac {3}{2}} \arcsin \left (a x \right )}{a^{3}}\right )}{2 \sqrt {\pi }\, \sqrt {-a^{2}}}+\frac {c^{2} \left (-2 \sqrt {\pi }+2 \sqrt {\pi }\, \sqrt {-a^{2} x^{2}+1}\right )}{2 \sqrt {\pi }}-c^{2} \arcsin \left (a x \right )+\frac {c^{2} \left (-2 \sqrt {\pi }\, \ln \left (\frac {1}{2}+\frac {\sqrt {-a^{2} x^{2}+1}}{2}\right )+\left (-2 \ln \left (2\right )+2 \ln \left (x \right )+\ln \left (-a^{2}\right )\right ) \sqrt {\pi }\right )}{2 \sqrt {\pi }}\) | \(155\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.47, size = 76, normalized size = 1.29 \begin {gather*} -\frac {1}{2} \, \sqrt {-a^{2} x^{2} + 1} a c^{2} x - \frac {1}{2} \, c^{2} \arcsin \left (a x\right ) - c^{2} \log \left (\frac {2 \, \sqrt {-a^{2} x^{2} + 1}}{{\left | x \right |}} + \frac {2}{{\left | x \right |}}\right ) + \sqrt {-a^{2} x^{2} + 1} c^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 76, normalized size = 1.29 \begin {gather*} c^{2} \arctan \left (\frac {\sqrt {-a^{2} x^{2} + 1} - 1}{a x}\right ) + c^{2} \log \left (\frac {\sqrt {-a^{2} x^{2} + 1} - 1}{x}\right ) - \frac {1}{2} \, {\left (a c^{2} x - 2 \, c^{2}\right )} \sqrt {-a^{2} x^{2} + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 7.92, size = 201, normalized size = 3.41 \begin {gather*} a^{3} c^{2} \left (\begin {cases} - \frac {i x \sqrt {a^{2} x^{2} - 1}}{2 a^{2}} - \frac {i \operatorname {acosh}{\left (a x \right )}}{2 a^{3}} & \text {for}\: \left |{a^{2} x^{2}}\right | > 1 \\\frac {x^{3}}{2 \sqrt {- a^{2} x^{2} + 1}} - \frac {x}{2 a^{2} \sqrt {- a^{2} x^{2} + 1}} + \frac {\operatorname {asin}{\left (a x \right )}}{2 a^{3}} & \text {otherwise} \end {cases}\right ) - a^{2} c^{2} \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 ) - a c^{2} \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 ) + c^{2} \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 ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 84, normalized size = 1.42 \begin {gather*} -\frac {a c^{2} \arcsin \left (a x\right ) \mathrm {sgn}\left (a\right )}{2 \, {\left | a \right |}} - \frac {a c^{2} \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 {1}{2} \, {\left (a c^{2} x - 2 \, c^{2}\right )} \sqrt {-a^{2} x^{2} + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.04, size = 77, normalized size = 1.31 \begin {gather*} c^2\,\sqrt {1-a^2\,x^2}-c^2\,\mathrm {atanh}\left (\sqrt {1-a^2\,x^2}\right )-\frac {a\,c^2\,x\,\sqrt {1-a^2\,x^2}}{2}-\frac {a\,c^2\,\mathrm {asinh}\left (x\,\sqrt {-a^2}\right )}{2\,\sqrt {-a^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________