It has been [proved](https://www.semanticscholar.org/paper/Sur-l%E2%80%99existence-locale-de-certaines-metriques-Gasqui/28e72863cb2fdaebe98288cce8427bc368229bfd) that,


If $\lambda\_1,\,\lambda\_2,\cdots,\lambda\_n$ are real analytic functions from $\mathbb{R}^n$ to $\mathbb{R}$, such that $\lambda\_i(0)\neq \lambda\_j(0)$ for $i\neq j$, then there exists a (real, analytic-) orthonormal coframe $\left(\omega\_1,\cdots,\omega\_n\right)$ in $(\mathbb{R}^n,g\_0)$, with $g\_0$ the standard Euclidean metric, defined in a neighbordhood of the origin such that the Riemannian metric


$$
g=\sum\_{i=1}^{n}e^{\lambda\_i}\omega\_i^2
$$


is flat. The condition $\lambda\_i(0)\neq \lambda\_j(0)$ overwhelms several physical applications, and I wonder if one can prove the same (or a similar) result when two of the functions, say $\lambda\_1$ and $\lambda\_2$, are identical, or at least when all the $\lambda$'s are constant and two of them are equal. The case $n=3$ is particularly interesting, but a naïve calculation of the Ricci tensor of the metric


$$
g=e^{\lambda\_1}\left(\sin\theta\,\mathrm{d} z-\cos\theta\,\left(\cos\phi\,\mathrm{d} x+\sin\phi\,\mathrm{d} y\right)\right)^{2}+e^{\lambda\_1}\left(\sin\phi\,\mathrm{d} x-\cos\phi\,\mathrm{d} y\right)^{2}+e^{\lambda\_3}\left(\cos\theta\,\mathrm{d} z+\sin\theta\,\left(\cos\phi\,\mathrm{d} x+\sin\phi\,\mathrm{d} y\right)\right)^{2}
$$


($\lambda\_1\neq\lambda\_3$ constanst) explodes, and it's not evident that one can find functions $\theta$ and $\phi$ that render the metric flat.



Local existence of flat metrics with degenerate singular values
Classifying the solutions is a non-trivial problem when two of the $\lambda\_i$ are equal, even when they are constants. The reason is that this is essentially an overdetermined problem when two of the $\lambda\_i$ are equal.


The point is this: When the $\lambda\_i$ are distinct, a choice of an orthonormal coframing $\omega = (\omega\_i)$ is essentially a map of $\mathbb{R}^3$ into $\mathrm{SO}(3)$, i.e., a choice of three functions of 3 variables. The requirement that the metric $g$ as defined above be flat is three equations, i.e., the vanishing of the three symmetric functions of the eigenvalues of the Ricci tensor of $g$. It's not surprising that this system of equations has local solutions (when the $\lambda\_i$ are distinct and real-analytic). Setting it up as an exterior differential system, one quickly finds that this system is involutive, and the Cartan-Kähler theorem does the job. (N.B.: This fact is not special to $3$-dimensions or to flatness. The Cartan-Kähler analysis I describe in [this MO answer](https://mathoverflow.net/questions/383244/local-obstructions-for-maps-with-constant-singular-values/383251#383251) generalizes without significant change to cover the case of not-necessarily-constant prescribed real-analytic singular value functions $\lambda\_1<\lambda\_2<\cdots<\lambda\_n$ on $M$ for real-analytic local mappings $f:(M^n,g)\to (N^n, h)$ between any two real-analytic Riemannian manifolds.)


However, when $\lambda\_1=\lambda\_2\not=\lambda\_3$, the situation is entirely different. Now, one doesn't need to specify a complete orthonormal coframe, just $\omega\_3$, a unit $1$-form, which is essentially a map of $\mathbb{R}^3$ into $S^2$, i.e., two functions of $3$ variables. Now, if $g\_0$ is the Euclidean metric, we can write $g$ in the form
$$
g = e^{\lambda\_1} g\_0 + (e^{\lambda\_3}-e^{\lambda\_1})\,{\omega\_3}^2,
$$
and the flatness condition on $g$, i.e., $\mathrm{Ric}(g) = 0$ is still three equations on the two unknowns that go into the definition of $\omega\_3$. For generic $\lambda\_1\not=\lambda\_3$, one does not expect there to be *any* solutions, even locally, but constructing an actual example of a pair $(\lambda\_1,\lambda\_3)$ for which no solution exists might be hard. (As a comparison, consider the even more restrictive case in which all the $\lambda\_i$ are equal. There, one definitely gets conditions on the function $\lambda = \lambda\_1=\lambda\_2=\lambda\_3$ in order for $e^\lambda g\_0$ to be flat. In fact, there is only a 4-parameter family of (local) functions $\lambda$ that satisfy these conditons, and, of course, we know these explicitly.) I expect that there will be *some* set of PDE relating $\lambda\_1$ and $\lambda\_3$ whose satisfaction tells whether solutions exist, but I have a feeling that this compatibility condition is liable to be quite complicated.


Even when $\lambda\_1$ and $\lambda\_3$ are constants, classifying the solutions is not trivial. Clearly, one can reduce to the case in which $\lambda\_1=0$ by scaling $g$ by a constant (which won't affect its flatness). For simplicity, set $e^{\lambda\_3} = a^2\not=1$. As Willie Wong has observed, taking $\omega\_3$ to have constant coefficients always gives a solution, which one can regard as 'trivial'.


Meanwhile, there are nontrivial solutions: Consider the following construction: Let $I\subset\mathbb{R}$ be an interval and let $f = (f\_i):I\to S^2$ be a smooth mapping. Consider, the $1$-parameter family of metrics
$$h\_{f,b}= du^2 + dv^2 + b^2\,\bigl(f\_1(t)\,u + f\_2(t)\,v + f\_3(t)\bigr)^2\,dt^2$$
in the domain $D\_f\subset\mathbb{R}^2\times I$ where $h\_{f,b}$ is positive definite, i.e., the complement of the locus where $f\_1(t)\,u + f\_2(t)\,v + f\_3(t)=0$. Here $b>0$ is a constant parameter. It is simple to verify that $h\_{f,b}$ is a flat metric for any choice of $f$ and $b$. As a result, there is a smooth local isometry $\phi\_f:D\_f\to\mathbb{R}^3$ so that $\phi\_f^\*(g\_0) = h\_{f,1}$, where $g\_0$ is the standard metric on $\mathbb{R}^3$. Restricting the domain of $\phi\_f$ to some open subset $D'\_f\subset D\_f$, if necessary, one can arrange that $\phi\_f:D'\_f\to\mathbb{R}^3$ be injective. Hence there will exist a unique quadratic form
$g\_{\lambda\_3}$ on the (open) image $\phi\_f(D'\_f)\subset\mathbb{R}^3$ such that $\phi\_f^\*(g\_{\lambda\_3}) = h\_{f,a}$. By construction,
$$
g\_{\lambda\_3} = g\_0 + (e^{\lambda\_3}-1)\,{\omega\_3}^2,
$$
where $\omega\_3$ is a $1$-form (of unit size with respect to $g\_0$); in fact,
$$
\phi\_f^\*(\omega\_3) = \bigl(f\_1(t)\,u + f\_2(t)\,v + f\_3(t)\bigr)\,dt.
$$
It's easy to show that this $g\_{\lambda\_3}$ is a 'trivial' solution if and only if $f\_1 = f\_2 = 0$, i.e., $f:I\to S^2$ is the constant map to either the north or south pole.


Thus, this construction gives a class of local solutions that essentially depend on two functions of one variable.


The remaining question is whether there are any solutions that are *not* equivalent to one of these up to isometries in $\mathbb{R}^3$.


What one can say is that, if there are any such solutions for given constants $\lambda\_1 = 0$ and $\lambda\_3\not=0$, there are not very many, even locally.
More precisely, using the Cartan structure equations, one can show the following: Suppose that one has a unit $1$-form $\omega\_3$, such that
$$
g = g\_0 + (e^{\lambda\_3}-1)\,{\omega\_3}^2
$$
is flat (where $\lambda\_3$ is a nonzero constant). Let $X$ be the vector field $g\_0$-dual to $\omega\_3$ and consider the quadratic form
$$
Q = \mathscr{L}\_X\bigl(g\_0-{\omega\_3}^2\bigr).
$$
If $Q$ is identically zero, then $g$ arises locally from the above construction using an $f:I\to S^2$. Moreover, there is at most a $6$-dimensional space of local solutions $\omega\_3$ that have a non-zero $Q$. (Probably, the space of such solutions has considerably smaller dimension, but I don't know how much smaller.)


