Homeomorphism from square to unit circle
Let me outline a proof; I shall leave the details of this proof as exercises.
Exercise 1: Prove that the unit circle $S^1$ is homeomorphic to the space obtained from the unit interval $[0,1]$ by identifying the endpoints $0$ and $1$. (Hint: the exponential mapping $\theta\to e^{i\theta}$ can be composed with a linear mapping to give a homeomorphism.)
Let $C$ be the image of a simple closed curve in the plane, that is, let $C$ be the image of a continuous function $f:[0,1]\to \mathbb{R}^2$ such that $f:(0,1)\to\mathbb{R}^2$ is injective and $f(0)=f(1)$.
Exercise 2: Prove that $C$ is homeomorphic to the unit circle $S^1$. (Hint: show that $f:[0,1]\to C$ induces a continuous bijection $\tilde{f}:S^1\to C$ using Exercise 1 and then show that $f$ is an open mapping using the compactness of $S^1$ and the fact that the plane is Hausdorff.)
We now need an elementary lemma of point-set topology:
Exercise 3: Let $X$ be a topological space and let $X=A\cup B$ where $A$ and $B$ are closed subspaces of $X$. Prove that if $g:A\to Y$ and $h:B\to Y$ are continuous functions into a topological space $Y$ such that $g(x)=h(x)$ for all $x\in A\cap B$, then there is a unique continuous function $f:X\to Y$ such that $f(a)=g(a)$ and $f(b)=h(b)$ for all $a\in A$ and $b\in B$.
Finally, we can prove the result of your question:
Exercise 4: Prove that the unit square is the image of a simple closed curve in the plane and conclude that it is homeomorphic to the unit circle. (Hint: you can use Exercise 3 to "glue" continuous mappings together.)
Exercise 5: Give examples of images of simple closed curves in the plane (using Exercise 3) and conclude (using Exercise 2) that they are homeomorphic to the unit circle $S^1$.
I hope this helps!
I'm not sure why you need algebraic formulas. Define each map $f$ to be radial projection onto the appropriate curve (from the origin) and find continuity by the property "$\forall$ neighborhood $U$ of $f(x)$ $\exists$ a neighborhood of $x$ whose image is contained in $U$", which is easy to check by eye.
It seems off to me. For example, in your second map, the point $(1,0)$, which is on the unit circle, gets mapped to $(\frac1{\sqrt2},0)$, which is not on the square.
If I were you, I would write out the four different maps for each side of the square - I think it simplifies the process, especially since once you remove the max terms, the function is easier to work with.