Integrand size = 12, antiderivative size = 337 \[ \int \left (2-6 x+3 x^3\right )^p \, dx=\frac {\left (2-6 x+3 x^3\right )^p \operatorname {AppellF1}\left (1+p,-p,-p,2+p,-\frac {\left (3 x-2 \sqrt {6} \cos \left (\frac {1}{6} \left (\pi +2 \arcsin \left (\frac {\sqrt {\frac {3}{2}}}{2}\right )\right )\right )\right ) \sec \left (\frac {1}{3} \arcsin \left (\frac {\sqrt {\frac {3}{2}}}{2}\right )\right )}{6 \sqrt {2}},-\frac {3 x-2 \sqrt {6} \cos \left (\frac {1}{6} \left (\pi +2 \arcsin \left (\frac {\sqrt {\frac {3}{2}}}{2}\right )\right )\right )}{\sqrt {6} \left (\sqrt {3} \cos \left (\frac {1}{3} \arcsin \left (\frac {\sqrt {\frac {3}{2}}}{2}\right )\right )-3 \sin \left (\frac {1}{3} \arcsin \left (\frac {\sqrt {\frac {3}{2}}}{2}\right )\right )\right )}\right ) \left (3 x-2 \sqrt {6} \cos \left (\frac {1}{6} \left (\pi +2 \arcsin \left (\frac {\sqrt {\frac {3}{2}}}{2}\right )\right )\right )\right ) \left (x-2 \sqrt {\frac {2}{3}} \sin \left (\frac {1}{3} \arcsin \left (\frac {\sqrt {\frac {3}{2}}}{2}\right )\right )\right )^{-p} \left (4 \cos \left (\frac {1}{3} \arcsin \left (\frac {\sqrt {\frac {3}{2}}}{2}\right )\right ) \left (\cos \left (\frac {1}{3} \arcsin \left (\frac {\sqrt {\frac {3}{2}}}{2}\right )\right )-\sqrt {3} \sin \left (\frac {1}{3} \arcsin \left (\frac {\sqrt {\frac {3}{2}}}{2}\right )\right )\right )\right )^p \left (x+2 \sqrt {\frac {2}{3}} \sin \left (\frac {1}{3} \left (\pi +\arcsin \left (\frac {\sqrt {\frac {3}{2}}}{2}\right )\right )\right )\right )^{-p}}{3 (1+p)} \] Output:
1/3*(3*x^3-6*x+2)^p*AppellF1(p+1,-p,-p,2+p,-1/6*(3*x-2*6^(1/2)*cos(1/6*Pi+ 1/3*arcsin(1/4*6^(1/2))))*6^(1/2)/(3^(1/2)*cos(1/3*arcsin(1/4*6^(1/2)))-3* sin(1/3*arcsin(1/4*6^(1/2)))),-1/12*(3*x-2*6^(1/2)*cos(1/6*Pi+1/3*arcsin(1 /4*6^(1/2))))*sec(1/3*arcsin(1/4*6^(1/2)))*2^(1/2))*(3*x-2*6^(1/2)*cos(1/6 *Pi+1/3*arcsin(1/4*6^(1/2))))*(4*cos(1/3*arcsin(1/4*6^(1/2)))*(cos(1/3*arc sin(1/4*6^(1/2)))-3^(1/2)*sin(1/3*arcsin(1/4*6^(1/2)))))^p/(p+1)/((x-2/3*6 ^(1/2)*sin(1/3*arcsin(1/4*6^(1/2))))^p)/((x+2/3*6^(1/2)*sin(1/3*Pi+1/3*arc sin(1/4*6^(1/2))))^p)
Result contains higher order function than in optimal. Order 9 vs. order 6 in optimal.
Time = 0.09 (sec) , antiderivative size = 286, normalized size of antiderivative = 0.85 \[ \int \left (2-6 x+3 x^3\right )^p \, dx=\frac {\operatorname {AppellF1}\left (1+p,-p,-p,2+p,\frac {-x+\text {Root}\left [3 \text {$\#$1}^3-6 \text {$\#$1}+2\&,1\right ]}{\text {Root}\left [3 \text {$\#$1}^3-6 \text {$\#$1}+2\&,1\right ]-\text {Root}\left [3 \text {$\#$1}^3-6 \text {$\#$1}+2\&,2\right ]},\frac {-x+\text {Root}\left [3 \text {$\#$1}^3-6 \text {$\#$1}+2\&,1\right ]}{\text {Root}\left [3 \text {$\#$1}^3-6 \text {$\#$1}+2\&,1\right ]-\text {Root}\left [3 \text {$\#$1}^3-6 \text {$\#$1}+2\&,3\right ]}\right ) \left (x-\text {Root}\left [3 \text {$\#$1}^3-6 \text {$\#$1}+2\&,1\right ]\right ) \left (-x+\text {Root}\left [3 \text {$\#$1}^3-6 \text {$\#$1}+2\&,2\right ]\right )^{-p} \left (\left (2-6 x+3 x^3\right ) \left (\text {Root}\left [3 \text {$\#$1}^3-6 \text {$\#$1}+2\&,1\right ]-\text {Root}\left [3 \text {$\#$1}^3-6 \text {$\#$1}+2\&,2\right ]\right ) \left (\text {Root}\left [3 \text {$\#$1}^3-6 \text {$\#$1}+2\&,1\right ]-\text {Root}\left [3 \text {$\#$1}^3-6 \text {$\#$1}+2\&,3\right ]\right )\right )^p \left (-x+\text {Root}\left [3 \text {$\#$1}^3-6 \text {$\#$1}+2\&,3\right ]\right )^{-p}}{1+p} \] Input:
Integrate[(2 - 6*x + 3*x^3)^p,x]
Output:
(AppellF1[1 + p, -p, -p, 2 + p, (-x + Root[2 - 6*#1 + 3*#1^3 & , 1, 0])/(R oot[2 - 6*#1 + 3*#1^3 & , 1, 0] - Root[2 - 6*#1 + 3*#1^3 & , 2, 0]), (-x + Root[2 - 6*#1 + 3*#1^3 & , 1, 0])/(Root[2 - 6*#1 + 3*#1^3 & , 1, 0] - Roo t[2 - 6*#1 + 3*#1^3 & , 3, 0])]*(x - Root[2 - 6*#1 + 3*#1^3 & , 1, 0])*((2 - 6*x + 3*x^3)*(Root[2 - 6*#1 + 3*#1^3 & , 1, 0] - Root[2 - 6*#1 + 3*#1^3 & , 2, 0])*(Root[2 - 6*#1 + 3*#1^3 & , 1, 0] - Root[2 - 6*#1 + 3*#1^3 & , 3, 0]))^p)/((1 + p)*(-x + Root[2 - 6*#1 + 3*#1^3 & , 2, 0])^p*(-x + Root[ 2 - 6*#1 + 3*#1^3 & , 3, 0])^p)
Result contains complex when optimal does not.
Time = 1.49 (sec) , antiderivative size = 719, normalized size of antiderivative = 2.13, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2475, 1179, 150}
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 \left (3 x^3-6 x+2\right )^p \, dx\) |
\(\Big \downarrow \) 2475 |
\(\displaystyle \left (3 x+\sqrt [3]{9-3 i \sqrt {15}}+\frac {2\ 3^{2/3}}{\sqrt [3]{3-i \sqrt {15}}}\right )^{-p} \left (9 x^2-3 \left (\frac {2\ 3^{2/3}}{\sqrt [3]{3-i \sqrt {15}}}+\sqrt [3]{9-3 i \sqrt {15}}\right ) x+\left (9-3 i \sqrt {15}\right )^{2/3}+\frac {12 \sqrt [3]{3}}{\left (3-i \sqrt {15}\right )^{2/3}}-6\right )^{-p} \left (3 x^3-6 x+2\right )^p \int \left (3 x+\sqrt [3]{9-3 i \sqrt {15}}+\frac {2\ 3^{2/3}}{\sqrt [3]{3-i \sqrt {15}}}\right )^p \left (9 x^2-3 \left (\frac {2\ 3^{2/3}}{\sqrt [3]{3-i \sqrt {15}}}+\sqrt [3]{9-3 i \sqrt {15}}\right ) x+\left (9-3 i \sqrt {15}\right )^{2/3}+\frac {12 \sqrt [3]{3}}{\left (3-i \sqrt {15}\right )^{2/3}}-6\right )^pdx\) |
\(\Big \downarrow \) 1179 |
\(\displaystyle \frac {1}{3} \left (3 x+\sqrt [3]{9-3 i \sqrt {15}}+\frac {2\ 3^{2/3}}{\sqrt [3]{3-i \sqrt {15}}}\right )^{-p} \left (3 x^3-6 x+2\right )^p \left (1-\frac {2 \sqrt [3]{3-i \sqrt {15}} \left (3 x+\sqrt [3]{9-3 i \sqrt {15}}+\frac {2\ 3^{2/3}}{\sqrt [3]{3-i \sqrt {15}}}\right )}{3 \left (2\ 3^{2/3}+\sqrt [3]{3} \left (3-i \sqrt {15}\right )^{2/3}-\sqrt {-4 \sqrt [3]{3}-\left (3^{2/3}-i \sqrt [6]{3} \sqrt {5}\right ) \sqrt [3]{3-i \sqrt {15}}+4 \left (3-i \sqrt {15}\right )^{2/3}}\right )}\right )^{-p} \left (1-\frac {2 \sqrt [3]{3-i \sqrt {15}} \left (3 x+\sqrt [3]{9-3 i \sqrt {15}}+\frac {2\ 3^{2/3}}{\sqrt [3]{3-i \sqrt {15}}}\right )}{3 \left (2\ 3^{2/3}+\sqrt [3]{3} \left (3-i \sqrt {15}\right )^{2/3}+\sqrt {-4 \sqrt [3]{3}-\left (3^{2/3}-i \sqrt [6]{3} \sqrt {5}\right ) \sqrt [3]{3-i \sqrt {15}}+4 \left (3-i \sqrt {15}\right )^{2/3}}\right )}\right )^{-p} \int \left (3 x+\sqrt [3]{9-3 i \sqrt {15}}+\frac {2\ 3^{2/3}}{\sqrt [3]{3-i \sqrt {15}}}\right )^p \left (1-\frac {2 \sqrt [3]{3-i \sqrt {15}} \left (3 x+\sqrt [3]{9-3 i \sqrt {15}}+\frac {2\ 3^{2/3}}{\sqrt [3]{3-i \sqrt {15}}}\right )}{3 \left (2\ 3^{2/3}+\sqrt [3]{3} \left (3-i \sqrt {15}\right )^{2/3}-\sqrt {-4 \sqrt [3]{3}-\left (3^{2/3}-i \sqrt [6]{3} \sqrt {5}\right ) \sqrt [3]{3-i \sqrt {15}}+4 \left (3-i \sqrt {15}\right )^{2/3}}\right )}\right )^p \left (1-\frac {2 \sqrt [3]{3-i \sqrt {15}} \left (3 x+\sqrt [3]{9-3 i \sqrt {15}}+\frac {2\ 3^{2/3}}{\sqrt [3]{3-i \sqrt {15}}}\right )}{3 \left (2\ 3^{2/3}+\sqrt [3]{3} \left (3-i \sqrt {15}\right )^{2/3}+\sqrt {-4 \sqrt [3]{3}-\left (3^{2/3}-i \sqrt [6]{3} \sqrt {5}\right ) \sqrt [3]{3-i \sqrt {15}}+4 \left (3-i \sqrt {15}\right )^{2/3}}\right )}\right )^pd\left (3 x+\sqrt [3]{9-3 i \sqrt {15}}+\frac {2\ 3^{2/3}}{\sqrt [3]{3-i \sqrt {15}}}\right )\) |
\(\Big \downarrow \) 150 |
\(\displaystyle \frac {\left (3 x+\sqrt [3]{9-3 i \sqrt {15}}+\frac {2\ 3^{2/3}}{\sqrt [3]{3-i \sqrt {15}}}\right ) \left (3 x^3-6 x+2\right )^p \left (1-\frac {2 \sqrt [3]{3-i \sqrt {15}} \left (3 x+\sqrt [3]{9-3 i \sqrt {15}}+\frac {2\ 3^{2/3}}{\sqrt [3]{3-i \sqrt {15}}}\right )}{3 \left (2\ 3^{2/3}+\sqrt [3]{3} \left (3-i \sqrt {15}\right )^{2/3}-\sqrt {-4 \sqrt [3]{3}-\left (3^{2/3}-i \sqrt [6]{3} \sqrt {5}\right ) \sqrt [3]{3-i \sqrt {15}}+4 \left (3-i \sqrt {15}\right )^{2/3}}\right )}\right )^{-p} \left (1-\frac {2 \sqrt [3]{3-i \sqrt {15}} \left (3 x+\sqrt [3]{9-3 i \sqrt {15}}+\frac {2\ 3^{2/3}}{\sqrt [3]{3-i \sqrt {15}}}\right )}{3 \left (2\ 3^{2/3}+\sqrt [3]{3} \left (3-i \sqrt {15}\right )^{2/3}+\sqrt {-4 \sqrt [3]{3}-\left (3^{2/3}-i \sqrt [6]{3} \sqrt {5}\right ) \sqrt [3]{3-i \sqrt {15}}+4 \left (3-i \sqrt {15}\right )^{2/3}}\right )}\right )^{-p} \operatorname {AppellF1}\left (p+1,-p,-p,p+2,\frac {2 \sqrt [3]{3-i \sqrt {15}} \left (3 x+\sqrt [3]{9-3 i \sqrt {15}}+\frac {2\ 3^{2/3}}{\sqrt [3]{3-i \sqrt {15}}}\right )}{3 \left (2\ 3^{2/3}+\sqrt [3]{3} \left (3-i \sqrt {15}\right )^{2/3}-\sqrt {-4 \sqrt [3]{3}-\left (3^{2/3}-i \sqrt [6]{3} \sqrt {5}\right ) \sqrt [3]{3-i \sqrt {15}}+4 \left (3-i \sqrt {15}\right )^{2/3}}\right )},\frac {2 \sqrt [3]{3-i \sqrt {15}} \left (3 x+\sqrt [3]{9-3 i \sqrt {15}}+\frac {2\ 3^{2/3}}{\sqrt [3]{3-i \sqrt {15}}}\right )}{3 \left (2\ 3^{2/3}+\sqrt [3]{3} \left (3-i \sqrt {15}\right )^{2/3}+\sqrt {-4 \sqrt [3]{3}-\left (3^{2/3}-i \sqrt [6]{3} \sqrt {5}\right ) \sqrt [3]{3-i \sqrt {15}}+4 \left (3-i \sqrt {15}\right )^{2/3}}\right )}\right )}{3 (p+1)}\) |
Input:
Int[(2 - 6*x + 3*x^3)^p,x]
Output:
(((2*3^(2/3))/(3 - I*Sqrt[15])^(1/3) + (9 - (3*I)*Sqrt[15])^(1/3) + 3*x)*( 2 - 6*x + 3*x^3)^p*AppellF1[1 + p, -p, -p, 2 + p, (2*(3 - I*Sqrt[15])^(1/3 )*((2*3^(2/3))/(3 - I*Sqrt[15])^(1/3) + (9 - (3*I)*Sqrt[15])^(1/3) + 3*x)) /(3*(2*3^(2/3) + 3^(1/3)*(3 - I*Sqrt[15])^(2/3) - Sqrt[-4*3^(1/3) - (3^(2/ 3) - I*3^(1/6)*Sqrt[5])*(3 - I*Sqrt[15])^(1/3) + 4*(3 - I*Sqrt[15])^(2/3)] )), (2*(3 - I*Sqrt[15])^(1/3)*((2*3^(2/3))/(3 - I*Sqrt[15])^(1/3) + (9 - ( 3*I)*Sqrt[15])^(1/3) + 3*x))/(3*(2*3^(2/3) + 3^(1/3)*(3 - I*Sqrt[15])^(2/3 ) + Sqrt[-4*3^(1/3) - (3^(2/3) - I*3^(1/6)*Sqrt[5])*(3 - I*Sqrt[15])^(1/3) + 4*(3 - I*Sqrt[15])^(2/3)]))])/(3*(1 + p)*(1 - (2*(3 - I*Sqrt[15])^(1/3) *((2*3^(2/3))/(3 - I*Sqrt[15])^(1/3) + (9 - (3*I)*Sqrt[15])^(1/3) + 3*x))/ (3*(2*3^(2/3) + 3^(1/3)*(3 - I*Sqrt[15])^(2/3) - Sqrt[-4*3^(1/3) - (3^(2/3 ) - I*3^(1/6)*Sqrt[5])*(3 - I*Sqrt[15])^(1/3) + 4*(3 - I*Sqrt[15])^(2/3)]) ))^p*(1 - (2*(3 - I*Sqrt[15])^(1/3)*((2*3^(2/3))/(3 - I*Sqrt[15])^(1/3) + (9 - (3*I)*Sqrt[15])^(1/3) + 3*x))/(3*(2*3^(2/3) + 3^(1/3)*(3 - I*Sqrt[15] )^(2/3) + Sqrt[-4*3^(1/3) - (3^(2/3) - I*3^(1/6)*Sqrt[5])*(3 - I*Sqrt[15]) ^(1/3) + 4*(3 - I*Sqrt[15])^(2/3)])))^p)
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_ ] :> Simp[c^n*e^p*((b*x)^(m + 1)/(b*(m + 1)))*AppellF1[m + 1, -n, -p, m + 2 , (-d)*(x/c), (-f)*(x/e)], x] /; FreeQ[{b, c, d, e, f, m, n, p}, x] && !In tegerQ[m] && !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])
Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_S ymbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[(a + b*x + c*x^2)^p/(e*(1 - ( d + e*x)/(d - e*((b - q)/(2*c))))^p*(1 - (d + e*x)/(d - e*((b + q)/(2*c)))) ^p) Subst[Int[x^m*Simp[1 - x/(d - e*((b - q)/(2*c))), x]^p*Simp[1 - x/(d - e*((b + q)/(2*c))), x]^p, x], x, d + e*x], x]] /; FreeQ[{a, b, c, d, e, m , p}, x]
Int[((a_.) + (b_.)*(x_) + (d_.)*(x_)^3)^(p_), x_Symbol] :> With[{r = Rt[-9* a*d^2 + Sqrt[3]*d*Sqrt[4*b^3*d + 27*a^2*d^2], 3]}, Simp[(a + b*x + d*x^3)^p /(Simp[18^(1/3)*b*(d/(3*r)) - r/18^(1/3) + d*x, x]^p*Simp[b*(d/3) + 12^(1/3 )*b^2*(d^2/(3*r^2)) + r^2/(3*12^(1/3)) - d*(2^(1/3)*b*(d/(3^(1/3)*r)) - r/1 8^(1/3))*x + d^2*x^2, x]^p) Int[Simp[18^(1/3)*b*(d/(3*r)) - r/18^(1/3) + d*x, x]^p*Simp[b*(d/3) + 12^(1/3)*b^2*(d^2/(3*r^2)) + r^2/(3*12^(1/3)) - d* (2^(1/3)*b*(d/(3^(1/3)*r)) - r/18^(1/3))*x + d^2*x^2, x]^p, x], x]] /; Free Q[{a, b, d, p}, x] && NeQ[4*b^3 + 27*a^2*d, 0] && !IntegerQ[p]
\[\int \left (3 x^{3}-6 x +2\right )^{p}d x\]
Input:
int((3*x^3-6*x+2)^p,x)
Output:
int((3*x^3-6*x+2)^p,x)
\[ \int \left (2-6 x+3 x^3\right )^p \, dx=\int { {\left (3 \, x^{3} - 6 \, x + 2\right )}^{p} \,d x } \] Input:
integrate((3*x^3-6*x+2)^p,x, algorithm="fricas")
Output:
integral((3*x^3 - 6*x + 2)^p, x)
\[ \int \left (2-6 x+3 x^3\right )^p \, dx=\int \left (3 x^{3} - 6 x + 2\right )^{p}\, dx \] Input:
integrate((3*x**3-6*x+2)**p,x)
Output:
Integral((3*x**3 - 6*x + 2)**p, x)
\[ \int \left (2-6 x+3 x^3\right )^p \, dx=\int { {\left (3 \, x^{3} - 6 \, x + 2\right )}^{p} \,d x } \] Input:
integrate((3*x^3-6*x+2)^p,x, algorithm="maxima")
Output:
integrate((3*x^3 - 6*x + 2)^p, x)
\[ \int \left (2-6 x+3 x^3\right )^p \, dx=\int { {\left (3 \, x^{3} - 6 \, x + 2\right )}^{p} \,d x } \] Input:
integrate((3*x^3-6*x+2)^p,x, algorithm="giac")
Output:
integrate((3*x^3 - 6*x + 2)^p, x)
Timed out. \[ \int \left (2-6 x+3 x^3\right )^p \, dx=\int {\left (3\,x^3-6\,x+2\right )}^p \,d x \] Input:
int((3*x^3 - 6*x + 2)^p,x)
Output:
int((3*x^3 - 6*x + 2)^p, x)
\[ \int \left (2-6 x+3 x^3\right )^p \, dx=\int \left (3 x^{3}-6 x +2\right )^{p}d x \] Input:
int((3*x^3-6*x+2)^p,x)
Output:
int((3*x**3 - 6*x + 2)**p,x)