3.216 \(\int (a+c x^2) (1+(a x+\frac {c x^3}{3})^n) \, dx\)

Optimal. Leaf size=34 \[ \frac {\left (a x+\frac {c x^3}{3}\right )^{n+1}}{n+1}+a x+\frac {c x^3}{3} \]

[Out]

a*x+1/3*c*x^3+(a*x+1/3*c*x^3)^(1+n)/(1+n)

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.042, Rules used = {1591} \[ \frac {\left (a x+\frac {c x^3}{3}\right )^{n+1}}{n+1}+a x+\frac {c x^3}{3} \]

Antiderivative was successfully verified.

[In]

Int[(a + c*x^2)*(1 + (a*x + (c*x^3)/3)^n),x]

[Out]

a*x + (c*x^3)/3 + (a*x + (c*x^3)/3)^(1 + n)/(1 + n)

Rule 1591

Int[((a_.) + (b_.)*(Pq_)^(n_.))^(p_.)*(Qr_), x_Symbol] :> With[{q = Expon[Pq, x], r = Expon[Qr, x]}, Dist[Coef
f[Qr, x, r]/(q*Coeff[Pq, x, q]), Subst[Int[(a + b*x^n)^p, x], x, Pq], x] /; EqQ[r, q - 1] && EqQ[Coeff[Qr, x,
r]*D[Pq, x], q*Coeff[Pq, x, q]*Qr]] /; FreeQ[{a, b, n, p}, x] && PolyQ[Pq, x] && PolyQ[Qr, x]

Rubi steps

\begin {align*} \int \left (a+c x^2\right ) \left (1+\left (a x+\frac {c x^3}{3}\right )^n\right ) \, dx &=\operatorname {Subst}\left (\int \left (1+x^n\right ) \, dx,x,a x+\frac {c x^3}{3}\right )\\ &=a x+\frac {c x^3}{3}+\frac {\left (a x+\frac {c x^3}{3}\right )^{1+n}}{1+n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 36, normalized size = 1.06 \[ \frac {x \left (3 a+c x^2\right ) \left (\left (a x+\frac {c x^3}{3}\right )^n+n+1\right )}{3 (n+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + c*x^2)*(1 + (a*x + (c*x^3)/3)^n),x]

[Out]

(x*(3*a + c*x^2)*(1 + n + (a*x + (c*x^3)/3)^n))/(3*(1 + n))

________________________________________________________________________________________

fricas [A]  time = 1.02, size = 48, normalized size = 1.41 \[ \frac {{\left (c n + c\right )} x^{3} + {\left (c x^{3} + 3 \, a x\right )} {\left (\frac {1}{3} \, c x^{3} + a x\right )}^{n} + 3 \, {\left (a n + a\right )} x}{3 \, {\left (n + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^2+a)*(1+(a*x+1/3*c*x^3)^n),x, algorithm="fricas")

[Out]

1/3*((c*n + c)*x^3 + (c*x^3 + 3*a*x)*(1/3*c*x^3 + a*x)^n + 3*(a*n + a)*x)/(n + 1)

________________________________________________________________________________________

giac [A]  time = 0.42, size = 30, normalized size = 0.88 \[ \frac {1}{3} \, c x^{3} + a x + \frac {{\left (\frac {1}{3} \, c x^{3} + a x\right )}^{n + 1}}{n + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^2+a)*(1+(a*x+1/3*c*x^3)^n),x, algorithm="giac")

[Out]

1/3*c*x^3 + a*x + (1/3*c*x^3 + a*x)^(n + 1)/(n + 1)

________________________________________________________________________________________

maple [A]  time = 0.00, size = 31, normalized size = 0.91 \[ \frac {c \,x^{3}}{3}+a x +\frac {\left (\frac {1}{3} c \,x^{3}+a x \right )^{n +1}}{n +1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*x^2+a)*(1+(a*x+1/3*c*x^3)^n),x)

[Out]

a*x+1/3*c*x^3+(a*x+1/3*c*x^3)^(n+1)/(n+1)

________________________________________________________________________________________

maxima [A]  time = 1.14, size = 54, normalized size = 1.59 \[ \frac {1}{3} \, c x^{3} + a x + \frac {{\left (c x^{3} + 3 \, a x\right )} e^{\left (n \log \left (c x^{2} + 3 \, a\right ) + n \log \relax (x)\right )}}{3^{n + 1} n + 3^{n + 1}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^2+a)*(1+(a*x+1/3*c*x^3)^n),x, algorithm="maxima")

[Out]

1/3*c*x^3 + a*x + (c*x^3 + 3*a*x)*e^(n*log(c*x^2 + 3*a) + n*log(x))/(3^(n + 1)*n + 3^(n + 1))

________________________________________________________________________________________

mupad [B]  time = 2.11, size = 33, normalized size = 0.97 \[ \frac {x\,\left (c\,x^2+3\,a\right )\,\left (n+{\left (\frac {c\,x^3}{3}+a\,x\right )}^n+1\right )}{3\,\left (n+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + c*x^2)*((a*x + (c*x^3)/3)^n + 1),x)

[Out]

(x*(3*a + c*x^2)*(n + (a*x + (c*x^3)/3)^n + 1))/(3*(n + 1))

________________________________________________________________________________________

sympy [B]  time = 112.00, size = 201, normalized size = 5.91 \[ \begin {cases} \frac {3 \cdot 3^{n} a n x}{3 \cdot 3^{n} n + 3 \cdot 3^{n}} + \frac {3 \cdot 3^{n} a x}{3 \cdot 3^{n} n + 3 \cdot 3^{n}} + \frac {3^{n} c n x^{3}}{3 \cdot 3^{n} n + 3 \cdot 3^{n}} + \frac {3^{n} c x^{3}}{3 \cdot 3^{n} n + 3 \cdot 3^{n}} + \frac {3 a x \left (3 a x + c x^{3}\right )^{n}}{3 \cdot 3^{n} n + 3 \cdot 3^{n}} + \frac {c x^{3} \left (3 a x + c x^{3}\right )^{n}}{3 \cdot 3^{n} n + 3 \cdot 3^{n}} & \text {for}\: n \neq -1 \\a x + \frac {c x^{3}}{3} + \log {\relax (x )} + \log {\left (- \sqrt {3} i \sqrt {a} \sqrt {\frac {1}{c}} + x \right )} + \log {\left (\sqrt {3} i \sqrt {a} \sqrt {\frac {1}{c}} + x \right )} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x**2+a)*(1+(a*x+1/3*c*x**3)**n),x)

[Out]

Piecewise((3*3**n*a*n*x/(3*3**n*n + 3*3**n) + 3*3**n*a*x/(3*3**n*n + 3*3**n) + 3**n*c*n*x**3/(3*3**n*n + 3*3**
n) + 3**n*c*x**3/(3*3**n*n + 3*3**n) + 3*a*x*(3*a*x + c*x**3)**n/(3*3**n*n + 3*3**n) + c*x**3*(3*a*x + c*x**3)
**n/(3*3**n*n + 3*3**n), Ne(n, -1)), (a*x + c*x**3/3 + log(x) + log(-sqrt(3)*I*sqrt(a)*sqrt(1/c) + x) + log(sq
rt(3)*I*sqrt(a)*sqrt(1/c) + x), True))

________________________________________________________________________________________