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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.169427, antiderivative size = 163, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 34, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.147, Rules used = {1637, 217, 203, 659, 651} $-\frac{\sqrt{d^2-e^2 x^2} \left (A e^2-B d e+C d^2\right )}{3 d^2 e^3 (d+e x)}-\frac{\sqrt{d^2-e^2 x^2} \left (A e^2-B d e+C d^2\right )}{3 d e^3 (d+e x)^2}+\frac{\sqrt{d^2-e^2 x^2} (2 C d-B e)}{d e^3 (d+e x)}+\frac{C \tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right )}{e^3}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 1637

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Int[ExpandIntegrand[(a + c*x^2)^p,
(d + e*x)^m*Pq, x], x] /; FreeQ[{a, c, d, e}, x] && PolyQ[Pq, x] && EqQ[c*d^2 + a*e^2, 0] && EqQ[m + Expon[Pq
, x] + 2*p + 1, 0] && ILtQ[m, 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])

Rule 659

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

Rule 651

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

Rubi steps

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

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

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.061, size = 355, normalized size = 2.2 \begin{align*}{\frac{C}{{e}^{2}}\arctan \left ({x\sqrt{{e}^{2}}{\frac{1}{\sqrt{-{x}^{2}{e}^{2}+{d}^{2}}}}} \right ){\frac{1}{\sqrt{{e}^{2}}}}}-{\frac{Be-2\,Cd}{{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}}-{\frac{A}{3\,d{e}^{3}}\sqrt{- \left ({\frac{d}{e}}+x \right ) ^{2}{e}^{2}+2\,de \left ({\frac{d}{e}}+x \right ) } \left ({\frac{d}{e}}+x \right ) ^{-2}}+{\frac{B}{3\,{e}^{4}}\sqrt{- \left ({\frac{d}{e}}+x \right ) ^{2}{e}^{2}+2\,de \left ({\frac{d}{e}}+x \right ) } \left ({\frac{d}{e}}+x \right ) ^{-2}}-{\frac{Cd}{3\,{e}^{5}}\sqrt{- \left ({\frac{d}{e}}+x \right ) ^{2}{e}^{2}+2\,de \left ({\frac{d}{e}}+x \right ) } \left ({\frac{d}{e}}+x \right ) ^{-2}}-{\frac{A}{3\,{d}^{2}{e}^{2}}\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}}+{\frac{B}{3\,d{e}^{3}}\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}}-{\frac{C}{3\,{e}^{4}}\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)^2/(-e^2*x^2+d^2)^(1/2),x)

[Out]

C/e^2/(e^2)^(1/2)*arctan((e^2)^(1/2)*x/(-e^2*x^2+d^2)^(1/2))-1/e^4*(B*e-2*C*d)/d/(d/e+x)*(-(d/e+x)^2*e^2+2*d*e
*(d/e+x))^(1/2)-1/3/e^3/d/(d/e+x)^2*(-(d/e+x)^2*e^2+2*d*e*(d/e+x))^(1/2)*A+1/3/e^4/(d/e+x)^2*(-(d/e+x)^2*e^2+2
*d*e*(d/e+x))^(1/2)*B-1/3/e^5*d/(d/e+x)^2*(-(d/e+x)^2*e^2+2*d*e*(d/e+x))^(1/2)*C-1/3/e^2/d^2/(d/e+x)*(-(d/e+x)
^2*e^2+2*d*e*(d/e+x))^(1/2)*A+1/3/e^3/d/(d/e+x)*(-(d/e+x)^2*e^2+2*d*e*(d/e+x))^(1/2)*B-1/3/e^4/(d/e+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*x+d)^2/(-e^2*x^2+d^2)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

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

[Out]

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

[Out]

sage0*x