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

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

Optimal result

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

1/16*c*(8*A*d^3-2*B*c*d^2+2*C*c^2*d-D*c^3)*x*(-d^2*x^2+c^2)^(1/2)/d^3+1/3* 
(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*B*d^2+2*C*c 
*d-D*c^2)*x*(-d^2*x^2+c^2)^(3/2)/d^3+1/6*D*x^3*(-d^2*x^2+c^2)^(3/2)/d-1/5* 
(C*d-D*c)*(-d^2*x^2+c^2)^(5/2)/d^4+1/16*c^3*(8*A*d^3-2*B*c*d^2+2*C*c^2*d-D 
*c^3)*arctan(d*x/(-d^2*x^2+c^2)^(1/2))/d^4
 

Mathematica [A] (verified)

Time = 1.32 (sec) , antiderivative size = 215, normalized size of antiderivative = 0.83 \[ \int \frac {\left (c^2-d^2 x^2\right )^{3/2} \left (A+B x+C x^2+D x^3\right )}{c+d x} \, dx=\frac {\sqrt {c^2-d^2 x^2} \left (-32 c^5 D+c^4 d (32 C+15 D x)-2 c^3 d^2 (40 B+x (15 C+8 D x))+4 c d^4 x (30 A+x (20 B+3 x (5 C+4 D x)))-4 d^5 x^2 (20 A+x (15 B+2 x (6 C+5 D x)))+2 c^2 d^3 (40 A+x (15 B+x (8 C+5 D x)))\right )+30 c^3 \left (-2 c^2 C d+2 B c d^2-8 A d^3+c^3 D\right ) \arctan \left (\frac {d x}{\sqrt {c^2}-\sqrt {c^2-d^2 x^2}}\right )}{240 d^4} \] Input:

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

Output:

(Sqrt[c^2 - d^2*x^2]*(-32*c^5*D + c^4*d*(32*C + 15*D*x) - 2*c^3*d^2*(40*B 
+ x*(15*C + 8*D*x)) + 4*c*d^4*x*(30*A + x*(20*B + 3*x*(5*C + 4*D*x))) - 4* 
d^5*x^2*(20*A + x*(15*B + 2*x*(6*C + 5*D*x))) + 2*c^2*d^3*(40*A + x*(15*B 
+ x*(8*C + 5*D*x)))) + 30*c^3*(-2*c^2*C*d + 2*B*c*d^2 - 8*A*d^3 + c^3*D)*A 
rcTan[(d*x)/(Sqrt[c^2] - Sqrt[c^2 - d^2*x^2])])/(240*d^4)
 

Rubi [A] (verified)

Time = 1.09 (sec) , antiderivative size = 242, normalized size of antiderivative = 0.94, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2170, 25, 2170, 27, 667, 676, 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 \frac {\left (c^2-d^2 x^2\right )^{3/2} \left (A+B x+C x^2+D x^3\right )}{c+d x} \, dx\)

\(\Big \downarrow \) 2170

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 2170

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 667

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

\(\Big \downarrow \) 676

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

\(\Big \downarrow \) 211

\(\displaystyle \frac {d^2 \left (\frac {3}{4} c \left (8 A d^3-2 B c d^2+c^3 (-D)+2 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 {2 \left (c^2-d^2 x^2\right )^{3/2} \left (A d^3-B c d^2+c^3 (-D)+c^2 C d\right )}{d}-\frac {1}{4} x \left (c^2-d^2 x^2\right )^{3/2} \left (-6 B d^2-7 c^2 D+6 c C d\right )\right )-\frac {1}{5} d \left (c^2-d^2 x^2\right )^{5/2} (6 C d-11 c D)}{6 d^5}-\frac {D (c+d x) \left (c^2-d^2 x^2\right )^{5/2}}{6 d^4}\)

\(\Big \downarrow \) 224

\(\displaystyle \frac {d^2 \left (\frac {3}{4} c \left (8 A d^3-2 B c d^2+c^3 (-D)+2 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 {2 \left (c^2-d^2 x^2\right )^{3/2} \left (A d^3-B c d^2+c^3 (-D)+c^2 C d\right )}{d}-\frac {1}{4} x \left (c^2-d^2 x^2\right )^{3/2} \left (-6 B d^2-7 c^2 D+6 c C d\right )\right )-\frac {1}{5} d \left (c^2-d^2 x^2\right )^{5/2} (6 C d-11 c D)}{6 d^5}-\frac {D (c+d x) \left (c^2-d^2 x^2\right )^{5/2}}{6 d^4}\)

\(\Big \downarrow \) 216

\(\displaystyle \frac {d^2 \left (\frac {3}{4} 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 (8 A d^3-2 B c d^2+c^3 (-D)+2 c^2 C d\right )+\frac {2 \left (c^2-d^2 x^2\right )^{3/2} \left (A d^3-B c d^2+c^3 (-D)+c^2 C d\right )}{d}-\frac {1}{4} x \left (c^2-d^2 x^2\right )^{3/2} \left (-6 B d^2-7 c^2 D+6 c C d\right )\right )-\frac {1}{5} d \left (c^2-d^2 x^2\right )^{5/2} (6 C d-11 c D)}{6 d^5}-\frac {D (c+d x) \left (c^2-d^2 x^2\right )^{5/2}}{6 d^4}\)

Input:

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

Output:

-1/6*(D*(c + d*x)*(c^2 - d^2*x^2)^(5/2))/d^4 + (-1/5*(d*(6*C*d - 11*c*D)*( 
c^2 - d^2*x^2)^(5/2)) + d^2*((2*(c^2*C*d - B*c*d^2 + A*d^3 - c^3*D)*(c^2 - 
 d^2*x^2)^(3/2))/d - ((6*c*C*d - 6*B*d^2 - 7*c^2*D)*x*(c^2 - d^2*x^2)^(3/2 
))/4 + (3*c*(2*c^2*C*d - 2*B*c*d^2 + 8*A*d^3 - 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))/(6*d^5)
 

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 667
Int[(((f_.) + (g_.)*(x_))^(n_.)*((a_) + (c_.)*(x_)^2)^(p_))/((d_) + (e_.)*( 
x_)), x_Symbol] :> Int[(a/d + c*(x/e))*(f + g*x)^n*(a + c*x^2)^(p - 1), x] 
/; FreeQ[{a, c, d, e, f, g, n, p}, x] && EqQ[c*d^2 + a*e^2, 0] && GtQ[p, 0]
 

rule 676
Int[((d_.) + (e_.)*(x_))*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x 
_Symbol] :> Simp[(e*f + d*g)*((a + c*x^2)^(p + 1)/(2*c*(p + 1))), x] + (Sim 
p[e*g*x*((a + c*x^2)^(p + 1)/(c*(2*p + 3))), x] - Simp[(a*e*g - c*d*f*(2*p 
+ 3))/(c*(2*p + 3))   Int[(a + c*x^2)^p, x], x]) /; FreeQ[{a, c, d, e, f, g 
, p}, x] &&  !LeQ[p, -1]
 

rule 2170
Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] : 
> With[{q = Expon[Pq, x], f = Coeff[Pq, x, Expon[Pq, x]]}, Simp[f*(d + e*x) 
^(m + q - 1)*((a + b*x^2)^(p + 1)/(b*e^(q - 1)*(m + q + 2*p + 1))), x] + Si 
mp[1/(b*e^q*(m + q + 2*p + 1))   Int[(d + e*x)^m*(a + b*x^2)^p*ExpandToSum[ 
b*e^q*(m + q + 2*p + 1)*Pq - b*f*(m + q + 2*p + 1)*(d + e*x)^q - 2*e*f*(m + 
 p + q)*(d + e*x)^(q - 2)*(a*e - b*d*x), x], x], x] /; NeQ[m + q + 2*p + 1, 
 0]] /; FreeQ[{a, b, d, e, m, p}, x] && PolyQ[Pq, x] && EqQ[b*d^2 + a*e^2, 
0] &&  !IGtQ[m, 0]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(534\) vs. \(2(234)=468\).

Time = 0.41 (sec) , antiderivative size = 535, normalized size of antiderivative = 2.07

method result size
default \(\frac {B \,d^{2} \left (\frac {x \left (-d^{2} x^{2}+c^{2}\right )^{\frac {3}{2}}}{4}+\frac {3 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}\right )+D c^{2} \left (\frac {x \left (-d^{2} x^{2}+c^{2}\right )^{\frac {3}{2}}}{4}+\frac {3 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}\right )-\frac {\left (C d -D c \right ) \left (-d^{2} x^{2}+c^{2}\right )^{\frac {5}{2}}}{5 d}+D d^{2} \left (-\frac {x \left (-d^{2} x^{2}+c^{2}\right )^{\frac {5}{2}}}{6 d^{2}}+\frac {c^{2} \left (\frac {x \left (-d^{2} x^{2}+c^{2}\right )^{\frac {3}{2}}}{4}+\frac {3 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}\right )}{6 d^{2}}\right )-C c d \left (\frac {x \left (-d^{2} x^{2}+c^{2}\right )^{\frac {3}{2}}}{4}+\frac {3 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}\right )}{d^{3}}+\frac {\left (A \,d^{3}-B c \,d^{2}+C \,c^{2} d -D c^{3}\right ) \left (\frac {\left (-d^{2} \left (x +\frac {c}{d}\right )^{2}+2 c d \left (x +\frac {c}{d}\right )\right )^{\frac {3}{2}}}{3}+c d \left (-\frac {\left (-2 d^{2} \left (x +\frac {c}{d}\right )+2 c d \right ) \sqrt {-d^{2} \left (x +\frac {c}{d}\right )^{2}+2 c d \left (x +\frac {c}{d}\right )}}{4 d^{2}}+\frac {c^{2} \arctan \left (\frac {\sqrt {d^{2}}\, x}{\sqrt {-d^{2} \left (x +\frac {c}{d}\right )^{2}+2 c d \left (x +\frac {c}{d}\right )}}\right )}{2 \sqrt {d^{2}}}\right )\right )}{d^{4}}\) \(535\)

Input:

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

Output:

1/d^3*(B*d^2*(1/4*x*(-d^2*x^2+c^2)^(3/2)+3/4*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))))+D*c^2* 
(1/4*x*(-d^2*x^2+c^2)^(3/2)+3/4*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/5/d*(C*d-D*c)*(-d 
^2*x^2+c^2)^(5/2)+D*d^2*(-1/6*x*(-d^2*x^2+c^2)^(5/2)/d^2+1/6*c^2/d^2*(1/4* 
x*(-d^2*x^2+c^2)^(3/2)+3/4*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)))))-C*c*d*(1/4*x*(-d^2*x^2+ 
c^2)^(3/2)+3/4*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)))))+(A*d^3-B*c*d^2+C*c^2*d-D*c^3)/d^4*( 
1/3*(-d^2*(x+c/d)^2+2*c*d*(x+c/d))^(3/2)+c*d*(-1/4*(-2*d^2*(x+c/d)+2*c*d)/ 
d^2*(-d^2*(x+c/d)^2+2*c*d*(x+c/d))^(1/2)+1/2*c^2/(d^2)^(1/2)*arctan((d^2)^ 
(1/2)*x/(-d^2*(x+c/d)^2+2*c*d*(x+c/d))^(1/2))))
 

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 239, normalized size of antiderivative = 0.93 \[ \int \frac {\left (c^2-d^2 x^2\right )^{3/2} \left (A+B x+C x^2+D x^3\right )}{c+d x} \, dx=\frac {30 \, {\left (D c^{6} - 2 \, C c^{5} d + 2 \, B c^{4} d^{2} - 8 \, A c^{3} d^{3}\right )} \arctan \left (-\frac {c - \sqrt {-d^{2} x^{2} + c^{2}}}{d x}\right ) - {\left (40 \, D d^{5} x^{5} + 32 \, D c^{5} - 32 \, C c^{4} d + 80 \, B c^{3} d^{2} - 80 \, A c^{2} d^{3} - 48 \, {\left (D c d^{4} - C d^{5}\right )} x^{4} - 10 \, {\left (D c^{2} d^{3} + 6 \, C c d^{4} - 6 \, B d^{5}\right )} x^{3} + 16 \, {\left (D c^{3} d^{2} - C c^{2} d^{3} - 5 \, B c d^{4} + 5 \, A d^{5}\right )} x^{2} - 15 \, {\left (D c^{4} d - 2 \, C c^{3} d^{2} + 2 \, B c^{2} d^{3} + 8 \, A c d^{4}\right )} x\right )} \sqrt {-d^{2} x^{2} + c^{2}}}{240 \, d^{4}} \] Input:

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

Output:

1/240*(30*(D*c^6 - 2*C*c^5*d + 2*B*c^4*d^2 - 8*A*c^3*d^3)*arctan(-(c - sqr 
t(-d^2*x^2 + c^2))/(d*x)) - (40*D*d^5*x^5 + 32*D*c^5 - 32*C*c^4*d + 80*B*c 
^3*d^2 - 80*A*c^2*d^3 - 48*(D*c*d^4 - C*d^5)*x^4 - 10*(D*c^2*d^3 + 6*C*c*d 
^4 - 6*B*d^5)*x^3 + 16*(D*c^3*d^2 - C*c^2*d^3 - 5*B*c*d^4 + 5*A*d^5)*x^2 - 
 15*(D*c^4*d - 2*C*c^3*d^2 + 2*B*c^2*d^3 + 8*A*c*d^4)*x)*sqrt(-d^2*x^2 + c 
^2))/d^4
 

Sympy [A] (verification not implemented)

Time = 2.29 (sec) , antiderivative size = 651, normalized size of antiderivative = 2.52 \[ \int \frac {\left (c^2-d^2 x^2\right )^{3/2} \left (A+B x+C x^2+D x^3\right )}{c+d x} \, dx =\text {Too large to display} \] Input:

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

Output:

A*c*Piecewise((c**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), True))/2 
 + x*sqrt(c**2 - d**2*x**2)/2, Ne(d**2, 0)), (x*sqrt(c**2), True)) - A*d*P 
iecewise((sqrt(c**2 - d**2*x**2)*(-c**2/(3*d**2) + x**2/3), Ne(d**2, 0)), 
(x**2*sqrt(c**2)/2, True)) + B*c*Piecewise((sqrt(c**2 - d**2*x**2)*(-c**2/ 
(3*d**2) + x**2/3), Ne(d**2, 0)), (x**2*sqrt(c**2)/2, True)) - B*d*Piecewi 
se((c**4*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), True))/(8*d**2) + s 
qrt(c**2 - d**2*x**2)*(-c**2*x/(8*d**2) + x**3/4), Ne(d**2, 0)), (x**3*sqr 
t(c**2)/3, True)) + C*c*Piecewise((c**4*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), True))/(8*d**2) + sqrt(c**2 - d**2*x**2)*(-c**2*x/(8*d**2) + x 
**3/4), Ne(d**2, 0)), (x**3*sqrt(c**2)/3, True)) - C*d*Piecewise((sqrt(c** 
2 - d**2*x**2)*(-2*c**4/(15*d**4) - c**2*x**2/(15*d**2) + x**4/5), Ne(d**2 
, 0)), (x**4*sqrt(c**2)/4, True)) + D*c*Piecewise((sqrt(c**2 - d**2*x**2)* 
(-2*c**4/(15*d**4) - c**2*x**2/(15*d**2) + x**4/5), Ne(d**2, 0)), (x**4*sq 
rt(c**2)/4, True)) - D*d*Piecewise((c**6*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), True))/(16*d**4) + sqrt(c**2 - d**2*x**2)*(-c**4*x/(16*d**4) 
- c**2*x**3/(24*d**2) + x**5/6), Ne(d**2, 0)), (x**5*sqrt(c**2)/5, True...
 

Maxima [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.14 (sec) , antiderivative size = 638, normalized size of antiderivative = 2.47 \[ \int \frac {\left (c^2-d^2 x^2\right )^{3/2} \left (A+B x+C x^2+D x^3\right )}{c+d x} \, dx=\frac {i \, D c^{6} \arcsin \left (\frac {d x}{c} + 2\right )}{2 \, d^{4}} - \frac {i \, C c^{5} \arcsin \left (\frac {d x}{c} + 2\right )}{2 \, d^{3}} + \frac {i \, B c^{4} \arcsin \left (\frac {d x}{c} + 2\right )}{2 \, d^{2}} - \frac {i \, A c^{3} \arcsin \left (\frac {d x}{c} + 2\right )}{2 \, d} + \frac {7 \, D c^{6} \arcsin \left (\frac {d x}{c}\right )}{16 \, d^{4}} - \frac {3 \, C c^{5} \arcsin \left (\frac {d x}{c}\right )}{8 \, d^{3}} + \frac {3 \, B c^{4} \arcsin \left (\frac {d x}{c}\right )}{8 \, d^{2}} + \frac {1}{2} \, \sqrt {d^{2} x^{2} + 4 \, c d x + 3 \, c^{2}} A c x - \frac {\sqrt {d^{2} x^{2} + 4 \, c d x + 3 \, c^{2}} D c^{4} x}{2 \, d^{3}} + \frac {7 \, \sqrt {-d^{2} x^{2} + c^{2}} D c^{4} x}{16 \, d^{3}} + \frac {\sqrt {d^{2} x^{2} + 4 \, c d x + 3 \, c^{2}} C c^{3} x}{2 \, d^{2}} - \frac {3 \, \sqrt {-d^{2} x^{2} + c^{2}} C c^{3} x}{8 \, d^{2}} - \frac {\sqrt {d^{2} x^{2} + 4 \, c d x + 3 \, c^{2}} B c^{2} x}{2 \, d} + \frac {3 \, \sqrt {-d^{2} x^{2} + c^{2}} B c^{2} x}{8 \, d} - \frac {\sqrt {d^{2} x^{2} + 4 \, c d x + 3 \, c^{2}} D c^{5}}{d^{4}} + \frac {\sqrt {d^{2} x^{2} + 4 \, c d x + 3 \, c^{2}} C c^{4}}{d^{3}} - \frac {\sqrt {d^{2} x^{2} + 4 \, c d x + 3 \, c^{2}} B c^{3}}{d^{2}} + \frac {\sqrt {d^{2} x^{2} + 4 \, c d x + 3 \, c^{2}} A c^{2}}{d} + \frac {7 \, {\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {3}{2}} D c^{2} x}{24 \, d^{3}} - \frac {{\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {3}{2}} C c x}{4 \, d^{2}} + \frac {{\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {3}{2}} B x}{4 \, d} - \frac {{\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {3}{2}} D c^{3}}{3 \, d^{4}} + \frac {{\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {3}{2}} C c^{2}}{3 \, d^{3}} - \frac {{\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {3}{2}} B c}{3 \, d^{2}} + \frac {{\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {3}{2}} A}{3 \, d} - \frac {{\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {5}{2}} D x}{6 \, d^{3}} + \frac {{\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {5}{2}} D c}{5 \, d^{4}} - \frac {{\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {5}{2}} C}{5 \, d^{3}} \] Input:

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

Output:

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

Giac [A] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 250, normalized size of antiderivative = 0.97 \[ \int \frac {\left (c^2-d^2 x^2\right )^{3/2} \left (A+B x+C x^2+D x^3\right )}{c+d x} \, dx=-\frac {1}{240} \, \sqrt {-d^{2} x^{2} + c^{2}} {\left ({\left (2 \, {\left ({\left (4 \, {\left (5 \, D d x - \frac {6 \, {\left (D c d^{8} - C d^{9}\right )}}{d^{8}}\right )} x - \frac {5 \, {\left (D c^{2} d^{7} + 6 \, C c d^{8} - 6 \, B d^{9}\right )}}{d^{8}}\right )} x + \frac {8 \, {\left (D c^{3} d^{6} - C c^{2} d^{7} - 5 \, B c d^{8} + 5 \, A d^{9}\right )}}{d^{8}}\right )} x - \frac {15 \, {\left (D c^{4} d^{5} - 2 \, C c^{3} d^{6} + 2 \, B c^{2} d^{7} + 8 \, A c d^{8}\right )}}{d^{8}}\right )} x + \frac {16 \, {\left (2 \, D c^{5} d^{4} - 2 \, C c^{4} d^{5} + 5 \, B c^{3} d^{6} - 5 \, A c^{2} d^{7}\right )}}{d^{8}}\right )} - \frac {{\left (D c^{6} - 2 \, C c^{5} d + 2 \, B c^{4} d^{2} - 8 \, A c^{3} 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^2*x^2+c^2)^(3/2)*(D*x^3+C*x^2+B*x+A)/(d*x+c),x, algorithm="g 
iac")
 

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 282, normalized size of antiderivative = 1.09 \[ \int \frac {\left (c^2-d^2 x^2\right )^{3/2} \left (A+B x+C x^2+D x^3\right )}{c+d x} \, dx=\frac {24 \mathit {asin} \left (\frac {d x}{c}\right ) a \,c^{3} d^{2}-6 \mathit {asin} \left (\frac {d x}{c}\right ) b \,c^{4} d +3 \mathit {asin} \left (\frac {d x}{c}\right ) c^{6}+16 \sqrt {-d^{2} x^{2}+c^{2}}\, a \,c^{2} d^{2}+24 \sqrt {-d^{2} x^{2}+c^{2}}\, a c \,d^{3} x -16 \sqrt {-d^{2} x^{2}+c^{2}}\, a \,d^{4} x^{2}-16 \sqrt {-d^{2} x^{2}+c^{2}}\, b \,c^{3} d +6 \sqrt {-d^{2} x^{2}+c^{2}}\, b \,c^{2} d^{2} x +16 \sqrt {-d^{2} x^{2}+c^{2}}\, b c \,d^{3} x^{2}-12 \sqrt {-d^{2} x^{2}+c^{2}}\, b \,d^{4} x^{3}-3 \sqrt {-d^{2} x^{2}+c^{2}}\, c^{4} d x +14 \sqrt {-d^{2} x^{2}+c^{2}}\, c^{2} d^{3} x^{3}-8 \sqrt {-d^{2} x^{2}+c^{2}}\, d^{5} x^{5}-16 a \,c^{3} d^{2}+16 b \,c^{4} d}{48 d^{3}} \] Input:

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

Output:

(24*asin((d*x)/c)*a*c**3*d**2 - 6*asin((d*x)/c)*b*c**4*d + 3*asin((d*x)/c) 
*c**6 + 16*sqrt(c**2 - d**2*x**2)*a*c**2*d**2 + 24*sqrt(c**2 - d**2*x**2)* 
a*c*d**3*x - 16*sqrt(c**2 - d**2*x**2)*a*d**4*x**2 - 16*sqrt(c**2 - d**2*x 
**2)*b*c**3*d + 6*sqrt(c**2 - d**2*x**2)*b*c**2*d**2*x + 16*sqrt(c**2 - d* 
*2*x**2)*b*c*d**3*x**2 - 12*sqrt(c**2 - d**2*x**2)*b*d**4*x**3 - 3*sqrt(c* 
*2 - d**2*x**2)*c**4*d*x + 14*sqrt(c**2 - d**2*x**2)*c**2*d**3*x**3 - 8*sq 
rt(c**2 - d**2*x**2)*d**5*x**5 - 16*a*c**3*d**2 + 16*b*c**4*d)/(48*d**3)