Optimal. Leaf size=496 \[ \frac {g \left (1-c^2 x^2\right ) (a+b \text {ArcCos}(c x))}{\left (c^2 f^2-g^2\right ) (f+g x) \sqrt {d-c^2 d x^2}}+\frac {i c^2 f \sqrt {1-c^2 x^2} (a+b \text {ArcCos}(c x)) \log \left (1+\frac {e^{i \text {ArcCos}(c x)} g}{c f-\sqrt {c^2 f^2-g^2}}\right )}{\left (c^2 f^2-g^2\right )^{3/2} \sqrt {d-c^2 d x^2}}-\frac {i c^2 f \sqrt {1-c^2 x^2} (a+b \text {ArcCos}(c x)) \log \left (1+\frac {e^{i \text {ArcCos}(c x)} g}{c f+\sqrt {c^2 f^2-g^2}}\right )}{\left (c^2 f^2-g^2\right )^{3/2} \sqrt {d-c^2 d x^2}}+\frac {b c \sqrt {1-c^2 x^2} \log (f+g x)}{\left (c^2 f^2-g^2\right ) \sqrt {d-c^2 d x^2}}+\frac {b c^2 f \sqrt {1-c^2 x^2} \text {PolyLog}\left (2,-\frac {e^{i \text {ArcCos}(c x)} g}{c f-\sqrt {c^2 f^2-g^2}}\right )}{\left (c^2 f^2-g^2\right )^{3/2} \sqrt {d-c^2 d x^2}}-\frac {b c^2 f \sqrt {1-c^2 x^2} \text {PolyLog}\left (2,-\frac {e^{i \text {ArcCos}(c x)} g}{c f+\sqrt {c^2 f^2-g^2}}\right )}{\left (c^2 f^2-g^2\right )^{3/2} \sqrt {d-c^2 d x^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.48, antiderivative size = 496, normalized size of antiderivative = 1.00, number of steps
used = 13, number of rules used = 10, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.323, Rules used = {4862, 4858,
3405, 3402, 2296, 2221, 2317, 2438, 2747, 31} \begin {gather*} \frac {g \left (1-c^2 x^2\right ) (a+b \text {ArcCos}(c x))}{\sqrt {d-c^2 d x^2} \left (c^2 f^2-g^2\right ) (f+g x)}+\frac {i c^2 f \sqrt {1-c^2 x^2} (a+b \text {ArcCos}(c x)) \log \left (1+\frac {g e^{i \text {ArcCos}(c x)}}{c f-\sqrt {c^2 f^2-g^2}}\right )}{\sqrt {d-c^2 d x^2} \left (c^2 f^2-g^2\right )^{3/2}}-\frac {i c^2 f \sqrt {1-c^2 x^2} (a+b \text {ArcCos}(c x)) \log \left (1+\frac {g e^{i \text {ArcCos}(c x)}}{\sqrt {c^2 f^2-g^2}+c f}\right )}{\sqrt {d-c^2 d x^2} \left (c^2 f^2-g^2\right )^{3/2}}+\frac {b c^2 f \sqrt {1-c^2 x^2} \text {Li}_2\left (-\frac {e^{i \text {ArcCos}(c x)} g}{c f-\sqrt {c^2 f^2-g^2}}\right )}{\sqrt {d-c^2 d x^2} \left (c^2 f^2-g^2\right )^{3/2}}-\frac {b c^2 f \sqrt {1-c^2 x^2} \text {Li}_2\left (-\frac {e^{i \text {ArcCos}(c x)} g}{c f+\sqrt {c^2 f^2-g^2}}\right )}{\sqrt {d-c^2 d x^2} \left (c^2 f^2-g^2\right )^{3/2}}+\frac {b c \sqrt {1-c^2 x^2} \log (f+g x)}{\sqrt {d-c^2 d x^2} \left (c^2 f^2-g^2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 2221
Rule 2296
Rule 2317
Rule 2438
Rule 2747
Rule 3402
Rule 3405
Rule 4858
Rule 4862
Rubi steps
\begin {align*} \int \frac {a+b \cos ^{-1}(c x)}{(f+g x)^2 \sqrt {d-c^2 d x^2}} \, dx &=\frac {\sqrt {1-c^2 x^2} \int \frac {a+b \cos ^{-1}(c x)}{(f+g x)^2 \sqrt {1-c^2 x^2}} \, dx}{\sqrt {d-c^2 d x^2}}\\ &=-\frac {\left (c \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int \frac {a+b x}{(c f+g \cos (x))^2} \, dx,x,\cos ^{-1}(c x)\right )}{\sqrt {d-c^2 d x^2}}\\ &=\frac {g \left (1-c^2 x^2\right ) \left (a+b \cos ^{-1}(c x)\right )}{\left (c^2 f^2-g^2\right ) (f+g x) \sqrt {d-c^2 d x^2}}-\frac {\left (c^2 f \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int \frac {a+b x}{c f+g \cos (x)} \, dx,x,\cos ^{-1}(c x)\right )}{\left (c^2 f^2-g^2\right ) \sqrt {d-c^2 d x^2}}-\frac {\left (b c g \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int \frac {\sin (x)}{c f+g \cos (x)} \, dx,x,\cos ^{-1}(c x)\right )}{\left (c^2 f^2-g^2\right ) \sqrt {d-c^2 d x^2}}\\ &=\frac {g \left (1-c^2 x^2\right ) \left (a+b \cos ^{-1}(c x)\right )}{\left (c^2 f^2-g^2\right ) (f+g x) \sqrt {d-c^2 d x^2}}+\frac {\left (b c \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int \frac {1}{c f+x} \, dx,x,c g x\right )}{\left (c^2 f^2-g^2\right ) \sqrt {d-c^2 d x^2}}-\frac {\left (2 c^2 f \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int \frac {e^{i x} (a+b x)}{2 c e^{i x} f+g+e^{2 i x} g} \, dx,x,\cos ^{-1}(c x)\right )}{\left (c^2 f^2-g^2\right ) \sqrt {d-c^2 d x^2}}\\ &=\frac {g \left (1-c^2 x^2\right ) \left (a+b \cos ^{-1}(c x)\right )}{\left (c^2 f^2-g^2\right ) (f+g x) \sqrt {d-c^2 d x^2}}+\frac {b c \sqrt {1-c^2 x^2} \log (f+g x)}{\left (c^2 f^2-g^2\right ) \sqrt {d-c^2 d x^2}}-\frac {\left (2 c^2 f g \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int \frac {e^{i x} (a+b x)}{2 c f+2 e^{i x} g-2 \sqrt {c^2 f^2-g^2}} \, dx,x,\cos ^{-1}(c x)\right )}{\left (c^2 f^2-g^2\right )^{3/2} \sqrt {d-c^2 d x^2}}+\frac {\left (2 c^2 f g \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int \frac {e^{i x} (a+b x)}{2 c f+2 e^{i x} g+2 \sqrt {c^2 f^2-g^2}} \, dx,x,\cos ^{-1}(c x)\right )}{\left (c^2 f^2-g^2\right )^{3/2} \sqrt {d-c^2 d x^2}}\\ &=\frac {g \left (1-c^2 x^2\right ) \left (a+b \cos ^{-1}(c x)\right )}{\left (c^2 f^2-g^2\right ) (f+g x) \sqrt {d-c^2 d x^2}}+\frac {i c^2 f \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right ) \log \left (1+\frac {e^{i \cos ^{-1}(c x)} g}{c f-\sqrt {c^2 f^2-g^2}}\right )}{\left (c^2 f^2-g^2\right )^{3/2} \sqrt {d-c^2 d x^2}}-\frac {i c^2 f \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right ) \log \left (1+\frac {e^{i \cos ^{-1}(c x)} g}{c f+\sqrt {c^2 f^2-g^2}}\right )}{\left (c^2 f^2-g^2\right )^{3/2} \sqrt {d-c^2 d x^2}}+\frac {b c \sqrt {1-c^2 x^2} \log (f+g x)}{\left (c^2 f^2-g^2\right ) \sqrt {d-c^2 d x^2}}-\frac {\left (i b c^2 f \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int \log \left (1+\frac {2 e^{i x} g}{2 c f-2 \sqrt {c^2 f^2-g^2}}\right ) \, dx,x,\cos ^{-1}(c x)\right )}{\left (c^2 f^2-g^2\right )^{3/2} \sqrt {d-c^2 d x^2}}+\frac {\left (i b c^2 f \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int \log \left (1+\frac {2 e^{i x} g}{2 c f+2 \sqrt {c^2 f^2-g^2}}\right ) \, dx,x,\cos ^{-1}(c x)\right )}{\left (c^2 f^2-g^2\right )^{3/2} \sqrt {d-c^2 d x^2}}\\ &=\frac {g \left (1-c^2 x^2\right ) \left (a+b \cos ^{-1}(c x)\right )}{\left (c^2 f^2-g^2\right ) (f+g x) \sqrt {d-c^2 d x^2}}+\frac {i c^2 f \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right ) \log \left (1+\frac {e^{i \cos ^{-1}(c x)} g}{c f-\sqrt {c^2 f^2-g^2}}\right )}{\left (c^2 f^2-g^2\right )^{3/2} \sqrt {d-c^2 d x^2}}-\frac {i c^2 f \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right ) \log \left (1+\frac {e^{i \cos ^{-1}(c x)} g}{c f+\sqrt {c^2 f^2-g^2}}\right )}{\left (c^2 f^2-g^2\right )^{3/2} \sqrt {d-c^2 d x^2}}+\frac {b c \sqrt {1-c^2 x^2} \log (f+g x)}{\left (c^2 f^2-g^2\right ) \sqrt {d-c^2 d x^2}}-\frac {\left (b c^2 f \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {2 g x}{2 c f-2 \sqrt {c^2 f^2-g^2}}\right )}{x} \, dx,x,e^{i \cos ^{-1}(c x)}\right )}{\left (c^2 f^2-g^2\right )^{3/2} \sqrt {d-c^2 d x^2}}+\frac {\left (b c^2 f \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {2 g x}{2 c f+2 \sqrt {c^2 f^2-g^2}}\right )}{x} \, dx,x,e^{i \cos ^{-1}(c x)}\right )}{\left (c^2 f^2-g^2\right )^{3/2} \sqrt {d-c^2 d x^2}}\\ &=\frac {g \left (1-c^2 x^2\right ) \left (a+b \cos ^{-1}(c x)\right )}{\left (c^2 f^2-g^2\right ) (f+g x) \sqrt {d-c^2 d x^2}}+\frac {i c^2 f \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right ) \log \left (1+\frac {e^{i \cos ^{-1}(c x)} g}{c f-\sqrt {c^2 f^2-g^2}}\right )}{\left (c^2 f^2-g^2\right )^{3/2} \sqrt {d-c^2 d x^2}}-\frac {i c^2 f \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right ) \log \left (1+\frac {e^{i \cos ^{-1}(c x)} g}{c f+\sqrt {c^2 f^2-g^2}}\right )}{\left (c^2 f^2-g^2\right )^{3/2} \sqrt {d-c^2 d x^2}}+\frac {b c \sqrt {1-c^2 x^2} \log (f+g x)}{\left (c^2 f^2-g^2\right ) \sqrt {d-c^2 d x^2}}+\frac {b c^2 f \sqrt {1-c^2 x^2} \text {Li}_2\left (-\frac {e^{i \cos ^{-1}(c x)} g}{c f-\sqrt {c^2 f^2-g^2}}\right )}{\left (c^2 f^2-g^2\right )^{3/2} \sqrt {d-c^2 d x^2}}-\frac {b c^2 f \sqrt {1-c^2 x^2} \text {Li}_2\left (-\frac {e^{i \cos ^{-1}(c x)} g}{c f+\sqrt {c^2 f^2-g^2}}\right )}{\left (c^2 f^2-g^2\right )^{3/2} \sqrt {d-c^2 d x^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(1108\) vs. \(2(496)=992\).
time = 3.28, size = 1108, normalized size = 2.23 \begin {gather*} -\frac {a g \sqrt {d-c^2 d x^2}}{d \left (-c^2 f^2+g^2\right ) (f+g x)}-\frac {a c^2 f \log (f+g x)}{\sqrt {d} \left (-c^2 f^2+g^2\right )^{3/2}}-\frac {a c^2 f \log \left (d \left (g+c^2 f x\right )+\sqrt {d} \sqrt {-c^2 f^2+g^2} \sqrt {d-c^2 d x^2}\right )}{\sqrt {d} (c f-g) (c f+g) \sqrt {-c^2 f^2+g^2}}-\frac {b c \sqrt {1-c^2 x^2} \left (-\frac {g \sqrt {1-c^2 x^2} \text {ArcCos}(c x)}{(c f-g) (c f+g) (c f+c g x)}-\frac {\log \left (1+\frac {g x}{f}\right )}{c^2 f^2-g^2}-\frac {c f \left (2 \text {ArcCos}(c x) \tanh ^{-1}\left (\frac {(c f+g) \cot \left (\frac {1}{2} \text {ArcCos}(c x)\right )}{\sqrt {-c^2 f^2+g^2}}\right )-2 \text {ArcCos}\left (-\frac {c f}{g}\right ) \tanh ^{-1}\left (\frac {(-c f+g) \tan \left (\frac {1}{2} \text {ArcCos}(c x)\right )}{\sqrt {-c^2 f^2+g^2}}\right )+\left (\text {ArcCos}\left (-\frac {c f}{g}\right )-2 i \tanh ^{-1}\left (\frac {(c f+g) \cot \left (\frac {1}{2} \text {ArcCos}(c x)\right )}{\sqrt {-c^2 f^2+g^2}}\right )+2 i \tanh ^{-1}\left (\frac {(-c f+g) \tan \left (\frac {1}{2} \text {ArcCos}(c x)\right )}{\sqrt {-c^2 f^2+g^2}}\right )\right ) \log \left (\frac {e^{-\frac {1}{2} i \text {ArcCos}(c x)} \sqrt {-c^2 f^2+g^2}}{\sqrt {2} \sqrt {g} \sqrt {c (f+g x)}}\right )+\left (\text {ArcCos}\left (-\frac {c f}{g}\right )+2 i \left (\tanh ^{-1}\left (\frac {(c f+g) \cot \left (\frac {1}{2} \text {ArcCos}(c x)\right )}{\sqrt {-c^2 f^2+g^2}}\right )-\tanh ^{-1}\left (\frac {(-c f+g) \tan \left (\frac {1}{2} \text {ArcCos}(c x)\right )}{\sqrt {-c^2 f^2+g^2}}\right )\right )\right ) \log \left (\frac {e^{\frac {1}{2} i \text {ArcCos}(c x)} \sqrt {-c^2 f^2+g^2}}{\sqrt {2} \sqrt {g} \sqrt {c (f+g x)}}\right )-\left (\text {ArcCos}\left (-\frac {c f}{g}\right )-2 i \tanh ^{-1}\left (\frac {(-c f+g) \tan \left (\frac {1}{2} \text {ArcCos}(c x)\right )}{\sqrt {-c^2 f^2+g^2}}\right )\right ) \log \left (\frac {(c f+g) \left (-i c f+i g+\sqrt {-c^2 f^2+g^2}\right ) \left (-i+\tan \left (\frac {1}{2} \text {ArcCos}(c x)\right )\right )}{g \left (c f+g+\sqrt {-c^2 f^2+g^2} \tan \left (\frac {1}{2} \text {ArcCos}(c x)\right )\right )}\right )-\left (\text {ArcCos}\left (-\frac {c f}{g}\right )+2 i \tanh ^{-1}\left (\frac {(-c f+g) \tan \left (\frac {1}{2} \text {ArcCos}(c x)\right )}{\sqrt {-c^2 f^2+g^2}}\right )\right ) \log \left (\frac {(c f+g) \left (i c f-i g+\sqrt {-c^2 f^2+g^2}\right ) \left (i+\tan \left (\frac {1}{2} \text {ArcCos}(c x)\right )\right )}{g \left (c f+g+\sqrt {-c^2 f^2+g^2} \tan \left (\frac {1}{2} \text {ArcCos}(c x)\right )\right )}\right )+i \left (\text {PolyLog}\left (2,\frac {\left (c f-i \sqrt {-c^2 f^2+g^2}\right ) \left (c f+g-\sqrt {-c^2 f^2+g^2} \tan \left (\frac {1}{2} \text {ArcCos}(c x)\right )\right )}{g \left (c f+g+\sqrt {-c^2 f^2+g^2} \tan \left (\frac {1}{2} \text {ArcCos}(c x)\right )\right )}\right )-\text {PolyLog}\left (2,\frac {\left (c f+i \sqrt {-c^2 f^2+g^2}\right ) \left (c f+g-\sqrt {-c^2 f^2+g^2} \tan \left (\frac {1}{2} \text {ArcCos}(c x)\right )\right )}{g \left (c f+g+\sqrt {-c^2 f^2+g^2} \tan \left (\frac {1}{2} \text {ArcCos}(c x)\right )\right )}\right )\right )\right )}{\left (-c^2 f^2+g^2\right )^{3/2}}\right )}{\sqrt {d-c^2 d x^2}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 1621 vs. \(2 (492 ) = 984\).
time = 1.34, size = 1622, normalized size = 3.27
method | result | size |
default | \(\text {Expression too large to display}\) | \(1622\) |
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 {a + b \operatorname {acos}{\left (c x \right )}}{\sqrt {- d \left (c x - 1\right ) \left (c x + 1\right )} \left (f + g 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 {a+b\,\mathrm {acos}\left (c\,x\right )}{{\left (f+g\,x\right )}^2\,\sqrt {d-c^2\,d\,x^2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________