I have the following parametric equation $$ x^2-a=0 $$ where $a$ is a given parameter. I would like to plot the nonnegative real root ($\sqrt{a}$) using NSolve as $a$ varies from $0$ to $1$. Can someone please teach me how to do this in Mathematica 10 Student Edition? Thank you very much!
I tried
Plot[NSolve[
x^2 - a == 0 && Element[x, Reals] == True && x >= 0, {x}], {a, 0, 1}]
but the output was empty.
p.s. My actual equation is much more complicated and I don't have an analytical solution, hence NSolve.
Plot[x /. Solve[x^2 - a == 0, {x}], {a, 0, 1}]– Dr. belisarius Dec 17 '14 at 06:00NSolvewith some numericavalue, say,a=1you will see the following:a = 1; NSolve[x^2 - a == 0 && Element[x, Reals] == True && x >= 0, x]yields the following:{{x -> 1.}}. This is what you get under the operatorPlot. For this reasonPlotreturns and empty thing. One workaround is to use the belisarius construct given above. – Alexei Boulbitch Dec 17 '14 at 09:24