I have two functions, let's call them $F1$ and $F2$. Both take the same three arguments: $x1, x2$ and $\epsilon$. With every $\epsilon^* \in [0,1]$, there should be either zero or one unique point $(x1^*,\,x2^*)$ that is a solution to

$\qquad F1(x1^*,\,x2^*,\,\epsilon^*) = 0$

$\qquad F2(x1^*,\,x2^*,\,\epsilon^*)= 0.$

What I want to do is make a plot with $\epsilon$ on the x-axis and the two values of $(x1,\,x2)$ on the y-axis so that for every $\epsilon \in [0,1]$ I display the $(x1,x2)$ pair that solves the above equation (if it exists). I know I could do this numerically by gathering points by solving the system for different $\epsilon$ values, but is there a more elegant solution. If not, I would also appreciate help on the numerical solution, since I'm not very comfortable with the Wolfram Language.

  • $\begingroup$ I'm not sure I understand your question. Are you asking how to solve equations? Are you asking how to plot the obtained solutions? Can you show what you did so far and at which point you got stuck? Are you asking for symbolic (i.e. not numeric) solutions? If yes, why do you think it is possible at all and what do your equations look like? $\endgroup$ – Szabolcs Apr 20 '16 at 12:59
  • $\begingroup$ I am not asking how to solve equations. What I would like to do is something similar to ContourPlot, where you are not explicitly solving the equation, but you can still plot the isoclines. I know that the solutions exist, because I can draw the isoclines for both functions with a set $\epsilon$ and see that they either cross at one point, or not at all. $\endgroup$ – user327440 Apr 20 '16 at 13:11
  • $\begingroup$ Oh, now I understand. I don't think this is possible purely with plotting functions (though I might always be wrong). I would use FindRoot to solve the equations then plot the result using ParametricPlot3D. $\endgroup$ – Szabolcs Apr 20 '16 at 15:17
  • 1
    $\begingroup$ Actually ... this is a duplicate of a question I answered and I have completely forgotten about. So it's quite embarrassing that I said that it's not possible ... $\endgroup$ – Szabolcs Apr 21 '16 at 15:36

I think it is actually possible to do this purely with plotting function.

We can abuse MeshFunctions and ContourPlot3D to do it.

f1[x1_, x2_, e_] := x1^2 + x2^2 - e
f2[x1_, x2_, e_] := x1 - x2 - e

ContourPlot3D[f1[x1, x2, e] == 0, {x1, -3, 3}, {x2, -3, 3}, {e, 0, 3},
  MeshFunctions -> {Function[{x1, x2, e}, f2[x1, x2, e]]}, 
 Mesh -> {{0}},
 PlotPoints -> 40,
 ContourStyle -> None,
 BoundaryStyle -> None, AxesLabel -> {"x1", "x2", "e"}]

Mathematica graphics

| improve this answer | |
  • $\begingroup$ This seems to be more or less what I wanted to do, but in 3D. I ended up forcing it though, finding the roots with FindRoot and making a list out of them. $\endgroup$ – user327440 Apr 25 '16 at 8:15

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