### 3.5 $$\int \frac{(A+B x+C x^2) \sqrt{d^2-e^2 x^2}}{(d+e x)^2} \, dx$$

Optimal. Leaf size=170 $-\frac{\left (d^2-e^2 x^2\right )^{3/2} \left (A e^2-B d e+C d^2\right )}{d e^3 (d+e x)^2}-\frac{\sqrt{d^2-e^2 x^2} \left (5 C d^2-2 e (2 B d-A e)\right )}{2 d e^3}-\frac{\tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right ) \left (5 C d^2-2 e (2 B d-A e)\right )}{2 e^3}-\frac{C \left (d^2-e^2 x^2\right )^{3/2}}{2 e^3 (d+e x)}$

[Out]

-((5*C*d^2 - 2*e*(2*B*d - A*e))*Sqrt[d^2 - e^2*x^2])/(2*d*e^3) - ((C*d^2 - B*d*e + A*e^2)*(d^2 - e^2*x^2)^(3/2
))/(d*e^3*(d + e*x)^2) - (C*(d^2 - e^2*x^2)^(3/2))/(2*e^3*(d + e*x)) - ((5*C*d^2 - 2*e*(2*B*d - A*e))*ArcTan[(
e*x)/Sqrt[d^2 - e^2*x^2]])/(2*e^3)

________________________________________________________________________________________

Rubi [A]  time = 0.202595, antiderivative size = 170, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 34, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.147, Rules used = {1639, 793, 665, 217, 203} $-\frac{\left (d^2-e^2 x^2\right )^{3/2} \left (A e^2-B d e+C d^2\right )}{d e^3 (d+e x)^2}-\frac{\sqrt{d^2-e^2 x^2} \left (5 C d^2-2 e (2 B d-A e)\right )}{2 d e^3}-\frac{\tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right ) \left (5 C d^2-2 e (2 B d-A e)\right )}{2 e^3}-\frac{C \left (d^2-e^2 x^2\right )^{3/2}}{2 e^3 (d+e x)}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-((5*C*d^2 - 2*e*(2*B*d - A*e))*Sqrt[d^2 - e^2*x^2])/(2*d*e^3) - ((C*d^2 - B*d*e + A*e^2)*(d^2 - e^2*x^2)^(3/2
))/(d*e^3*(d + e*x)^2) - (C*(d^2 - e^2*x^2)^(3/2))/(2*e^3*(d + e*x)) - ((5*C*d^2 - 2*e*(2*B*d - A*e))*ArcTan[(
e*x)/Sqrt[d^2 - e^2*x^2]])/(2*e^3)

Rule 1639

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(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 + c*x^2)^(p + 1))/(c*e^(q - 1)*(m + q + 2*p + 1)), x]
+ Dist[1/(c*e^q*(m + q + 2*p + 1)), Int[(d + e*x)^m*(a + c*x^2)^p*ExpandToSum[c*e^q*(m + q + 2*p + 1)*Pq - c*
f*(m + q + 2*p + 1)*(d + e*x)^q - 2*e*f*(m + p + q)*(d + e*x)^(q - 2)*(a*e - c*d*x), x], x], x] /; NeQ[m + q +
2*p + 1, 0]] /; FreeQ[{a, c, d, e, m, p}, x] && PolyQ[Pq, x] && EqQ[c*d^2 + a*e^2, 0] &&  !IGtQ[m, 0]

Rule 793

Int[((d_) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((d*g - e*f)*(
d + e*x)^m*(a + c*x^2)^(p + 1))/(2*c*d*(m + p + 1)), x] + Dist[(m*(g*c*d + c*e*f) + 2*e*c*f*(p + 1))/(e*(2*c*d
)*(m + p + 1)), Int[(d + e*x)^(m + 1)*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, m, p}, x] && EqQ[c*d^2
+ a*e^2, 0] && ((LtQ[m, -1] &&  !IGtQ[m + p + 1, 0]) || (LtQ[m, 0] && LtQ[p, -1]) || EqQ[m + 2*p + 2, 0]) &&
NeQ[m + p + 1, 0]

Rule 665

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((d + e*x)^(m + 1)*(a + c*x^2)^p)/(
e*(m + 2*p + 1)), x] - Dist[(2*c*d*p)/(e^2*(m + 2*p + 1)), Int[(d + e*x)^(m + 1)*(a + c*x^2)^(p - 1), x], x] /
; FreeQ[{a, c, d, e}, x] && EqQ[c*d^2 + a*e^2, 0] && GtQ[p, 0] && (LeQ[-2, m, 0] || EqQ[m + p + 1, 0]) && NeQ[
m + 2*p + 1, 0] && IntegerQ[2*p]

Rule 217

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 203

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

Rubi steps

\begin{align*} \int \frac{\left (A+B x+C x^2\right ) \sqrt{d^2-e^2 x^2}}{(d+e x)^2} \, dx &=-\frac{C \left (d^2-e^2 x^2\right )^{3/2}}{2 e^3 (d+e x)}-\frac{\int \frac{\left (e^2 \left (C d^2-2 A e^2\right )+e^3 (3 C d-2 B e) x\right ) \sqrt{d^2-e^2 x^2}}{(d+e x)^2} \, dx}{2 e^4}\\ &=-\frac{\left (C d^2-B d e+A e^2\right ) \left (d^2-e^2 x^2\right )^{3/2}}{d e^3 (d+e x)^2}-\frac{C \left (d^2-e^2 x^2\right )^{3/2}}{2 e^3 (d+e x)}-\frac{\left (-3 e^5 \left (C d^2-2 A e^2\right )-2 \left (-d e^5 (3 C d-2 B e)-e^5 \left (C d^2-2 A e^2\right )\right )\right ) \int \frac{\sqrt{d^2-e^2 x^2}}{d+e x} \, dx}{2 d e^7}\\ &=-\frac{\left (5 C d^2-2 e (2 B d-A e)\right ) \sqrt{d^2-e^2 x^2}}{2 d e^3}-\frac{\left (C d^2-B d e+A e^2\right ) \left (d^2-e^2 x^2\right )^{3/2}}{d e^3 (d+e x)^2}-\frac{C \left (d^2-e^2 x^2\right )^{3/2}}{2 e^3 (d+e x)}-\frac{\left (-3 e^5 \left (C d^2-2 A e^2\right )-2 \left (-d e^5 (3 C d-2 B e)-e^5 \left (C d^2-2 A e^2\right )\right )\right ) \int \frac{1}{\sqrt{d^2-e^2 x^2}} \, dx}{2 e^7}\\ &=-\frac{\left (5 C d^2-2 e (2 B d-A e)\right ) \sqrt{d^2-e^2 x^2}}{2 d e^3}-\frac{\left (C d^2-B d e+A e^2\right ) \left (d^2-e^2 x^2\right )^{3/2}}{d e^3 (d+e x)^2}-\frac{C \left (d^2-e^2 x^2\right )^{3/2}}{2 e^3 (d+e x)}-\frac{\left (-3 e^5 \left (C d^2-2 A e^2\right )-2 \left (-d e^5 (3 C d-2 B e)-e^5 \left (C d^2-2 A e^2\right )\right )\right ) \operatorname{Subst}\left (\int \frac{1}{1+e^2 x^2} \, dx,x,\frac{x}{\sqrt{d^2-e^2 x^2}}\right )}{2 e^7}\\ &=-\frac{\left (5 C d^2-2 e (2 B d-A e)\right ) \sqrt{d^2-e^2 x^2}}{2 d e^3}-\frac{\left (C d^2-B d e+A e^2\right ) \left (d^2-e^2 x^2\right )^{3/2}}{d e^3 (d+e x)^2}-\frac{C \left (d^2-e^2 x^2\right )^{3/2}}{2 e^3 (d+e x)}-\frac{\left (5 C d^2-2 e (2 B d-A e)\right ) \tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right )}{2 e^3}\\ \end{align*}

Mathematica [A]  time = 0.242847, size = 109, normalized size = 0.64 $\frac{\frac{\sqrt{d^2-e^2 x^2} \left (2 e (-2 A e+3 B d+B e x)+C \left (-8 d^2-3 d e x+e^2 x^2\right )\right )}{d+e x}-\tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right ) \left (2 e (A e-2 B d)+5 C d^2\right )}{2 e^3}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

((Sqrt[d^2 - e^2*x^2]*(2*e*(3*B*d - 2*A*e + B*e*x) + C*(-8*d^2 - 3*d*e*x + e^2*x^2)))/(d + e*x) - (5*C*d^2 + 2
*e*(-2*B*d + A*e))*ArcTan[(e*x)/Sqrt[d^2 - e^2*x^2]])/(2*e^3)

________________________________________________________________________________________

Maple [B]  time = 0.06, size = 439, normalized size = 2.6 \begin{align*}{\frac{Cx}{2\,{e}^{2}}\sqrt{-{x}^{2}{e}^{2}+{d}^{2}}}+{\frac{C{d}^{2}}{2\,{e}^{2}}\arctan \left ({x\sqrt{{e}^{2}}{\frac{1}{\sqrt{-{x}^{2}{e}^{2}+{d}^{2}}}}} \right ){\frac{1}{\sqrt{{e}^{2}}}}}+2\,{\frac{B}{{e}^{2}}\sqrt{- \left ({\frac{d}{e}}+x \right ) ^{2}{e}^{2}+2\,de \left ({\frac{d}{e}}+x \right ) }}-3\,{\frac{dC}{{e}^{3}}\sqrt{- \left ({\frac{d}{e}}+x \right ) ^{2}{e}^{2}+2\,de \left ({\frac{d}{e}}+x \right ) }}+2\,{\frac{Bd}{e\sqrt{{e}^{2}}}\arctan \left ({\sqrt{{e}^{2}}x{\frac{1}{\sqrt{- \left ({\frac{d}{e}}+x \right ) ^{2}{e}^{2}+2\,de \left ({\frac{d}{e}}+x \right ) }}}} \right ) }-3\,{\frac{C{d}^{2}}{{e}^{2}\sqrt{{e}^{2}}}\arctan \left ({\sqrt{{e}^{2}}x{\frac{1}{\sqrt{- \left ({\frac{d}{e}}+x \right ) ^{2}{e}^{2}+2\,de \left ({\frac{d}{e}}+x \right ) }}}} \right ) }-{\frac{A}{d{e}^{3}} \left ( - \left ({\frac{d}{e}}+x \right ) ^{2}{e}^{2}+2\,de \left ({\frac{d}{e}}+x \right ) \right ) ^{{\frac{3}{2}}} \left ({\frac{d}{e}}+x \right ) ^{-2}}+{\frac{B}{{e}^{4}} \left ( - \left ({\frac{d}{e}}+x \right ) ^{2}{e}^{2}+2\,de \left ({\frac{d}{e}}+x \right ) \right ) ^{{\frac{3}{2}}} \left ({\frac{d}{e}}+x \right ) ^{-2}}-{\frac{dC}{{e}^{5}} \left ( - \left ({\frac{d}{e}}+x \right ) ^{2}{e}^{2}+2\,de \left ({\frac{d}{e}}+x \right ) \right ) ^{{\frac{3}{2}}} \left ({\frac{d}{e}}+x \right ) ^{-2}}-{\frac{A}{de}\sqrt{- \left ({\frac{d}{e}}+x \right ) ^{2}{e}^{2}+2\,de \left ({\frac{d}{e}}+x \right ) }}-{A\arctan \left ({x\sqrt{{e}^{2}}{\frac{1}{\sqrt{- \left ({\frac{d}{e}}+x \right ) ^{2}{e}^{2}+2\,de \left ({\frac{d}{e}}+x \right ) }}}} \right ){\frac{1}{\sqrt{{e}^{2}}}}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.88055, size = 409, normalized size = 2.41 \begin{align*} -\frac{8 \, C d^{3} - 6 \, B d^{2} e + 4 \, A d e^{2} + 2 \,{\left (4 \, C d^{2} e - 3 \, B d e^{2} + 2 \, A e^{3}\right )} x - 2 \,{\left (5 \, C d^{3} - 4 \, B d^{2} e + 2 \, A d e^{2} +{\left (5 \, C d^{2} e - 4 \, B d e^{2} + 2 \, A e^{3}\right )} x\right )} \arctan \left (-\frac{d - \sqrt{-e^{2} x^{2} + d^{2}}}{e x}\right ) -{\left (C e^{2} x^{2} - 8 \, C d^{2} + 6 \, B d e - 4 \, A e^{2} -{\left (3 \, C d e - 2 \, B e^{2}\right )} x\right )} \sqrt{-e^{2} x^{2} + d^{2}}}{2 \,{\left (e^{4} x + d e^{3}\right )}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*(8*C*d^3 - 6*B*d^2*e + 4*A*d*e^2 + 2*(4*C*d^2*e - 3*B*d*e^2 + 2*A*e^3)*x - 2*(5*C*d^3 - 4*B*d^2*e + 2*A*d
*e^2 + (5*C*d^2*e - 4*B*d*e^2 + 2*A*e^3)*x)*arctan(-(d - sqrt(-e^2*x^2 + d^2))/(e*x)) - (C*e^2*x^2 - 8*C*d^2 +
6*B*d*e - 4*A*e^2 - (3*C*d*e - 2*B*e^2)*x)*sqrt(-e^2*x^2 + d^2))/(e^4*x + d*e^3)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{- \left (- d + e x\right ) \left (d + e x\right )} \left (A + B x + C x^{2}\right )}{\left (d + e x\right )^{2}}\, dx \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((C*x**2+B*x+A)*(-e**2*x**2+d**2)**(1/2)/(e*x+d)**2,x)

[Out]

Integral(sqrt(-(-d + e*x)*(d + e*x))*(A + B*x + C*x**2)/(d + e*x)**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \mathit{sage}_{0} x \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

sage0*x