homeomorphism from square to disk I am looking at an exercise to find a homeomorphism from $[-1,1] \times [-1,1]$ to the unit disk.
A possible solution may be $$y_{i} = \frac{\left \| x \right \| x_{i}}{ max(|x_{1}|,|x_{2}|)}$$
for a point $x$ from the unit disk to a point y from the unit square. And $0$ is mapped to $0$.
But what is the thought process to come up with that?
Some idea seems to be to look at the intersection point with the square but I don't really understand that.
 A: Your formula is not quite correct, you need absolute values around $x_1$ and $x_2$ in the denominator.
The thought process for arriving at a formula starts by drawing a picture: the unit disk, which I'll denote $D$, is inscribed in the square $S = [-1,1] \times [-1,1]$, tangent to the midpoint of each of the four sides of that square. 
Now consider any ray in the Euclidean plane based at the origin, denoted $R$. On $R$ there are two special points: the point $D(R)$ which is the last point of $R$ in $D$, namely the point where $R$ intersects the unit circle; and the point $S(R)$ the last point of $R$ in $S$, which is the last point where $R$ intersects the boundary of the square $S$. 
So, the idea of the homeomorphism is: map the origin $\mathcal O$ to itself; and then for each ray $R$, map the point $D(R)$ to the point $S(R)$, and then extend this to a map of the segment $\overline{\mathcal O D(R)}$ to the segment $\overline{\mathcal O S(R)}$. To define that extension, simply scale the first segment (whose length equals $1$) to the second segment (whose length equals the norm $\|S(R)\|$) by multiplying by a scalar equal to $\|S(R)\|$. 
Now comes the tricky part: given $x=(x_1,x_2) \in D$, I have to determine the correct scalar to multiply by, so I have to think about the ray $R_x$ that starts from the origin, then passes through $x$, and then through $D(R_x)$, and then through $S(R_x)$, and then I have to compute the norm of $S(R_x)$. A little thought shows that
$$S(R_x) = \frac{x}{\text{max}\{|x_1|,|x_2|\}}
$$ 
which has norm
$$\|S(R_x)\| = \frac{\|x\|}{\text{max}\{|x_1|,|x_2|\}}
$$
and so the final formula for the desired map is
$$x \mapsto \|S(R_x)\| \, x = \frac{\|x\| \, x}{\text{max}\{|x_1|,|x_2|\}}
$$
Letting $y$ be the image point with coordinates $y=(y_1,y_2)$ then you can write this formula as
$$y_i = \frac{\|x\| \, x_i}{\text{max}\{|x_1|,|x_2|\}}
$$
