# Double branch $\sqrt x$ or square function turned 90°?

I have this idea for a graph but don't know what function could describe it better.

The idea is something like the "squared" function turned $90$ degrees to the right, so that possible values for $x$ are always positive and $y$ may be both positive and negative.

The graphs of $\sqrt x$ and $-\sqrt x$ combined look good too, but I don't know how to write that as a single function (eh, I'm so bad with these things).

Basically, anything that may look like this will do.

Looking forward to some solution.

What you're looking for can be described as a parabola opening towards the positive $x$ axis. I'm going to refer to it as a "sideways parabola," since the "standard" parabola that people learn opens towards the positive $y$ axis.

The bad news: You cannot express a sideways parabola as a function of $x$. Why? Let's go back and look at a restriction on functions:

Vertical Line Test: For a relation to be a function, it must (colloquially) pass the vertical line test. That is, you must be able to draw a vertical line anywhere on the relation's graph and the line must intersect the relation in at most one point.

In the picture below, I've marked the two intersections that a vertical line makes on a sideways parabola. This shows that the sideways parabola is not a function. However, the good news is that one may still describe such a graph with mathematical notation. Two such ways are below, but keep in mind that they are not functions of $x$.

$$x=y^2$$ $$y=\pm\sqrt{x}$$

• okay, somehow i didn't know about the vertical line. this is a really good explanation, thank you. – Don Jan 14 '15 at 4:22

The graph you describe will have equation $x=y^2$.

You cannot write it in the form "$y=\langle\hbox{function of$x$}\rangle$" because, just as you pointed out, every $x>0$ will correspond to two $y$ values, not just one.

• Concise. Correct. +1. – MPW Jan 14 '15 at 4:55

If you want the square function $$y = x^2$$ turned 90 degrees to the right, you get the inverse $$x = y^2$$ or written in another way (like you already mentioned) $$y = \pm \sqrt{x}.$$

I'm not actually sure what you mean by writing it as a single function as it has two branches (the positive and the negative one).

• what i meant comes from the fact that i'm stuck with this program which will only accept input like y = sqrt(x), so there's no +/-, and giving it sqrt(x)+(-sqrt(x)) makes no sense of course. – Don Jan 14 '15 at 4:20
• Well, in that case graphing a function with two branches like that seems to be impossible. – 655321 Jan 14 '15 at 4:30
• More accurately, $y = \sqrt{x}$ is the inverse of $y = x^2, x \geq 0$, while $y = -\sqrt{x}$ is the inverse of $y = x^2, x \leq 0$. The equation $x = y^2$ is not a function of $x$ since there are two values of $y$ for each value of $x > 0$. – N. F. Taussig Jan 14 '15 at 12:54

The curve obtained by combining the graphs of $y = \sqrt{x}$ and $y = -\sqrt{x}$ is $x = y^2$. It is not a function of $x$ since there are two values of $y$ for each $x > 0$. However, you can use the parametric equations \begin{align*} x(t) & = t^2\\ y(t) & = t \end{align*} to write both $x$ and $y$ as functions of a third variable $t$. Observe that $x(t) = [y(t)]^2$.

By using parametric equations to express both $x$ and $y$ as functions of $t$, you can describe curves that are not necessarily functions of $x$.