7
$\begingroup$

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!

$\endgroup$
1
  • $\begingroup$ What does $\;0\sqrt{-x}\;$ mean? Zero times the square root of minus $\;x\;$ ? That's just zero... $\endgroup$
    – Timbuc
    Jul 3, 2015 at 19:08

2 Answers 2

7
$\begingroup$

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]$.

$\endgroup$
4
  • $\begingroup$ So overall WA is correct ? I guess the issue of Desmos comes with the fact that it does not support complex numbers... $\endgroup$
    – NeilRoy
    Jul 3, 2015 at 16:29
  • 1
    $\begingroup$ I like this answer, I think it really gives the full story - that we need to choose whether we allow complex square roots, or only real-valued ones, before we can say which is correct. They're really plotting different $\sqrt{x}$ functions. $\endgroup$
    – pjs36
    Jul 3, 2015 at 16:30
  • $\begingroup$ @NeilRoy, both programs are correct. They are answering questions that are slightly different on a technical level. $\endgroup$
    – vadim123
    Jul 3, 2015 at 16:31
  • $\begingroup$ umm..So what should I do when i am given any graph to plot by hand? First check the domain? Or first solve the equation? $\endgroup$
    – NeilRoy
    Jul 4, 2015 at 3:08
3
$\begingroup$

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.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .