Optimal. Leaf size=72 \[ -\sqrt {1+x} \cos (x)+\sqrt {\frac {\pi }{2}} \cos (1) \text {FresnelC}\left (\sqrt {\frac {2}{\pi }} \sqrt {1+x}\right )+\sqrt {\frac {\pi }{2}} S\left (\sqrt {\frac {2}{\pi }} \sqrt {1+x}\right ) \sin (1) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.438, Rules used = {6264, 3377,
3387, 3386, 3432, 3385, 3433} \begin {gather*} \sqrt {\frac {\pi }{2}} \cos (1) \text {FresnelC}\left (\sqrt {\frac {2}{\pi }} \sqrt {x+1}\right )+\sqrt {\frac {\pi }{2}} \sin (1) S\left (\sqrt {\frac {2}{\pi }} \sqrt {x+1}\right )-\sqrt {x+1} \cos (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3377
Rule 3385
Rule 3386
Rule 3387
Rule 3432
Rule 3433
Rule 6264
Rubi steps
\begin {align*} \int e^{\tanh ^{-1}(x)} \sqrt {1-x} \sin (x) \, dx &=\int \sqrt {1+x} \sin (x) \, dx\\ &=-\sqrt {1+x} \cos (x)+\frac {1}{2} \int \frac {\cos (x)}{\sqrt {1+x}} \, dx\\ &=-\sqrt {1+x} \cos (x)+\frac {1}{2} \cos (1) \int \frac {\cos (1+x)}{\sqrt {1+x}} \, dx+\frac {1}{2} \sin (1) \int \frac {\sin (1+x)}{\sqrt {1+x}} \, dx\\ &=-\sqrt {1+x} \cos (x)+\cos (1) \text {Subst}\left (\int \cos \left (x^2\right ) \, dx,x,\sqrt {1+x}\right )+\sin (1) \text {Subst}\left (\int \sin \left (x^2\right ) \, dx,x,\sqrt {1+x}\right )\\ &=-\sqrt {1+x} \cos (x)+\sqrt {\frac {\pi }{2}} \cos (1) C\left (\sqrt {\frac {2}{\pi }} \sqrt {1+x}\right )+\sqrt {\frac {\pi }{2}} S\left (\sqrt {\frac {2}{\pi }} \sqrt {1+x}\right ) \sin (1)\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.02, size = 77, normalized size = 1.07 \begin {gather*} -\frac {e^{-i} \sqrt {1+x} \Gamma \left (\frac {3}{2},-i (1+x)\right )}{2 \sqrt {-i (1+x)}}-\frac {e^i \sqrt {1+x} \Gamma \left (\frac {3}{2},i (1+x)\right )}{2 \sqrt {i (1+x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.03, size = 0, normalized size = 0.00 \[\int \frac {\left (1+x \right ) \sqrt {1-x}\, \sin \left (x \right )}{\sqrt {-x^{2}+1}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains complex when optimal does not.
time = 0.34, size = 498, normalized size = 6.92 \begin {gather*} -\frac {{\left ({\left ({\left (-i \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {i \, x + i}\right ) - 1\right )} + i \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-i \, x - i}\right ) - 1\right )}\right )} \cos \left (1\right ) + {\left (\sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {i \, x + i}\right ) - 1\right )} + \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-i \, x - i}\right ) - 1\right )}\right )} \sin \left (1\right )\right )} \cos \left (\frac {1}{2} \, \arctan \left (x + 1, 0\right )\right ) - {\left ({\left (\sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {i \, x + i}\right ) - 1\right )} + \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-i \, x - i}\right ) - 1\right )}\right )} \cos \left (1\right ) - {\left (-i \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {i \, x + i}\right ) - 1\right )} + i \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-i \, x - i}\right ) - 1\right )}\right )} \sin \left (1\right )\right )} \sin \left (\frac {1}{2} \, \arctan \left (x + 1, 0\right )\right )\right )} \sqrt {x + 1}}{2 \, \sqrt {{\left | x + 1 \right |}}} - \frac {{\left ({\left ({\left (i \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {i \, x + i}\right ) - 1\right )} - i \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-i \, x - i}\right ) - 1\right )}\right )} \cos \left (1\right ) - {\left (\sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {i \, x + i}\right ) - 1\right )} + \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-i \, x - i}\right ) - 1\right )}\right )} \sin \left (1\right )\right )} {\left | x + 1 \right |} \cos \left (\frac {1}{2} \, \arctan \left (x + 1, 0\right )\right ) + {\left ({\left (\sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {i \, x + i}\right ) - 1\right )} + \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-i \, x - i}\right ) - 1\right )}\right )} \cos \left (1\right ) + {\left (i \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {i \, x + i}\right ) - 1\right )} - i \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-i \, x - i}\right ) - 1\right )}\right )} \sin \left (1\right )\right )} {\left | x + 1 \right |} \sin \left (\frac {1}{2} \, \arctan \left (x + 1, 0\right )\right ) + {\left ({\left ({\left (i \, \cos \left (1\right ) - \sin \left (1\right )\right )} \Gamma \left (\frac {3}{2}, i \, x + i\right ) + {\left (-i \, \cos \left (1\right ) - \sin \left (1\right )\right )} \Gamma \left (\frac {3}{2}, -i \, x - i\right )\right )} x + {\left (i \, \cos \left (1\right ) - \sin \left (1\right )\right )} \Gamma \left (\frac {3}{2}, i \, x + i\right ) + {\left (-i \, \cos \left (1\right ) - \sin \left (1\right )\right )} \Gamma \left (\frac {3}{2}, -i \, x - i\right )\right )} \cos \left (\frac {3}{2} \, \arctan \left (x + 1, 0\right )\right ) + {\left ({\left ({\left (\cos \left (1\right ) + i \, \sin \left (1\right )\right )} \Gamma \left (\frac {3}{2}, i \, x + i\right ) + {\left (\cos \left (1\right ) - i \, \sin \left (1\right )\right )} \Gamma \left (\frac {3}{2}, -i \, x - i\right )\right )} x + {\left (\cos \left (1\right ) + i \, \sin \left (1\right )\right )} \Gamma \left (\frac {3}{2}, i \, x + i\right ) + {\left (\cos \left (1\right ) - i \, \sin \left (1\right )\right )} \Gamma \left (\frac {3}{2}, -i \, x - i\right )\right )} \sin \left (\frac {3}{2} \, \arctan \left (x + 1, 0\right )\right )\right )} \sqrt {{\left | x + 1 \right |}}}{2 \, {\left (x + 1\right )}^{\frac {3}{2}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \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 {\sqrt {1 - x} \left (x + 1\right ) \sin {\left (x \right )}}{\sqrt {- \left (x - 1\right ) \left (x + 1\right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] Result contains complex when optimal does not.
time = 0.42, size = 66, normalized size = 0.92 \begin {gather*} \left (\frac {1}{8} i - \frac {1}{8}\right ) \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (-\left (\frac {1}{2} i + \frac {1}{2}\right ) \, \sqrt {2} \sqrt {x + 1}\right ) e^{i} - \left (\frac {1}{8} i + \frac {1}{8}\right ) \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (\left (\frac {1}{2} i - \frac {1}{2}\right ) \, \sqrt {2} \sqrt {x + 1}\right ) e^{\left (-i\right )} - \frac {1}{2} \, \sqrt {x + 1} e^{\left (i \, x\right )} - \frac {1}{2} \, \sqrt {x + 1} e^{\left (-i \, x\right )} - 0.339605729125000 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sin \left (x\right )\,\sqrt {1-x}\,\left (x+1\right )}{\sqrt {1-x^2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________