I'm trying to find the three distinct and real roots of $$-x^3+3x+\left(2-\frac{4}{n}\right)=0,$$
where $n>0$ (we could say $n\geq 2$ if that helps), but I'm not able to get very far:
Using the notation of the Wikipedia-page, I find that the discriminant is $$\Delta=27\cdot 4\left(\frac{1}{n}-\frac{1}{n^2}\right),$$ which gives
$$C=3\left( 1-\frac{2}{n} \pm 2 i \sqrt{\frac{1}{n}-\frac{1}{n^2}} \;\right)^{1/3},$$
which is then used to find $x$, as $$x=\frac{C}{3}+\frac{3}{C}.$$
Two things confuse me:
- $C$ looks like a non-real number, but $x$ should be real (since $\Delta >0$). How can one further reduce the expression for $x(C)$ to show that the imaginary part is zero? I'm having trouble evaluating that cube root.
- When I use my expression for $x(C)$ in Mathematica and evaluate numerically for some $n$, I only find one of the three solutions that Mathematica finds if I just ask it to give the roots of the original equation (the change of sign in $C$, i.e. the $\pm$, doesn't even give two different solutions). What have I done to exclude the two other solutions (or is it just Mathematica excluding them somehow)?
Context:
Actually, I'm only trying to find the root where $-1\leq x\leq 1$. I'm trying solve (the first) part of system of equations that I solved numerically in order to make this answer analytically, so that I can play with the limit of the expression (as $n\rightarrow \infty$).
Thank you.
For the calculation of the roots of the depressed cubic $$ y^{\,3} + p\,y + q = 0 $$ where $p$ and $q$ are real or complex, I personally adopt a method indicated in this work by A. Cauli, by which putting $$ u = \sqrt[{3\,}]{{ - \frac{q} {2} + \sqrt {\frac{{q^{\,2} }} {4} + \frac{{p^{\,3} }} {{27}}} }}\quad v = - \frac{p} {{3\,u}}\quad \omega = e^{\,i\,\frac{{2\pi }} {3}} $$ where for the radicals you take one value, the real or the first complex one (but does not matter which) then you compute the three solutions as: $$ y_{\,1} = u + v\quad y_{\,2} = \omega \,u + \frac{1} {\omega }\,v\quad y_{\,3} = \frac{1} {\omega }\,u + \omega \,v $$ In your case: $$ y^{\,3} - 3\,y - 2\left( {\frac{{n - 2}} {n}} \right) = 0 $$ we obtain $$ \frac{{q^{\,2} }} {4} + \frac{{p^{\,3} }} {{27}} = \left( {\frac{{n - 2}} {n}} \right)^{\,2} - 1 = - 4\frac{{\left( {n - 1} \right)}} {{n^{\,2} }} < 0 $$ which confirms that there are three real solutions, and $$ \begin{gathered} u = \sqrt[{3\,}]{{\frac{{n - 2}} {n} + i\,\frac{2} {n}\sqrt {\left( {n - 1} \right)} }} = \frac{1} {{\sqrt[{3\,}]{n}}}\;\sqrt[{3\,}]{{n - 2 + i\,2\sqrt {\left( {n - 1} \right)} }} = \hfill \\ = \frac{1} {{\sqrt[{3\,}]{n}}}\;\sqrt[{3\,}]{{n\,e^{\,i\,\alpha } }} = e^{\,i\,\alpha /3} \quad \left| {\,\alpha = \arctan \left( {\frac{{2\sqrt {\left( {n - 1} \right)} }} {{n - 2}}} \right)} \right. \hfill \\ v = - \frac{p} {{3\,u}} = \frac{1} {u} = e^{\, - \,i\,\alpha /3} \hfill \\ \end{gathered} $$ with the understanding that for $n=1,\; 2$, $\alpha= \pi , \; \pi /2$, i.e. that we use the 4-quadrant $arctan$.
So that in conclusion, for $0<n$, we have: $$ \left\{ \begin{gathered} y_{\,1} = e^{\,i\,\alpha /3} + e^{\, - \,i\,\alpha /3} = 2\cos \left( {\frac{\alpha } {3}} \right) \hfill \\ y_{\,2} = e^{\,i\,\alpha /3 + 2\pi /3} + e^{\, - \,i\,\alpha /3 - 2\pi /3} = 2\cos \left( {\frac{{\alpha + 2\pi }} {3}} \right) \hfill \\ y_{\,3} = e^{\,i\,\alpha /3 - 2\pi /3} + e^{\, - \,i\,\alpha /3 + 2\pi /3} = 2\cos \left( {\frac{{\alpha - 2\pi }} {3}} \right) \hfill \\ \end{gathered} \right. $$ Concerning the range spanned by the solutions, apart for $n=1$ where we get the solutions (1,-2,1), then for $2 \le\; n$ we have $$ \frac{{\alpha (n)}} {3}\quad \left| {\;2 \leqslant n} \right.\quad = \frac{1} {3}\arctan _{\,4\,Q} \left( {n - 2,\;2\sqrt {\left( {n - 1} \right)} } \right) = \left\{ {\frac{\pi } {6},\frac{\pi } {{7.66}},\; \cdots } \right\} $$ which means: $$ \left\{ \begin{gathered} \quad \quad 2 \leqslant n \hfill \\ 0 < \frac{{\alpha (n)}} {3} \leqslant \frac{\pi } {6}\quad \Rightarrow \quad \sqrt 3 \leqslant y_{\,1} < 2 \hfill \\ 2\frac{\pi } {3} < \frac{{\alpha (n)}} {3} + 2\frac{\pi } {3} \leqslant \frac{5} {6}\pi \quad \quad \Rightarrow \quad - 2 < y_{\,2} \leqslant - \sqrt 3 \hfill \\ - 2\frac{\pi } {3} < \frac{{\alpha (n)}} {3} - 2\frac{\pi } {3} \leqslant - \frac{\pi } {2}\quad \quad \Rightarrow \quad - 1 < y_{\,3} \leqslant 0 \hfill \\ \end{gathered} \right. $$