Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

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.

share|improve this question

marked as duplicate by Szabolcs, MarcoB, Yves Klett, Öskå, Sjoerd C. de Vries Apr 23 at 22:14

This question was marked as an exact duplicate of an existing question.

    
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? – Szabolcs Apr 20 at 12:59
    
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. – user327440 Apr 20 at 13:11
    
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. – Szabolcs Apr 20 at 15:17
1  
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 ... – Szabolcs Apr 21 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

share|improve this answer
    
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. – user327440 Apr 25 at 8:15

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