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

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

Optimal result

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

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

Mathematica [A] (verified)

Time = 1.02 (sec) , antiderivative size = 134, normalized size of antiderivative = 0.77 \[ \int \frac {A+B x+C x^2+D x^3}{(c+d x)^2 \sqrt {c^2-d^2 x^2}} \, dx=-\frac {\frac {\sqrt {c^2-d^2 x^2} \left (10 c^4 D+A d^4 x+2 c d^3 (A+B x)+c^3 (-4 C d+14 d D x)+c^2 d^2 (B+x (-5 C+3 D x))\right )}{c^2 (c+d x)^2}+6 (C d-2 c D) \arctan \left (\frac {d x}{\sqrt {c^2}-\sqrt {c^2-d^2 x^2}}\right )}{3 d^4} \] Input:

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

Output:

-1/3*((Sqrt[c^2 - d^2*x^2]*(10*c^4*D + A*d^4*x + 2*c*d^3*(A + B*x) + c^3*( 
-4*C*d + 14*d*D*x) + c^2*d^2*(B + x*(-5*C + 3*D*x))))/(c^2*(c + d*x)^2) + 
6*(C*d - 2*c*D)*ArcTan[(d*x)/(Sqrt[c^2] - Sqrt[c^2 - d^2*x^2])])/d^4
 

Rubi [A] (verified)

Time = 0.98 (sec) , antiderivative size = 216, normalized size of antiderivative = 1.25, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2170, 25, 2168, 2009}

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 {A+B x+C x^2+D x^3}{(c+d x)^2 \sqrt {c^2-d^2 x^2}} \, dx\)

\(\Big \downarrow \) 2170

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 2168

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-\frac {d \sqrt {c^2-d^2 x^2} \left (A d^3-B c d^2+c^3 (-D)+c^2 C d\right )}{3 c^2 (c+d x)}-\frac {d \sqrt {c^2-d^2 x^2} \left (A d^3-B c d^2+c^3 (-D)+c^2 C d\right )}{3 c (c+d x)^2}+d \arctan \left (\frac {d x}{\sqrt {c^2-d^2 x^2}}\right ) (C d-2 c D)+\frac {d \sqrt {c^2-d^2 x^2} \left (-B d^2-3 c^2 D+2 c C d\right )}{c (c+d x)}}{d^5}-\frac {D \sqrt {c^2-d^2 x^2}}{d^4}\)

Input:

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

Output:

-((D*Sqrt[c^2 - d^2*x^2])/d^4) + (-1/3*(d*(c^2*C*d - B*c*d^2 + A*d^3 - c^3 
*D)*Sqrt[c^2 - d^2*x^2])/(c*(c + d*x)^2) + (d*(2*c*C*d - B*d^2 - 3*c^2*D)* 
Sqrt[c^2 - d^2*x^2])/(c*(c + d*x)) - (d*(c^2*C*d - B*c*d^2 + A*d^3 - c^3*D 
)*Sqrt[c^2 - d^2*x^2])/(3*c^2*(c + d*x)) + d*(C*d - 2*c*D)*ArcTan[(d*x)/Sq 
rt[c^2 - d^2*x^2]])/d^5
 

Defintions of rubi rules used

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

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2168
Int[(Pq_)*((d_) + (e_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> 
 Int[ExpandIntegrand[(a + b*x^2)^p, (d + e*x)^m*Pq, x], x] /; FreeQ[{a, b, 
d, e}, x] && PolyQ[Pq, x] && EqQ[b*d^2 + a*e^2, 0] && EqQ[m + Expon[Pq, x] 
+ 2*p + 1, 0] && ILtQ[m, 0]
 

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 [A] (verified)

Time = 0.45 (sec) , antiderivative size = 267, normalized size of antiderivative = 1.54

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

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 305, normalized size of antiderivative = 1.76 \[ \int \frac {A+B x+C x^2+D x^3}{(c+d x)^2 \sqrt {c^2-d^2 x^2}} \, dx=-\frac {10 \, D c^{5} - 4 \, C c^{4} d + B c^{3} d^{2} + 2 \, A c^{2} d^{3} + {\left (10 \, D c^{3} d^{2} - 4 \, C c^{2} d^{3} + B c d^{4} + 2 \, A d^{5}\right )} x^{2} + 2 \, {\left (10 \, D c^{4} d - 4 \, C c^{3} d^{2} + B c^{2} d^{3} + 2 \, A c d^{4}\right )} x - 6 \, {\left (2 \, D c^{5} - C c^{4} d + {\left (2 \, D c^{3} d^{2} - C c^{2} d^{3}\right )} x^{2} + 2 \, {\left (2 \, D c^{4} d - C c^{3} d^{2}\right )} x\right )} \arctan \left (-\frac {c - \sqrt {-d^{2} x^{2} + c^{2}}}{d x}\right ) + {\left (3 \, D c^{2} d^{2} x^{2} + 10 \, D c^{4} - 4 \, C c^{3} d + B c^{2} d^{2} + 2 \, A c d^{3} + {\left (14 \, D c^{3} d - 5 \, C c^{2} d^{2} + 2 \, B c d^{3} + A d^{4}\right )} x\right )} \sqrt {-d^{2} x^{2} + c^{2}}}{3 \, {\left (c^{2} d^{6} x^{2} + 2 \, c^{3} d^{5} x + c^{4} d^{4}\right )}} \] Input:

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 467 vs. \(2 (162) = 324\).

Time = 0.13 (sec) , antiderivative size = 467, normalized size of antiderivative = 2.70 \[ \int \frac {A+B x+C x^2+D x^3}{(c+d x)^2 \sqrt {c^2-d^2 x^2}} \, dx=\frac {\sqrt {-d^{2} x^{2} + c^{2}} D c^{3}}{3 \, {\left (c d^{6} x^{2} + 2 \, c^{2} d^{5} x + c^{3} d^{4}\right )}} + \frac {\sqrt {-d^{2} x^{2} + c^{2}} D c^{3}}{3 \, {\left (c^{2} d^{5} x + c^{3} d^{4}\right )}} - \frac {\sqrt {-d^{2} x^{2} + c^{2}} C c^{2}}{3 \, {\left (c d^{5} x^{2} + 2 \, c^{2} d^{4} x + c^{3} d^{3}\right )}} - \frac {\sqrt {-d^{2} x^{2} + c^{2}} C c^{2}}{3 \, {\left (c^{2} d^{4} x + c^{3} d^{3}\right )}} + \frac {\sqrt {-d^{2} x^{2} + c^{2}} B c}{3 \, {\left (c d^{4} x^{2} + 2 \, c^{2} d^{3} x + c^{3} d^{2}\right )}} + \frac {\sqrt {-d^{2} x^{2} + c^{2}} B c}{3 \, {\left (c^{2} d^{3} x + c^{3} d^{2}\right )}} - \frac {3 \, \sqrt {-d^{2} x^{2} + c^{2}} D c}{d^{5} x + c d^{4}} - \frac {\sqrt {-d^{2} x^{2} + c^{2}} A}{3 \, {\left (c d^{3} x^{2} + 2 \, c^{2} d^{2} x + c^{3} d\right )}} - \frac {\sqrt {-d^{2} x^{2} + c^{2}} A}{3 \, {\left (c^{2} d^{2} x + c^{3} d\right )}} - \frac {\sqrt {-d^{2} x^{2} + c^{2}} B}{c d^{3} x + c^{2} d^{2}} + \frac {2 \, \sqrt {-d^{2} x^{2} + c^{2}} C}{d^{4} x + c d^{3}} - \frac {2 \, D c \arcsin \left (\frac {d x}{c}\right )}{d^{4}} + \frac {C \arcsin \left (\frac {d x}{c}\right )}{d^{3}} - \frac {\sqrt {-d^{2} x^{2} + c^{2}} D}{d^{4}} \] Input:

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

Output:

1/3*sqrt(-d^2*x^2 + c^2)*D*c^3/(c*d^6*x^2 + 2*c^2*d^5*x + c^3*d^4) + 1/3*s 
qrt(-d^2*x^2 + c^2)*D*c^3/(c^2*d^5*x + c^3*d^4) - 1/3*sqrt(-d^2*x^2 + c^2) 
*C*c^2/(c*d^5*x^2 + 2*c^2*d^4*x + c^3*d^3) - 1/3*sqrt(-d^2*x^2 + c^2)*C*c^ 
2/(c^2*d^4*x + c^3*d^3) + 1/3*sqrt(-d^2*x^2 + c^2)*B*c/(c*d^4*x^2 + 2*c^2* 
d^3*x + c^3*d^2) + 1/3*sqrt(-d^2*x^2 + c^2)*B*c/(c^2*d^3*x + c^3*d^2) - 3* 
sqrt(-d^2*x^2 + c^2)*D*c/(d^5*x + c*d^4) - 1/3*sqrt(-d^2*x^2 + c^2)*A/(c*d 
^3*x^2 + 2*c^2*d^2*x + c^3*d) - 1/3*sqrt(-d^2*x^2 + c^2)*A/(c^2*d^2*x + c^ 
3*d) - sqrt(-d^2*x^2 + c^2)*B/(c*d^3*x + c^2*d^2) + 2*sqrt(-d^2*x^2 + c^2) 
*C/(d^4*x + c*d^3) - 2*D*c*arcsin(d*x/c)/d^4 + C*arcsin(d*x/c)/d^3 - sqrt( 
-d^2*x^2 + c^2)*D/d^4
 

Giac [A] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 275, normalized size of antiderivative = 1.59 \[ \int \frac {A+B x+C x^2+D x^3}{(c+d x)^2 \sqrt {c^2-d^2 x^2}} \, dx=-\frac {6 \, {\left (d x + c\right )} D c d^{2} \sqrt {\frac {2 \, c}{d x + c} - 1} - 12 \, {\left (2 \, D c^{2} d^{2} - C c d^{3}\right )} \arctan \left (\sqrt {\frac {2 \, c}{d x + c} - 1}\right ) - \frac {D c^{5} d^{2} {\left (\frac {2 \, c}{d x + c} - 1\right )}^{\frac {3}{2}} - C c^{4} d^{3} {\left (\frac {2 \, c}{d x + c} - 1\right )}^{\frac {3}{2}} + B c^{3} d^{4} {\left (\frac {2 \, c}{d x + c} - 1\right )}^{\frac {3}{2}} - A c^{2} d^{5} {\left (\frac {2 \, c}{d x + c} - 1\right )}^{\frac {3}{2}} - 15 \, D c^{5} d^{2} \sqrt {\frac {2 \, c}{d x + c} - 1} + 9 \, C c^{4} d^{3} \sqrt {\frac {2 \, c}{d x + c} - 1} - 3 \, B c^{3} d^{4} \sqrt {\frac {2 \, c}{d x + c} - 1} - 3 \, A c^{2} d^{5} \sqrt {\frac {2 \, c}{d x + c} - 1}}{c^{3}}}{6 \, c d^{5} {\left | d \right |} \mathrm {sgn}\left (\frac {1}{d x + c}\right ) \mathrm {sgn}\left (d\right )} \] Input:

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

Output:

-1/6*(6*(d*x + c)*D*c*d^2*sqrt(2*c/(d*x + c) - 1) - 12*(2*D*c^2*d^2 - C*c* 
d^3)*arctan(sqrt(2*c/(d*x + c) - 1)) - (D*c^5*d^2*(2*c/(d*x + c) - 1)^(3/2 
) - C*c^4*d^3*(2*c/(d*x + c) - 1)^(3/2) + B*c^3*d^4*(2*c/(d*x + c) - 1)^(3 
/2) - A*c^2*d^5*(2*c/(d*x + c) - 1)^(3/2) - 15*D*c^5*d^2*sqrt(2*c/(d*x + c 
) - 1) + 9*C*c^4*d^3*sqrt(2*c/(d*x + c) - 1) - 3*B*c^3*d^4*sqrt(2*c/(d*x + 
 c) - 1) - 3*A*c^2*d^5*sqrt(2*c/(d*x + c) - 1))/c^3)/(c*d^5*abs(d)*sgn(1/( 
d*x + c))*sgn(d))
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 355, normalized size of antiderivative = 2.05 \[ \int \frac {A+B x+C x^2+D x^3}{(c+d x)^2 \sqrt {c^2-d^2 x^2}} \, dx=\frac {-3 \sqrt {-d^{2} x^{2}+c^{2}}\, \mathit {asin} \left (\frac {d x}{c}\right ) c^{4}-3 \sqrt {-d^{2} x^{2}+c^{2}}\, \mathit {asin} \left (\frac {d x}{c}\right ) c^{3} d x +3 \mathit {asin} \left (\frac {d x}{c}\right ) c^{5}+6 \mathit {asin} \left (\frac {d x}{c}\right ) c^{4} d x +3 \mathit {asin} \left (\frac {d x}{c}\right ) c^{3} d^{2} x^{2}+2 \sqrt {-d^{2} x^{2}+c^{2}}\, a c \,d^{2}+\sqrt {-d^{2} x^{2}+c^{2}}\, a \,d^{3} x +\sqrt {-d^{2} x^{2}+c^{2}}\, b c \,d^{2} x +2 \sqrt {-d^{2} x^{2}+c^{2}}\, c^{4}+5 \sqrt {-d^{2} x^{2}+c^{2}}\, c^{3} d x +3 \sqrt {-d^{2} x^{2}+c^{2}}\, c^{2} d^{2} x^{2}-2 a \,c^{2} d^{2}+a c \,d^{3} x +a \,d^{4} x^{2}+b \,c^{2} d^{2} x +3 b c \,d^{3} x^{2}-2 c^{5}+5 c^{4} d x +10 c^{3} d^{2} x^{2}+3 c^{2} d^{3} x^{3}}{3 c^{2} d^{3} \left (\sqrt {-d^{2} x^{2}+c^{2}}\, c +\sqrt {-d^{2} x^{2}+c^{2}}\, d x -c^{2}-2 c d x -d^{2} x^{2}\right )} \] Input:

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

Output:

( - 3*sqrt(c**2 - d**2*x**2)*asin((d*x)/c)*c**4 - 3*sqrt(c**2 - d**2*x**2) 
*asin((d*x)/c)*c**3*d*x + 3*asin((d*x)/c)*c**5 + 6*asin((d*x)/c)*c**4*d*x 
+ 3*asin((d*x)/c)*c**3*d**2*x**2 + 2*sqrt(c**2 - d**2*x**2)*a*c*d**2 + sqr 
t(c**2 - d**2*x**2)*a*d**3*x + sqrt(c**2 - d**2*x**2)*b*c*d**2*x + 2*sqrt( 
c**2 - d**2*x**2)*c**4 + 5*sqrt(c**2 - d**2*x**2)*c**3*d*x + 3*sqrt(c**2 - 
 d**2*x**2)*c**2*d**2*x**2 - 2*a*c**2*d**2 + a*c*d**3*x + a*d**4*x**2 + b* 
c**2*d**2*x + 3*b*c*d**3*x**2 - 2*c**5 + 5*c**4*d*x + 10*c**3*d**2*x**2 + 
3*c**2*d**3*x**3)/(3*c**2*d**3*(sqrt(c**2 - d**2*x**2)*c + sqrt(c**2 - d** 
2*x**2)*d*x - c**2 - 2*c*d*x - d**2*x**2))