### 3.733 $$\int (d+e x)^2 (a+c x^2)^p \, dx$$

Optimal. Leaf size=133 $-\frac{x \left (a+c x^2\right )^p \left (\frac{c x^2}{a}+1\right )^{-p} \left (a e^2-c d^2 (2 p+3)\right ) \, _2F_1\left (\frac{1}{2},-p;\frac{3}{2};-\frac{c x^2}{a}\right )}{c (2 p+3)}+\frac{e (d+e x) \left (a+c x^2\right )^{p+1}}{c (2 p+3)}+\frac{d e (p+2) \left (a+c x^2\right )^{p+1}}{c (p+1) (2 p+3)}$

[Out]

(d*e*(2 + p)*(a + c*x^2)^(1 + p))/(c*(1 + p)*(3 + 2*p)) + (e*(d + e*x)*(a + c*x^2)^(1 + p))/(c*(3 + 2*p)) - ((
a*e^2 - c*d^2*(3 + 2*p))*x*(a + c*x^2)^p*Hypergeometric2F1[1/2, -p, 3/2, -((c*x^2)/a)])/(c*(3 + 2*p)*(1 + (c*x
^2)/a)^p)

________________________________________________________________________________________

Rubi [A]  time = 0.0730234, antiderivative size = 125, normalized size of antiderivative = 0.94, number of steps used = 4, number of rules used = 4, integrand size = 17, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.235, Rules used = {743, 641, 246, 245} $x \left (a+c x^2\right )^p \left (\frac{c x^2}{a}+1\right )^{-p} \left (d^2-\frac{a e^2}{2 c p+3 c}\right ) \, _2F_1\left (\frac{1}{2},-p;\frac{3}{2};-\frac{c x^2}{a}\right )+\frac{e (d+e x) \left (a+c x^2\right )^{p+1}}{c (2 p+3)}+\frac{d e (p+2) \left (a+c x^2\right )^{p+1}}{c (p+1) (2 p+3)}$

Antiderivative was successfully veriﬁed.

[In]

Int[(d + e*x)^2*(a + c*x^2)^p,x]

[Out]

(d*e*(2 + p)*(a + c*x^2)^(1 + p))/(c*(1 + p)*(3 + 2*p)) + (e*(d + e*x)*(a + c*x^2)^(1 + p))/(c*(3 + 2*p)) + ((
d^2 - (a*e^2)/(3*c + 2*c*p))*x*(a + c*x^2)^p*Hypergeometric2F1[1/2, -p, 3/2, -((c*x^2)/a)])/(1 + (c*x^2)/a)^p

Rule 743

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

Rule 641

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

Rule 246

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[(a^IntPart[p]*(a + b*x^n)^FracPart[p])/(1 + (b*x^n)/a)^Fr
acPart[p], Int[(1 + (b*x^n)/a)^p, x], x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILt
Q[Simplify[1/n + p], 0] &&  !(IntegerQ[p] || GtQ[a, 0])

Rule 245

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, -((b*x^n)/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rubi steps

\begin{align*} \int (d+e x)^2 \left (a+c x^2\right )^p \, dx &=\frac{e (d+e x) \left (a+c x^2\right )^{1+p}}{c (3+2 p)}+\frac{\int \left (-a e^2+c d^2 (3+2 p)+2 c d e (2+p) x\right ) \left (a+c x^2\right )^p \, dx}{c (3+2 p)}\\ &=\frac{d e (2+p) \left (a+c x^2\right )^{1+p}}{c (1+p) (3+2 p)}+\frac{e (d+e x) \left (a+c x^2\right )^{1+p}}{c (3+2 p)}+\left (d^2-\frac{a e^2}{3 c+2 c p}\right ) \int \left (a+c x^2\right )^p \, dx\\ &=\frac{d e (2+p) \left (a+c x^2\right )^{1+p}}{c (1+p) (3+2 p)}+\frac{e (d+e x) \left (a+c x^2\right )^{1+p}}{c (3+2 p)}+\left (\left (d^2-\frac{a e^2}{3 c+2 c p}\right ) \left (a+c x^2\right )^p \left (1+\frac{c x^2}{a}\right )^{-p}\right ) \int \left (1+\frac{c x^2}{a}\right )^p \, dx\\ &=\frac{d e (2+p) \left (a+c x^2\right )^{1+p}}{c (1+p) (3+2 p)}+\frac{e (d+e x) \left (a+c x^2\right )^{1+p}}{c (3+2 p)}+\left (d^2-\frac{a e^2}{3 c+2 c p}\right ) x \left (a+c x^2\right )^p \left (1+\frac{c x^2}{a}\right )^{-p} \, _2F_1\left (\frac{1}{2},-p;\frac{3}{2};-\frac{c x^2}{a}\right )\\ \end{align*}

Mathematica [A]  time = 0.100026, size = 133, normalized size = 1. $\frac{\left (a+c x^2\right )^p \left (\frac{c x^2}{a}+1\right )^{-p} \left (3 c d^2 (p+1) x \, _2F_1\left (\frac{1}{2},-p;\frac{3}{2};-\frac{c x^2}{a}\right )+e \left (3 d \left (c x^2 \left (\frac{c x^2}{a}+1\right )^p+a \left (\left (\frac{c x^2}{a}+1\right )^p-1\right )\right )+c e (p+1) x^3 \, _2F_1\left (\frac{3}{2},-p;\frac{5}{2};-\frac{c x^2}{a}\right )\right )\right )}{3 c (p+1)}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(d + e*x)^2*(a + c*x^2)^p,x]

[Out]

((a + c*x^2)^p*(3*c*d^2*(1 + p)*x*Hypergeometric2F1[1/2, -p, 3/2, -((c*x^2)/a)] + e*(3*d*(c*x^2*(1 + (c*x^2)/a
)^p + a*(-1 + (1 + (c*x^2)/a)^p)) + c*e*(1 + p)*x^3*Hypergeometric2F1[3/2, -p, 5/2, -((c*x^2)/a)])))/(3*c*(1 +
p)*(1 + (c*x^2)/a)^p)

________________________________________________________________________________________

Maple [F]  time = 0.45, size = 0, normalized size = 0. \begin{align*} \int \left ( ex+d \right ) ^{2} \left ( c{x}^{2}+a \right ) ^{p}\, dx \end{align*}

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

[In]

int((e*x+d)^2*(c*x^2+a)^p,x)

[Out]

int((e*x+d)^2*(c*x^2+a)^p,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (e x + d\right )}^{2}{\left (c x^{2} + a\right )}^{p}\,{d x} \end{align*}

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

[In]

integrate((e*x+d)^2*(c*x^2+a)^p,x, algorithm="maxima")

[Out]

integrate((e*x + d)^2*(c*x^2 + a)^p, x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (e^{2} x^{2} + 2 \, d e x + d^{2}\right )}{\left (c x^{2} + a\right )}^{p}, x\right ) \end{align*}

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

[In]

integrate((e*x+d)^2*(c*x^2+a)^p,x, algorithm="fricas")

[Out]

integral((e^2*x^2 + 2*d*e*x + d^2)*(c*x^2 + a)^p, x)

________________________________________________________________________________________

Sympy [A]  time = 12.7396, size = 97, normalized size = 0.73 \begin{align*} a^{p} d^{2} x{{}_{2}F_{1}\left (\begin{matrix} \frac{1}{2}, - p \\ \frac{3}{2} \end{matrix}\middle |{\frac{c x^{2} e^{i \pi }}{a}} \right )} + \frac{a^{p} e^{2} x^{3}{{}_{2}F_{1}\left (\begin{matrix} \frac{3}{2}, - p \\ \frac{5}{2} \end{matrix}\middle |{\frac{c x^{2} e^{i \pi }}{a}} \right )}}{3} + 2 d e \left (\begin{cases} \frac{a^{p} x^{2}}{2} & \text{for}\: c = 0 \\\frac{\begin{cases} \frac{\left (a + c x^{2}\right )^{p + 1}}{p + 1} & \text{for}\: p \neq -1 \\\log{\left (a + c x^{2} \right )} & \text{otherwise} \end{cases}}{2 c} & \text{otherwise} \end{cases}\right ) \end{align*}

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

[In]

integrate((e*x+d)**2*(c*x**2+a)**p,x)

[Out]

a**p*d**2*x*hyper((1/2, -p), (3/2,), c*x**2*exp_polar(I*pi)/a) + a**p*e**2*x**3*hyper((3/2, -p), (5/2,), c*x**
2*exp_polar(I*pi)/a)/3 + 2*d*e*Piecewise((a**p*x**2/2, Eq(c, 0)), (Piecewise(((a + c*x**2)**(p + 1)/(p + 1), N
e(p, -1)), (log(a + c*x**2), True))/(2*c), True))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (e x + d\right )}^{2}{\left (c x^{2} + a\right )}^{p}\,{d x} \end{align*}

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

[In]

integrate((e*x+d)^2*(c*x^2+a)^p,x, algorithm="giac")

[Out]

integrate((e*x + d)^2*(c*x^2 + a)^p, x)