I am trying to plot a solution to a Solve result, ie I have a function f(x,y) and I want to plot y=y(x) for when f(x,y) = 0.06366. Here is what I am trying to do

f[x_, y_] := 0.5*Erf[(y - 0.04*x^2)/(0.1*Sqrt[x])] + 0.5;
Plot[Evaluate@Table[Solve[f[x, y] == 0.06366, {x, y}, {y, Range[0, 1, 0.2]}],
{x, 0, 7}], PlotRange -> Full]
  • $\begingroup$ Why not directly plot the expression in terms of InverseErf[] that you get from Solve[]? $\endgroup$ – J. M. will be back soon May 27 '13 at 7:17
  • $\begingroup$ I want to be able to do this for a general f(x,y) $\endgroup$ – l3win May 27 '13 at 7:26

Something like the following will do the job:

f[x_, y_] := 0.5*Erf[(y - 0.04*x^2)/(0.1*Sqrt[x])] + 0.5;
Plot[y /. Solve[f[x, y] == 0.06366, y], {x, 0, 7}]

I just copied the method from the "Solve" help page in Mathematica.

enter image description here


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.