Optimal. Leaf size=459 \[ \frac {b (4 (e g-d h)+e h x) \sqrt {1-c^2 x^2}}{4 c e^2}-\frac {b h \text {ArcSin}(c x)}{4 c^2 e}-\frac {i b \left (e^2 f-d e g+d^2 h\right ) \text {ArcSin}(c x)^2}{2 e^3}+\frac {(e g-d h) x (a+b \text {ArcSin}(c x))}{e^2}+\frac {h x^2 (a+b \text {ArcSin}(c x))}{2 e}+\frac {b \left (e^2 f-d e g+d^2 h\right ) \text {ArcSin}(c x) \log \left (1-\frac {i e e^{i \text {ArcSin}(c x)}}{c d-\sqrt {c^2 d^2-e^2}}\right )}{e^3}+\frac {b \left (e^2 f-d e g+d^2 h\right ) \text {ArcSin}(c x) \log \left (1-\frac {i e e^{i \text {ArcSin}(c x)}}{c d+\sqrt {c^2 d^2-e^2}}\right )}{e^3}-\frac {b \left (e^2 f-d e g+d^2 h\right ) \text {ArcSin}(c x) \log (d+e x)}{e^3}+\frac {\left (e^2 f-d e g+d^2 h\right ) (a+b \text {ArcSin}(c x)) \log (d+e x)}{e^3}-\frac {i b \left (e^2 f-d e g+d^2 h\right ) \text {PolyLog}\left (2,\frac {i e e^{i \text {ArcSin}(c x)}}{c d-\sqrt {c^2 d^2-e^2}}\right )}{e^3}-\frac {i b \left (e^2 f-d e g+d^2 h\right ) \text {PolyLog}\left (2,\frac {i e e^{i \text {ArcSin}(c x)}}{c d+\sqrt {c^2 d^2-e^2}}\right )}{e^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.57, antiderivative size = 459, normalized size of antiderivative = 1.00, number of steps
used = 15, number of rules used = 12, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {712, 4837,
12, 6874, 794, 222, 2451, 4825, 4615, 2221, 2317, 2438} \begin {gather*} \frac {\log (d+e x) (a+b \text {ArcSin}(c x)) \left (d^2 h-d e g+e^2 f\right )}{e^3}+\frac {x (e g-d h) (a+b \text {ArcSin}(c x))}{e^2}+\frac {h x^2 (a+b \text {ArcSin}(c x))}{2 e}-\frac {i b \left (d^2 h-d e g+e^2 f\right ) \text {Li}_2\left (\frac {i e e^{i \text {ArcSin}(c x)}}{c d-\sqrt {c^2 d^2-e^2}}\right )}{e^3}-\frac {i b \left (d^2 h-d e g+e^2 f\right ) \text {Li}_2\left (\frac {i e e^{i \text {ArcSin}(c x)}}{c d+\sqrt {c^2 d^2-e^2}}\right )}{e^3}+\frac {b \text {ArcSin}(c x) \left (d^2 h-d e g+e^2 f\right ) \log \left (1-\frac {i e e^{i \text {ArcSin}(c x)}}{c d-\sqrt {c^2 d^2-e^2}}\right )}{e^3}+\frac {b \text {ArcSin}(c x) \left (d^2 h-d e g+e^2 f\right ) \log \left (1-\frac {i e e^{i \text {ArcSin}(c x)}}{\sqrt {c^2 d^2-e^2}+c d}\right )}{e^3}-\frac {b h \text {ArcSin}(c x)}{4 c^2 e}-\frac {i b \text {ArcSin}(c x)^2 \left (d^2 h-d e g+e^2 f\right )}{2 e^3}-\frac {b \text {ArcSin}(c x) \log (d+e x) \left (d^2 h-d e g+e^2 f\right )}{e^3}+\frac {b \sqrt {1-c^2 x^2} (4 (e g-d h)+e h x)}{4 c e^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 222
Rule 712
Rule 794
Rule 2221
Rule 2317
Rule 2438
Rule 2451
Rule 4615
Rule 4825
Rule 4837
Rule 6874
Rubi steps
\begin {align*} \int \frac {\left (f+g x+h x^2\right ) \left (a+b \sin ^{-1}(c x)\right )}{d+e x} \, dx &=\frac {(e g-d h) x \left (a+b \sin ^{-1}(c x)\right )}{e^2}+\frac {h x^2 \left (a+b \sin ^{-1}(c x)\right )}{2 e}+\frac {\left (e^2 f-d e g+d^2 h\right ) \left (a+b \sin ^{-1}(c x)\right ) \log (d+e x)}{e^3}-(b c) \int \frac {e x (2 e g-2 d h+e h x)+2 \left (e^2 f-d e g+d^2 h\right ) \log (d+e x)}{2 e^3 \sqrt {1-c^2 x^2}} \, dx\\ &=\frac {(e g-d h) x \left (a+b \sin ^{-1}(c x)\right )}{e^2}+\frac {h x^2 \left (a+b \sin ^{-1}(c x)\right )}{2 e}+\frac {\left (e^2 f-d e g+d^2 h\right ) \left (a+b \sin ^{-1}(c x)\right ) \log (d+e x)}{e^3}-\frac {(b c) \int \frac {e x (2 e g-2 d h+e h x)+2 \left (e^2 f-d e g+d^2 h\right ) \log (d+e x)}{\sqrt {1-c^2 x^2}} \, dx}{2 e^3}\\ &=\frac {(e g-d h) x \left (a+b \sin ^{-1}(c x)\right )}{e^2}+\frac {h x^2 \left (a+b \sin ^{-1}(c x)\right )}{2 e}+\frac {\left (e^2 f-d e g+d^2 h\right ) \left (a+b \sin ^{-1}(c x)\right ) \log (d+e x)}{e^3}-\frac {(b c) \int \left (\frac {e x (2 e g-2 d h+e h x)}{\sqrt {1-c^2 x^2}}+\frac {2 \left (e^2 f-d e g+d^2 h\right ) \log (d+e x)}{\sqrt {1-c^2 x^2}}\right ) \, dx}{2 e^3}\\ &=\frac {(e g-d h) x \left (a+b \sin ^{-1}(c x)\right )}{e^2}+\frac {h x^2 \left (a+b \sin ^{-1}(c x)\right )}{2 e}+\frac {\left (e^2 f-d e g+d^2 h\right ) \left (a+b \sin ^{-1}(c x)\right ) \log (d+e x)}{e^3}-\frac {(b c) \int \frac {x (2 e g-2 d h+e h x)}{\sqrt {1-c^2 x^2}} \, dx}{2 e^2}-\frac {\left (b c \left (e^2 f-d e g+d^2 h\right )\right ) \int \frac {\log (d+e x)}{\sqrt {1-c^2 x^2}} \, dx}{e^3}\\ &=\frac {b (4 (e g-d h)+e h x) \sqrt {1-c^2 x^2}}{4 c e^2}+\frac {(e g-d h) x \left (a+b \sin ^{-1}(c x)\right )}{e^2}+\frac {h x^2 \left (a+b \sin ^{-1}(c x)\right )}{2 e}-\frac {b \left (e^2 f-d e g+d^2 h\right ) \sin ^{-1}(c x) \log (d+e x)}{e^3}+\frac {\left (e^2 f-d e g+d^2 h\right ) \left (a+b \sin ^{-1}(c x)\right ) \log (d+e x)}{e^3}-\frac {(b h) \int \frac {1}{\sqrt {1-c^2 x^2}} \, dx}{4 c e}+\frac {\left (b c \left (e^2 f-d e g+d^2 h\right )\right ) \int \frac {\sin ^{-1}(c x)}{c d+c e x} \, dx}{e^2}\\ &=\frac {b (4 (e g-d h)+e h x) \sqrt {1-c^2 x^2}}{4 c e^2}-\frac {b h \sin ^{-1}(c x)}{4 c^2 e}+\frac {(e g-d h) x \left (a+b \sin ^{-1}(c x)\right )}{e^2}+\frac {h x^2 \left (a+b \sin ^{-1}(c x)\right )}{2 e}-\frac {b \left (e^2 f-d e g+d^2 h\right ) \sin ^{-1}(c x) \log (d+e x)}{e^3}+\frac {\left (e^2 f-d e g+d^2 h\right ) \left (a+b \sin ^{-1}(c x)\right ) \log (d+e x)}{e^3}+\frac {\left (b c \left (e^2 f-d e g+d^2 h\right )\right ) \text {Subst}\left (\int \frac {x \cos (x)}{c^2 d+c e \sin (x)} \, dx,x,\sin ^{-1}(c x)\right )}{e^2}\\ &=\frac {b (4 (e g-d h)+e h x) \sqrt {1-c^2 x^2}}{4 c e^2}-\frac {b h \sin ^{-1}(c x)}{4 c^2 e}-\frac {i b \left (e^2 f-d e g+d^2 h\right ) \sin ^{-1}(c x)^2}{2 e^3}+\frac {(e g-d h) x \left (a+b \sin ^{-1}(c x)\right )}{e^2}+\frac {h x^2 \left (a+b \sin ^{-1}(c x)\right )}{2 e}-\frac {b \left (e^2 f-d e g+d^2 h\right ) \sin ^{-1}(c x) \log (d+e x)}{e^3}+\frac {\left (e^2 f-d e g+d^2 h\right ) \left (a+b \sin ^{-1}(c x)\right ) \log (d+e x)}{e^3}+\frac {\left (b c \left (e^2 f-d e g+d^2 h\right )\right ) \text {Subst}\left (\int \frac {e^{i x} x}{c^2 d-c \sqrt {c^2 d^2-e^2}-i c e e^{i x}} \, dx,x,\sin ^{-1}(c x)\right )}{e^2}+\frac {\left (b c \left (e^2 f-d e g+d^2 h\right )\right ) \text {Subst}\left (\int \frac {e^{i x} x}{c^2 d+c \sqrt {c^2 d^2-e^2}-i c e e^{i x}} \, dx,x,\sin ^{-1}(c x)\right )}{e^2}\\ &=\frac {b (4 (e g-d h)+e h x) \sqrt {1-c^2 x^2}}{4 c e^2}-\frac {b h \sin ^{-1}(c x)}{4 c^2 e}-\frac {i b \left (e^2 f-d e g+d^2 h\right ) \sin ^{-1}(c x)^2}{2 e^3}+\frac {(e g-d h) x \left (a+b \sin ^{-1}(c x)\right )}{e^2}+\frac {h x^2 \left (a+b \sin ^{-1}(c x)\right )}{2 e}+\frac {b \left (e^2 f-d e g+d^2 h\right ) \sin ^{-1}(c x) \log \left (1-\frac {i e e^{i \sin ^{-1}(c x)}}{c d-\sqrt {c^2 d^2-e^2}}\right )}{e^3}+\frac {b \left (e^2 f-d e g+d^2 h\right ) \sin ^{-1}(c x) \log \left (1-\frac {i e e^{i \sin ^{-1}(c x)}}{c d+\sqrt {c^2 d^2-e^2}}\right )}{e^3}-\frac {b \left (e^2 f-d e g+d^2 h\right ) \sin ^{-1}(c x) \log (d+e x)}{e^3}+\frac {\left (e^2 f-d e g+d^2 h\right ) \left (a+b \sin ^{-1}(c x)\right ) \log (d+e x)}{e^3}-\frac {\left (b \left (e^2 f-d e g+d^2 h\right )\right ) \text {Subst}\left (\int \log \left (1-\frac {i c e e^{i x}}{c^2 d-c \sqrt {c^2 d^2-e^2}}\right ) \, dx,x,\sin ^{-1}(c x)\right )}{e^3}-\frac {\left (b \left (e^2 f-d e g+d^2 h\right )\right ) \text {Subst}\left (\int \log \left (1-\frac {i c e e^{i x}}{c^2 d+c \sqrt {c^2 d^2-e^2}}\right ) \, dx,x,\sin ^{-1}(c x)\right )}{e^3}\\ &=\frac {b (4 (e g-d h)+e h x) \sqrt {1-c^2 x^2}}{4 c e^2}-\frac {b h \sin ^{-1}(c x)}{4 c^2 e}-\frac {i b \left (e^2 f-d e g+d^2 h\right ) \sin ^{-1}(c x)^2}{2 e^3}+\frac {(e g-d h) x \left (a+b \sin ^{-1}(c x)\right )}{e^2}+\frac {h x^2 \left (a+b \sin ^{-1}(c x)\right )}{2 e}+\frac {b \left (e^2 f-d e g+d^2 h\right ) \sin ^{-1}(c x) \log \left (1-\frac {i e e^{i \sin ^{-1}(c x)}}{c d-\sqrt {c^2 d^2-e^2}}\right )}{e^3}+\frac {b \left (e^2 f-d e g+d^2 h\right ) \sin ^{-1}(c x) \log \left (1-\frac {i e e^{i \sin ^{-1}(c x)}}{c d+\sqrt {c^2 d^2-e^2}}\right )}{e^3}-\frac {b \left (e^2 f-d e g+d^2 h\right ) \sin ^{-1}(c x) \log (d+e x)}{e^3}+\frac {\left (e^2 f-d e g+d^2 h\right ) \left (a+b \sin ^{-1}(c x)\right ) \log (d+e x)}{e^3}+\frac {\left (i b \left (e^2 f-d e g+d^2 h\right )\right ) \text {Subst}\left (\int \frac {\log \left (1-\frac {i c e x}{c^2 d-c \sqrt {c^2 d^2-e^2}}\right )}{x} \, dx,x,e^{i \sin ^{-1}(c x)}\right )}{e^3}+\frac {\left (i b \left (e^2 f-d e g+d^2 h\right )\right ) \text {Subst}\left (\int \frac {\log \left (1-\frac {i c e x}{c^2 d+c \sqrt {c^2 d^2-e^2}}\right )}{x} \, dx,x,e^{i \sin ^{-1}(c x)}\right )}{e^3}\\ &=\frac {b (4 (e g-d h)+e h x) \sqrt {1-c^2 x^2}}{4 c e^2}-\frac {b h \sin ^{-1}(c x)}{4 c^2 e}-\frac {i b \left (e^2 f-d e g+d^2 h\right ) \sin ^{-1}(c x)^2}{2 e^3}+\frac {(e g-d h) x \left (a+b \sin ^{-1}(c x)\right )}{e^2}+\frac {h x^2 \left (a+b \sin ^{-1}(c x)\right )}{2 e}+\frac {b \left (e^2 f-d e g+d^2 h\right ) \sin ^{-1}(c x) \log \left (1-\frac {i e e^{i \sin ^{-1}(c x)}}{c d-\sqrt {c^2 d^2-e^2}}\right )}{e^3}+\frac {b \left (e^2 f-d e g+d^2 h\right ) \sin ^{-1}(c x) \log \left (1-\frac {i e e^{i \sin ^{-1}(c x)}}{c d+\sqrt {c^2 d^2-e^2}}\right )}{e^3}-\frac {b \left (e^2 f-d e g+d^2 h\right ) \sin ^{-1}(c x) \log (d+e x)}{e^3}+\frac {\left (e^2 f-d e g+d^2 h\right ) \left (a+b \sin ^{-1}(c x)\right ) \log (d+e x)}{e^3}-\frac {i b \left (e^2 f-d e g+d^2 h\right ) \text {Li}_2\left (\frac {i e e^{i \sin ^{-1}(c x)}}{c d-\sqrt {c^2 d^2-e^2}}\right )}{e^3}-\frac {i b \left (e^2 f-d e g+d^2 h\right ) \text {Li}_2\left (\frac {i e e^{i \sin ^{-1}(c x)}}{c d+\sqrt {c^2 d^2-e^2}}\right )}{e^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(928\) vs. \(2(459)=918\).
time = 2.00, size = 928, normalized size = 2.02 \begin {gather*} \frac {8 a c^2 e (e g-d h) x+4 a c^2 e^2 h x^2+8 a c^2 \left (e^2 f-d e g+d^2 h\right ) \log (d+e x)+b c e g \left (8 e \sqrt {1-c^2 x^2}+8 c e x \text {ArcSin}(c x)-c d \left (i (\pi -2 \text {ArcSin}(c x))^2-32 i \text {ArcSin}\left (\frac {\sqrt {1+\frac {c d}{e}}}{\sqrt {2}}\right ) \text {ArcTan}\left (\frac {(c d-e) \cot \left (\frac {1}{4} (\pi +2 \text {ArcSin}(c x))\right )}{\sqrt {c^2 d^2-e^2}}\right )-4 \left (\pi +4 \text {ArcSin}\left (\frac {\sqrt {1+\frac {c d}{e}}}{\sqrt {2}}\right )-2 \text {ArcSin}(c x)\right ) \log \left (1-\frac {i \left (-c d+\sqrt {c^2 d^2-e^2}\right ) e^{-i \text {ArcSin}(c x)}}{e}\right )-4 \left (\pi -4 \text {ArcSin}\left (\frac {\sqrt {1+\frac {c d}{e}}}{\sqrt {2}}\right )-2 \text {ArcSin}(c x)\right ) \log \left (1+\frac {i \left (c d+\sqrt {c^2 d^2-e^2}\right ) e^{-i \text {ArcSin}(c x)}}{e}\right )+4 (\pi -2 \text {ArcSin}(c x)) \log (c (d+e x))+8 \text {ArcSin}(c x) \log (c (d+e x))+8 i \left (\text {PolyLog}\left (2,\frac {i \left (-c d+\sqrt {c^2 d^2-e^2}\right ) e^{-i \text {ArcSin}(c x)}}{e}\right )+\text {PolyLog}\left (2,-\frac {i \left (c d+\sqrt {c^2 d^2-e^2}\right ) e^{-i \text {ArcSin}(c x)}}{e}\right )\right )\right )\right )-4 i b c^2 e^2 f \left (\text {ArcSin}(c x) \left (\text {ArcSin}(c x)+2 i \left (\log \left (1+\frac {i e e^{i \text {ArcSin}(c x)}}{-c d+\sqrt {c^2 d^2-e^2}}\right )+\log \left (1-\frac {i e e^{i \text {ArcSin}(c x)}}{c d+\sqrt {c^2 d^2-e^2}}\right )\right )\right )+2 \text {PolyLog}\left (2,-\frac {i e e^{i \text {ArcSin}(c x)}}{-c d+\sqrt {c^2 d^2-e^2}}\right )+2 \text {PolyLog}\left (2,\frac {i e e^{i \text {ArcSin}(c x)}}{c d+\sqrt {c^2 d^2-e^2}}\right )\right )-b h \left (8 c d e \sqrt {1-c^2 x^2}+8 c^2 d e x \text {ArcSin}(c x)+4 i c^2 d^2 \text {ArcSin}(c x)^2+2 e^2 \text {ArcSin}(c x) \cos (2 \text {ArcSin}(c x))-8 c^2 d^2 \text {ArcSin}(c x) \log \left (1+\frac {i e e^{i \text {ArcSin}(c x)}}{-c d+\sqrt {c^2 d^2-e^2}}\right )-8 c^2 d^2 \text {ArcSin}(c x) \log \left (1-\frac {i e e^{i \text {ArcSin}(c x)}}{c d+\sqrt {c^2 d^2-e^2}}\right )+8 i c^2 d^2 \text {PolyLog}\left (2,-\frac {i e e^{i \text {ArcSin}(c x)}}{-c d+\sqrt {c^2 d^2-e^2}}\right )+8 i c^2 d^2 \text {PolyLog}\left (2,\frac {i e e^{i \text {ArcSin}(c x)}}{c d+\sqrt {c^2 d^2-e^2}}\right )-e^2 \sin (2 \text {ArcSin}(c x))\right )}{8 c^2 e^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 2484 vs. \(2 (464 ) = 928\).
time = 0.86, size = 2485, normalized size = 5.41
method | result | size |
derivativedivides | \(\text {Expression too large to display}\) | \(2485\) |
default | \(\text {Expression too large to display}\) | \(2485\) |
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 [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 {\left (a + b \operatorname {asin}{\left (c x \right )}\right ) \left (f + g x + h x^{2}\right )}{d + e x}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [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]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\left (a+b\,\mathrm {asin}\left (c\,x\right )\right )\,\left (h\,x^2+g\,x+f\right )}{d+e\,x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________