Inverse of 2d function involving sine and cosine

162 Views Asked by At

I have the function $f: \mathbb R^2 \to \mathbb R^2$ or more precisely

$$f\left([0,\pi/2]^2\right)=\{(x,y) \in \mathbb R^2 : \Vert (x,y) \Vert \leq 1 \text{ and } y\geq0\}$$

which means it is a bijection between the square $[0,\pi/2]^2$ and the upper half of an unit circle with $$f: (x,y) \mapsto \Big( \sin(x-y) \:\: , \:\: \frac{1}{2} \cos(x-y) - \frac{1}{2} \cos(x+y) \Big) \\= \Big( \cos(y)\sin(x)-\cos(x)\sin(y) \:\: , \:\: \sin(x)\sin(y) \Big)$$

(As you can see I have already found two ways of expressing this function with the help of the addition theorems.) Now I need an explicit inverse that is defined on the set mentioned above. Does an explicit one exists? (It feels that it should.) And how can I find it?

I think it might be perhaps (?) be easier to look at this function as $f: \mathbb C \to \mathbb C$ but I did not succeed with this either.

2

There are 2 best solutions below

2
On BEST ANSWER

Let's write $$(u,v) = \Big( \sin(x-y) \:\: , \:\: \frac{1}{2} \cos(x-y) - \frac{1}{2} \cos(x+y) \Big)$$ As Daniel Fischer noted, $$x-y=\arcsin u\tag1$$ because $-\pi/2\le x-y\le \pi/2$. Furthermore, we have $$\cos(x+y) = \cos(x-y)-2v = \sqrt{1-u^2}-2v$$ hence $$x+y = \arccos(\sqrt{1-u^2}-2v)\tag2$$ because $0\le x+y\le \pi$. You can get $(x,y)$ from (1) and (2).

0
On

I originally posted this general idea of using ellipses in that reddit thread you posted, but I figured I could post it here as well since I fleshed out the idea in full now, just for fun.

The idea was to use the intersection of two ellipses as defining the mapped point. This is based on the system of parabolic coordinates with some tweaks. It turns out it ends up being much simpler and requires no trigonometric functions. Here's the basic setup:

Two ellipses intersect at two points, only one of them in the upper half disk

So, we take their eccentricities as the coordinates $u$ and $v$, with $0 \leq u, v \leq 1$. Using this idea, we can define simply:

$$x = v - u$$

$$y = \sqrt{ (v^2 - 1) (u^2 - 1) }$$

Which will map to the upper half disk as desired. The conversion to polar coordinates is easy then.

Here's how the map looks like:

elliptical coordinate system

The problem is that all coordinates are bunched up on the outer part of the disk. This can be tweaked with some function composition to act as a scaling factor. Some flipping of the parameters may be desired ($u \to 1 - u$, etc.)

Here's using $$u \to \sin(u\tfrac{\pi}{2})$$ and similarly for v:

elliptical coordinates with sin(x pi/2) scaling factor

Looks great and uniform now.