Plot of $y=x+0\sqrt{-x}$ (and WolframAlpha vs Desmos)

993 Views Asked by At

To plot the graph of $y=x+0\sqrt{-x}$ :

Do we have to first find out the domain of $y$ which is $y \in ( -\infty,0 ]$ ? $\color{blue}{\text{[Case 1]}}$ (that's what I do)

Or do we solve the equation first resulting in $y=x$ ? $\color{blue}{\text{[Case 2]}}$


When plotted in WolframAlpha, it does it through Case 2 as :

1

But when plotted in Desmos, it goes via Case 1 as: (Which I think is correct)

2


So which is correct?

Thanks!

2

There are 2 best solutions below

4
On BEST ANSWER

This is a fairly technical question, and therefore will admit a technical answer.

If $x,y$ are restricted to be real (or rational) numbers, then $\sqrt{-x}$ is undefined for $x>0$. Once we have an undefined quantity, we cannot proceed further, even multiplying it by zero. Hence with this restriction Desmos is correct.

However, if $x,y$ are allowed to be complex numbers, then $\sqrt{-x}$ is (multiply) defined for real $x>0$. It is natural to take the principal value of the square root, but it doesn't matter, with any branch you end up multiplying the result by zero. Hence if $y$ is allowed to be complex, then Alpha gives the correct solution. Note that if you ask Alpha for properties of the function (like this), it tells you that as a real function the domain and range are both $(-\infty,0]$.

0
On

Either order is fine. The issue with Desmos is that it is restricting the domain (artificially) to non-positive numbers because $\sqrt{-x}$ is complex for other numbers. In reality, having complex numbers is fine, and indeed, the next step, which is to multiply by zero makes the number real again. Wolfram alpha's plot is more correct, while Desmos' plot is incomplete.