How plot $\sqrt{|x|}+\sqrt{|y|}=1$

129 Views Asked by At

I am doing this question as a continuation of this following

Previous question

I don't know well how draw the plot of $\sqrt{|x|}+\sqrt{|y|}=1$. My idea: $$\sqrt{|x|}+\sqrt{|y|}=1\implies \sqrt{|y|}=1-\sqrt{|x|}$$ The last tells me that, since $\sqrt{|y|}\geq 0$ then necessarily $1-\sqrt{|x|}\geq 0\iff -1\leq x\leq 1$. Now squaring the last equation I will have: $$|y|=(1-\sqrt{|x|})^2$$ Now I have some doubts: I know that $|y|=\begin{cases} y \,\,\,\,\,\,,if \,\,\,\,\,y\geq 0\\ -y \,\,\,\,\,\,,if\,\,\,\,\, y\leq 0\end{cases}$

But now how can I use this fact in rewriting the equation? Is the following right? $$y=\begin{cases} (1-\sqrt{|x|})^2\,\,\,, if \,\,y\geq 0\\ -(1-\sqrt{|x|})^2\,\,\,, if \,\,y<0\end{cases}$$ So in essence under $x$ axis I will consider the equation with minus sign and over the equation with $+$?

2

There are 2 best solutions below

2
On

just plot the graph in the first quadrant and then flip it to all 4 quadrants.
you are guaranteed to get the accurate graph.

here's why the flipping works :
consider $\sqrt{x}+\sqrt{y}=1$
you can only plug in positive x's and output will be positive y's only.


now consider $\sqrt{|x|}+\sqrt{y}=1$
we can put in both positive and negative x values but we can only get positive y values. note carefully that putting $+x$ or $-x$ will not affect the output y value.

now take $\sqrt{|x|}+\sqrt{|y|}=1$
here we can put any kind of x, positive or negative but we get two corresponding y's, potive and negative.
thus we can stretch our domain and range to all real numbers.

so all we do is plot $\sqrt{x}+\sqrt{y}=1$

the final plot is this : enter image description here

2
On

You are correct that $x\in[-1,1].$

Your formula for $y$ is too, after the edit.

Worth noting that if $(x,y)$ is a point of this graph, then $(y,x)$ is too.

Sometimes it is easier to “parameterize” an equation.

For $t\in [0,1]$ the points $(t^2,(1-t)^2)$ trace all the points of this graph in the first quadrant.

That lets you find a lot of points without solving $y$ for $x$ or visa versa, which tend to be ugly formulas. In particular, for this formula, $x$ and $y$ are rational when $t$ is. You won’t need to do any square roots.

If you know calculus, the parameterization also explains the spikes at the ends of the graph, because the derivative at $t=0$ is $(0,-2)$ and the derivative at $t=1$ is $(2,0),$ so the graph is going “straight down” at the start, and straight right at the end.