Functions satisfying $f^2+g^2=1$ I am asked to prove that if $f,g$ are differentiable functions and $f^2(x)+g^2(x)=1$ $\forall x$, then there exists a differentiable function $\theta$ so that $f(x)=\cos(\theta(x))$ and $g(x)=\sin(\theta(x))$, $\forall x$.
The proof can't use complex numbers. I'm suggested to use $\theta' = fg'-gf'$, but I haven't been able to make any considerable progress.
 A: Pick $\theta_0$ such that $f(0) = \cos(\theta_0)$ and $g(0) = \sin(\theta_0)$.
If you don't assume that $f$ and $g$ are continuously differentiable, things get a little bit hairy and require a high-level result. I will provide this proof now. Define $S = \{(x, y) \in \mathbb{R}^2 : x^2 + y^2 = 1\}$ to be the unit circle. Then since $f$ and $g$ are continuous, we have a continuous map $h : \mathbb{R} \to S$ defined by $h(x) = (f(x), g(x))$.
Now consider the map $\pi : \mathbb{R} \to S$ defined by $\pi(x) = (\cos(x), \sin(x))$. It is a well-known fact that this is a covering space.
Because $\pi : \mathbb{R} \to S$ is a covering, $\pi(\theta_0) = h(0)$, and $h$ is continuous, there exists a unique continuous map $\theta : \mathbb{R} \to \mathbb{R}$ such that $h = \pi \circ \theta$ and $\theta_0 = \theta(0)$. This follows easily from the path lifting property of covering spaces. This is therefore a $\theta$ such that $\cos \circ \theta = f$ and $\sin \circ \theta = g$.
It now remains to show that $\theta$ is a differentiable function. Consider some $x \in \mathbb{R}$. Since $\pi$ is a local diffeomorphism, we can take some neighbourhood $U$ of $\theta(x)$ such that $\pi|_U : U \to \pi(U)$ is a diffeomorphism. Let $\tau : \pi(U) \to U$ be the inverse diffeomorphism of $\pi|_U$. Let $V = \theta^{-1}(U)$; then $V$ is an open set, and $x \in V$.
We see that $h|_V = \pi|_U \circ \theta|_V$. Then $\tau \circ h|_V = \tau \circ \pi|_U \circ \theta|_V = \theta|_V$. Since $\tau$ and $h|_V$ are both differentiable, so is $\theta|_V$. That is, $\theta$ is differentiable in an an open neighbourhood of $x$. Then $\theta$ is differentiable at $x$.
Then $\theta$ is differentiable.
