Optimal. Leaf size=282 \[ \frac {3 \sqrt [4]{1-a x} (1+a x)^{3/4}}{8 a^3}+\frac {(1-a x)^{5/4} (1+a x)^{3/4}}{12 a^3}-\frac {x (1-a x)^{5/4} (1+a x)^{3/4}}{3 a^2}+\frac {3 \text {ArcTan}\left (1-\frac {\sqrt {2} \sqrt [4]{1-a x}}{\sqrt [4]{1+a x}}\right )}{8 \sqrt {2} a^3}-\frac {3 \text {ArcTan}\left (1+\frac {\sqrt {2} \sqrt [4]{1-a x}}{\sqrt [4]{1+a x}}\right )}{8 \sqrt {2} a^3}+\frac {3 \log \left (1+\frac {\sqrt {1-a x}}{\sqrt {1+a x}}-\frac {\sqrt {2} \sqrt [4]{1-a x}}{\sqrt [4]{1+a x}}\right )}{16 \sqrt {2} a^3}-\frac {3 \log \left (1+\frac {\sqrt {1-a x}}{\sqrt {1+a x}}+\frac {\sqrt {2} \sqrt [4]{1-a x}}{\sqrt [4]{1+a x}}\right )}{16 \sqrt {2} a^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 282, normalized size of antiderivative = 1.00, number of steps
used = 15, number of rules used = 12, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.857, Rules used = {6261, 92, 81,
52, 65, 246, 217, 1179, 642, 1176, 631, 210} \begin {gather*} \frac {3 \text {ArcTan}\left (1-\frac {\sqrt {2} \sqrt [4]{1-a x}}{\sqrt [4]{a x+1}}\right )}{8 \sqrt {2} a^3}-\frac {3 \text {ArcTan}\left (\frac {\sqrt {2} \sqrt [4]{1-a x}}{\sqrt [4]{a x+1}}+1\right )}{8 \sqrt {2} a^3}+\frac {(a x+1)^{3/4} (1-a x)^{5/4}}{12 a^3}+\frac {3 (a x+1)^{3/4} \sqrt [4]{1-a x}}{8 a^3}+\frac {3 \log \left (\frac {\sqrt {1-a x}}{\sqrt {a x+1}}-\frac {\sqrt {2} \sqrt [4]{1-a x}}{\sqrt [4]{a x+1}}+1\right )}{16 \sqrt {2} a^3}-\frac {3 \log \left (\frac {\sqrt {1-a x}}{\sqrt {a x+1}}+\frac {\sqrt {2} \sqrt [4]{1-a x}}{\sqrt [4]{a x+1}}+1\right )}{16 \sqrt {2} a^3}-\frac {x (a x+1)^{3/4} (1-a x)^{5/4}}{3 a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 52
Rule 65
Rule 81
Rule 92
Rule 210
Rule 217
Rule 246
Rule 631
Rule 642
Rule 1176
Rule 1179
Rule 6261
Rubi steps
\begin {align*} \int e^{-\frac {1}{2} \tanh ^{-1}(a x)} x^2 \, dx &=\int \frac {x^2 \sqrt [4]{1-a x}}{\sqrt [4]{1+a x}} \, dx\\ &=-\frac {x (1-a x)^{5/4} (1+a x)^{3/4}}{3 a^2}-\frac {\int \frac {\sqrt [4]{1-a x} \left (-1+\frac {a x}{2}\right )}{\sqrt [4]{1+a x}} \, dx}{3 a^2}\\ &=\frac {(1-a x)^{5/4} (1+a x)^{3/4}}{12 a^3}-\frac {x (1-a x)^{5/4} (1+a x)^{3/4}}{3 a^2}+\frac {3 \int \frac {\sqrt [4]{1-a x}}{\sqrt [4]{1+a x}} \, dx}{8 a^2}\\ &=\frac {3 \sqrt [4]{1-a x} (1+a x)^{3/4}}{8 a^3}+\frac {(1-a x)^{5/4} (1+a x)^{3/4}}{12 a^3}-\frac {x (1-a x)^{5/4} (1+a x)^{3/4}}{3 a^2}+\frac {3 \int \frac {1}{(1-a x)^{3/4} \sqrt [4]{1+a x}} \, dx}{16 a^2}\\ &=\frac {3 \sqrt [4]{1-a x} (1+a x)^{3/4}}{8 a^3}+\frac {(1-a x)^{5/4} (1+a x)^{3/4}}{12 a^3}-\frac {x (1-a x)^{5/4} (1+a x)^{3/4}}{3 a^2}-\frac {3 \text {Subst}\left (\int \frac {1}{\sqrt [4]{2-x^4}} \, dx,x,\sqrt [4]{1-a x}\right )}{4 a^3}\\ &=\frac {3 \sqrt [4]{1-a x} (1+a x)^{3/4}}{8 a^3}+\frac {(1-a x)^{5/4} (1+a x)^{3/4}}{12 a^3}-\frac {x (1-a x)^{5/4} (1+a x)^{3/4}}{3 a^2}-\frac {3 \text {Subst}\left (\int \frac {1}{1+x^4} \, dx,x,\frac {\sqrt [4]{1-a x}}{\sqrt [4]{1+a x}}\right )}{4 a^3}\\ &=\frac {3 \sqrt [4]{1-a x} (1+a x)^{3/4}}{8 a^3}+\frac {(1-a x)^{5/4} (1+a x)^{3/4}}{12 a^3}-\frac {x (1-a x)^{5/4} (1+a x)^{3/4}}{3 a^2}-\frac {3 \text {Subst}\left (\int \frac {1-x^2}{1+x^4} \, dx,x,\frac {\sqrt [4]{1-a x}}{\sqrt [4]{1+a x}}\right )}{8 a^3}-\frac {3 \text {Subst}\left (\int \frac {1+x^2}{1+x^4} \, dx,x,\frac {\sqrt [4]{1-a x}}{\sqrt [4]{1+a x}}\right )}{8 a^3}\\ &=\frac {3 \sqrt [4]{1-a x} (1+a x)^{3/4}}{8 a^3}+\frac {(1-a x)^{5/4} (1+a x)^{3/4}}{12 a^3}-\frac {x (1-a x)^{5/4} (1+a x)^{3/4}}{3 a^2}-\frac {3 \text {Subst}\left (\int \frac {1}{1-\sqrt {2} x+x^2} \, dx,x,\frac {\sqrt [4]{1-a x}}{\sqrt [4]{1+a x}}\right )}{16 a^3}-\frac {3 \text {Subst}\left (\int \frac {1}{1+\sqrt {2} x+x^2} \, dx,x,\frac {\sqrt [4]{1-a x}}{\sqrt [4]{1+a x}}\right )}{16 a^3}+\frac {3 \text {Subst}\left (\int \frac {\sqrt {2}+2 x}{-1-\sqrt {2} x-x^2} \, dx,x,\frac {\sqrt [4]{1-a x}}{\sqrt [4]{1+a x}}\right )}{16 \sqrt {2} a^3}+\frac {3 \text {Subst}\left (\int \frac {\sqrt {2}-2 x}{-1+\sqrt {2} x-x^2} \, dx,x,\frac {\sqrt [4]{1-a x}}{\sqrt [4]{1+a x}}\right )}{16 \sqrt {2} a^3}\\ &=\frac {3 \sqrt [4]{1-a x} (1+a x)^{3/4}}{8 a^3}+\frac {(1-a x)^{5/4} (1+a x)^{3/4}}{12 a^3}-\frac {x (1-a x)^{5/4} (1+a x)^{3/4}}{3 a^2}+\frac {3 \log \left (1+\frac {\sqrt {1-a x}}{\sqrt {1+a x}}-\frac {\sqrt {2} \sqrt [4]{1-a x}}{\sqrt [4]{1+a x}}\right )}{16 \sqrt {2} a^3}-\frac {3 \log \left (1+\frac {\sqrt {1-a x}}{\sqrt {1+a x}}+\frac {\sqrt {2} \sqrt [4]{1-a x}}{\sqrt [4]{1+a x}}\right )}{16 \sqrt {2} a^3}-\frac {3 \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\frac {\sqrt {2} \sqrt [4]{1-a x}}{\sqrt [4]{1+a x}}\right )}{8 \sqrt {2} a^3}+\frac {3 \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\frac {\sqrt {2} \sqrt [4]{1-a x}}{\sqrt [4]{1+a x}}\right )}{8 \sqrt {2} a^3}\\ &=\frac {3 \sqrt [4]{1-a x} (1+a x)^{3/4}}{8 a^3}+\frac {(1-a x)^{5/4} (1+a x)^{3/4}}{12 a^3}-\frac {x (1-a x)^{5/4} (1+a x)^{3/4}}{3 a^2}+\frac {3 \tan ^{-1}\left (1-\frac {\sqrt {2} \sqrt [4]{1-a x}}{\sqrt [4]{1+a x}}\right )}{8 \sqrt {2} a^3}-\frac {3 \tan ^{-1}\left (1+\frac {\sqrt {2} \sqrt [4]{1-a x}}{\sqrt [4]{1+a x}}\right )}{8 \sqrt {2} a^3}+\frac {3 \log \left (1+\frac {\sqrt {1-a x}}{\sqrt {1+a x}}-\frac {\sqrt {2} \sqrt [4]{1-a x}}{\sqrt [4]{1+a x}}\right )}{16 \sqrt {2} a^3}-\frac {3 \log \left (1+\frac {\sqrt {1-a x}}{\sqrt {1+a x}}+\frac {\sqrt {2} \sqrt [4]{1-a x}}{\sqrt [4]{1+a x}}\right )}{16 \sqrt {2} a^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 0.02, size = 62, normalized size = 0.22 \begin {gather*} -\frac {(1-a x)^{5/4} \left (5 (1+a x)^{3/4} (-1+4 a x)+9\ 2^{3/4} \, _2F_1\left (\frac {1}{4},\frac {5}{4};\frac {9}{4};\frac {1}{2} (1-a x)\right )\right )}{60 a^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.01, size = 0, normalized size = 0.00 \[\int \frac {x^{2}}{\sqrt {\frac {a x +1}{\sqrt {-a^{2} x^{2}+1}}}}\, dx\]
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 [B] Leaf count of result is larger than twice the leaf count of optimal. 549 vs.
\(2 (215) = 430\).
time = 0.36, size = 549, normalized size = 1.95 \begin {gather*} -\frac {36 \, \sqrt {2} a^{3} \frac {1}{a^{12}}^{\frac {1}{4}} \arctan \left (\sqrt {2} a^{3} \sqrt {\frac {\sqrt {2} {\left (a^{10} x - a^{9}\right )} \sqrt {-\frac {\sqrt {-a^{2} x^{2} + 1}}{a x - 1}} \frac {1}{a^{12}}^{\frac {3}{4}} + {\left (a^{7} x - a^{6}\right )} \sqrt {\frac {1}{a^{12}}} - \sqrt {-a^{2} x^{2} + 1}}{a x - 1}} \frac {1}{a^{12}}^{\frac {1}{4}} - \sqrt {2} a^{3} \sqrt {-\frac {\sqrt {-a^{2} x^{2} + 1}}{a x - 1}} \frac {1}{a^{12}}^{\frac {1}{4}} - 1\right ) + 36 \, \sqrt {2} a^{3} \frac {1}{a^{12}}^{\frac {1}{4}} \arctan \left (\sqrt {2} a^{3} \sqrt {-\frac {\sqrt {2} {\left (a^{10} x - a^{9}\right )} \sqrt {-\frac {\sqrt {-a^{2} x^{2} + 1}}{a x - 1}} \frac {1}{a^{12}}^{\frac {3}{4}} - {\left (a^{7} x - a^{6}\right )} \sqrt {\frac {1}{a^{12}}} + \sqrt {-a^{2} x^{2} + 1}}{a x - 1}} \frac {1}{a^{12}}^{\frac {1}{4}} - \sqrt {2} a^{3} \sqrt {-\frac {\sqrt {-a^{2} x^{2} + 1}}{a x - 1}} \frac {1}{a^{12}}^{\frac {1}{4}} + 1\right ) + 9 \, \sqrt {2} a^{3} \frac {1}{a^{12}}^{\frac {1}{4}} \log \left (\frac {\sqrt {2} {\left (a^{10} x - a^{9}\right )} \sqrt {-\frac {\sqrt {-a^{2} x^{2} + 1}}{a x - 1}} \frac {1}{a^{12}}^{\frac {3}{4}} + {\left (a^{7} x - a^{6}\right )} \sqrt {\frac {1}{a^{12}}} - \sqrt {-a^{2} x^{2} + 1}}{a x - 1}\right ) - 9 \, \sqrt {2} a^{3} \frac {1}{a^{12}}^{\frac {1}{4}} \log \left (-\frac {\sqrt {2} {\left (a^{10} x - a^{9}\right )} \sqrt {-\frac {\sqrt {-a^{2} x^{2} + 1}}{a x - 1}} \frac {1}{a^{12}}^{\frac {3}{4}} - {\left (a^{7} x - a^{6}\right )} \sqrt {\frac {1}{a^{12}}} + \sqrt {-a^{2} x^{2} + 1}}{a x - 1}\right ) - 4 \, {\left (8 \, a^{2} x^{2} - 10 \, a x + 11\right )} \sqrt {-a^{2} x^{2} + 1} \sqrt {-\frac {\sqrt {-a^{2} x^{2} + 1}}{a x - 1}}}{96 \, a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{2}}{\sqrt {\frac {a x + 1}{\sqrt {- a^{2} x^{2} + 1}}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {x^2}{\sqrt {\frac {a\,x+1}{\sqrt {1-a^2\,x^2}}}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________