\(\int \frac {1}{1+\sqrt [4]{9-6 x+x^2}} \, dx\) [605]

   Optimal result
   Rubi [B] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 16, antiderivative size = 47 \[ \int \frac {1}{1+\sqrt [4]{9-6 x+x^2}} \, dx=\frac {\sqrt {(-3+x)^2} \left (2 \sqrt [4]{9-6 x+x^2}-2 \log \left (1+\sqrt [4]{9-6 x+x^2}\right )\right )}{-3+x} \]

[Out]

((-3+x)^2)^(1/2)*(2*(x^2-6*x+9)^(1/4)-2*ln(1+(x^2-6*x+9)^(1/4)))/(-3+x)

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(215\) vs. \(2(47)=94\).

Time = 0.15 (sec) , antiderivative size = 215, normalized size of antiderivative = 4.57, number of steps used = 26, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.438, Rules used = {6874, 660, 52, 65, 210, 213, 45} \[ \int \frac {1}{1+\sqrt [4]{9-6 x+x^2}} \, dx=-\frac {\left (x^2-6 x+9\right )^{3/4} \arctan \left (\sqrt {x-3}\right )}{(x-3)^{3/2}}+\frac {\sqrt [4]{x^2-6 x+9} \arctan \left (\sqrt {x-3}\right )}{\sqrt {x-3}}-\frac {\left (x^2-6 x+9\right )^{3/4} \text {arctanh}\left (\sqrt {x-3}\right )}{(x-3)^{3/2}}-\frac {\sqrt [4]{x^2-6 x+9} \text {arctanh}\left (\sqrt {x-3}\right )}{\sqrt {x-3}}-\frac {2 \left (x^2-6 x+9\right )^{3/4}}{3-x}+\frac {\sqrt {x^2-6 x+9} \log (2-x)}{2 (3-x)}+\frac {\sqrt {x^2-6 x+9} \log (4-x)}{2 (3-x)}+\frac {1}{2} \log (2-x)-\frac {1}{2} \log (4-x) \]

[In]

Int[(1 + (9 - 6*x + x^2)^(1/4))^(-1),x]

[Out]

(-2*(9 - 6*x + x^2)^(3/4))/(3 - x) + ((9 - 6*x + x^2)^(1/4)*ArcTan[Sqrt[-3 + x]])/Sqrt[-3 + x] - ((9 - 6*x + x
^2)^(3/4)*ArcTan[Sqrt[-3 + x]])/(-3 + x)^(3/2) - ((9 - 6*x + x^2)^(1/4)*ArcTanh[Sqrt[-3 + x]])/Sqrt[-3 + x] -
((9 - 6*x + x^2)^(3/4)*ArcTanh[Sqrt[-3 + x]])/(-3 + x)^(3/2) + Log[2 - x]/2 + (Sqrt[9 - 6*x + x^2]*Log[2 - x])
/(2*(3 - x)) - Log[4 - x]/2 + (Sqrt[9 - 6*x + x^2]*Log[4 - x])/(2*(3 - x))

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 52

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^n/(b*(
m + n + 1))), x] + Dist[n*((b*c - a*d)/(b*(m + n + 1))), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 210

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 660

Int[((d_.) + (e_.)*(x_))^(m_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[(a + b*x + c*x^2)^Fra
cPart[p]/(c^IntPart[p]*(b/2 + c*x)^(2*FracPart[p])), Int[(d + e*x)^m*(b/2 + c*x)^(2*p), x], x] /; FreeQ[{a, b,
 c, d, e, m, p}, x] && EqQ[b^2 - 4*a*c, 0] &&  !IntegerQ[p] && NeQ[2*c*d - b*e, 0]

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps \begin{align*} \text {integral}& = \int \left (-\frac {1}{2 (-4+x)}+\frac {1}{2 (-2+x)}+\frac {\sqrt [4]{9-6 x+x^2}}{2 (2-x)}+\frac {\sqrt [4]{9-6 x+x^2}}{2 (-4+x)}+\frac {\sqrt {9-6 x+x^2}}{2 (4-x)}+\frac {\sqrt {9-6 x+x^2}}{2 (-2+x)}+\frac {\left (9-6 x+x^2\right )^{3/4}}{2 (2-x)}+\frac {\left (9-6 x+x^2\right )^{3/4}}{2 (-4+x)}\right ) \, dx \\ & = \frac {1}{2} \log (2-x)-\frac {1}{2} \log (4-x)+\frac {1}{2} \int \frac {\sqrt [4]{9-6 x+x^2}}{2-x} \, dx+\frac {1}{2} \int \frac {\sqrt [4]{9-6 x+x^2}}{-4+x} \, dx+\frac {1}{2} \int \frac {\sqrt {9-6 x+x^2}}{4-x} \, dx+\frac {1}{2} \int \frac {\sqrt {9-6 x+x^2}}{-2+x} \, dx+\frac {1}{2} \int \frac {\left (9-6 x+x^2\right )^{3/4}}{2-x} \, dx+\frac {1}{2} \int \frac {\left (9-6 x+x^2\right )^{3/4}}{-4+x} \, dx \\ & = \frac {1}{2} \log (2-x)-\frac {1}{2} \log (4-x)+\frac {\sqrt [4]{9-6 x+x^2} \int \frac {\sqrt {-3+x}}{2-x} \, dx}{2 \sqrt {-3+x}}+\frac {\sqrt [4]{9-6 x+x^2} \int \frac {\sqrt {-3+x}}{-4+x} \, dx}{2 \sqrt {-3+x}}+\frac {\sqrt {9-6 x+x^2} \int \frac {-3+x}{4-x} \, dx}{2 (-3+x)}+\frac {\sqrt {9-6 x+x^2} \int \frac {-3+x}{-2+x} \, dx}{2 (-3+x)}+\frac {\left (9-6 x+x^2\right )^{3/4} \int \frac {(-3+x)^{3/2}}{2-x} \, dx}{2 (-3+x)^{3/2}}+\frac {\left (9-6 x+x^2\right )^{3/4} \int \frac {(-3+x)^{3/2}}{-4+x} \, dx}{2 (-3+x)^{3/2}} \\ & = \frac {1}{2} \log (2-x)-\frac {1}{2} \log (4-x)-\frac {\sqrt [4]{9-6 x+x^2} \int \frac {1}{(2-x) \sqrt {-3+x}} \, dx}{2 \sqrt {-3+x}}+\frac {\sqrt [4]{9-6 x+x^2} \int \frac {1}{(-4+x) \sqrt {-3+x}} \, dx}{2 \sqrt {-3+x}}+\frac {\sqrt {9-6 x+x^2} \int \left (1+\frac {1}{2-x}\right ) \, dx}{2 (-3+x)}+\frac {\sqrt {9-6 x+x^2} \int \left (-1+\frac {1}{4-x}\right ) \, dx}{2 (-3+x)}-\frac {\left (9-6 x+x^2\right )^{3/4} \int \frac {\sqrt {-3+x}}{2-x} \, dx}{2 (-3+x)^{3/2}}+\frac {\left (9-6 x+x^2\right )^{3/4} \int \frac {\sqrt {-3+x}}{-4+x} \, dx}{2 (-3+x)^{3/2}} \\ & = -\frac {2 \left (9-6 x+x^2\right )^{3/4}}{3-x}+\frac {1}{2} \log (2-x)+\frac {\sqrt {9-6 x+x^2} \log (2-x)}{2 (3-x)}-\frac {1}{2} \log (4-x)+\frac {\sqrt {9-6 x+x^2} \log (4-x)}{2 (3-x)}-\frac {\sqrt [4]{9-6 x+x^2} \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,\sqrt {-3+x}\right )}{\sqrt {-3+x}}+\frac {\sqrt [4]{9-6 x+x^2} \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sqrt {-3+x}\right )}{\sqrt {-3+x}}+\frac {\left (9-6 x+x^2\right )^{3/4} \int \frac {1}{(2-x) \sqrt {-3+x}} \, dx}{2 (-3+x)^{3/2}}+\frac {\left (9-6 x+x^2\right )^{3/4} \int \frac {1}{(-4+x) \sqrt {-3+x}} \, dx}{2 (-3+x)^{3/2}} \\ & = -\frac {2 \left (9-6 x+x^2\right )^{3/4}}{3-x}+\frac {\sqrt [4]{9-6 x+x^2} \arctan \left (\sqrt {-3+x}\right )}{\sqrt {-3+x}}-\frac {\sqrt [4]{9-6 x+x^2} \text {arctanh}\left (\sqrt {-3+x}\right )}{\sqrt {-3+x}}+\frac {1}{2} \log (2-x)+\frac {\sqrt {9-6 x+x^2} \log (2-x)}{2 (3-x)}-\frac {1}{2} \log (4-x)+\frac {\sqrt {9-6 x+x^2} \log (4-x)}{2 (3-x)}+\frac {\left (9-6 x+x^2\right )^{3/4} \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,\sqrt {-3+x}\right )}{(-3+x)^{3/2}}+\frac {\left (9-6 x+x^2\right )^{3/4} \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sqrt {-3+x}\right )}{(-3+x)^{3/2}} \\ & = -\frac {2 \left (9-6 x+x^2\right )^{3/4}}{3-x}+\frac {\sqrt [4]{9-6 x+x^2} \arctan \left (\sqrt {-3+x}\right )}{\sqrt {-3+x}}-\frac {\left (9-6 x+x^2\right )^{3/4} \arctan \left (\sqrt {-3+x}\right )}{(-3+x)^{3/2}}-\frac {\sqrt [4]{9-6 x+x^2} \text {arctanh}\left (\sqrt {-3+x}\right )}{\sqrt {-3+x}}-\frac {\left (9-6 x+x^2\right )^{3/4} \text {arctanh}\left (\sqrt {-3+x}\right )}{(-3+x)^{3/2}}+\frac {1}{2} \log (2-x)+\frac {\sqrt {9-6 x+x^2} \log (2-x)}{2 (3-x)}-\frac {1}{2} \log (4-x)+\frac {\sqrt {9-6 x+x^2} \log (4-x)}{2 (3-x)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.87 \[ \int \frac {1}{1+\sqrt [4]{9-6 x+x^2}} \, dx=\frac {\sqrt {(-3+x)^2} \left (2 \sqrt [4]{(-3+x)^2}-2 \log \left (1+\sqrt [4]{(-3+x)^2}\right )\right )}{-3+x} \]

[In]

Integrate[(1 + (9 - 6*x + x^2)^(1/4))^(-1),x]

[Out]

(Sqrt[(-3 + x)^2]*(2*((-3 + x)^2)^(1/4) - 2*Log[1 + ((-3 + x)^2)^(1/4)]))/(-3 + x)

Maple [F]

\[\int \frac {1}{1+\left (x^{2}-6 x +9\right )^{\frac {1}{4}}}d x\]

[In]

int(1/(1+(x^2-6*x+9)^(1/4)),x)

[Out]

int(1/(1+(x^2-6*x+9)^(1/4)),x)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.60 \[ \int \frac {1}{1+\sqrt [4]{9-6 x+x^2}} \, dx=2 \, {\left (x^{2} - 6 \, x + 9\right )}^{\frac {1}{4}} - 2 \, \log \left ({\left (x^{2} - 6 \, x + 9\right )}^{\frac {1}{4}} + 1\right ) \]

[In]

integrate(1/(1+(x^2-6*x+9)^(1/4)),x, algorithm="fricas")

[Out]

2*(x^2 - 6*x + 9)^(1/4) - 2*log((x^2 - 6*x + 9)^(1/4) + 1)

Sympy [F]

\[ \int \frac {1}{1+\sqrt [4]{9-6 x+x^2}} \, dx=\int \frac {1}{\sqrt [4]{x^{2} - 6 x + 9} + 1}\, dx \]

[In]

integrate(1/(1+(x**2-6*x+9)**(1/4)),x)

[Out]

Integral(1/((x**2 - 6*x + 9)**(1/4) + 1), x)

Maxima [F]

\[ \int \frac {1}{1+\sqrt [4]{9-6 x+x^2}} \, dx=\int { \frac {1}{{\left (x^{2} - 6 \, x + 9\right )}^{\frac {1}{4}} + 1} \,d x } \]

[In]

integrate(1/(1+(x^2-6*x+9)^(1/4)),x, algorithm="maxima")

[Out]

integrate(1/((x^2 - 6*x + 9)^(1/4) + 1), x)

Giac [F]

\[ \int \frac {1}{1+\sqrt [4]{9-6 x+x^2}} \, dx=\int { \frac {1}{{\left (x^{2} - 6 \, x + 9\right )}^{\frac {1}{4}} + 1} \,d x } \]

[In]

integrate(1/(1+(x^2-6*x+9)^(1/4)),x, algorithm="giac")

[Out]

integrate(1/((x^2 - 6*x + 9)^(1/4) + 1), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {1}{1+\sqrt [4]{9-6 x+x^2}} \, dx=\int \frac {1}{{\left (x^2-6\,x+9\right )}^{1/4}+1} \,d x \]

[In]

int(1/((x^2 - 6*x + 9)^(1/4) + 1),x)

[Out]

int(1/((x^2 - 6*x + 9)^(1/4) + 1), x)