3.15 \(\int \frac {(f+g x)^2 (a+b \cos ^{-1}(c x))}{\sqrt {d-c^2 d x^2}} \, dx\)

Optimal. Leaf size=270 \[ -\frac {f^2 \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right )^2}{2 b c \sqrt {d-c^2 d x^2}}-\frac {2 f g \left (1-c^2 x^2\right ) \left (a+b \cos ^{-1}(c x)\right )}{c^2 \sqrt {d-c^2 d x^2}}-\frac {g^2 x \left (1-c^2 x^2\right ) \left (a+b \cos ^{-1}(c x)\right )}{2 c^2 \sqrt {d-c^2 d x^2}}-\frac {g^2 \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right )^2}{4 b c^3 \sqrt {d-c^2 d x^2}}-\frac {2 b f g x \sqrt {1-c^2 x^2}}{c \sqrt {d-c^2 d x^2}}-\frac {b g^2 x^2 \sqrt {1-c^2 x^2}}{4 c \sqrt {d-c^2 d x^2}} \]

[Out]

-2*f*g*(-c^2*x^2+1)*(a+b*arccos(c*x))/c^2/(-c^2*d*x^2+d)^(1/2)-1/2*g^2*x*(-c^2*x^2+1)*(a+b*arccos(c*x))/c^2/(-
c^2*d*x^2+d)^(1/2)-2*b*f*g*x*(-c^2*x^2+1)^(1/2)/c/(-c^2*d*x^2+d)^(1/2)-1/4*b*g^2*x^2*(-c^2*x^2+1)^(1/2)/c/(-c^
2*d*x^2+d)^(1/2)-1/2*f^2*(a+b*arccos(c*x))^2*(-c^2*x^2+1)^(1/2)/b/c/(-c^2*d*x^2+d)^(1/2)-1/4*g^2*(a+b*arccos(c
*x))^2*(-c^2*x^2+1)^(1/2)/b/c^3/(-c^2*d*x^2+d)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.44, antiderivative size = 270, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.226, Rules used = {4778, 4764, 4642, 4678, 8, 4708, 30} \[ -\frac {f^2 \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right )^2}{2 b c \sqrt {d-c^2 d x^2}}-\frac {2 f g \left (1-c^2 x^2\right ) \left (a+b \cos ^{-1}(c x)\right )}{c^2 \sqrt {d-c^2 d x^2}}-\frac {g^2 \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right )^2}{4 b c^3 \sqrt {d-c^2 d x^2}}-\frac {g^2 x \left (1-c^2 x^2\right ) \left (a+b \cos ^{-1}(c x)\right )}{2 c^2 \sqrt {d-c^2 d x^2}}-\frac {2 b f g x \sqrt {1-c^2 x^2}}{c \sqrt {d-c^2 d x^2}}-\frac {b g^2 x^2 \sqrt {1-c^2 x^2}}{4 c \sqrt {d-c^2 d x^2}} \]

Antiderivative was successfully verified.

[In]

Int[((f + g*x)^2*(a + b*ArcCos[c*x]))/Sqrt[d - c^2*d*x^2],x]

[Out]

(-2*b*f*g*x*Sqrt[1 - c^2*x^2])/(c*Sqrt[d - c^2*d*x^2]) - (b*g^2*x^2*Sqrt[1 - c^2*x^2])/(4*c*Sqrt[d - c^2*d*x^2
]) - (2*f*g*(1 - c^2*x^2)*(a + b*ArcCos[c*x]))/(c^2*Sqrt[d - c^2*d*x^2]) - (g^2*x*(1 - c^2*x^2)*(a + b*ArcCos[
c*x]))/(2*c^2*Sqrt[d - c^2*d*x^2]) - (f^2*Sqrt[1 - c^2*x^2]*(a + b*ArcCos[c*x])^2)/(2*b*c*Sqrt[d - c^2*d*x^2])
 - (g^2*Sqrt[1 - c^2*x^2]*(a + b*ArcCos[c*x])^2)/(4*b*c^3*Sqrt[d - c^2*d*x^2])

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 4642

Int[((a_.) + ArcCos[(c_.)*(x_)]*(b_.))^(n_.)/Sqrt[(d_) + (e_.)*(x_)^2], x_Symbol] :> -Simp[(a + b*ArcCos[c*x])
^(n + 1)/(b*c*Sqrt[d]*(n + 1)), x] /; FreeQ[{a, b, c, d, e, n}, x] && EqQ[c^2*d + e, 0] && GtQ[d, 0] && NeQ[n,
 -1]

Rule 4678

Int[((a_.) + ArcCos[(c_.)*(x_)]*(b_.))^(n_.)*(x_)*((d_) + (e_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[((d + e*x^2)^
(p + 1)*(a + b*ArcCos[c*x])^n)/(2*e*(p + 1)), x] - Dist[(b*n*d^IntPart[p]*(d + e*x^2)^FracPart[p])/(2*c*(p + 1
)*(1 - c^2*x^2)^FracPart[p]), Int[(1 - c^2*x^2)^(p + 1/2)*(a + b*ArcCos[c*x])^(n - 1), x], x] /; FreeQ[{a, b,
c, d, e, p}, x] && EqQ[c^2*d + e, 0] && GtQ[n, 0] && NeQ[p, -1]

Rule 4708

Int[(((a_.) + ArcCos[(c_.)*(x_)]*(b_.))^(n_.)*((f_.)*(x_))^(m_))/Sqrt[(d_) + (e_.)*(x_)^2], x_Symbol] :> Simp[
(f*(f*x)^(m - 1)*Sqrt[d + e*x^2]*(a + b*ArcCos[c*x])^n)/(e*m), x] + (Dist[(f^2*(m - 1))/(c^2*m), Int[((f*x)^(m
 - 2)*(a + b*ArcCos[c*x])^n)/Sqrt[d + e*x^2], x], x] - Dist[(b*f*n*Sqrt[1 - c^2*x^2])/(c*m*Sqrt[d + e*x^2]), I
nt[(f*x)^(m - 1)*(a + b*ArcCos[c*x])^(n - 1), x], x]) /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[c^2*d + e, 0] &&
GtQ[n, 0] && GtQ[m, 1] && IntegerQ[m]

Rule 4764

Int[((a_.) + ArcCos[(c_.)*(x_)]*(b_.))^(n_.)*((f_) + (g_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(p_), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x^2)^p*(a + b*ArcCos[c*x])^n, (f + g*x)^m, x], x] /; FreeQ[{a, b, c, d, e, f, g},
 x] && EqQ[c^2*d + e, 0] && IGtQ[m, 0] && IntegerQ[p + 1/2] && GtQ[d, 0] && IGtQ[n, 0] && (m == 1 || p > 0 ||
(n == 1 && p > -1) || (m == 2 && p < -2))

Rule 4778

Int[((a_.) + ArcCos[(c_.)*(x_)]*(b_.))^(n_.)*((f_) + (g_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(p_), x_Symbol] :
> Dist[(d^IntPart[p]*(d + e*x^2)^FracPart[p])/(1 - c^2*x^2)^FracPart[p], Int[(f + g*x)^m*(1 - c^2*x^2)^p*(a +
b*ArcCos[c*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && EqQ[c^2*d + e, 0] && IntegerQ[m] && IntegerQ
[p - 1/2] &&  !GtQ[d, 0]

Rubi steps

\begin {align*} \int \frac {(f+g x)^2 \left (a+b \cos ^{-1}(c x)\right )}{\sqrt {d-c^2 d x^2}} \, dx &=\frac {\sqrt {1-c^2 x^2} \int \frac {(f+g x)^2 \left (a+b \cos ^{-1}(c x)\right )}{\sqrt {1-c^2 x^2}} \, dx}{\sqrt {d-c^2 d x^2}}\\ &=\frac {\sqrt {1-c^2 x^2} \int \left (\frac {f^2 \left (a+b \cos ^{-1}(c x)\right )}{\sqrt {1-c^2 x^2}}+\frac {2 f g x \left (a+b \cos ^{-1}(c x)\right )}{\sqrt {1-c^2 x^2}}+\frac {g^2 x^2 \left (a+b \cos ^{-1}(c x)\right )}{\sqrt {1-c^2 x^2}}\right ) \, dx}{\sqrt {d-c^2 d x^2}}\\ &=\frac {\left (f^2 \sqrt {1-c^2 x^2}\right ) \int \frac {a+b \cos ^{-1}(c x)}{\sqrt {1-c^2 x^2}} \, dx}{\sqrt {d-c^2 d x^2}}+\frac {\left (2 f g \sqrt {1-c^2 x^2}\right ) \int \frac {x \left (a+b \cos ^{-1}(c x)\right )}{\sqrt {1-c^2 x^2}} \, dx}{\sqrt {d-c^2 d x^2}}+\frac {\left (g^2 \sqrt {1-c^2 x^2}\right ) \int \frac {x^2 \left (a+b \cos ^{-1}(c x)\right )}{\sqrt {1-c^2 x^2}} \, dx}{\sqrt {d-c^2 d x^2}}\\ &=-\frac {2 f g \left (1-c^2 x^2\right ) \left (a+b \cos ^{-1}(c x)\right )}{c^2 \sqrt {d-c^2 d x^2}}-\frac {g^2 x \left (1-c^2 x^2\right ) \left (a+b \cos ^{-1}(c x)\right )}{2 c^2 \sqrt {d-c^2 d x^2}}-\frac {f^2 \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right )^2}{2 b c \sqrt {d-c^2 d x^2}}-\frac {\left (2 b f g \sqrt {1-c^2 x^2}\right ) \int 1 \, dx}{c \sqrt {d-c^2 d x^2}}+\frac {\left (g^2 \sqrt {1-c^2 x^2}\right ) \int \frac {a+b \cos ^{-1}(c x)}{\sqrt {1-c^2 x^2}} \, dx}{2 c^2 \sqrt {d-c^2 d x^2}}-\frac {\left (b g^2 \sqrt {1-c^2 x^2}\right ) \int x \, dx}{2 c \sqrt {d-c^2 d x^2}}\\ &=-\frac {2 b f g x \sqrt {1-c^2 x^2}}{c \sqrt {d-c^2 d x^2}}-\frac {b g^2 x^2 \sqrt {1-c^2 x^2}}{4 c \sqrt {d-c^2 d x^2}}-\frac {2 f g \left (1-c^2 x^2\right ) \left (a+b \cos ^{-1}(c x)\right )}{c^2 \sqrt {d-c^2 d x^2}}-\frac {g^2 x \left (1-c^2 x^2\right ) \left (a+b \cos ^{-1}(c x)\right )}{2 c^2 \sqrt {d-c^2 d x^2}}-\frac {f^2 \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right )^2}{2 b c \sqrt {d-c^2 d x^2}}-\frac {g^2 \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right )^2}{4 b c^3 \sqrt {d-c^2 d x^2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.84, size = 266, normalized size = 0.99 \[ \frac {\sqrt {d} g \left (c^2 x^2-1\right ) \left (4 c \left (a \sqrt {1-c^2 x^2} (4 f+g x)+4 b c f x\right )+b g \cos \left (2 \cos ^{-1}(c x)\right )\right )-4 a \sqrt {1-c^2 x^2} \sqrt {d-c^2 d x^2} \left (2 c^2 f^2+g^2\right ) \tan ^{-1}\left (\frac {c x \sqrt {d-c^2 d x^2}}{\sqrt {d} \left (c^2 x^2-1\right )}\right )+2 b \sqrt {d} \left (c^2 x^2-1\right ) \left (2 c^2 f^2+g^2\right ) \cos ^{-1}(c x)^2+2 b \sqrt {d} g \left (c^2 x^2-1\right ) \cos ^{-1}(c x) \left (8 c f \sqrt {1-c^2 x^2}+g \sin \left (2 \cos ^{-1}(c x)\right )\right )}{8 c^3 \sqrt {d} \sqrt {1-c^2 x^2} \sqrt {d-c^2 d x^2}} \]

Antiderivative was successfully verified.

[In]

Integrate[((f + g*x)^2*(a + b*ArcCos[c*x]))/Sqrt[d - c^2*d*x^2],x]

[Out]

(2*b*Sqrt[d]*(2*c^2*f^2 + g^2)*(-1 + c^2*x^2)*ArcCos[c*x]^2 - 4*a*(2*c^2*f^2 + g^2)*Sqrt[1 - c^2*x^2]*Sqrt[d -
 c^2*d*x^2]*ArcTan[(c*x*Sqrt[d - c^2*d*x^2])/(Sqrt[d]*(-1 + c^2*x^2))] + Sqrt[d]*g*(-1 + c^2*x^2)*(4*c*(4*b*c*
f*x + a*(4*f + g*x)*Sqrt[1 - c^2*x^2]) + b*g*Cos[2*ArcCos[c*x]]) + 2*b*Sqrt[d]*g*(-1 + c^2*x^2)*ArcCos[c*x]*(8
*c*f*Sqrt[1 - c^2*x^2] + g*Sin[2*ArcCos[c*x]]))/(8*c^3*Sqrt[d]*Sqrt[1 - c^2*x^2]*Sqrt[d - c^2*d*x^2])

________________________________________________________________________________________

fricas [F]  time = 0.47, size = 0, normalized size = 0.00 \[ {\rm integral}\left (-\frac {\sqrt {-c^{2} d x^{2} + d} {\left (a g^{2} x^{2} + 2 \, a f g x + a f^{2} + {\left (b g^{2} x^{2} + 2 \, b f g x + b f^{2}\right )} \arccos \left (c x\right )\right )}}{c^{2} d x^{2} - d}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^2*(a+b*arccos(c*x))/(-c^2*d*x^2+d)^(1/2),x, algorithm="fricas")

[Out]

integral(-sqrt(-c^2*d*x^2 + d)*(a*g^2*x^2 + 2*a*f*g*x + a*f^2 + (b*g^2*x^2 + 2*b*f*g*x + b*f^2)*arccos(c*x))/(
c^2*d*x^2 - d), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (g x + f\right )}^{2} {\left (b \arccos \left (c x\right ) + a\right )}}{\sqrt {-c^{2} d x^{2} + d}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^2*(a+b*arccos(c*x))/(-c^2*d*x^2+d)^(1/2),x, algorithm="giac")

[Out]

integrate((g*x + f)^2*(b*arccos(c*x) + a)/sqrt(-c^2*d*x^2 + d), x)

________________________________________________________________________________________

maple [B]  time = 1.32, size = 548, normalized size = 2.03 \[ -\frac {a \,g^{2} x \sqrt {-c^{2} d \,x^{2}+d}}{2 c^{2} d}+\frac {a \,g^{2} \arctan \left (\frac {\sqrt {c^{2} d}\, x}{\sqrt {-c^{2} d \,x^{2}+d}}\right )}{2 c^{2} \sqrt {c^{2} d}}-\frac {2 a f g \sqrt {-c^{2} d \,x^{2}+d}}{c^{2} d}+\frac {a \,f^{2} \arctan \left (\frac {\sqrt {c^{2} d}\, x}{\sqrt {-c^{2} d \,x^{2}+d}}\right )}{\sqrt {c^{2} d}}+\frac {b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, \sqrt {-c^{2} x^{2}+1}\, \arccos \left (c x \right )^{2} f^{2}}{2 c d \left (c^{2} x^{2}-1\right )}+\frac {b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, \sqrt {-c^{2} x^{2}+1}\, \arccos \left (c x \right )^{2} g^{2}}{4 c^{3} d \left (c^{2} x^{2}-1\right )}+\frac {2 b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, f g \sqrt {-c^{2} x^{2}+1}\, x}{c d \left (c^{2} x^{2}-1\right )}-\frac {2 b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, f g \arccos \left (c x \right ) x^{2}}{d \left (c^{2} x^{2}-1\right )}+\frac {2 b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, f g \arccos \left (c x \right )}{c^{2} d \left (c^{2} x^{2}-1\right )}+\frac {b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, \arccos \left (c x \right ) g^{2} x}{8 c^{2} d \left (c^{2} x^{2}-1\right )}-\frac {b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, \sqrt {-c^{2} x^{2}+1}\, g^{2}}{16 c^{3} d \left (c^{2} x^{2}-1\right )}-\frac {b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, \arccos \left (c x \right ) g^{2} \cos \left (3 \arccos \left (c x \right )\right )}{8 c^{3} d \left (c^{2} x^{2}-1\right )}+\frac {b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, g^{2} \sin \left (3 \arccos \left (c x \right )\right )}{16 c^{3} d \left (c^{2} x^{2}-1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*x+f)^2*(a+b*arccos(c*x))/(-c^2*d*x^2+d)^(1/2),x)

[Out]

-1/2*a*g^2*x/c^2/d*(-c^2*d*x^2+d)^(1/2)+1/2*a*g^2/c^2/(c^2*d)^(1/2)*arctan((c^2*d)^(1/2)*x/(-c^2*d*x^2+d)^(1/2
))-2*a*f*g/c^2/d*(-c^2*d*x^2+d)^(1/2)+a*f^2/(c^2*d)^(1/2)*arctan((c^2*d)^(1/2)*x/(-c^2*d*x^2+d)^(1/2))+1/2*b*(
-d*(c^2*x^2-1))^(1/2)*(-c^2*x^2+1)^(1/2)/c/d/(c^2*x^2-1)*arccos(c*x)^2*f^2+1/4*b*(-d*(c^2*x^2-1))^(1/2)*(-c^2*
x^2+1)^(1/2)/c^3/d/(c^2*x^2-1)*arccos(c*x)^2*g^2+2*b*(-d*(c^2*x^2-1))^(1/2)*f*g/c/d/(c^2*x^2-1)*(-c^2*x^2+1)^(
1/2)*x-2*b*(-d*(c^2*x^2-1))^(1/2)*f*g/d/(c^2*x^2-1)*arccos(c*x)*x^2+2*b*(-d*(c^2*x^2-1))^(1/2)*f*g/c^2/d/(c^2*
x^2-1)*arccos(c*x)+1/8*b*(-d*(c^2*x^2-1))^(1/2)/c^2/d/(c^2*x^2-1)*arccos(c*x)*g^2*x-1/16*b*(-d*(c^2*x^2-1))^(1
/2)*(-c^2*x^2+1)^(1/2)/c^3/d/(c^2*x^2-1)*g^2-1/8*b*(-d*(c^2*x^2-1))^(1/2)/c^3/d/(c^2*x^2-1)*arccos(c*x)*g^2*co
s(3*arccos(c*x))+1/16*b*(-d*(c^2*x^2-1))^(1/2)/c^3/d/(c^2*x^2-1)*g^2*sin(3*arccos(c*x))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ -\frac {1}{2} \, a g^{2} {\left (\frac {\sqrt {-c^{2} d x^{2} + d} x}{c^{2} d} - \frac {\arcsin \left (c x\right )}{c^{3} \sqrt {d}}\right )} + \frac {b f^{2} \arccos \left (c x\right ) \arcsin \left (c x\right )}{c \sqrt {d}} + \frac {b f^{2} \arcsin \left (c x\right )^{2}}{2 \, c \sqrt {d}} + \frac {b g^{2} \int \frac {x^{2} \arctan \left (\sqrt {c x + 1} \sqrt {-c x + 1}, c x\right )}{\sqrt {c x + 1} \sqrt {-c x + 1}}\,{d x}}{\sqrt {d}} - \frac {2 \, b f g x}{c \sqrt {d}} + \frac {a f^{2} \arcsin \left (c x\right )}{c \sqrt {d}} - \frac {2 \, \sqrt {-c^{2} d x^{2} + d} b f g \arccos \left (c x\right )}{c^{2} d} - \frac {2 \, \sqrt {-c^{2} d x^{2} + d} a f g}{c^{2} d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^2*(a+b*arccos(c*x))/(-c^2*d*x^2+d)^(1/2),x, algorithm="maxima")

[Out]

-1/2*a*g^2*(sqrt(-c^2*d*x^2 + d)*x/(c^2*d) - arcsin(c*x)/(c^3*sqrt(d))) + b*f^2*arccos(c*x)*arcsin(c*x)/(c*sqr
t(d)) + 1/2*b*f^2*arcsin(c*x)^2/(c*sqrt(d)) + b*g^2*integrate(x^2*arctan2(sqrt(c*x + 1)*sqrt(-c*x + 1), c*x)/(
sqrt(c*x + 1)*sqrt(-c*x + 1)), x)/sqrt(d) - 2*b*f*g*x/(c*sqrt(d)) + a*f^2*arcsin(c*x)/(c*sqrt(d)) - 2*sqrt(-c^
2*d*x^2 + d)*b*f*g*arccos(c*x)/(c^2*d) - 2*sqrt(-c^2*d*x^2 + d)*a*f*g/(c^2*d)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\left (f+g\,x\right )}^2\,\left (a+b\,\mathrm {acos}\left (c\,x\right )\right )}{\sqrt {d-c^2\,d\,x^2}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((f + g*x)^2*(a + b*acos(c*x)))/(d - c^2*d*x^2)^(1/2),x)

[Out]

int(((f + g*x)^2*(a + b*acos(c*x)))/(d - c^2*d*x^2)^(1/2), x)

________________________________________________________________________________________

sympy [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)**2*(a+b*acos(c*x))/(-c**2*d*x**2+d)**(1/2),x)

[Out]

Exception raised: TypeError

________________________________________________________________________________________