I am trying to find a relation between coefficients $a$ and $b$ of the equation $a x^3 + b x^2 - x + 2 =0$ so that I get positive real roots of the equation (i.e. $x\geq0$). Any help on how to do this on Mathematica 12?
$\begingroup$
$\endgroup$
2
-
2$\begingroup$ Check the function Discriminant. $\endgroup$– Daniel LichtblauCommented Jul 10, 2023 at 13:39
-
$\begingroup$ @DanielLichtblau Thanks I have taken the discriminant, g[a_, b_] := Discriminant[a^2 x^3 + 2 b x^2 - x + 2, x] and done a region plot, RegionPlot[g[a, b] >= 0, {a, -2, 2}, {b, -2, 2}, FrameLabel -> {"a", "b"}]. It solves my problem! $\endgroup$– misphyzCommented Jul 10, 2023 at 14:27
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
5
Try:
Solve[a*x^3 + b*x^2 - x + 2 == 0 && x >= 0, x, Reals]
You should get the roots (3) with the conditional domains for the coefficients. The notebook will return them as icons which you can expand and examine.
-
$\begingroup$ +1 You could also append
//ToRadicals
or//ToRadicals//InputForm
$\endgroup$ Commented Jul 10, 2023 at 14:30 -
$\begingroup$ Using
ToRadicals
will not readily help due to the casus irreducibilis. $\endgroup$ Commented Jul 10, 2023 at 17:43 -
$\begingroup$ @DanielLichtblau -
ToRadicals
alleviates the panic that some experience when encounteringRoot
expressions. In this case, the order of the polynomial is low enough thatToRadicals
will always work to eliminate theRoot
representation. $\endgroup$ Commented Jul 10, 2023 at 18:57 -
$\begingroup$ I realize it will eliminate the
Root
expressions. The problem is that both cases of one and three real roots will be indistinguishable (ignoring the case wherea=0
and there are only two roots). That's the gist of the casus irreducibilis: the radical expressions will have explicit imaginary values even when they are real-valued.... $\endgroup$ Commented Jul 10, 2023 at 21:23 -
$\begingroup$ ...Example:
In[2702]:= rads = ToRadicals[SolveValues[x^3 + -5*x^2 - x + 2 == 0, x]] N[rads] // Chop Out[2702]= {5/3 - (14 (1 + I Sqrt[3]))/( 3 (1/2 (241 + 9 I Sqrt[367]))^(1/3)) - 1/6 (1 - I Sqrt[3]) (1/2 (241 + 9 I Sqrt[367]))^(1/3), 5/3 - (14 (1 - I Sqrt[3]))/(3 (1/2 (241 + 9 I Sqrt[367]))^(1/3)) - 1/6 (1 + I Sqrt[3]) (1/2 (241 + 9 I Sqrt[367]))^(1/3), 1/3 (5 + 28/(1/2 (241 + 9 I Sqrt[367]))^( 1/3) + (1/2 (241 + 9 I Sqrt[367]))^(1/3))} Out[2703]= {-0.6874, 0.568373, 5.11903}
$\endgroup$ Commented Jul 10, 2023 at 21:23