\(\int (c+d x)^2 \sqrt {c^2-d^2 x^2} (A+B x+C x^2+D x^3) \, dx\) [129]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [B] (verification not implemented)
Maxima [A] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [F(-1)]
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 39, antiderivative size = 308 \[ \int (c+d x)^2 \sqrt {c^2-d^2 x^2} \left (A+B x+C x^2+D x^3\right ) \, dx=\frac {c^2 \left (3 c^2 C d+4 B c d^2+10 A d^3+2 c^3 D\right ) x \sqrt {c^2-d^2 x^2}}{16 d^3}-\frac {2 c \left (c^2 C d+B c d^2+A d^3+c^3 D\right ) \left (c^2-d^2 x^2\right )^{3/2}}{3 d^4}-\frac {\left (3 c^2 C d+4 B c d^2+2 A d^3+2 c^3 D\right ) x \left (c^2-d^2 x^2\right )^{3/2}}{8 d^3}-\frac {(C d+2 c D) x^3 \left (c^2-d^2 x^2\right )^{3/2}}{6 d}+\frac {\left (2 c C d+B d^2+3 c^2 D\right ) \left (c^2-d^2 x^2\right )^{5/2}}{5 d^4}-\frac {D \left (c^2-d^2 x^2\right )^{7/2}}{7 d^4}+\frac {c^4 \left (3 c^2 C d+4 B c d^2+10 A d^3+2 c^3 D\right ) \arctan \left (\frac {d x}{\sqrt {c^2-d^2 x^2}}\right )}{16 d^4} \] Output:

1/16*c^2*(10*A*d^3+4*B*c*d^2+3*C*c^2*d+2*D*c^3)*x*(-d^2*x^2+c^2)^(1/2)/d^3 
-2/3*c*(A*d^3+B*c*d^2+C*c^2*d+D*c^3)*(-d^2*x^2+c^2)^(3/2)/d^4-1/8*(2*A*d^3 
+4*B*c*d^2+3*C*c^2*d+2*D*c^3)*x*(-d^2*x^2+c^2)^(3/2)/d^3-1/6*(C*d+2*D*c)*x 
^3*(-d^2*x^2+c^2)^(3/2)/d+1/5*(B*d^2+2*C*c*d+3*D*c^2)*(-d^2*x^2+c^2)^(5/2) 
/d^4-1/7*D*(-d^2*x^2+c^2)^(7/2)/d^4+1/16*c^4*(10*A*d^3+4*B*c*d^2+3*C*c^2*d 
+2*D*c^3)*arctan(d*x/(-d^2*x^2+c^2)^(1/2))/d^4
 

Mathematica [A] (verified)

Time = 2.02 (sec) , antiderivative size = 249, normalized size of antiderivative = 0.81 \[ \int (c+d x)^2 \sqrt {c^2-d^2 x^2} \left (A+B x+C x^2+D x^3\right ) \, dx=\frac {\sqrt {c^2-d^2 x^2} \left (-352 c^6 D-14 c^5 d (32 C+15 D x)-c^4 d^2 (784 B+x (315 C+176 D x))+56 c d^5 x^2 (20 A+x (15 B+2 x (6 C+5 D x)))-28 c^3 d^3 (40 A+x (15 B+x (8 C+5 D x)))+4 d^6 x^3 (105 A+2 x (42 B+5 x (7 C+6 D x)))+2 c^2 d^4 x (315 A+x (224 B+x (175 C+144 D x)))\right )-210 c^4 \left (3 c^2 C d+4 B c d^2+10 A d^3+2 c^3 D\right ) \arctan \left (\frac {d x}{\sqrt {c^2}-\sqrt {c^2-d^2 x^2}}\right )}{1680 d^4} \] Input:

Integrate[(c + d*x)^2*Sqrt[c^2 - d^2*x^2]*(A + B*x + C*x^2 + D*x^3),x]
 

Output:

(Sqrt[c^2 - d^2*x^2]*(-352*c^6*D - 14*c^5*d*(32*C + 15*D*x) - c^4*d^2*(784 
*B + x*(315*C + 176*D*x)) + 56*c*d^5*x^2*(20*A + x*(15*B + 2*x*(6*C + 5*D* 
x))) - 28*c^3*d^3*(40*A + x*(15*B + x*(8*C + 5*D*x))) + 4*d^6*x^3*(105*A + 
 2*x*(42*B + 5*x*(7*C + 6*D*x))) + 2*c^2*d^4*x*(315*A + x*(224*B + x*(175* 
C + 144*D*x)))) - 210*c^4*(3*c^2*C*d + 4*B*c*d^2 + 10*A*d^3 + 2*c^3*D)*Arc 
Tan[(d*x)/(Sqrt[c^2] - Sqrt[c^2 - d^2*x^2])])/(1680*d^4)
 

Rubi [A] (verified)

Time = 1.74 (sec) , antiderivative size = 317, normalized size of antiderivative = 1.03, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2346, 25, 2346, 27, 2346, 25, 2346, 25, 27, 455, 211, 224, 216}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (c+d x)^2 \sqrt {c^2-d^2 x^2} \left (A+B x+C x^2+D x^3\right ) \, dx\)

\(\Big \downarrow \) 2346

\(\displaystyle -\frac {\int -\sqrt {c^2-d^2 x^2} \left (7 d^3 (C d+2 c D) x^4+d^2 \left (11 D c^2+14 C d c+7 B d^2\right ) x^3+7 d^2 \left (C c^2+2 B d c+A d^2\right ) x^2+7 c d^2 (B c+2 A d) x+7 A c^2 d^2\right )dx}{7 d^2}-\frac {1}{7} D x^4 \left (c^2-d^2 x^2\right )^{3/2}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\int \sqrt {c^2-d^2 x^2} \left (7 d^3 (C d+2 c D) x^4+d^2 \left (11 D c^2+14 C d c+7 B d^2\right ) x^3+7 d^2 \left (C c^2+2 B d c+A d^2\right ) x^2+7 c d^2 (B c+2 A d) x+7 A c^2 d^2\right )dx}{7 d^2}-\frac {1}{7} D x^4 \left (c^2-d^2 x^2\right )^{3/2}\)

\(\Big \downarrow \) 2346

\(\displaystyle \frac {-\frac {\int -3 \sqrt {c^2-d^2 x^2} \left (2 \left (11 D c^2+14 C d c+7 B d^2\right ) x^3 d^4+14 A c^2 d^4+14 c (B c+2 A d) x d^4+7 \left (2 D c^3+3 C d c^2+4 B d^2 c+2 A d^3\right ) x^2 d^3\right )dx}{6 d^2}-\frac {7}{6} d x^3 \left (c^2-d^2 x^2\right )^{3/2} (2 c D+C d)}{7 d^2}-\frac {1}{7} D x^4 \left (c^2-d^2 x^2\right )^{3/2}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {\int \sqrt {c^2-d^2 x^2} \left (2 \left (11 D c^2+14 C d c+7 B d^2\right ) x^3 d^4+14 A c^2 d^4+14 c (B c+2 A d) x d^4+7 \left (2 D c^3+3 C d c^2+4 B d^2 c+2 A d^3\right ) x^2 d^3\right )dx}{2 d^2}-\frac {7}{6} d x^3 \left (c^2-d^2 x^2\right )^{3/2} (2 c D+C d)}{7 d^2}-\frac {1}{7} D x^4 \left (c^2-d^2 x^2\right )^{3/2}\)

\(\Big \downarrow \) 2346

\(\displaystyle \frac {\frac {-\frac {\int -\sqrt {c^2-d^2 x^2} \left (70 A c^2 d^6+35 \left (2 D c^3+3 C d c^2+4 B d^2 c+2 A d^3\right ) x^2 d^5+2 c \left (22 D c^3+28 C d c^2+49 B d^2 c+70 A d^3\right ) x d^4\right )dx}{5 d^2}-\frac {2}{5} d^2 x^2 \left (c^2-d^2 x^2\right )^{3/2} \left (7 B d^2+11 c^2 D+14 c C d\right )}{2 d^2}-\frac {7}{6} d x^3 \left (c^2-d^2 x^2\right )^{3/2} (2 c D+C d)}{7 d^2}-\frac {1}{7} D x^4 \left (c^2-d^2 x^2\right )^{3/2}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\frac {\frac {\int \sqrt {c^2-d^2 x^2} \left (70 A c^2 d^6+35 \left (2 D c^3+3 C d c^2+4 B d^2 c+2 A d^3\right ) x^2 d^5+2 c \left (22 D c^3+28 C d c^2+49 B d^2 c+70 A d^3\right ) x d^4\right )dx}{5 d^2}-\frac {2}{5} d^2 x^2 \left (c^2-d^2 x^2\right )^{3/2} \left (7 B d^2+11 c^2 D+14 c C d\right )}{2 d^2}-\frac {7}{6} d x^3 \left (c^2-d^2 x^2\right )^{3/2} (2 c D+C d)}{7 d^2}-\frac {1}{7} D x^4 \left (c^2-d^2 x^2\right )^{3/2}\)

\(\Big \downarrow \) 2346

\(\displaystyle \frac {\frac {\frac {-\frac {\int -c d^5 \left (35 c \left (2 D c^3+3 C d c^2+4 B d^2 c+10 A d^3\right )+8 d \left (22 D c^3+28 C d c^2+49 B d^2 c+70 A d^3\right ) x\right ) \sqrt {c^2-d^2 x^2}dx}{4 d^2}-\frac {35}{4} d^3 x \left (c^2-d^2 x^2\right )^{3/2} \left (2 A d^3+4 B c d^2+2 c^3 D+3 c^2 C d\right )}{5 d^2}-\frac {2}{5} d^2 x^2 \left (c^2-d^2 x^2\right )^{3/2} \left (7 B d^2+11 c^2 D+14 c C d\right )}{2 d^2}-\frac {7}{6} d x^3 \left (c^2-d^2 x^2\right )^{3/2} (2 c D+C d)}{7 d^2}-\frac {1}{7} D x^4 \left (c^2-d^2 x^2\right )^{3/2}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\frac {\frac {\frac {\int c d^5 \left (35 c \left (2 D c^3+3 C d c^2+4 B d^2 c+10 A d^3\right )+8 d \left (22 D c^3+28 C d c^2+49 B d^2 c+70 A d^3\right ) x\right ) \sqrt {c^2-d^2 x^2}dx}{4 d^2}-\frac {35}{4} d^3 x \left (c^2-d^2 x^2\right )^{3/2} \left (2 A d^3+4 B c d^2+2 c^3 D+3 c^2 C d\right )}{5 d^2}-\frac {2}{5} d^2 x^2 \left (c^2-d^2 x^2\right )^{3/2} \left (7 B d^2+11 c^2 D+14 c C d\right )}{2 d^2}-\frac {7}{6} d x^3 \left (c^2-d^2 x^2\right )^{3/2} (2 c D+C d)}{7 d^2}-\frac {1}{7} D x^4 \left (c^2-d^2 x^2\right )^{3/2}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {\frac {\frac {1}{4} c d^3 \int \left (35 c \left (2 D c^3+3 C d c^2+4 B d^2 c+10 A d^3\right )+8 d \left (22 D c^3+28 C d c^2+49 B d^2 c+70 A d^3\right ) x\right ) \sqrt {c^2-d^2 x^2}dx-\frac {35}{4} d^3 x \left (c^2-d^2 x^2\right )^{3/2} \left (2 A d^3+4 B c d^2+2 c^3 D+3 c^2 C d\right )}{5 d^2}-\frac {2}{5} d^2 x^2 \left (c^2-d^2 x^2\right )^{3/2} \left (7 B d^2+11 c^2 D+14 c C d\right )}{2 d^2}-\frac {7}{6} d x^3 \left (c^2-d^2 x^2\right )^{3/2} (2 c D+C d)}{7 d^2}-\frac {1}{7} D x^4 \left (c^2-d^2 x^2\right )^{3/2}\)

\(\Big \downarrow \) 455

\(\displaystyle \frac {\frac {\frac {\frac {1}{4} c d^3 \left (35 c \left (10 A d^3+4 B c d^2+2 c^3 D+3 c^2 C d\right ) \int \sqrt {c^2-d^2 x^2}dx-\frac {8 \left (c^2-d^2 x^2\right )^{3/2} \left (70 A d^3+49 B c d^2+22 c^3 D+28 c^2 C d\right )}{3 d}\right )-\frac {35}{4} d^3 x \left (c^2-d^2 x^2\right )^{3/2} \left (2 A d^3+4 B c d^2+2 c^3 D+3 c^2 C d\right )}{5 d^2}-\frac {2}{5} d^2 x^2 \left (c^2-d^2 x^2\right )^{3/2} \left (7 B d^2+11 c^2 D+14 c C d\right )}{2 d^2}-\frac {7}{6} d x^3 \left (c^2-d^2 x^2\right )^{3/2} (2 c D+C d)}{7 d^2}-\frac {1}{7} D x^4 \left (c^2-d^2 x^2\right )^{3/2}\)

\(\Big \downarrow \) 211

\(\displaystyle \frac {\frac {\frac {\frac {1}{4} c d^3 \left (35 c \left (10 A d^3+4 B c d^2+2 c^3 D+3 c^2 C d\right ) \left (\frac {1}{2} c^2 \int \frac {1}{\sqrt {c^2-d^2 x^2}}dx+\frac {1}{2} x \sqrt {c^2-d^2 x^2}\right )-\frac {8 \left (c^2-d^2 x^2\right )^{3/2} \left (70 A d^3+49 B c d^2+22 c^3 D+28 c^2 C d\right )}{3 d}\right )-\frac {35}{4} d^3 x \left (c^2-d^2 x^2\right )^{3/2} \left (2 A d^3+4 B c d^2+2 c^3 D+3 c^2 C d\right )}{5 d^2}-\frac {2}{5} d^2 x^2 \left (c^2-d^2 x^2\right )^{3/2} \left (7 B d^2+11 c^2 D+14 c C d\right )}{2 d^2}-\frac {7}{6} d x^3 \left (c^2-d^2 x^2\right )^{3/2} (2 c D+C d)}{7 d^2}-\frac {1}{7} D x^4 \left (c^2-d^2 x^2\right )^{3/2}\)

\(\Big \downarrow \) 224

\(\displaystyle \frac {\frac {\frac {\frac {1}{4} c d^3 \left (35 c \left (10 A d^3+4 B c d^2+2 c^3 D+3 c^2 C d\right ) \left (\frac {1}{2} c^2 \int \frac {1}{\frac {d^2 x^2}{c^2-d^2 x^2}+1}d\frac {x}{\sqrt {c^2-d^2 x^2}}+\frac {1}{2} x \sqrt {c^2-d^2 x^2}\right )-\frac {8 \left (c^2-d^2 x^2\right )^{3/2} \left (70 A d^3+49 B c d^2+22 c^3 D+28 c^2 C d\right )}{3 d}\right )-\frac {35}{4} d^3 x \left (c^2-d^2 x^2\right )^{3/2} \left (2 A d^3+4 B c d^2+2 c^3 D+3 c^2 C d\right )}{5 d^2}-\frac {2}{5} d^2 x^2 \left (c^2-d^2 x^2\right )^{3/2} \left (7 B d^2+11 c^2 D+14 c C d\right )}{2 d^2}-\frac {7}{6} d x^3 \left (c^2-d^2 x^2\right )^{3/2} (2 c D+C d)}{7 d^2}-\frac {1}{7} D x^4 \left (c^2-d^2 x^2\right )^{3/2}\)

\(\Big \downarrow \) 216

\(\displaystyle \frac {\frac {\frac {\frac {1}{4} c d^3 \left (35 c \left (\frac {c^2 \arctan \left (\frac {d x}{\sqrt {c^2-d^2 x^2}}\right )}{2 d}+\frac {1}{2} x \sqrt {c^2-d^2 x^2}\right ) \left (10 A d^3+4 B c d^2+2 c^3 D+3 c^2 C d\right )-\frac {8 \left (c^2-d^2 x^2\right )^{3/2} \left (70 A d^3+49 B c d^2+22 c^3 D+28 c^2 C d\right )}{3 d}\right )-\frac {35}{4} d^3 x \left (c^2-d^2 x^2\right )^{3/2} \left (2 A d^3+4 B c d^2+2 c^3 D+3 c^2 C d\right )}{5 d^2}-\frac {2}{5} d^2 x^2 \left (c^2-d^2 x^2\right )^{3/2} \left (7 B d^2+11 c^2 D+14 c C d\right )}{2 d^2}-\frac {7}{6} d x^3 \left (c^2-d^2 x^2\right )^{3/2} (2 c D+C d)}{7 d^2}-\frac {1}{7} D x^4 \left (c^2-d^2 x^2\right )^{3/2}\)

Input:

Int[(c + d*x)^2*Sqrt[c^2 - d^2*x^2]*(A + B*x + C*x^2 + D*x^3),x]
 

Output:

-1/7*(D*x^4*(c^2 - d^2*x^2)^(3/2)) + ((-7*d*(C*d + 2*c*D)*x^3*(c^2 - d^2*x 
^2)^(3/2))/6 + ((-2*d^2*(14*c*C*d + 7*B*d^2 + 11*c^2*D)*x^2*(c^2 - d^2*x^2 
)^(3/2))/5 + ((-35*d^3*(3*c^2*C*d + 4*B*c*d^2 + 2*A*d^3 + 2*c^3*D)*x*(c^2 
- d^2*x^2)^(3/2))/4 + (c*d^3*((-8*(28*c^2*C*d + 49*B*c*d^2 + 70*A*d^3 + 22 
*c^3*D)*(c^2 - d^2*x^2)^(3/2))/(3*d) + 35*c*(3*c^2*C*d + 4*B*c*d^2 + 10*A* 
d^3 + 2*c^3*D)*((x*Sqrt[c^2 - d^2*x^2])/2 + (c^2*ArcTan[(d*x)/Sqrt[c^2 - d 
^2*x^2]])/(2*d))))/4)/(5*d^2))/(2*d^2))/(7*d^2)
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 211
Int[((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[x*((a + b*x^2)^p/(2*p + 1 
)), x] + Simp[2*a*(p/(2*p + 1))   Int[(a + b*x^2)^(p - 1), x], x] /; FreeQ[ 
{a, b}, x] && GtQ[p, 0] && (IntegerQ[4*p] || IntegerQ[6*p])
 

rule 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

rule 224
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], 
x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b}, x] &&  !GtQ[a, 0]
 

rule 455
Int[((c_) + (d_.)*(x_))*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[d*(( 
a + b*x^2)^(p + 1)/(2*b*(p + 1))), x] + Simp[c   Int[(a + b*x^2)^p, x], x] 
/; FreeQ[{a, b, c, d, p}, x] &&  !LeQ[p, -1]
 

rule 2346
Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Expon[Pq, x], 
e = Coeff[Pq, x, Expon[Pq, x]]}, Simp[e*x^(q - 1)*((a + b*x^2)^(p + 1)/(b*( 
q + 2*p + 1))), x] + Simp[1/(b*(q + 2*p + 1))   Int[(a + b*x^2)^p*ExpandToS 
um[b*(q + 2*p + 1)*Pq - a*e*(q - 1)*x^(q - 2) - b*e*(q + 2*p + 1)*x^q, x], 
x], x]] /; FreeQ[{a, b, p}, x] && PolyQ[Pq, x] &&  !LeQ[p, -1]
 
Maple [A] (verified)

Time = 0.50 (sec) , antiderivative size = 444, normalized size of antiderivative = 1.44

method result size
default \(A \,c^{2} \left (\frac {x \sqrt {-d^{2} x^{2}+c^{2}}}{2}+\frac {c^{2} \arctan \left (\frac {\sqrt {d^{2}}\, x}{\sqrt {-d^{2} x^{2}+c^{2}}}\right )}{2 \sqrt {d^{2}}}\right )-\frac {c \left (2 A d +B c \right ) \left (-d^{2} x^{2}+c^{2}\right )^{\frac {3}{2}}}{3 d^{2}}+d \left (C d +2 D c \right ) \left (-\frac {x^{3} \left (-d^{2} x^{2}+c^{2}\right )^{\frac {3}{2}}}{6 d^{2}}+\frac {c^{2} \left (-\frac {x \left (-d^{2} x^{2}+c^{2}\right )^{\frac {3}{2}}}{4 d^{2}}+\frac {c^{2} \left (\frac {x \sqrt {-d^{2} x^{2}+c^{2}}}{2}+\frac {c^{2} \arctan \left (\frac {\sqrt {d^{2}}\, x}{\sqrt {-d^{2} x^{2}+c^{2}}}\right )}{2 \sqrt {d^{2}}}\right )}{4 d^{2}}\right )}{2 d^{2}}\right )+\left (A \,d^{2}+2 B c d +C \,c^{2}\right ) \left (-\frac {x \left (-d^{2} x^{2}+c^{2}\right )^{\frac {3}{2}}}{4 d^{2}}+\frac {c^{2} \left (\frac {x \sqrt {-d^{2} x^{2}+c^{2}}}{2}+\frac {c^{2} \arctan \left (\frac {\sqrt {d^{2}}\, x}{\sqrt {-d^{2} x^{2}+c^{2}}}\right )}{2 \sqrt {d^{2}}}\right )}{4 d^{2}}\right )+\left (B \,d^{2}+2 C c d +D c^{2}\right ) \left (-\frac {x^{2} \left (-d^{2} x^{2}+c^{2}\right )^{\frac {3}{2}}}{5 d^{2}}-\frac {2 c^{2} \left (-d^{2} x^{2}+c^{2}\right )^{\frac {3}{2}}}{15 d^{4}}\right )+d^{2} D \left (-\frac {x^{4} \left (-d^{2} x^{2}+c^{2}\right )^{\frac {3}{2}}}{7 d^{2}}+\frac {4 c^{2} \left (-\frac {x^{2} \left (-d^{2} x^{2}+c^{2}\right )^{\frac {3}{2}}}{5 d^{2}}-\frac {2 c^{2} \left (-d^{2} x^{2}+c^{2}\right )^{\frac {3}{2}}}{15 d^{4}}\right )}{7 d^{2}}\right )\) \(444\)

Input:

int((d*x+c)^2*(-d^2*x^2+c^2)^(1/2)*(D*x^3+C*x^2+B*x+A),x,method=_RETURNVER 
BOSE)
 

Output:

A*c^2*(1/2*x*(-d^2*x^2+c^2)^(1/2)+1/2*c^2/(d^2)^(1/2)*arctan((d^2)^(1/2)*x 
/(-d^2*x^2+c^2)^(1/2)))-1/3*c*(2*A*d+B*c)*(-d^2*x^2+c^2)^(3/2)/d^2+d*(C*d+ 
2*D*c)*(-1/6*x^3*(-d^2*x^2+c^2)^(3/2)/d^2+1/2*c^2/d^2*(-1/4*x*(-d^2*x^2+c^ 
2)^(3/2)/d^2+1/4*c^2/d^2*(1/2*x*(-d^2*x^2+c^2)^(1/2)+1/2*c^2/(d^2)^(1/2)*a 
rctan((d^2)^(1/2)*x/(-d^2*x^2+c^2)^(1/2)))))+(A*d^2+2*B*c*d+C*c^2)*(-1/4*x 
*(-d^2*x^2+c^2)^(3/2)/d^2+1/4*c^2/d^2*(1/2*x*(-d^2*x^2+c^2)^(1/2)+1/2*c^2/ 
(d^2)^(1/2)*arctan((d^2)^(1/2)*x/(-d^2*x^2+c^2)^(1/2))))+(B*d^2+2*C*c*d+D* 
c^2)*(-1/5*x^2*(-d^2*x^2+c^2)^(3/2)/d^2-2/15*c^2*(-d^2*x^2+c^2)^(3/2)/d^4) 
+d^2*D*(-1/7*x^4*(-d^2*x^2+c^2)^(3/2)/d^2+4/7*c^2/d^2*(-1/5*x^2*(-d^2*x^2+ 
c^2)^(3/2)/d^2-2/15*c^2*(-d^2*x^2+c^2)^(3/2)/d^4))
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 285, normalized size of antiderivative = 0.93 \[ \int (c+d x)^2 \sqrt {c^2-d^2 x^2} \left (A+B x+C x^2+D x^3\right ) \, dx=-\frac {210 \, {\left (2 \, D c^{7} + 3 \, C c^{6} d + 4 \, B c^{5} d^{2} + 10 \, A c^{4} d^{3}\right )} \arctan \left (-\frac {c - \sqrt {-d^{2} x^{2} + c^{2}}}{d x}\right ) - {\left (240 \, D d^{6} x^{6} - 352 \, D c^{6} - 448 \, C c^{5} d - 784 \, B c^{4} d^{2} - 1120 \, A c^{3} d^{3} + 280 \, {\left (2 \, D c d^{5} + C d^{6}\right )} x^{5} + 48 \, {\left (6 \, D c^{2} d^{4} + 14 \, C c d^{5} + 7 \, B d^{6}\right )} x^{4} - 70 \, {\left (2 \, D c^{3} d^{3} - 5 \, C c^{2} d^{4} - 12 \, B c d^{5} - 6 \, A d^{6}\right )} x^{3} - 16 \, {\left (11 \, D c^{4} d^{2} + 14 \, C c^{3} d^{3} - 28 \, B c^{2} d^{4} - 70 \, A c d^{5}\right )} x^{2} - 105 \, {\left (2 \, D c^{5} d + 3 \, C c^{4} d^{2} + 4 \, B c^{3} d^{3} - 6 \, A c^{2} d^{4}\right )} x\right )} \sqrt {-d^{2} x^{2} + c^{2}}}{1680 \, d^{4}} \] Input:

integrate((d*x+c)^2*(-d^2*x^2+c^2)^(1/2)*(D*x^3+C*x^2+B*x+A),x, algorithm= 
"fricas")
 

Output:

-1/1680*(210*(2*D*c^7 + 3*C*c^6*d + 4*B*c^5*d^2 + 10*A*c^4*d^3)*arctan(-(c 
 - sqrt(-d^2*x^2 + c^2))/(d*x)) - (240*D*d^6*x^6 - 352*D*c^6 - 448*C*c^5*d 
 - 784*B*c^4*d^2 - 1120*A*c^3*d^3 + 280*(2*D*c*d^5 + C*d^6)*x^5 + 48*(6*D* 
c^2*d^4 + 14*C*c*d^5 + 7*B*d^6)*x^4 - 70*(2*D*c^3*d^3 - 5*C*c^2*d^4 - 12*B 
*c*d^5 - 6*A*d^6)*x^3 - 16*(11*D*c^4*d^2 + 14*C*c^3*d^3 - 28*B*c^2*d^4 - 7 
0*A*c*d^5)*x^2 - 105*(2*D*c^5*d + 3*C*c^4*d^2 + 4*B*c^3*d^3 - 6*A*c^2*d^4) 
*x)*sqrt(-d^2*x^2 + c^2))/d^4
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 619 vs. \(2 (298) = 596\).

Time = 0.74 (sec) , antiderivative size = 619, normalized size of antiderivative = 2.01 \[ \int (c+d x)^2 \sqrt {c^2-d^2 x^2} \left (A+B x+C x^2+D x^3\right ) \, dx=\begin {cases} \sqrt {c^{2} - d^{2} x^{2}} \left (\frac {D d^{2} x^{6}}{7} - \frac {x^{5} \left (- C d^{4} - 2 D c d^{3}\right )}{6 d^{2}} - \frac {x^{4} \left (- B d^{4} - 2 C c d^{3} - \frac {6 D c^{2} d^{2}}{7}\right )}{5 d^{2}} - \frac {x^{3} \left (- A d^{4} - 2 B c d^{3} + 2 D c^{3} d + \frac {5 c^{2} \left (- C d^{4} - 2 D c d^{3}\right )}{6 d^{2}}\right )}{4 d^{2}} - \frac {x^{2} \left (- 2 A c d^{3} + 2 C c^{3} d + D c^{4} + \frac {4 c^{2} \left (- B d^{4} - 2 C c d^{3} - \frac {6 D c^{2} d^{2}}{7}\right )}{5 d^{2}}\right )}{3 d^{2}} - \frac {x \left (2 B c^{3} d + C c^{4} + \frac {3 c^{2} \left (- A d^{4} - 2 B c d^{3} + 2 D c^{3} d + \frac {5 c^{2} \left (- C d^{4} - 2 D c d^{3}\right )}{6 d^{2}}\right )}{4 d^{2}}\right )}{2 d^{2}} - \frac {2 A c^{3} d + B c^{4} + \frac {2 c^{2} \left (- 2 A c d^{3} + 2 C c^{3} d + D c^{4} + \frac {4 c^{2} \left (- B d^{4} - 2 C c d^{3} - \frac {6 D c^{2} d^{2}}{7}\right )}{5 d^{2}}\right )}{3 d^{2}}}{d^{2}}\right ) + \left (A c^{4} + \frac {c^{2} \cdot \left (2 B c^{3} d + C c^{4} + \frac {3 c^{2} \left (- A d^{4} - 2 B c d^{3} + 2 D c^{3} d + \frac {5 c^{2} \left (- C d^{4} - 2 D c d^{3}\right )}{6 d^{2}}\right )}{4 d^{2}}\right )}{2 d^{2}}\right ) \left (\begin {cases} \frac {\log {\left (- 2 d^{2} x + 2 \sqrt {- d^{2}} \sqrt {c^{2} - d^{2} x^{2}} \right )}}{\sqrt {- d^{2}}} & \text {for}\: c^{2} \neq 0 \\\frac {x \log {\left (x \right )}}{\sqrt {- d^{2} x^{2}}} & \text {otherwise} \end {cases}\right ) & \text {for}\: d^{2} \neq 0 \\\left (A c^{2} x + \frac {D d^{2} x^{6}}{6} + \frac {x^{5} \left (C d^{2} + 2 D c d\right )}{5} + \frac {x^{4} \left (B d^{2} + 2 C c d + D c^{2}\right )}{4} + \frac {x^{3} \left (A d^{2} + 2 B c d + C c^{2}\right )}{3} + \frac {x^{2} \cdot \left (2 A c d + B c^{2}\right )}{2}\right ) \sqrt {c^{2}} & \text {otherwise} \end {cases} \] Input:

integrate((d*x+c)**2*(-d**2*x**2+c**2)**(1/2)*(D*x**3+C*x**2+B*x+A),x)
 

Output:

Piecewise((sqrt(c**2 - d**2*x**2)*(D*d**2*x**6/7 - x**5*(-C*d**4 - 2*D*c*d 
**3)/(6*d**2) - x**4*(-B*d**4 - 2*C*c*d**3 - 6*D*c**2*d**2/7)/(5*d**2) - x 
**3*(-A*d**4 - 2*B*c*d**3 + 2*D*c**3*d + 5*c**2*(-C*d**4 - 2*D*c*d**3)/(6* 
d**2))/(4*d**2) - x**2*(-2*A*c*d**3 + 2*C*c**3*d + D*c**4 + 4*c**2*(-B*d** 
4 - 2*C*c*d**3 - 6*D*c**2*d**2/7)/(5*d**2))/(3*d**2) - x*(2*B*c**3*d + C*c 
**4 + 3*c**2*(-A*d**4 - 2*B*c*d**3 + 2*D*c**3*d + 5*c**2*(-C*d**4 - 2*D*c* 
d**3)/(6*d**2))/(4*d**2))/(2*d**2) - (2*A*c**3*d + B*c**4 + 2*c**2*(-2*A*c 
*d**3 + 2*C*c**3*d + D*c**4 + 4*c**2*(-B*d**4 - 2*C*c*d**3 - 6*D*c**2*d**2 
/7)/(5*d**2))/(3*d**2))/d**2) + (A*c**4 + c**2*(2*B*c**3*d + C*c**4 + 3*c* 
*2*(-A*d**4 - 2*B*c*d**3 + 2*D*c**3*d + 5*c**2*(-C*d**4 - 2*D*c*d**3)/(6*d 
**2))/(4*d**2))/(2*d**2))*Piecewise((log(-2*d**2*x + 2*sqrt(-d**2)*sqrt(c* 
*2 - d**2*x**2))/sqrt(-d**2), Ne(c**2, 0)), (x*log(x)/sqrt(-d**2*x**2), Tr 
ue)), Ne(d**2, 0)), ((A*c**2*x + D*d**2*x**6/6 + x**5*(C*d**2 + 2*D*c*d)/5 
 + x**4*(B*d**2 + 2*C*c*d + D*c**2)/4 + x**3*(A*d**2 + 2*B*c*d + C*c**2)/3 
 + x**2*(2*A*c*d + B*c**2)/2)*sqrt(c**2), True))
 

Maxima [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 460, normalized size of antiderivative = 1.49 \[ \int (c+d x)^2 \sqrt {c^2-d^2 x^2} \left (A+B x+C x^2+D x^3\right ) \, dx=-\frac {1}{7} \, {\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {3}{2}} D x^{4} + \frac {A c^{4} \arcsin \left (\frac {d x}{c}\right )}{2 \, d} + \frac {1}{2} \, \sqrt {-d^{2} x^{2} + c^{2}} A c^{2} x - \frac {4 \, {\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {3}{2}} D c^{2} x^{2}}{35 \, d^{2}} - \frac {{\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {3}{2}} {\left (2 \, D c d + C d^{2}\right )} x^{3}}{6 \, d^{2}} + \frac {{\left (2 \, D c d + C d^{2}\right )} c^{6} \arcsin \left (\frac {d x}{c}\right )}{16 \, d^{5}} + \frac {{\left (C c^{2} + 2 \, B c d + A d^{2}\right )} c^{4} \arcsin \left (\frac {d x}{c}\right )}{8 \, d^{3}} - \frac {8 \, {\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {3}{2}} D c^{4}}{105 \, d^{4}} - \frac {{\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {3}{2}} B c^{2}}{3 \, d^{2}} - \frac {2 \, {\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {3}{2}} A c}{3 \, d} + \frac {\sqrt {-d^{2} x^{2} + c^{2}} {\left (2 \, D c d + C d^{2}\right )} c^{4} x}{16 \, d^{4}} + \frac {\sqrt {-d^{2} x^{2} + c^{2}} {\left (C c^{2} + 2 \, B c d + A d^{2}\right )} c^{2} x}{8 \, d^{2}} - \frac {{\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {3}{2}} {\left (D c^{2} + 2 \, C c d + B d^{2}\right )} x^{2}}{5 \, d^{2}} - \frac {{\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {3}{2}} {\left (2 \, D c d + C d^{2}\right )} c^{2} x}{8 \, d^{4}} - \frac {{\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {3}{2}} {\left (C c^{2} + 2 \, B c d + A d^{2}\right )} x}{4 \, d^{2}} - \frac {2 \, {\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {3}{2}} {\left (D c^{2} + 2 \, C c d + B d^{2}\right )} c^{2}}{15 \, d^{4}} \] Input:

integrate((d*x+c)^2*(-d^2*x^2+c^2)^(1/2)*(D*x^3+C*x^2+B*x+A),x, algorithm= 
"maxima")
 

Output:

-1/7*(-d^2*x^2 + c^2)^(3/2)*D*x^4 + 1/2*A*c^4*arcsin(d*x/c)/d + 1/2*sqrt(- 
d^2*x^2 + c^2)*A*c^2*x - 4/35*(-d^2*x^2 + c^2)^(3/2)*D*c^2*x^2/d^2 - 1/6*( 
-d^2*x^2 + c^2)^(3/2)*(2*D*c*d + C*d^2)*x^3/d^2 + 1/16*(2*D*c*d + C*d^2)*c 
^6*arcsin(d*x/c)/d^5 + 1/8*(C*c^2 + 2*B*c*d + A*d^2)*c^4*arcsin(d*x/c)/d^3 
 - 8/105*(-d^2*x^2 + c^2)^(3/2)*D*c^4/d^4 - 1/3*(-d^2*x^2 + c^2)^(3/2)*B*c 
^2/d^2 - 2/3*(-d^2*x^2 + c^2)^(3/2)*A*c/d + 1/16*sqrt(-d^2*x^2 + c^2)*(2*D 
*c*d + C*d^2)*c^4*x/d^4 + 1/8*sqrt(-d^2*x^2 + c^2)*(C*c^2 + 2*B*c*d + A*d^ 
2)*c^2*x/d^2 - 1/5*(-d^2*x^2 + c^2)^(3/2)*(D*c^2 + 2*C*c*d + B*d^2)*x^2/d^ 
2 - 1/8*(-d^2*x^2 + c^2)^(3/2)*(2*D*c*d + C*d^2)*c^2*x/d^4 - 1/4*(-d^2*x^2 
 + c^2)^(3/2)*(C*c^2 + 2*B*c*d + A*d^2)*x/d^2 - 2/15*(-d^2*x^2 + c^2)^(3/2 
)*(D*c^2 + 2*C*c*d + B*d^2)*c^2/d^4
 

Giac [A] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 302, normalized size of antiderivative = 0.98 \[ \int (c+d x)^2 \sqrt {c^2-d^2 x^2} \left (A+B x+C x^2+D x^3\right ) \, dx=\frac {1}{1680} \, \sqrt {-d^{2} x^{2} + c^{2}} {\left ({\left (2 \, {\left ({\left (4 \, {\left (5 \, {\left (6 \, D d^{2} x + \frac {7 \, {\left (2 \, D c d^{11} + C d^{12}\right )}}{d^{10}}\right )} x + \frac {6 \, {\left (6 \, D c^{2} d^{10} + 14 \, C c d^{11} + 7 \, B d^{12}\right )}}{d^{10}}\right )} x - \frac {35 \, {\left (2 \, D c^{3} d^{9} - 5 \, C c^{2} d^{10} - 12 \, B c d^{11} - 6 \, A d^{12}\right )}}{d^{10}}\right )} x - \frac {8 \, {\left (11 \, D c^{4} d^{8} + 14 \, C c^{3} d^{9} - 28 \, B c^{2} d^{10} - 70 \, A c d^{11}\right )}}{d^{10}}\right )} x - \frac {105 \, {\left (2 \, D c^{5} d^{7} + 3 \, C c^{4} d^{8} + 4 \, B c^{3} d^{9} - 6 \, A c^{2} d^{10}\right )}}{d^{10}}\right )} x - \frac {16 \, {\left (22 \, D c^{6} d^{6} + 28 \, C c^{5} d^{7} + 49 \, B c^{4} d^{8} + 70 \, A c^{3} d^{9}\right )}}{d^{10}}\right )} + \frac {{\left (2 \, D c^{7} + 3 \, C c^{6} d + 4 \, B c^{5} d^{2} + 10 \, A c^{4} d^{3}\right )} \arcsin \left (\frac {d x}{c}\right ) \mathrm {sgn}\left (c\right ) \mathrm {sgn}\left (d\right )}{16 \, d^{3} {\left | d \right |}} \] Input:

integrate((d*x+c)^2*(-d^2*x^2+c^2)^(1/2)*(D*x^3+C*x^2+B*x+A),x, algorithm= 
"giac")
 

Output:

1/1680*sqrt(-d^2*x^2 + c^2)*((2*((4*(5*(6*D*d^2*x + 7*(2*D*c*d^11 + C*d^12 
)/d^10)*x + 6*(6*D*c^2*d^10 + 14*C*c*d^11 + 7*B*d^12)/d^10)*x - 35*(2*D*c^ 
3*d^9 - 5*C*c^2*d^10 - 12*B*c*d^11 - 6*A*d^12)/d^10)*x - 8*(11*D*c^4*d^8 + 
 14*C*c^3*d^9 - 28*B*c^2*d^10 - 70*A*c*d^11)/d^10)*x - 105*(2*D*c^5*d^7 + 
3*C*c^4*d^8 + 4*B*c^3*d^9 - 6*A*c^2*d^10)/d^10)*x - 16*(22*D*c^6*d^6 + 28* 
C*c^5*d^7 + 49*B*c^4*d^8 + 70*A*c^3*d^9)/d^10) + 1/16*(2*D*c^7 + 3*C*c^6*d 
 + 4*B*c^5*d^2 + 10*A*c^4*d^3)*arcsin(d*x/c)*sgn(c)*sgn(d)/(d^3*abs(d))
 

Mupad [F(-1)]

Timed out. \[ \int (c+d x)^2 \sqrt {c^2-d^2 x^2} \left (A+B x+C x^2+D x^3\right ) \, dx=\int \sqrt {c^2-d^2\,x^2}\,{\left (c+d\,x\right )}^2\,\left (A+B\,x+C\,x^2+x^3\,D\right ) \,d x \] Input:

int((c^2 - d^2*x^2)^(1/2)*(c + d*x)^2*(A + B*x + C*x^2 + x^3*D),x)
 

Output:

int((c^2 - d^2*x^2)^(1/2)*(c + d*x)^2*(A + B*x + C*x^2 + x^3*D), x)
 

Reduce [B] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 425, normalized size of antiderivative = 1.38 \[ \int (c+d x)^2 \sqrt {c^2-d^2 x^2} \left (A+B x+C x^2+D x^3\right ) \, dx=\frac {1050 \mathit {asin} \left (\frac {d x}{c}\right ) a \,c^{4} d^{2}+420 \mathit {asin} \left (\frac {d x}{c}\right ) b \,c^{5} d +525 \mathit {asin} \left (\frac {d x}{c}\right ) c^{7}-1120 \sqrt {-d^{2} x^{2}+c^{2}}\, a \,c^{3} d^{2}+630 \sqrt {-d^{2} x^{2}+c^{2}}\, a \,c^{2} d^{3} x +1120 \sqrt {-d^{2} x^{2}+c^{2}}\, a c \,d^{4} x^{2}+420 \sqrt {-d^{2} x^{2}+c^{2}}\, a \,d^{5} x^{3}-784 \sqrt {-d^{2} x^{2}+c^{2}}\, b \,c^{4} d -420 \sqrt {-d^{2} x^{2}+c^{2}}\, b \,c^{3} d^{2} x +448 \sqrt {-d^{2} x^{2}+c^{2}}\, b \,c^{2} d^{3} x^{2}+840 \sqrt {-d^{2} x^{2}+c^{2}}\, b c \,d^{4} x^{3}+336 \sqrt {-d^{2} x^{2}+c^{2}}\, b \,d^{5} x^{4}-800 \sqrt {-d^{2} x^{2}+c^{2}}\, c^{6}-525 \sqrt {-d^{2} x^{2}+c^{2}}\, c^{5} d x -400 \sqrt {-d^{2} x^{2}+c^{2}}\, c^{4} d^{2} x^{2}+210 \sqrt {-d^{2} x^{2}+c^{2}}\, c^{3} d^{3} x^{3}+960 \sqrt {-d^{2} x^{2}+c^{2}}\, c^{2} d^{4} x^{4}+840 \sqrt {-d^{2} x^{2}+c^{2}}\, c \,d^{5} x^{5}+240 \sqrt {-d^{2} x^{2}+c^{2}}\, d^{6} x^{6}+1120 a \,c^{4} d^{2}+784 b \,c^{5} d +800 c^{7}}{1680 d^{3}} \] Input:

int((d*x+c)^2*(-d^2*x^2+c^2)^(1/2)*(D*x^3+C*x^2+B*x+A),x)
 

Output:

(1050*asin((d*x)/c)*a*c**4*d**2 + 420*asin((d*x)/c)*b*c**5*d + 525*asin((d 
*x)/c)*c**7 - 1120*sqrt(c**2 - d**2*x**2)*a*c**3*d**2 + 630*sqrt(c**2 - d* 
*2*x**2)*a*c**2*d**3*x + 1120*sqrt(c**2 - d**2*x**2)*a*c*d**4*x**2 + 420*s 
qrt(c**2 - d**2*x**2)*a*d**5*x**3 - 784*sqrt(c**2 - d**2*x**2)*b*c**4*d - 
420*sqrt(c**2 - d**2*x**2)*b*c**3*d**2*x + 448*sqrt(c**2 - d**2*x**2)*b*c* 
*2*d**3*x**2 + 840*sqrt(c**2 - d**2*x**2)*b*c*d**4*x**3 + 336*sqrt(c**2 - 
d**2*x**2)*b*d**5*x**4 - 800*sqrt(c**2 - d**2*x**2)*c**6 - 525*sqrt(c**2 - 
 d**2*x**2)*c**5*d*x - 400*sqrt(c**2 - d**2*x**2)*c**4*d**2*x**2 + 210*sqr 
t(c**2 - d**2*x**2)*c**3*d**3*x**3 + 960*sqrt(c**2 - d**2*x**2)*c**2*d**4* 
x**4 + 840*sqrt(c**2 - d**2*x**2)*c*d**5*x**5 + 240*sqrt(c**2 - d**2*x**2) 
*d**6*x**6 + 1120*a*c**4*d**2 + 784*b*c**5*d + 800*c**7)/(1680*d**3)