\(\int \frac {(2+d x)^2 (e+f x)^n}{(4-d^2 x^2)^{3/2}} \, dx\) [116]

Optimal result
Mathematica [F]
Rubi [B] (warning: unable to verify)
Maple [F]
Fricas [F]
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 29, antiderivative size = 82 \[ \int \frac {(2+d x)^2 (e+f x)^n}{\left (4-d^2 x^2\right )^{3/2}} \, dx=\frac {4 (e+f x)^n \left (\frac {d (e+f x)}{d e+2 f}\right )^{-n} \operatorname {AppellF1}\left (-\frac {1}{2},-\frac {1}{2},-n,\frac {1}{2},\frac {1}{4} (2-d x),\frac {f (2-d x)}{d e+2 f}\right )}{d \sqrt {2-d x}} \] Output:

4*(f*x+e)^n*AppellF1(-1/2,-n,-1/2,1/2,f*(-d*x+2)/(d*e+2*f),-1/4*d*x+1/2)/d 
/(-d*x+2)^(1/2)/((d*(f*x+e)/(d*e+2*f))^n)
 

Mathematica [F]

\[ \int \frac {(2+d x)^2 (e+f x)^n}{\left (4-d^2 x^2\right )^{3/2}} \, dx=\int \frac {(2+d x)^2 (e+f x)^n}{\left (4-d^2 x^2\right )^{3/2}} \, dx \] Input:

Integrate[((2 + d*x)^2*(e + f*x)^n)/(4 - d^2*x^2)^(3/2),x]
 

Output:

Integrate[((2 + d*x)^2*(e + f*x)^n)/(4 - d^2*x^2)^(3/2), x]
 

Rubi [B] (warning: unable to verify)

Leaf count is larger than twice the leaf count of optimal. \(273\) vs. \(2(82)=164\).

Time = 0.45 (sec) , antiderivative size = 273, normalized size of antiderivative = 3.33, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.241, Rules used = {714, 27, 719, 513, 27, 156, 155}

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 {(d x+2)^2 (e+f x)^n}{\left (4-d^2 x^2\right )^{3/2}} \, dx\)

\(\Big \downarrow \) 714

\(\displaystyle \frac {\int -\frac {4 (d e-2 f) (e+f x)^n (d e+2 f+4 f n+2 d f (n+1) x)}{\sqrt {4-d^2 x^2}}dx}{4 \left (d^2 e^2-4 f^2\right )}+\frac {2 (d x (d e-2 f)+2 (d e-2 f)) (e+f x)^{n+1}}{\sqrt {4-d^2 x^2} \left (d^2 e^2-4 f^2\right )}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {2 (d x (d e-2 f)+2 (d e-2 f)) (e+f x)^{n+1}}{\sqrt {4-d^2 x^2} \left (d^2 e^2-4 f^2\right )}-\frac {(d e-2 f) \int \frac {(e+f x)^n (d e+2 f+4 f n+2 d f (n+1) x)}{\sqrt {4-d^2 x^2}}dx}{d^2 e^2-4 f^2}\)

\(\Big \downarrow \) 719

\(\displaystyle \frac {2 (d x (d e-2 f)+2 (d e-2 f)) (e+f x)^{n+1}}{\sqrt {4-d^2 x^2} \left (d^2 e^2-4 f^2\right )}-\frac {(d e-2 f) \left (2 d (n+1) \int \frac {(e+f x)^{n+1}}{\sqrt {4-d^2 x^2}}dx-(2 n+1) (d e-2 f) \int \frac {(e+f x)^n}{\sqrt {4-d^2 x^2}}dx\right )}{d^2 e^2-4 f^2}\)

\(\Big \downarrow \) 513

\(\displaystyle \frac {2 (d x (d e-2 f)+2 (d e-2 f)) (e+f x)^{n+1}}{\sqrt {4-d^2 x^2} \left (d^2 e^2-4 f^2\right )}-\frac {(d e-2 f) \left (d (n+1) \int \frac {2 (e+f x)^{n+1}}{\sqrt {2-d x} \sqrt {d x+2}}dx-\frac {1}{2} (2 n+1) (d e-2 f) \int \frac {2 (e+f x)^n}{\sqrt {2-d x} \sqrt {d x+2}}dx\right )}{d^2 e^2-4 f^2}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {2 (d x (d e-2 f)+2 (d e-2 f)) (e+f x)^{n+1}}{\sqrt {4-d^2 x^2} \left (d^2 e^2-4 f^2\right )}-\frac {(d e-2 f) \left (2 d (n+1) \int \frac {(e+f x)^{n+1}}{\sqrt {2-d x} \sqrt {d x+2}}dx-(2 n+1) (d e-2 f) \int \frac {(e+f x)^n}{\sqrt {2-d x} \sqrt {d x+2}}dx\right )}{d^2 e^2-4 f^2}\)

\(\Big \downarrow \) 156

\(\displaystyle \frac {2 (d x (d e-2 f)+2 (d e-2 f)) (e+f x)^{n+1}}{\sqrt {4-d^2 x^2} \left (d^2 e^2-4 f^2\right )}-\frac {(d e-2 f) \left (2 (n+1) (d e+2 f) (e+f x)^n \left (\frac {d (e+f x)}{d e+2 f}\right )^{-n} \int \frac {\left (\frac {d e}{d e+2 f}+\frac {d f x}{d e+2 f}\right )^{n+1}}{\sqrt {2-d x} \sqrt {d x+2}}dx-(2 n+1) (d e-2 f) (e+f x)^n \left (\frac {d (e+f x)}{d e+2 f}\right )^{-n} \int \frac {\left (\frac {d e}{d e+2 f}+\frac {d f x}{d e+2 f}\right )^n}{\sqrt {2-d x} \sqrt {d x+2}}dx\right )}{d^2 e^2-4 f^2}\)

\(\Big \downarrow \) 155

\(\displaystyle \frac {2 (d x (d e-2 f)+2 (d e-2 f)) (e+f x)^{n+1}}{\sqrt {4-d^2 x^2} \left (d^2 e^2-4 f^2\right )}-\frac {(d e-2 f) \left (\frac {(2 n+1) \sqrt {2-d x} (d e-2 f) (e+f x)^n \left (\frac {d (e+f x)}{d e+2 f}\right )^{-n} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-n,\frac {3}{2},\frac {1}{4} (2-d x),\frac {f (2-d x)}{d e+2 f}\right )}{d}-\frac {2 (n+1) \sqrt {2-d x} (d e+2 f) (e+f x)^n \left (\frac {d (e+f x)}{d e+2 f}\right )^{-n} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-n-1,\frac {3}{2},\frac {1}{4} (2-d x),\frac {f (2-d x)}{d e+2 f}\right )}{d}\right )}{d^2 e^2-4 f^2}\)

Input:

Int[((2 + d*x)^2*(e + f*x)^n)/(4 - d^2*x^2)^(3/2),x]
 

Output:

(2*(2*(d*e - 2*f) + d*(d*e - 2*f)*x)*(e + f*x)^(1 + n))/((d^2*e^2 - 4*f^2) 
*Sqrt[4 - d^2*x^2]) - ((d*e - 2*f)*((-2*(d*e + 2*f)*(1 + n)*Sqrt[2 - d*x]* 
(e + f*x)^n*AppellF1[1/2, 1/2, -1 - n, 3/2, (2 - d*x)/4, (f*(2 - d*x))/(d* 
e + 2*f)])/(d*((d*(e + f*x))/(d*e + 2*f))^n) + ((d*e - 2*f)*(1 + 2*n)*Sqrt 
[2 - d*x]*(e + f*x)^n*AppellF1[1/2, 1/2, -n, 3/2, (2 - d*x)/4, (f*(2 - d*x 
))/(d*e + 2*f)])/(d*((d*(e + f*x))/(d*e + 2*f))^n)))/(d^2*e^2 - 4*f^2)
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 155
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_)) 
^(p_), x_] :> Simp[((a + b*x)^(m + 1)/(b*(m + 1)*Simplify[b/(b*c - a*d)]^n* 
Simplify[b/(b*e - a*f)]^p))*AppellF1[m + 1, -n, -p, m + 2, (-d)*((a + b*x)/ 
(b*c - a*d)), (-f)*((a + b*x)/(b*e - a*f))], x] /; FreeQ[{a, b, c, d, e, f, 
 m, n, p}, x] &&  !IntegerQ[m] &&  !IntegerQ[n] &&  !IntegerQ[p] && GtQ[Sim 
plify[b/(b*c - a*d)], 0] && GtQ[Simplify[b/(b*e - a*f)], 0] &&  !(GtQ[Simpl 
ify[d/(d*a - c*b)], 0] && GtQ[Simplify[d/(d*e - c*f)], 0] && SimplerQ[c + d 
*x, a + b*x]) &&  !(GtQ[Simplify[f/(f*a - e*b)], 0] && GtQ[Simplify[f/(f*c 
- e*d)], 0] && SimplerQ[e + f*x, a + b*x])
 

rule 156
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_)) 
^(p_), x_] :> Simp[(e + f*x)^FracPart[p]/(Simplify[b/(b*e - a*f)]^IntPart[p 
]*(b*((e + f*x)/(b*e - a*f)))^FracPart[p])   Int[(a + b*x)^m*(c + d*x)^n*Si 
mp[b*(e/(b*e - a*f)) + b*f*(x/(b*e - a*f)), x]^p, x], x] /; FreeQ[{a, b, c, 
 d, e, f, m, n, p}, x] &&  !IntegerQ[m] &&  !IntegerQ[n] &&  !IntegerQ[p] & 
& GtQ[Simplify[b/(b*c - a*d)], 0] &&  !GtQ[Simplify[b/(b*e - a*f)], 0]
 

rule 513
Int[((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[ 
a^p   Int[(c + d*x)^n*(1 + Rt[-b/a, 2]*x)^p*(1 - Rt[-b/a, 2]*x)^p, x], x] / 
; FreeQ[{a, b, c, d, n, p}, x] && GtQ[a, 0] && NegQ[b/a]
 

rule 714
Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_) 
^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[(f + g*x)^n, a + c*x^2, 
 x], R = Coeff[PolynomialRemainder[(f + g*x)^n, a + c*x^2, x], x, 0], S = C 
oeff[PolynomialRemainder[(f + g*x)^n, a + c*x^2, x], x, 1]}, Simp[(-(d + e* 
x)^(m + 1))*(a + c*x^2)^(p + 1)*((a*(e*R - d*S) + (c*d*R + a*e*S)*x)/(2*a*( 
p + 1)*(c*d^2 + a*e^2))), x] + Simp[1/(2*a*(p + 1)*(c*d^2 + a*e^2))   Int[( 
d + e*x)^m*(a + c*x^2)^(p + 1)*ExpandToSum[2*a*(p + 1)*(c*d^2 + a*e^2)*Q + 
c*d^2*R*(2*p + 3) - a*e*(d*S*m - e*R*(m + 2*p + 3)) + e*(c*d*R + a*e*S)*(m 
+ 2*p + 4)*x, x], x], x]] /; FreeQ[{a, c, d, e, f, g, m}, x] && IGtQ[n, 1] 
&& LtQ[p, -1] && NeQ[c*d^2 + a*e^2, 0]
 

rule 719
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p 
_.), x_Symbol] :> Simp[g/e   Int[(d + e*x)^(m + 1)*(a + c*x^2)^p, x], x] + 
Simp[(e*f - d*g)/e   Int[(d + e*x)^m*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, 
d, e, f, g, m, p}, x] &&  !IGtQ[m, 0]
 
Maple [F]

\[\int \frac {\left (d x +2\right )^{2} \left (f x +e \right )^{n}}{\left (-d^{2} x^{2}+4\right )^{\frac {3}{2}}}d x\]

Input:

int((d*x+2)^2*(f*x+e)^n/(-d^2*x^2+4)^(3/2),x)
 

Output:

int((d*x+2)^2*(f*x+e)^n/(-d^2*x^2+4)^(3/2),x)
 

Fricas [F]

\[ \int \frac {(2+d x)^2 (e+f x)^n}{\left (4-d^2 x^2\right )^{3/2}} \, dx=\int { \frac {{\left (d x + 2\right )}^{2} {\left (f x + e\right )}^{n}}{{\left (-d^{2} x^{2} + 4\right )}^{\frac {3}{2}}} \,d x } \] Input:

integrate((d*x+2)^2*(f*x+e)^n/(-d^2*x^2+4)^(3/2),x, algorithm="fricas")
 

Output:

integral(sqrt(-d^2*x^2 + 4)*(f*x + e)^n/(d^2*x^2 - 4*d*x + 4), x)
 

Sympy [F]

\[ \int \frac {(2+d x)^2 (e+f x)^n}{\left (4-d^2 x^2\right )^{3/2}} \, dx=\int \frac {\left (e + f x\right )^{n} \left (d x + 2\right )^{2}}{\left (- \left (d x - 2\right ) \left (d x + 2\right )\right )^{\frac {3}{2}}}\, dx \] Input:

integrate((d*x+2)**2*(f*x+e)**n/(-d**2*x**2+4)**(3/2),x)
 

Output:

Integral((e + f*x)**n*(d*x + 2)**2/(-(d*x - 2)*(d*x + 2))**(3/2), x)
 

Maxima [F]

\[ \int \frac {(2+d x)^2 (e+f x)^n}{\left (4-d^2 x^2\right )^{3/2}} \, dx=\int { \frac {{\left (d x + 2\right )}^{2} {\left (f x + e\right )}^{n}}{{\left (-d^{2} x^{2} + 4\right )}^{\frac {3}{2}}} \,d x } \] Input:

integrate((d*x+2)^2*(f*x+e)^n/(-d^2*x^2+4)^(3/2),x, algorithm="maxima")
 

Output:

integrate((d*x + 2)^2*(f*x + e)^n/(-d^2*x^2 + 4)^(3/2), x)
 

Giac [F]

\[ \int \frac {(2+d x)^2 (e+f x)^n}{\left (4-d^2 x^2\right )^{3/2}} \, dx=\int { \frac {{\left (d x + 2\right )}^{2} {\left (f x + e\right )}^{n}}{{\left (-d^{2} x^{2} + 4\right )}^{\frac {3}{2}}} \,d x } \] Input:

integrate((d*x+2)^2*(f*x+e)^n/(-d^2*x^2+4)^(3/2),x, algorithm="giac")
 

Output:

integrate((d*x + 2)^2*(f*x + e)^n/(-d^2*x^2 + 4)^(3/2), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {(2+d x)^2 (e+f x)^n}{\left (4-d^2 x^2\right )^{3/2}} \, dx=\int \frac {{\left (e+f\,x\right )}^n\,{\left (d\,x+2\right )}^2}{{\left (4-d^2\,x^2\right )}^{3/2}} \,d x \] Input:

int(((e + f*x)^n*(d*x + 2)^2)/(4 - d^2*x^2)^(3/2),x)
 

Output:

int(((e + f*x)^n*(d*x + 2)^2)/(4 - d^2*x^2)^(3/2), x)
 

Reduce [F]

\[ \int \frac {(2+d x)^2 (e+f x)^n}{\left (4-d^2 x^2\right )^{3/2}} \, dx=-2 \left (\int \frac {\left (f x +e \right )^{n}}{\sqrt {-d^{2} x^{2}+4}\, d x -2 \sqrt {-d^{2} x^{2}+4}}d x \right )-\left (\int \frac {\left (f x +e \right )^{n} x}{\sqrt {-d^{2} x^{2}+4}\, d x -2 \sqrt {-d^{2} x^{2}+4}}d x \right ) d \] Input:

int((d*x+2)^2*(f*x+e)^n/(-d^2*x^2+4)^(3/2),x)
                                                                                    
                                                                                    
 

Output:

 - 2*int((e + f*x)**n/(sqrt( - d**2*x**2 + 4)*d*x - 2*sqrt( - d**2*x**2 + 
4)),x) - int(((e + f*x)**n*x)/(sqrt( - d**2*x**2 + 4)*d*x - 2*sqrt( - d**2 
*x**2 + 4)),x)*d