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

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

[Out]

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

________________________________________________________________________________________

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

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-((C*Sqrt[d^2 - e^2*x^2])/e^3) - ((C*d^2 - B*d*e + A*e^2)*Sqrt[d^2 - e^2*x^2])/(d*e^3*(d + e*x)) - ((C*d - B*e
)*ArcTan[(e*x)/Sqrt[d^2 - e^2*x^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 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{A+B x+C x^2}{(d+e x) \sqrt{d^2-e^2 x^2}} \, dx &=-\frac{C \sqrt{d^2-e^2 x^2}}{e^3}-\frac{\int \frac{-A e^4+e^3 (C d-B e) x}{(d+e x) \sqrt{d^2-e^2 x^2}} \, dx}{e^4}\\ &=-\frac{C \sqrt{d^2-e^2 x^2}}{e^3}-\frac{\left (C d^2-B d e+A e^2\right ) \sqrt{d^2-e^2 x^2}}{d e^3 (d+e x)}-\frac{(C d-B e) \int \frac{1}{\sqrt{d^2-e^2 x^2}} \, dx}{e^2}\\ &=-\frac{C \sqrt{d^2-e^2 x^2}}{e^3}-\frac{\left (C d^2-B d e+A e^2\right ) \sqrt{d^2-e^2 x^2}}{d e^3 (d+e x)}-\frac{(C d-B e) \operatorname{Subst}\left (\int \frac{1}{1+e^2 x^2} \, dx,x,\frac{x}{\sqrt{d^2-e^2 x^2}}\right )}{e^2}\\ &=-\frac{C \sqrt{d^2-e^2 x^2}}{e^3}-\frac{\left (C d^2-B d e+A e^2\right ) \sqrt{d^2-e^2 x^2}}{d e^3 (d+e x)}-\frac{(C d-B e) \tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right )}{e^3}\\ \end{align*}

Mathematica [A]  time = 0.161356, size = 83, normalized size = 0.81 $\frac{(B e-C d) \tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right )-\frac{\sqrt{d^2-e^2 x^2} (e (A e-B d)+C d (2 d+e x))}{d (d+e x)}}{e^3}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.057, size = 149, normalized size = 1.5 \begin{align*} -{\frac{C}{{e}^{3}}\sqrt{-{x}^{2}{e}^{2}+{d}^{2}}}+{\frac{B}{e}\arctan \left ({x\sqrt{{e}^{2}}{\frac{1}{\sqrt{-{x}^{2}{e}^{2}+{d}^{2}}}}} \right ){\frac{1}{\sqrt{{e}^{2}}}}}-{\frac{Cd}{{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}^{2}-Bde+C{d}^{2}}{{e}^{4}d}\sqrt{- \left ({\frac{d}{e}}+x \right ) ^{2}{e}^{2}+2\,de \left ({\frac{d}{e}}+x \right ) } \left ({\frac{d}{e}}+x \right ) ^{-1}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

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*x+d)/(-e^2*x^2+d^2)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.84959, size = 315, normalized size = 3.06 \begin{align*} -\frac{2 \, C d^{3} - B d^{2} e + A d e^{2} +{\left (2 \, C d^{2} e - B d e^{2} + A e^{3}\right )} x - 2 \,{\left (C d^{3} - B d^{2} e +{\left (C d^{2} e - B d e^{2}\right )} x\right )} \arctan \left (-\frac{d - \sqrt{-e^{2} x^{2} + d^{2}}}{e x}\right ) +{\left (C d e x + 2 \, C d^{2} - B d e + A e^{2}\right )} \sqrt{-e^{2} x^{2} + d^{2}}}{d e^{4} x + d^{2} e^{3}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

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

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

[In]

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

[Out]

Integral((A + B*x + C*x**2)/(sqrt(-(-d + e*x)*(d + e*x))*(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*x+d)/(-e^2*x^2+d^2)^(1/2),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError