1
$\begingroup$

I have a fourth-degree polynomial equal to 0: $a_2m + 2a_4m^3 + 3a_6m^4 =0 $.

$a_2$ and $a_4$ are functions of $\alpha, \beta$: $a_2 = 1/2 (1-\frac{2\beta}{2+e^{\alpha^2(\beta-1)}})$ and $a_4 = \beta^3 \frac{4-(1+2\alpha^2)e^{\alpha^2(\beta-1)}}{(2+e^{\alpha^2(\beta-1)})^2}$.

Note that $\alpha \in [0, \infty)$, $\beta \in (0, \infty)$, but plotting for $\alpha \in [0, 0.7)$, $\beta \in (0, 1.3)$ should be sufficient.

Let's assume that $3a_6 = 1$. Now, if I try to plot my function implicitly as a function of $m, \alpha, \beta$, then Mathematica (understandably) has a breakdown. I was thinking it would make the most sense to plot some list of values of $m, \alpha, \beta$ that solve the equation. However, although I have racked my brain, I just cannot figure out how to do this, because given a value of $(\alpha, \beta)$, there are often multiple values of $m$.

I've been digging on StackExchange and the documentation to see where I can begin, but I'm really stuck. What I see as what I should do:

  1. Create a list of ($\alpha, \beta$) values for $\alpha \in [0, 0.7)$, $\beta \in (0, 1.3)$. I could do this using, for example

    Flatten[Table[{a, b}, {a, 0, 0.7, 0.01}, {j, 0, 1.3, 0.02}], 1]

(Although this doesn't feel very elegant). I would probably start with around 10,000 coordinates total if this is something Mathematica could handle.

  1. Apply NSolve to every element on this list in the variable $m$. This would sometimes give me multiple values of $m$.
  2. Somehow combine these values of $(\alpha, \beta, m)$, so that multiple values of $m$ give multiple entries in my list of values.
  3. Plot this list of values of $(\alpha, \beta, m)$ using ListPointPlot3D or ListPlot3D (this seems very doable).

Help on any of the steps would be appreciated, or if you think I'm going about this the wrong way please let me know!

$\endgroup$
5
  • 2
    $\begingroup$ Try ContourPlot, it should be exactly for your case. $\endgroup$
    – yarchik
    Dec 6, 2022 at 13:52
  • 3
    $\begingroup$ Please provide Mathematica code. Makes helping easier! Did you try ContourPlot3D ? $\endgroup$ Dec 6, 2022 at 13:53
  • $\begingroup$ I have triedContourPlot3D[ m^4 + 2g[a, B] m^3 + k[a, B]*m == 0, {m, -1, 1}, {a, 0, 1.3}, {B, 0, 0.7}] with the functions g and k defined as the functions for alpha and beta: k[a_, B_] := 1/2 (1 - (2*B)/(2 + E^(a^2*B - a^2))) g[a_, B_] := B^3/12*(4 - (1 + 2 a^2) E^(a^2*B - a^2))/(2 + E^(B*a^2 - a^2)) This gives me a plot that does not seem at all accurate. $\endgroup$
    – Fellon
    Dec 6, 2022 at 14:01
  • $\begingroup$ "if I try to plot my function implicitly as a function of $m$, $α$, $β$, then Mathematica (understandably) has a breakdown." How do you cause the breakdown? Can you add the code? $\endgroup$
    – xzczd
    Dec 6, 2022 at 14:13
  • $\begingroup$ Hi, see my comment before yours. The code gives me a plot that has the zero solution, and one more surface that does not appear to be correct. There should be a cusp shape $\endgroup$
    – Fellon
    Dec 6, 2022 at 14:32

1 Answer 1

1
$\begingroup$

Try ( m!=0, a6==0 )

poly = 1/2 (1 \[Minus] (2 \[Beta])/(2 + Exp[\[Alpha]^2 (\[Beta] \[Minus] 1)])) + 2 (\[Beta]^3 (4 \[Minus] (1 + 2 \[Alpha]^2 ) Exp[\[Alpha]^2 (\[Beta] \[Minus]1)]))/(\[Alpha]^2 (\[Beta] \[Minus] 1))^2  m^2; 
ContourPlot3D[poly == 0, {\[Alpha], 0, 1}, {\[Beta], 0, 2}, {m, -2, 2},AxesLabel -> {\[Alpha], \[Beta], m}]

enter image description here

General case a6==1/3

poly = 1/2 (1 \[Minus] (2 \[Beta])/(2 + Exp[\[Alpha]^2 (\[Beta] \[Minus] 1)])) m + 2 (\[Beta]^3 (4 \[Minus] (1 + 2 \[Alpha]^2 ) Exp[\[Alpha]^2 (\[Beta] \[Minus] 1)]))/(\[Alpha]^2 (\[Beta] \[Minus] 1))^2  m^3 + 1/3 m^4

ContourPlot3D[poly == 0, {\[Alpha], 0, 1}, {\[Beta], 0, 2}, {m, -2, 2}, AxesLabel -> {\[Alpha], \[Beta], m}]

enter image description here

$\endgroup$
2
  • $\begingroup$ Thanks! How did you plot for m!=0? I just edited the question because I had accidentally written 3a_6=0 instead of 3a_6=0, which is what I meant to write. Does that change anything? $\endgroup$
    – Fellon
    Dec 6, 2022 at 14:10
  • $\begingroup$ My intention was to simplify the plot. Change to poly = 1/2 (1 \[Minus] (2 \[Beta])/(2 + Exp[\[Alpha]^2 (\[Beta] \[Minus] 1)]))m + 2 (\[Beta]^3 (4 \[Minus] (1 + 2 \[Alpha]^2 ) Exp[\[Alpha]^2 (\[Beta] \[Minus]1)]))/(\[Alpha]^2 (\[Beta] \[Minus] 1))^2 m^3; In my answer I assumed a6==0 . $\endgroup$ Dec 6, 2022 at 15:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.