2
$\begingroup$

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]
$\endgroup$
2
  • $\begingroup$ Why not directly plot the expression in terms of InverseErf[] that you get from Solve[]? $\endgroup$ Commented May 27, 2013 at 7:17
  • $\begingroup$ I want to be able to do this for a general f(x,y) $\endgroup$
    – l3win
    Commented May 27, 2013 at 7:26

1 Answer 1

6
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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