### 3.398 $$\int (a+c x^2)^p (A+C x^2) (d+f x^2)^q \, dx$$

Optimal. Leaf size=166 $A x \left (a+c x^2\right )^p \left (\frac{c x^2}{a}+1\right )^{-p} \left (d+f x^2\right )^q \left (\frac{f x^2}{d}+1\right )^{-q} F_1\left (\frac{1}{2};-p,-q;\frac{3}{2};-\frac{c x^2}{a},-\frac{f x^2}{d}\right )+\frac{1}{3} C x^3 \left (a+c x^2\right )^p \left (\frac{c x^2}{a}+1\right )^{-p} \left (d+f x^2\right )^q \left (\frac{f x^2}{d}+1\right )^{-q} F_1\left (\frac{3}{2};-p,-q;\frac{5}{2};-\frac{c x^2}{a},-\frac{f x^2}{d}\right )$

[Out]

(A*x*(a + c*x^2)^p*(d + f*x^2)^q*AppellF1[1/2, -p, -q, 3/2, -((c*x^2)/a), -((f*x^2)/d)])/((1 + (c*x^2)/a)^p*(1
+ (f*x^2)/d)^q) + (C*x^3*(a + c*x^2)^p*(d + f*x^2)^q*AppellF1[3/2, -p, -q, 5/2, -((c*x^2)/a), -((f*x^2)/d)])/
(3*(1 + (c*x^2)/a)^p*(1 + (f*x^2)/d)^q)

________________________________________________________________________________________

Rubi [A]  time = 0.14659, antiderivative size = 166, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 26, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.192, Rules used = {531, 430, 429, 511, 510} $A x \left (a+c x^2\right )^p \left (\frac{c x^2}{a}+1\right )^{-p} \left (d+f x^2\right )^q \left (\frac{f x^2}{d}+1\right )^{-q} F_1\left (\frac{1}{2};-p,-q;\frac{3}{2};-\frac{c x^2}{a},-\frac{f x^2}{d}\right )+\frac{1}{3} C x^3 \left (a+c x^2\right )^p \left (\frac{c x^2}{a}+1\right )^{-p} \left (d+f x^2\right )^q \left (\frac{f x^2}{d}+1\right )^{-q} F_1\left (\frac{3}{2};-p,-q;\frac{5}{2};-\frac{c x^2}{a},-\frac{f x^2}{d}\right )$

Antiderivative was successfully veriﬁed.

[In]

Int[(a + c*x^2)^p*(A + C*x^2)*(d + f*x^2)^q,x]

[Out]

(A*x*(a + c*x^2)^p*(d + f*x^2)^q*AppellF1[1/2, -p, -q, 3/2, -((c*x^2)/a), -((f*x^2)/d)])/((1 + (c*x^2)/a)^p*(1
+ (f*x^2)/d)^q) + (C*x^3*(a + c*x^2)^p*(d + f*x^2)^q*AppellF1[3/2, -p, -q, 5/2, -((c*x^2)/a), -((f*x^2)/d)])/
(3*(1 + (c*x^2)/a)^p*(1 + (f*x^2)/d)^q)

Rule 531

Int[((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> Dist[
e, Int[(a + b*x^n)^p*(c + d*x^n)^q, x], x] + Dist[f, Int[x^n*(a + b*x^n)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a,
b, c, d, e, f, n, p, q}, x]

Rule 430

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Dist[(a^IntPart[p]*(a + b*x^n)^F
racPart[p])/(1 + (b*x^n)/a)^FracPart[p], Int[(1 + (b*x^n)/a)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, n,
p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n, -1] &&  !(IntegerQ[p] || GtQ[a, 0])

Rule 429

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[a^p*c^q*x*AppellF1[1/n, -p,
-q, 1 + 1/n, -((b*x^n)/a), -((d*x^n)/c)], x] /; FreeQ[{a, b, c, d, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n
, -1] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])

Rule 511

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Dist[(a^IntPa
rt[p]*(a + b*x^n)^FracPart[p])/(1 + (b*x^n)/a)^FracPart[p], Int[(e*x)^m*(1 + (b*x^n)/a)^p*(c + d*x^n)^q, x], x
] /; FreeQ[{a, b, c, d, e, m, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[m, -1] && NeQ[m, n - 1] &&  !(IntegerQ[
p] || GtQ[a, 0])

Rule 510

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(a^p*c^q
*(e*x)^(m + 1)*AppellF1[(m + 1)/n, -p, -q, 1 + (m + 1)/n, -((b*x^n)/a), -((d*x^n)/c)])/(e*(m + 1)), x] /; Free
Q[{a, b, c, d, e, m, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[m, -1] && NeQ[m, n - 1] && (IntegerQ[p] || GtQ[a
, 0]) && (IntegerQ[q] || GtQ[c, 0])

Rubi steps

\begin{align*} \int \left (a+c x^2\right )^p \left (A+C x^2\right ) \left (d+f x^2\right )^q \, dx &=A \int \left (a+c x^2\right )^p \left (d+f x^2\right )^q \, dx+C \int x^2 \left (a+c x^2\right )^p \left (d+f x^2\right )^q \, dx\\ &=\left (A \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 \left (d+f x^2\right )^q \, dx+\left (C \left (a+c x^2\right )^p \left (1+\frac{c x^2}{a}\right )^{-p}\right ) \int x^2 \left (1+\frac{c x^2}{a}\right )^p \left (d+f x^2\right )^q \, dx\\ &=\left (A \left (a+c x^2\right )^p \left (1+\frac{c x^2}{a}\right )^{-p} \left (d+f x^2\right )^q \left (1+\frac{f x^2}{d}\right )^{-q}\right ) \int \left (1+\frac{c x^2}{a}\right )^p \left (1+\frac{f x^2}{d}\right )^q \, dx+\left (C \left (a+c x^2\right )^p \left (1+\frac{c x^2}{a}\right )^{-p} \left (d+f x^2\right )^q \left (1+\frac{f x^2}{d}\right )^{-q}\right ) \int x^2 \left (1+\frac{c x^2}{a}\right )^p \left (1+\frac{f x^2}{d}\right )^q \, dx\\ &=A x \left (a+c x^2\right )^p \left (1+\frac{c x^2}{a}\right )^{-p} \left (d+f x^2\right )^q \left (1+\frac{f x^2}{d}\right )^{-q} F_1\left (\frac{1}{2};-p,-q;\frac{3}{2};-\frac{c x^2}{a},-\frac{f x^2}{d}\right )+\frac{1}{3} C x^3 \left (a+c x^2\right )^p \left (1+\frac{c x^2}{a}\right )^{-p} \left (d+f x^2\right )^q \left (1+\frac{f x^2}{d}\right )^{-q} F_1\left (\frac{3}{2};-p,-q;\frac{5}{2};-\frac{c x^2}{a},-\frac{f x^2}{d}\right )\\ \end{align*}

Mathematica [A]  time = 0.42378, size = 242, normalized size = 1.46 $\frac{1}{3} x \left (a+c x^2\right )^p \left (d+f x^2\right )^q \left (\frac{9 a A d F_1\left (\frac{1}{2};-p,-q;\frac{3}{2};-\frac{c x^2}{a},-\frac{f x^2}{d}\right )}{2 x^2 \left (c d p F_1\left (\frac{3}{2};1-p,-q;\frac{5}{2};-\frac{c x^2}{a},-\frac{f x^2}{d}\right )+a f q F_1\left (\frac{3}{2};-p,1-q;\frac{5}{2};-\frac{c x^2}{a},-\frac{f x^2}{d}\right )\right )+3 a d F_1\left (\frac{1}{2};-p,-q;\frac{3}{2};-\frac{c x^2}{a},-\frac{f x^2}{d}\right )}+C x^2 \left (\frac{c x^2}{a}+1\right )^{-p} \left (\frac{f x^2}{d}+1\right )^{-q} F_1\left (\frac{3}{2};-p,-q;\frac{5}{2};-\frac{c x^2}{a},-\frac{f x^2}{d}\right )\right )$

Warning: Unable to verify antiderivative.

[In]

Integrate[(a + c*x^2)^p*(A + C*x^2)*(d + f*x^2)^q,x]

[Out]

(x*(a + c*x^2)^p*(d + f*x^2)^q*((9*a*A*d*AppellF1[1/2, -p, -q, 3/2, -((c*x^2)/a), -((f*x^2)/d)])/(3*a*d*Appell
F1[1/2, -p, -q, 3/2, -((c*x^2)/a), -((f*x^2)/d)] + 2*x^2*(c*d*p*AppellF1[3/2, 1 - p, -q, 5/2, -((c*x^2)/a), -(
(f*x^2)/d)] + a*f*q*AppellF1[3/2, -p, 1 - q, 5/2, -((c*x^2)/a), -((f*x^2)/d)])) + (C*x^2*AppellF1[3/2, -p, -q,
5/2, -((c*x^2)/a), -((f*x^2)/d)])/((1 + (c*x^2)/a)^p*(1 + (f*x^2)/d)^q)))/3

________________________________________________________________________________________

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

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

[In]

int((c*x^2+a)^p*(C*x^2+A)*(f*x^2+d)^q,x)

[Out]

int((c*x^2+a)^p*(C*x^2+A)*(f*x^2+d)^q,x)

________________________________________________________________________________________

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

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

[In]

integrate((c*x^2+a)^p*(C*x^2+A)*(f*x^2+d)^q,x, algorithm="maxima")

[Out]

integrate((C*x^2 + A)*(c*x^2 + a)^p*(f*x^2 + d)^q, x)

________________________________________________________________________________________

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

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

[In]

integrate((c*x^2+a)^p*(C*x^2+A)*(f*x^2+d)^q,x, algorithm="fricas")

[Out]

integral((C*x^2 + A)*(c*x^2 + a)^p*(f*x^2 + d)^q, x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

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

[In]

integrate((c*x**2+a)**p*(C*x**2+A)*(f*x**2+d)**q,x)

[Out]

Timed out

________________________________________________________________________________________

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

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

[In]

integrate((c*x^2+a)^p*(C*x^2+A)*(f*x^2+d)^q,x, algorithm="giac")

[Out]

integrate((C*x^2 + A)*(c*x^2 + a)^p*(f*x^2 + d)^q, x)