I have an equation, that I want to solve numerically. The equation is


The problem here is the $\gamma$. What I want to achieve is a plot of the solutions in the $(x,y,\gamma)$-space. Actually, I want to plot ther borders of the surface, to make the other surfaces visible as well, but this is another issue. I have a fixed value of $c$ and I realized, that symbolically, this would get quite hard. So my first approach was something like this:

$Assumptions = gamma >= 0 && x>=0 && z>=0;
c = 0.1732;
dx := x*(1 - c*x) - x*y/(1 + y^(1 + gamma))

I get the following error

NSolve was unable to solve the system with inexact coefficients. 

Isn't there a simple solution to obtain all positive real solutions for $x$, assuming that $y>= 0$?

Thank you!

  • $\begingroup$ Use Rationalize around c and the step size to get rid of the message. $\endgroup$ – user21 Sep 24 '19 at 8:15
  • $\begingroup$ Reduce[x*(1 - c*x) - x*y/(1 + y^(1 + gamma)) == 0, gamma, Reals] returns what looks like a legitimate solution fairly quickly $\endgroup$ – gpap Sep 24 '19 at 8:43
  • $\begingroup$ @user21 This indeed helps to get rid of the method. But I am searching for a solution of some form $x(y,\gamma)$ and I am only getting ConditionalExpression with this. Any idea? $\endgroup$ – gumpel Sep 24 '19 at 9:01
  • $\begingroup$ @gpap This may be right. But I can't confirm this because I don't know how to plot these expressions.. Any idea on this? $\endgroup$ – gumpel Sep 24 '19 at 9:04
  • 1
    $\begingroup$ What's z? Do you mean y? $\endgroup$ – Chris K Sep 24 '19 at 9:13

If you're only interested in the plot, not the functional form of x[y, gamma], then you can use ContourPlot3D:

ContourPlot3D[dx == 0, {gamma, 0, 1}, {y, 0, 5}, {x, 0, 1/c},
  AxesLabel -> {gamma, y, x}]

Mathematica graphics

| improve this answer | |
  • $\begingroup$ Perfect, thank you. Do you, by chance, know whether/how it is possible to plot only the borders of the surfaces? $\endgroup$ – gumpel Sep 24 '19 at 9:52
  • $\begingroup$ @gumpel Sorry, I don't know about plotting the borders only. Maybe look at ContourPlot3D options. $\endgroup$ – Chris K Sep 24 '19 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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