Optimal. Leaf size=520 \[ -\frac {2 b^2 h x}{e}+\frac {2 a b h \sqrt {1-c^2 x^2}}{c e}+\frac {2 b^2 h \sqrt {1-c^2 x^2} \text {ArcSin}(c x)}{c e}+\frac {h x (a+b \text {ArcSin}(c x))^2}{e}-\frac {\left (f-\frac {d^2 h}{e^2}\right ) (a+b \text {ArcSin}(c x))^2}{d+e x}+\frac {2 a b c \left (e^2 f-d^2 h\right ) \text {ArcTan}\left (\frac {e+c^2 d x}{\sqrt {c^2 d^2-e^2} \sqrt {1-c^2 x^2}}\right )}{e^2 \sqrt {c^2 d^2-e^2}}-\frac {2 i b^2 c \left (e^2 f-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^2 \sqrt {c^2 d^2-e^2}}+\frac {2 i b^2 c \left (e^2 f-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^2 \sqrt {c^2 d^2-e^2}}-\frac {2 b^2 c \left (e^2 f-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^2 \sqrt {c^2 d^2-e^2}}+\frac {2 b^2 c \left (e^2 f-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^2 \sqrt {c^2 d^2-e^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 1.15, antiderivative size = 520, normalized size of antiderivative = 1.00, number of steps
used = 20, number of rules used = 18, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.546, Rules used = {697, 4841,
6874, 267, 739, 210, 4883, 1668, 12, 4881, 4767, 8, 4857, 3404, 2296, 2221, 2317, 2438}
\begin {gather*} -\frac {\left (f-\frac {d^2 h}{e^2}\right ) (a+b \text {ArcSin}(c x))^2}{d+e x}+\frac {h x (a+b \text {ArcSin}(c x))^2}{e}+\frac {2 a b c \left (e^2 f-d^2 h\right ) \text {ArcTan}\left (\frac {c^2 d x+e}{\sqrt {1-c^2 x^2} \sqrt {c^2 d^2-e^2}}\right )}{e^2 \sqrt {c^2 d^2-e^2}}+\frac {2 a b h \sqrt {1-c^2 x^2}}{c e}-\frac {2 b^2 c \left (e^2 f-d^2 h\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^2 \sqrt {c^2 d^2-e^2}}+\frac {2 b^2 c \left (e^2 f-d^2 h\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^2 \sqrt {c^2 d^2-e^2}}-\frac {2 i b^2 c \text {ArcSin}(c x) \left (e^2 f-d^2 h\right ) \log \left (1-\frac {i e e^{i \text {ArcSin}(c x)}}{c d-\sqrt {c^2 d^2-e^2}}\right )}{e^2 \sqrt {c^2 d^2-e^2}}+\frac {2 i b^2 c \text {ArcSin}(c x) \left (e^2 f-d^2 h\right ) \log \left (1-\frac {i e e^{i \text {ArcSin}(c x)}}{\sqrt {c^2 d^2-e^2}+c d}\right )}{e^2 \sqrt {c^2 d^2-e^2}}+\frac {2 b^2 h \sqrt {1-c^2 x^2} \text {ArcSin}(c x)}{c e}-\frac {2 b^2 h x}{e} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 12
Rule 210
Rule 267
Rule 697
Rule 739
Rule 1668
Rule 2221
Rule 2296
Rule 2317
Rule 2438
Rule 3404
Rule 4767
Rule 4841
Rule 4857
Rule 4881
Rule 4883
Rule 6874
Rubi steps
\begin {align*} \int \frac {\left (e f+2 d h x+e h x^2\right ) \left (a+b \sin ^{-1}(c x)\right )^2}{(d+e x)^2} \, dx &=\frac {h x \left (a+b \sin ^{-1}(c x)\right )^2}{e}-\frac {\left (f-\frac {d^2 h}{e^2}\right ) \left (a+b \sin ^{-1}(c x)\right )^2}{d+e x}-(2 b c) \int \frac {\left (\frac {h x}{e}-\frac {f-\frac {d^2 h}{e^2}}{d+e x}\right ) \left (a+b \sin ^{-1}(c x)\right )}{\sqrt {1-c^2 x^2}} \, dx\\ &=\frac {h x \left (a+b \sin ^{-1}(c x)\right )^2}{e}-\frac {\left (f-\frac {d^2 h}{e^2}\right ) \left (a+b \sin ^{-1}(c x)\right )^2}{d+e x}-(2 b c) \int \left (\frac {a \left (-e^2 f+d^2 h+d e h x+e^2 h x^2\right )}{e^2 (d+e x) \sqrt {1-c^2 x^2}}+\frac {b \left (-e^2 f+d^2 h+d e h x+e^2 h x^2\right ) \sin ^{-1}(c x)}{e^2 (d+e x) \sqrt {1-c^2 x^2}}\right ) \, dx\\ &=\frac {h x \left (a+b \sin ^{-1}(c x)\right )^2}{e}-\frac {\left (f-\frac {d^2 h}{e^2}\right ) \left (a+b \sin ^{-1}(c x)\right )^2}{d+e x}-\frac {(2 a b c) \int \frac {-e^2 f+d^2 h+d e h x+e^2 h x^2}{(d+e x) \sqrt {1-c^2 x^2}} \, dx}{e^2}-\frac {\left (2 b^2 c\right ) \int \frac {\left (-e^2 f+d^2 h+d e h x+e^2 h x^2\right ) \sin ^{-1}(c x)}{(d+e x) \sqrt {1-c^2 x^2}} \, dx}{e^2}\\ &=\frac {2 a b h \sqrt {1-c^2 x^2}}{c e}+\frac {h x \left (a+b \sin ^{-1}(c x)\right )^2}{e}-\frac {\left (f-\frac {d^2 h}{e^2}\right ) \left (a+b \sin ^{-1}(c x)\right )^2}{d+e x}+\frac {(2 a b) \int \frac {c^2 e^2 \left (e^2 f-d^2 h\right )}{(d+e x) \sqrt {1-c^2 x^2}} \, dx}{c e^4}-\frac {\left (2 b^2 c\right ) \int \left (\frac {e h x \sin ^{-1}(c x)}{\sqrt {1-c^2 x^2}}+\frac {\left (-e^2 f+d^2 h\right ) \sin ^{-1}(c x)}{(d+e x) \sqrt {1-c^2 x^2}}\right ) \, dx}{e^2}\\ &=\frac {2 a b h \sqrt {1-c^2 x^2}}{c e}+\frac {h x \left (a+b \sin ^{-1}(c x)\right )^2}{e}-\frac {\left (f-\frac {d^2 h}{e^2}\right ) \left (a+b \sin ^{-1}(c x)\right )^2}{d+e x}-\frac {\left (2 b^2 c h\right ) \int \frac {x \sin ^{-1}(c x)}{\sqrt {1-c^2 x^2}} \, dx}{e}+\frac {\left (2 a b c \left (e^2 f-d^2 h\right )\right ) \int \frac {1}{(d+e x) \sqrt {1-c^2 x^2}} \, dx}{e^2}-\frac {\left (2 b^2 c \left (-e^2 f+d^2 h\right )\right ) \int \frac {\sin ^{-1}(c x)}{(d+e x) \sqrt {1-c^2 x^2}} \, dx}{e^2}\\ &=\frac {2 a b h \sqrt {1-c^2 x^2}}{c e}+\frac {2 b^2 h \sqrt {1-c^2 x^2} \sin ^{-1}(c x)}{c e}+\frac {h x \left (a+b \sin ^{-1}(c x)\right )^2}{e}-\frac {\left (f-\frac {d^2 h}{e^2}\right ) \left (a+b \sin ^{-1}(c x)\right )^2}{d+e x}-\frac {\left (2 b^2 h\right ) \int 1 \, dx}{e}-\frac {\left (2 a b c \left (e^2 f-d^2 h\right )\right ) \text {Subst}\left (\int \frac {1}{-c^2 d^2+e^2-x^2} \, dx,x,\frac {e+c^2 d x}{\sqrt {1-c^2 x^2}}\right )}{e^2}-\frac {\left (2 b^2 c \left (-e^2 f+d^2 h\right )\right ) \text {Subst}\left (\int \frac {x}{c d+e \sin (x)} \, dx,x,\sin ^{-1}(c x)\right )}{e^2}\\ &=-\frac {2 b^2 h x}{e}+\frac {2 a b h \sqrt {1-c^2 x^2}}{c e}+\frac {2 b^2 h \sqrt {1-c^2 x^2} \sin ^{-1}(c x)}{c e}+\frac {h x \left (a+b \sin ^{-1}(c x)\right )^2}{e}-\frac {\left (f-\frac {d^2 h}{e^2}\right ) \left (a+b \sin ^{-1}(c x)\right )^2}{d+e x}+\frac {2 a b c \left (e^2 f-d^2 h\right ) \tan ^{-1}\left (\frac {e+c^2 d x}{\sqrt {c^2 d^2-e^2} \sqrt {1-c^2 x^2}}\right )}{e^2 \sqrt {c^2 d^2-e^2}}-\frac {\left (4 b^2 c \left (-e^2 f+d^2 h\right )\right ) \text {Subst}\left (\int \frac {e^{i x} x}{i e+2 c d e^{i x}-i e e^{2 i x}} \, dx,x,\sin ^{-1}(c x)\right )}{e^2}\\ &=-\frac {2 b^2 h x}{e}+\frac {2 a b h \sqrt {1-c^2 x^2}}{c e}+\frac {2 b^2 h \sqrt {1-c^2 x^2} \sin ^{-1}(c x)}{c e}+\frac {h x \left (a+b \sin ^{-1}(c x)\right )^2}{e}-\frac {\left (f-\frac {d^2 h}{e^2}\right ) \left (a+b \sin ^{-1}(c x)\right )^2}{d+e x}+\frac {2 a b c \left (e^2 f-d^2 h\right ) \tan ^{-1}\left (\frac {e+c^2 d x}{\sqrt {c^2 d^2-e^2} \sqrt {1-c^2 x^2}}\right )}{e^2 \sqrt {c^2 d^2-e^2}}-\frac {\left (4 i b^2 c \left (e^2 f-d^2 h\right )\right ) \text {Subst}\left (\int \frac {e^{i x} x}{2 c d-2 \sqrt {c^2 d^2-e^2}-2 i e e^{i x}} \, dx,x,\sin ^{-1}(c x)\right )}{e \sqrt {c^2 d^2-e^2}}+\frac {\left (4 i b^2 c \left (e^2 f-d^2 h\right )\right ) \text {Subst}\left (\int \frac {e^{i x} x}{2 c d+2 \sqrt {c^2 d^2-e^2}-2 i e e^{i x}} \, dx,x,\sin ^{-1}(c x)\right )}{e \sqrt {c^2 d^2-e^2}}\\ &=-\frac {2 b^2 h x}{e}+\frac {2 a b h \sqrt {1-c^2 x^2}}{c e}+\frac {2 b^2 h \sqrt {1-c^2 x^2} \sin ^{-1}(c x)}{c e}+\frac {h x \left (a+b \sin ^{-1}(c x)\right )^2}{e}-\frac {\left (f-\frac {d^2 h}{e^2}\right ) \left (a+b \sin ^{-1}(c x)\right )^2}{d+e x}+\frac {2 a b c \left (e^2 f-d^2 h\right ) \tan ^{-1}\left (\frac {e+c^2 d x}{\sqrt {c^2 d^2-e^2} \sqrt {1-c^2 x^2}}\right )}{e^2 \sqrt {c^2 d^2-e^2}}-\frac {2 i b^2 c \left (e^2 f-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^2 \sqrt {c^2 d^2-e^2}}+\frac {2 i b^2 c \left (e^2 f-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^2 \sqrt {c^2 d^2-e^2}}+\frac {\left (2 i b^2 c \left (e^2 f-d^2 h\right )\right ) \text {Subst}\left (\int \log \left (1-\frac {2 i e e^{i x}}{2 c d-2 \sqrt {c^2 d^2-e^2}}\right ) \, dx,x,\sin ^{-1}(c x)\right )}{e^2 \sqrt {c^2 d^2-e^2}}-\frac {\left (2 i b^2 c \left (e^2 f-d^2 h\right )\right ) \text {Subst}\left (\int \log \left (1-\frac {2 i e e^{i x}}{2 c d+2 \sqrt {c^2 d^2-e^2}}\right ) \, dx,x,\sin ^{-1}(c x)\right )}{e^2 \sqrt {c^2 d^2-e^2}}\\ &=-\frac {2 b^2 h x}{e}+\frac {2 a b h \sqrt {1-c^2 x^2}}{c e}+\frac {2 b^2 h \sqrt {1-c^2 x^2} \sin ^{-1}(c x)}{c e}+\frac {h x \left (a+b \sin ^{-1}(c x)\right )^2}{e}-\frac {\left (f-\frac {d^2 h}{e^2}\right ) \left (a+b \sin ^{-1}(c x)\right )^2}{d+e x}+\frac {2 a b c \left (e^2 f-d^2 h\right ) \tan ^{-1}\left (\frac {e+c^2 d x}{\sqrt {c^2 d^2-e^2} \sqrt {1-c^2 x^2}}\right )}{e^2 \sqrt {c^2 d^2-e^2}}-\frac {2 i b^2 c \left (e^2 f-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^2 \sqrt {c^2 d^2-e^2}}+\frac {2 i b^2 c \left (e^2 f-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^2 \sqrt {c^2 d^2-e^2}}+\frac {\left (2 b^2 c \left (e^2 f-d^2 h\right )\right ) \text {Subst}\left (\int \frac {\log \left (1-\frac {2 i e x}{2 c d-2 \sqrt {c^2 d^2-e^2}}\right )}{x} \, dx,x,e^{i \sin ^{-1}(c x)}\right )}{e^2 \sqrt {c^2 d^2-e^2}}-\frac {\left (2 b^2 c \left (e^2 f-d^2 h\right )\right ) \text {Subst}\left (\int \frac {\log \left (1-\frac {2 i e x}{2 c d+2 \sqrt {c^2 d^2-e^2}}\right )}{x} \, dx,x,e^{i \sin ^{-1}(c x)}\right )}{e^2 \sqrt {c^2 d^2-e^2}}\\ &=-\frac {2 b^2 h x}{e}+\frac {2 a b h \sqrt {1-c^2 x^2}}{c e}+\frac {2 b^2 h \sqrt {1-c^2 x^2} \sin ^{-1}(c x)}{c e}+\frac {h x \left (a+b \sin ^{-1}(c x)\right )^2}{e}-\frac {\left (f-\frac {d^2 h}{e^2}\right ) \left (a+b \sin ^{-1}(c x)\right )^2}{d+e x}+\frac {2 a b c \left (e^2 f-d^2 h\right ) \tan ^{-1}\left (\frac {e+c^2 d x}{\sqrt {c^2 d^2-e^2} \sqrt {1-c^2 x^2}}\right )}{e^2 \sqrt {c^2 d^2-e^2}}-\frac {2 i b^2 c \left (e^2 f-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^2 \sqrt {c^2 d^2-e^2}}+\frac {2 i b^2 c \left (e^2 f-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^2 \sqrt {c^2 d^2-e^2}}-\frac {2 b^2 c \left (e^2 f-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^2 \sqrt {c^2 d^2-e^2}}+\frac {2 b^2 c \left (e^2 f-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^2 \sqrt {c^2 d^2-e^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.29, size = 307, normalized size = 0.59 \begin {gather*} \frac {h x (a+b \text {ArcSin}(c x))^2}{e}-\frac {\left (f-\frac {d^2 h}{e^2}\right ) (a+b \text {ArcSin}(c x))^2}{d+e x}-\frac {2 b h \left (b x-\frac {\sqrt {1-c^2 x^2} (a+b \text {ArcSin}(c x))}{c}\right )}{e}+\frac {2 b c \left (e^2 f-d^2 h\right ) \left (-i (a+b \text {ArcSin}(c x)) \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 )-b \text {PolyLog}\left (2,\frac {i e e^{i \text {ArcSin}(c x)}}{c d-\sqrt {c^2 d^2-e^2}}\right )+b \text {PolyLog}\left (2,\frac {i e e^{i \text {ArcSin}(c x)}}{c d+\sqrt {c^2 d^2-e^2}}\right )\right )}{e^2 \sqrt {c^2 d^2-e^2}} \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. 1426 vs. \(2 (520 ) = 1040\).
time = 1.72, size = 1427, normalized size = 2.74 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \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 )^{2} \cdot \left (2 d h x + e f + e h x^{2}\right )}{\left (d + e x\right )^{2}}\, 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 )}^2\,\left (e\,h\,x^2+2\,d\,h\,x+e\,f\right )}{{\left (d+e\,x\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________