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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.1763, antiderivative size = 148, 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, 795, 665, 217, 203} $\frac{\sqrt{d^2-e^2 x^2} \left (C d^2-e (B d-2 A e)\right )}{2 e^3}+\frac{d \tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right ) \left (C d^2-e (B d-2 A e)\right )}{2 e^3}+\frac{\left (d^2-e^2 x^2\right )^{3/2} (C d-B e)}{2 e^3 (d+e x)}-\frac{C \left (d^2-e^2 x^2\right )^{3/2}}{3 e^3}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

((C*d^2 - e*(B*d - 2*A*e))*Sqrt[d^2 - e^2*x^2])/(2*e^3) - (C*(d^2 - e^2*x^2)^(3/2))/(3*e^3) + ((C*d - B*e)*(d^
2 - e^2*x^2)^(3/2))/(2*e^3*(d + e*x)) + (d*(C*d^2 - e*(B*d - 2*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 795

Int[((d_) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(g*(d + e*x)^m
*(a + c*x^2)^(p + 1))/(c*(m + 2*p + 2)), x] + Dist[(m*(d*g + e*f) + 2*e*f*(p + 1))/(e*(m + 2*p + 2)), Int[(d +
e*x)^m*(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] && NeQ[m + 2*p +
2, 0] && NeQ[m, 2]

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} \, dx &=-\frac{C \left (d^2-e^2 x^2\right )^{3/2}}{3 e^3}-\frac{\int \frac{\left (-3 A e^4+3 e^3 (C d-B e) x\right ) \sqrt{d^2-e^2 x^2}}{d+e x} \, dx}{3 e^4}\\ &=-\frac{C \left (d^2-e^2 x^2\right )^{3/2}}{3 e^3}+\frac{(C d-B e) \left (d^2-e^2 x^2\right )^{3/2}}{2 e^3 (d+e x)}+\frac{\left (C d^2-e (B d-2 A e)\right ) \int \frac{\sqrt{d^2-e^2 x^2}}{d+e x} \, dx}{2 e^2}\\ &=\frac{\left (C d^2-e (B d-2 A e)\right ) \sqrt{d^2-e^2 x^2}}{2 e^3}-\frac{C \left (d^2-e^2 x^2\right )^{3/2}}{3 e^3}+\frac{(C d-B e) \left (d^2-e^2 x^2\right )^{3/2}}{2 e^3 (d+e x)}+\frac{\left (d \left (C d^2-e (B d-2 A e)\right )\right ) \int \frac{1}{\sqrt{d^2-e^2 x^2}} \, dx}{2 e^2}\\ &=\frac{\left (C d^2-e (B d-2 A e)\right ) \sqrt{d^2-e^2 x^2}}{2 e^3}-\frac{C \left (d^2-e^2 x^2\right )^{3/2}}{3 e^3}+\frac{(C d-B e) \left (d^2-e^2 x^2\right )^{3/2}}{2 e^3 (d+e x)}+\frac{\left (d \left (C d^2-e (B d-2 A e)\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^2}\\ &=\frac{\left (C d^2-e (B d-2 A e)\right ) \sqrt{d^2-e^2 x^2}}{2 e^3}-\frac{C \left (d^2-e^2 x^2\right )^{3/2}}{3 e^3}+\frac{(C d-B e) \left (d^2-e^2 x^2\right )^{3/2}}{2 e^3 (d+e x)}+\frac{d \left (C d^2-e (B d-2 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.226047, size = 103, normalized size = 0.7 $\frac{\sqrt{d^2-e^2 x^2} \left (3 e (2 A e-2 B d+B e x)+C \left (4 d^2-3 d e x+2 e^2 x^2\right )\right )+3 d \tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right ) \left (e (2 A e-B d)+C d^2\right )}{6 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),x]

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.058, size = 384, normalized size = 2.6 \begin{align*} -{\frac{C}{3\,{e}^{3}} \left ( -{x}^{2}{e}^{2}+{d}^{2} \right ) ^{{\frac{3}{2}}}}+{\frac{Bx}{2\,e}\sqrt{-{x}^{2}{e}^{2}+{d}^{2}}}+{\frac{B{d}^{2}}{2\,e}\arctan \left ({x\sqrt{{e}^{2}}{\frac{1}{\sqrt{-{x}^{2}{e}^{2}+{d}^{2}}}}} \right ){\frac{1}{\sqrt{{e}^{2}}}}}-{\frac{Cdx}{2\,{e}^{2}}\sqrt{-{x}^{2}{e}^{2}+{d}^{2}}}-{\frac{C{d}^{3}}{2\,{e}^{2}}\arctan \left ({x\sqrt{{e}^{2}}{\frac{1}{\sqrt{-{x}^{2}{e}^{2}+{d}^{2}}}}} \right ){\frac{1}{\sqrt{{e}^{2}}}}}+{\frac{A}{e}\sqrt{- \left ({\frac{d}{e}}+x \right ) ^{2}{e}^{2}+2\,de \left ({\frac{d}{e}}+x \right ) }}-{\frac{Bd}{{e}^{2}}\sqrt{- \left ({\frac{d}{e}}+x \right ) ^{2}{e}^{2}+2\,de \left ({\frac{d}{e}}+x \right ) }}+{\frac{C{d}^{2}}{{e}^{3}}\sqrt{- \left ({\frac{d}{e}}+x \right ) ^{2}{e}^{2}+2\,de \left ({\frac{d}{e}}+x \right ) }}+{Ad\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}}}}}-{\frac{B{d}^{2}}{e}\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}}}}}+{\frac{C{d}^{3}}{{e}^{2}}\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),x)

[Out]

-1/3*C*(-e^2*x^2+d^2)^(3/2)/e^3+1/2/e*B*x*(-e^2*x^2+d^2)^(1/2)+1/2/e*B*d^2/(e^2)^(1/2)*arctan((e^2)^(1/2)*x/(-
e^2*x^2+d^2)^(1/2))-1/2/e^2*C*d*x*(-e^2*x^2+d^2)^(1/2)-1/2/e^2*C*d^3/(e^2)^(1/2)*arctan((e^2)^(1/2)*x/(-e^2*x^
2+d^2)^(1/2))+1/e*(-(d/e+x)^2*e^2+2*d*e*(d/e+x))^(1/2)*A-1/e^2*(-(d/e+x)^2*e^2+2*d*e*(d/e+x))^(1/2)*B*d+1/e^3*
(-(d/e+x)^2*e^2+2*d*e*(d/e+x))^(1/2)*C*d^2+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))*A-1/e*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))*B+1/e^2*d^3/(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

________________________________________________________________________________________

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),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.87252, size = 236, normalized size = 1.59 \begin{align*} -\frac{6 \,{\left (C d^{3} - B d^{2} e + 2 \, A d e^{2}\right )} \arctan \left (-\frac{d - \sqrt{-e^{2} x^{2} + d^{2}}}{e x}\right ) -{\left (2 \, C e^{2} x^{2} + 4 \, C d^{2} - 6 \, B d e + 6 \, A e^{2} - 3 \,{\left (C d e - B e^{2}\right )} x\right )} \sqrt{-e^{2} x^{2} + d^{2}}}{6 \, e^{3}} \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),x, algorithm="fricas")

[Out]

-1/6*(6*(C*d^3 - B*d^2*e + 2*A*d*e^2)*arctan(-(d - sqrt(-e^2*x^2 + d^2))/(e*x)) - (2*C*e^2*x^2 + 4*C*d^2 - 6*B
*d*e + 6*A*e^2 - 3*(C*d*e - B*e^2)*x)*sqrt(-e^2*x^2 + d^2))/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 )}{d + e x}\, 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),x)

[Out]

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

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \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),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError