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:
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.
- Apply NSolve to every element on this list in the variable $m$. This would sometimes give me multiple values of $m$.
- Somehow combine these values of $(\alpha, \beta, m)$, so that multiple values of $m$ give multiple entries in my list of values.
- 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!
ContourPlot
, it should be exactly for your case. $\endgroup$ContourPlot3D
? $\endgroup$ContourPlot3D[ 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$