Optimal. Leaf size=358 \[ -\frac {i b g \text {ArcSin}(c x)^2}{2 e^2}-\frac {(e f-d g) (a+b \text {ArcSin}(c x))}{e^2 (d+e x)}+\frac {b c (e f-d g) \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 {b g \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}+\frac {b g \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}-\frac {b g \text {ArcSin}(c x) \log (d+e x)}{e^2}+\frac {g (a+b \text {ArcSin}(c x)) \log (d+e x)}{e^2}-\frac {i b g \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}-\frac {i b g \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} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.68, antiderivative size = 358, normalized size of antiderivative = 1.00, number of steps
used = 15, number of rules used = 13, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.619, Rules used = {45, 4837, 12,
6874, 739, 210, 222, 2451, 4825, 4615, 2221, 2317, 2438} \begin {gather*} -\frac {(e f-d g) (a+b \text {ArcSin}(c x))}{e^2 (d+e x)}+\frac {g \log (d+e x) (a+b \text {ArcSin}(c x))}{e^2}-\frac {i b g \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}-\frac {i b g \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}+\frac {b g \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}+\frac {b g \text {ArcSin}(c x) \log \left (1-\frac {i e e^{i \text {ArcSin}(c x)}}{\sqrt {c^2 d^2-e^2}+c d}\right )}{e^2}-\frac {b g \text {ArcSin}(c x) \log (d+e x)}{e^2}-\frac {i b g \text {ArcSin}(c x)^2}{2 e^2}+\frac {b c (e f-d g) \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}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 45
Rule 210
Rule 222
Rule 739
Rule 2221
Rule 2317
Rule 2438
Rule 2451
Rule 4615
Rule 4825
Rule 4837
Rule 6874
Rubi steps
\begin {align*} \int \frac {(f+g x) \left (a+b \sin ^{-1}(c x)\right )}{(d+e x)^2} \, dx &=-\frac {(e f-d g) \left (a+b \sin ^{-1}(c x)\right )}{e^2 (d+e x)}+\frac {g \left (a+b \sin ^{-1}(c x)\right ) \log (d+e x)}{e^2}-(b c) \int \frac {-e f \left (1-\frac {d g}{e f}\right )+g (d+e x) \log (d+e x)}{e^2 (d+e x) \sqrt {1-c^2 x^2}} \, dx\\ &=-\frac {(e f-d g) \left (a+b \sin ^{-1}(c x)\right )}{e^2 (d+e x)}+\frac {g \left (a+b \sin ^{-1}(c x)\right ) \log (d+e x)}{e^2}-\frac {(b c) \int \frac {-e f \left (1-\frac {d g}{e f}\right )+g (d+e x) \log (d+e x)}{(d+e x) \sqrt {1-c^2 x^2}} \, dx}{e^2}\\ &=-\frac {(e f-d g) \left (a+b \sin ^{-1}(c x)\right )}{e^2 (d+e x)}+\frac {g \left (a+b \sin ^{-1}(c x)\right ) \log (d+e x)}{e^2}-\frac {(b c) \int \left (\frac {-e f+d g}{(d+e x) \sqrt {1-c^2 x^2}}+\frac {g \log (d+e x)}{\sqrt {1-c^2 x^2}}\right ) \, dx}{e^2}\\ &=-\frac {(e f-d g) \left (a+b \sin ^{-1}(c x)\right )}{e^2 (d+e x)}+\frac {g \left (a+b \sin ^{-1}(c x)\right ) \log (d+e x)}{e^2}-\frac {(b c g) \int \frac {\log (d+e x)}{\sqrt {1-c^2 x^2}} \, dx}{e^2}+\frac {(b c (e f-d g)) \int \frac {1}{(d+e x) \sqrt {1-c^2 x^2}} \, dx}{e^2}\\ &=-\frac {(e f-d g) \left (a+b \sin ^{-1}(c x)\right )}{e^2 (d+e x)}-\frac {b g \sin ^{-1}(c x) \log (d+e x)}{e^2}+\frac {g \left (a+b \sin ^{-1}(c x)\right ) \log (d+e x)}{e^2}+\frac {(b c g) \int \frac {\sin ^{-1}(c x)}{c d+c e x} \, dx}{e}-\frac {(b c (e f-d g)) \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 {(e f-d g) \left (a+b \sin ^{-1}(c x)\right )}{e^2 (d+e x)}+\frac {b c (e f-d g) \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 {b g \sin ^{-1}(c x) \log (d+e x)}{e^2}+\frac {g \left (a+b \sin ^{-1}(c x)\right ) \log (d+e x)}{e^2}+\frac {(b c g) \text {Subst}\left (\int \frac {x \cos (x)}{c^2 d+c e \sin (x)} \, dx,x,\sin ^{-1}(c x)\right )}{e}\\ &=-\frac {i b g \sin ^{-1}(c x)^2}{2 e^2}-\frac {(e f-d g) \left (a+b \sin ^{-1}(c x)\right )}{e^2 (d+e x)}+\frac {b c (e f-d g) \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 {b g \sin ^{-1}(c x) \log (d+e x)}{e^2}+\frac {g \left (a+b \sin ^{-1}(c x)\right ) \log (d+e x)}{e^2}+\frac {(b c g) \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}+\frac {(b c g) \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}\\ &=-\frac {i b g \sin ^{-1}(c x)^2}{2 e^2}-\frac {(e f-d g) \left (a+b \sin ^{-1}(c x)\right )}{e^2 (d+e x)}+\frac {b c (e f-d g) \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 {b g \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}+\frac {b g \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}-\frac {b g \sin ^{-1}(c x) \log (d+e x)}{e^2}+\frac {g \left (a+b \sin ^{-1}(c x)\right ) \log (d+e x)}{e^2}-\frac {(b g) \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^2}-\frac {(b g) \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^2}\\ &=-\frac {i b g \sin ^{-1}(c x)^2}{2 e^2}-\frac {(e f-d g) \left (a+b \sin ^{-1}(c x)\right )}{e^2 (d+e x)}+\frac {b c (e f-d g) \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 {b g \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}+\frac {b g \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}-\frac {b g \sin ^{-1}(c x) \log (d+e x)}{e^2}+\frac {g \left (a+b \sin ^{-1}(c x)\right ) \log (d+e x)}{e^2}+\frac {(i b g) \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^2}+\frac {(i b g) \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^2}\\ &=-\frac {i b g \sin ^{-1}(c x)^2}{2 e^2}-\frac {(e f-d g) \left (a+b \sin ^{-1}(c x)\right )}{e^2 (d+e x)}+\frac {b c (e f-d g) \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 {b g \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}+\frac {b g \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}-\frac {b g \sin ^{-1}(c x) \log (d+e x)}{e^2}+\frac {g \left (a+b \sin ^{-1}(c x)\right ) \log (d+e x)}{e^2}-\frac {i b g \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}-\frac {i b g \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}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 6 vs. order 4 in
optimal.
time = 1.22, size = 438, normalized size = 1.22 \begin {gather*} \frac {\frac {2 a (-e f+d g)}{d+e x}-2 b f \left (\frac {c \sqrt {\frac {e \left (-\sqrt {\frac {1}{c^2}}+x\right )}{d+e x}} \sqrt {\frac {e \left (\sqrt {\frac {1}{c^2}}+x\right )}{d+e x}} F_1\left (1;\frac {1}{2},\frac {1}{2};2;\frac {d-\sqrt {\frac {1}{c^2}} e}{d+e x},\frac {d+\sqrt {\frac {1}{c^2}} e}{d+e x}\right )}{\sqrt {1-c^2 x^2}}+\frac {e \text {ArcSin}(c x)}{d+e x}\right )+2 a g \log (d+e x)+b g \left (\frac {2 d \text {ArcSin}(c x)}{d+e x}-i \text {ArcSin}(c x)^2-\frac {2 c d \text {ArcTan}\left (\frac {e+c^2 d x}{\sqrt {c^2 d^2-e^2} \sqrt {1-c^2 x^2}}\right )}{\sqrt {c^2 d^2-e^2}}+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 )+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 )-2 i \text {PolyLog}\left (2,-\frac {i e e^{i \text {ArcSin}(c x)}}{-c d+\sqrt {c^2 d^2-e^2}}\right )-2 i \text {PolyLog}\left (2,\frac {i e e^{i \text {ArcSin}(c x)}}{c d+\sqrt {c^2 d^2-e^2}}\right )\right )}{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. 1005 vs. \(2 (367 ) = 734\).
time = 1.69, size = 1006, normalized size = 2.81
method | result | size |
derivativedivides | \(\frac {\frac {a \,c^{2} d g}{e^{2} \left (c e x +d c \right )}-\frac {a \,c^{2} f}{e \left (c e x +d c \right )}+\frac {a c g \ln \left (c e x +d c \right )}{e^{2}}-\frac {i b \,c^{3} d^{2} g \dilog \left (\frac {i d c +e \left (i c x +\sqrt {-c^{2} x^{2}+1}\right )-\sqrt {-c^{2} d^{2}+e^{2}}}{i d c -\sqrt {-c^{2} d^{2}+e^{2}}}\right )}{e^{2} \left (c^{2} d^{2}-e^{2}\right )}+\frac {b \,c^{2} \arcsin \left (c x \right ) d g}{e^{2} \left (c e x +d c \right )}-\frac {b \,c^{2} \arcsin \left (c x \right ) f}{e \left (c e x +d c \right )}-\frac {i b c g \arcsin \left (c x \right )^{2}}{2 e^{2}}+\frac {i b c g \dilog \left (\frac {i d c +e \left (i c x +\sqrt {-c^{2} x^{2}+1}\right )-\sqrt {-c^{2} d^{2}+e^{2}}}{i d c -\sqrt {-c^{2} d^{2}+e^{2}}}\right )}{c^{2} d^{2}-e^{2}}+\frac {2 i b \,c^{2} d g \arctanh \left (\frac {2 i e \left (i c x +\sqrt {-c^{2} x^{2}+1}\right )-2 d c}{2 \sqrt {c^{2} d^{2}-e^{2}}}\right )}{e^{2} \sqrt {c^{2} d^{2}-e^{2}}}-\frac {b c g \arcsin \left (c x \right ) \ln \left (\frac {i d c +e \left (i c x +\sqrt {-c^{2} x^{2}+1}\right )-\sqrt {-c^{2} d^{2}+e^{2}}}{i d c -\sqrt {-c^{2} d^{2}+e^{2}}}\right )}{c^{2} d^{2}-e^{2}}-\frac {b c g \arcsin \left (c x \right ) \ln \left (\frac {i d c +e \left (i c x +\sqrt {-c^{2} x^{2}+1}\right )+\sqrt {-c^{2} d^{2}+e^{2}}}{i d c +\sqrt {-c^{2} d^{2}+e^{2}}}\right )}{c^{2} d^{2}-e^{2}}+\frac {b \,c^{3} d^{2} g \arcsin \left (c x \right ) \ln \left (\frac {i d c +e \left (i c x +\sqrt {-c^{2} x^{2}+1}\right )-\sqrt {-c^{2} d^{2}+e^{2}}}{i d c -\sqrt {-c^{2} d^{2}+e^{2}}}\right )}{e^{2} \left (c^{2} d^{2}-e^{2}\right )}+\frac {b \,c^{3} d^{2} g \arcsin \left (c x \right ) \ln \left (\frac {i d c +e \left (i c x +\sqrt {-c^{2} x^{2}+1}\right )+\sqrt {-c^{2} d^{2}+e^{2}}}{i d c +\sqrt {-c^{2} d^{2}+e^{2}}}\right )}{e^{2} \left (c^{2} d^{2}-e^{2}\right )}+\frac {i b c g \dilog \left (\frac {i d c +e \left (i c x +\sqrt {-c^{2} x^{2}+1}\right )+\sqrt {-c^{2} d^{2}+e^{2}}}{i d c +\sqrt {-c^{2} d^{2}+e^{2}}}\right )}{c^{2} d^{2}-e^{2}}-\frac {i b \,c^{3} d^{2} g \dilog \left (\frac {i d c +e \left (i c x +\sqrt {-c^{2} x^{2}+1}\right )+\sqrt {-c^{2} d^{2}+e^{2}}}{i d c +\sqrt {-c^{2} d^{2}+e^{2}}}\right )}{e^{2} \left (c^{2} d^{2}-e^{2}\right )}-\frac {2 i b \,c^{2} f \arctanh \left (\frac {2 i e \left (i c x +\sqrt {-c^{2} x^{2}+1}\right )-2 d c}{2 \sqrt {c^{2} d^{2}-e^{2}}}\right )}{e \sqrt {c^{2} d^{2}-e^{2}}}}{c}\) | \(1006\) |
default | \(\frac {\frac {a \,c^{2} d g}{e^{2} \left (c e x +d c \right )}-\frac {a \,c^{2} f}{e \left (c e x +d c \right )}+\frac {a c g \ln \left (c e x +d c \right )}{e^{2}}-\frac {i b \,c^{3} d^{2} g \dilog \left (\frac {i d c +e \left (i c x +\sqrt {-c^{2} x^{2}+1}\right )-\sqrt {-c^{2} d^{2}+e^{2}}}{i d c -\sqrt {-c^{2} d^{2}+e^{2}}}\right )}{e^{2} \left (c^{2} d^{2}-e^{2}\right )}+\frac {b \,c^{2} \arcsin \left (c x \right ) d g}{e^{2} \left (c e x +d c \right )}-\frac {b \,c^{2} \arcsin \left (c x \right ) f}{e \left (c e x +d c \right )}-\frac {i b c g \arcsin \left (c x \right )^{2}}{2 e^{2}}+\frac {i b c g \dilog \left (\frac {i d c +e \left (i c x +\sqrt {-c^{2} x^{2}+1}\right )-\sqrt {-c^{2} d^{2}+e^{2}}}{i d c -\sqrt {-c^{2} d^{2}+e^{2}}}\right )}{c^{2} d^{2}-e^{2}}+\frac {2 i b \,c^{2} d g \arctanh \left (\frac {2 i e \left (i c x +\sqrt {-c^{2} x^{2}+1}\right )-2 d c}{2 \sqrt {c^{2} d^{2}-e^{2}}}\right )}{e^{2} \sqrt {c^{2} d^{2}-e^{2}}}-\frac {b c g \arcsin \left (c x \right ) \ln \left (\frac {i d c +e \left (i c x +\sqrt {-c^{2} x^{2}+1}\right )-\sqrt {-c^{2} d^{2}+e^{2}}}{i d c -\sqrt {-c^{2} d^{2}+e^{2}}}\right )}{c^{2} d^{2}-e^{2}}-\frac {b c g \arcsin \left (c x \right ) \ln \left (\frac {i d c +e \left (i c x +\sqrt {-c^{2} x^{2}+1}\right )+\sqrt {-c^{2} d^{2}+e^{2}}}{i d c +\sqrt {-c^{2} d^{2}+e^{2}}}\right )}{c^{2} d^{2}-e^{2}}+\frac {b \,c^{3} d^{2} g \arcsin \left (c x \right ) \ln \left (\frac {i d c +e \left (i c x +\sqrt {-c^{2} x^{2}+1}\right )-\sqrt {-c^{2} d^{2}+e^{2}}}{i d c -\sqrt {-c^{2} d^{2}+e^{2}}}\right )}{e^{2} \left (c^{2} d^{2}-e^{2}\right )}+\frac {b \,c^{3} d^{2} g \arcsin \left (c x \right ) \ln \left (\frac {i d c +e \left (i c x +\sqrt {-c^{2} x^{2}+1}\right )+\sqrt {-c^{2} d^{2}+e^{2}}}{i d c +\sqrt {-c^{2} d^{2}+e^{2}}}\right )}{e^{2} \left (c^{2} d^{2}-e^{2}\right )}+\frac {i b c g \dilog \left (\frac {i d c +e \left (i c x +\sqrt {-c^{2} x^{2}+1}\right )+\sqrt {-c^{2} d^{2}+e^{2}}}{i d c +\sqrt {-c^{2} d^{2}+e^{2}}}\right )}{c^{2} d^{2}-e^{2}}-\frac {i b \,c^{3} d^{2} g \dilog \left (\frac {i d c +e \left (i c x +\sqrt {-c^{2} x^{2}+1}\right )+\sqrt {-c^{2} d^{2}+e^{2}}}{i d c +\sqrt {-c^{2} d^{2}+e^{2}}}\right )}{e^{2} \left (c^{2} d^{2}-e^{2}\right )}-\frac {2 i b \,c^{2} f \arctanh \left (\frac {2 i e \left (i c x +\sqrt {-c^{2} x^{2}+1}\right )-2 d c}{2 \sqrt {c^{2} d^{2}-e^{2}}}\right )}{e \sqrt {c^{2} d^{2}-e^{2}}}}{c}\) | \(1006\) |
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 ) \left (f + g x\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 (f+g\,x\right )\,\left (a+b\,\mathrm {asin}\left (c\,x\right )\right )}{{\left (d+e\,x\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________