Can a Sphere be Flattened? We consider 2D metric:
$ds^2={d\theta}^2+\sin^2(\theta)d{\phi}^2$ (1) 
Is it possible to transform the above metric to the form: $ds^2=dx^2+dy^2$ (2) 
Let's check: Initially we write equation (2) in the form: $ds'^2=dx^2+dy^2$ (3)
For relations (1) and (3) we use the following transformations:
$\theta=f_1(p,q)$
$\phi=f_2(p,q)$ 
$x=f_3(p,q)$
$y=f_4(p,q)$ 
$d(\theta)=[ \partial{f_1} / \partial{p} ]dp  + [ \partial{f_1}/ \partial{q}] dq$
$d(\phi)=[\partial{f_2}/\partial{p} ]dp  + [\partial{f_2}/\partial{q}] dq$
$dx=[\partial{f_3}/\partial{p} ]dp  + [\partial{f_3}/\partial{q}] dq$
$dy=[\partial{f_4}/\partial{p} ]dp  + [\partial{f_4}/\partial{q}] dq$
Using the above transformations in (1) and (3) we have:
$ds'^2=[(\partial{f_1}/\partial{p})^2+\sin^2(f_1)(\partial{f_2}/\partial{p})^2]dp^2+[(\partial{f_1}/
\partial{q})^2+\sin^2(f_1)(\partial{f_2}/\partial{q})^2]dq^2$ 
$+2[(\partial{f_1}/\partial{p} )( \partial{f_1}/\partial{q})+\sin^2(f_1) (\partial{f_2}/\partial{p} )( \partial{f_2}/\partial{q})]dpdq \qquad$    (4)
And
$ds^2=[(\partial{f_3}/\partial{p})^2+(\partial{f_4}/\partial {p})^2]dp^2+[(\partial{f_3}/\partial{q})^2+ (\partial{f_4}/\partial{q})^2]dq^2$ $+2[(\partial{f_3}/\partial{p} ) (\partial{f_3}/\partial{q})+ (\partial{f_4}/\partial{p})
(\partial{f_4}/\partial{q})]dpdq \qquad$ (5)
To make $ds^2=ds'^2$ we may consider the following equations:
(denoted by SET A):
$(\partial{f_1}/\partial{p})^2+\sin^2(f_1)(\partial{f_2}/\partial{p})^2= (\partial{f_3}/\partial{p})^2+(\partial{f_4}/\partial{p})^2$ (A1)
$(\partial{f_1}/\partial{q})^2+\sin^2(f_1)(\partial{f_2}/\partial{q})^2= (\partial{f_3}/\partial{q})^2+(\partial{f_4}/\partial{q})^2$ (A2)
$\frac{\partial{f_1}}{\partial{p}}\frac{\partial{f_1}}{\partial{q}}+ \sin^2(f_1) \frac{\partial{f_2}}{\partial{p}}  \frac{\partial{f_2}}{\partial{q}} =\frac{ \partial{f_3}}{\partial{p}}\frac{\partial{f_3}}{\partial{q}}+\frac{ \partial{f_4}}{\partial{p} } \frac{\partial{f_4}}{\partial{q}}$ (A3)
If SET A has solutions for the functions $f_1, f_2, f_3$ and $f_4$ we are
passing from relation (1) to relation (2) by coordinate
transformation ($ds^2$ is preserved and  it is being carried from one
manifold to another). Is it really possible, that is, can a sphere be flattened?
What are the conditions[from the theory of differential equations] for the existence/non-existence of solutions for SET A?
[You may consider the following calculations to assess the nature of the problem
Separate numbering starts from here.
$ds^2=d\theta^2+Sin^2(\theta)d\phi^2$ ------------------- (1)
$ds’^2=dx^2+dy^2$              --------------------------- (2)
Transformations:
$\theta=\theta(x,y)$
$\phi=\phi(x,y)$
$d\theta=\frac{\partial \theta}{\partial x}{dx}+\frac{\partial \theta}{\partial y}{dy}$
$d\phi=\frac{\partial \phi}{\partial x}{dx}+\frac{\partial \phi}{\partial y}{dy}$
Using the above differentials in (1) we have:
$ds^2= [(\frac{\partial \theta}{\partial x})^2+Sin^2(\theta)(\frac{\partial \phi}{\partial x})^2]dx^2$
$+[(\frac{\partial \theta}{\partial y})^2+Sin^2(\theta)(\frac{\partial \phi}{\partial y})^2]dy^2$
$+[\frac{\partial \theta}{\partial  x} \frac{\partial \theta}{\partial  y}+ Sin^2(\theta)\frac{\partial \phi}{\partial  x} \frac{\partial \phi}{\partial  y}] dx dy$
-------------------- (3)
Relations (1) and (2) would become identical $[ds^2=ds’^2]$  if the following equations [SET A] are satisfied if:
$(\frac{\partial \theta}{\partial x})^2+Sin^2(\theta)(\frac{\partial \phi}{\partial x})^2=1$     -------- A1
$(\frac{\partial \theta}{\partial y})^2+Sin^2(\theta)(\frac{\partial \phi}{\partial y})^2=1$     ------- A2
$[\frac{\partial \theta}{\partial  x} \frac{\partial \theta}{\partial  y}+ Sin^2(\theta)\frac{\partial \phi}{\partial  x} \frac{\partial \phi}{\partial  y}]=0$    ---------------- A3
We will look for a solution for which the following hold true:
SET B
$\frac{\partial \theta}{\partial x}=\psi$           ------------ B1
$\frac{\partial \theta}{\partial y}=\chi$            ------------ B2
$\frac{\partial \phi}{\partial x}=\frac{1}{Sin \theta}\chi$     -------------- B3
$\frac{\partial \phi}{\partial y}= - \frac{1}{Sin \theta}\psi$   ------------- B4
$\psi^2+\chi^2=1$   ----------- B5
Exact differential conditions:
[SET C]
$\frac{\partial \psi}{\partial  y}=\frac {\partial \chi }{\partial x}$ ----------- C1
$\frac{\partial}{\partial y}\frac{1}{Sin \theta}{\chi}=-\frac{\partial}{\partial x}\frac{1}{Sin \theta}{\psi}$
-------------------- C2
Differentiating C2 we have:
$-\frac{Cos^2 \theta}{Sin \theta}\frac{\partial \theta}{\partial y}\chi+\frac{1}{Sin\theta}\frac{\partial \chi}{\partial y}= \frac{Cos^2 \theta}{Sin \theta}\frac{\partial \theta}{\partial x}\psi+\frac{1}{Sin\theta}\frac{\partial \psi}{\partial x}$
Using B1 and B2 in the above step we have,
$\frac{Cos^2 \theta}{Sin \theta}(\chi^2+\psi^2)=\frac{1}{Sin \theta}(\frac{\partial \psi}{\partial x}+\frac{\partial \chi}{\partial y})$
Since
$(\psi^2 + \chi^2)=1$
We may write:
$Cot \theta =\frac{\partial \psi}{\partial x}+\frac{\partial \chi}{\partial y}$
Therefore our final equation is:
$\frac{\partial^2 \theta}{\partial x^2}+\frac{\partial^2 \theta}{\partial y^2}=Cot \theta$
-------------- D
If  the above equation is solvable we can flatten a sphere.
Theorema Egregium:The Gaussian curvature of a surface is invariant under local isometry.
Incidentally an isometry comes under diffeomorphisms which involve invertible functions  which are differentiable 'r' times [or infinite times]. This is suggestive of linear functions[or bijections]. But the functions representing $\theta $and $\phi$ could be of non-linear nature]
[It is important to note that tensor equations are preserved in coordinate transformations where the value of the line element,ds^2, does not change.
But in General Relativity the same tensor equations[ex: the Geodesic equation,Maxwell's Rquations in covariant form] are considered applicable in all manifolds--flat spacetime and curved spacetime. The stated equations are considered invariant in all manifolds] 
 A: This is not possible, not even locally. 
The first metric you mention is that of a piece of a sphere, which has constant, positive curvature. The second one, that of the plane, has zero curvature. The two are not locally isometric, because of the Theorema Egregium.
A: Let’s solve the PDE:$$\frac{\partial^2 u}{\partial x^2}+ \frac{\partial^2 u}{\partial y^2}=\cot (u)$$  ------------(1) 
Subject to the constraint :$$(\frac{\partial u}{\partial x})^2+(\frac{\partial u}{\partial y})^2=1$$ ----------------- (2)
We write PDE (1) as: $$\frac{\partial^2 [(u+F(u))-F(u)]}{\partial x^2}+ \frac{\partial^2 [(u+F(u))-F(u)]}{\partial y^2}=\cot (u)$$ ----------- (3)
PDE (3) may be represented as the following two equations:
$$\frac{\partial^2 (u+F(u))}{\partial x^2}+ \frac{\partial^2 (u+F(u))}{\partial y^2}=0$$--------- (4) 
And
$$\frac{\partial^2 F(u)}{\partial x^2}+ \frac{\partial^2 F(u)}{\partial y^2}=-\cot (u)$$--------------- (5)
Now,
$$\frac{\partial F(u)}{\partial x}=\frac{dF}{du} \frac{\partial u}{\partial x}$$
$$\frac{\partial^2 F(u)}{\partial x^2}=\frac {d^2 F}{du^2} (\frac {\partial u}{\partial x})^2+\frac{dF}{du}\frac{\partial^2 u}{\partial x^2}$$
And
$$\frac{\partial F(u)}{\partial y}=\frac{dF}{du} \frac{\partial u}{\partial y}$$
$$\frac{\partial^2 F(u)}{\partial y^2}=\frac {d^2 F}{du^2} (\frac {\partial u}{\partial y})^2+\frac{dF}{du}\frac{\partial^2 u}{\partial y^2}$$
PDE (5) may be written as:
$$\frac {d^2 F}{du^2} [(\frac {\partial u}{\partial x})^2+(\frac {\partial u}{\partial y})^2]+\frac{dF}{du}[\frac{\partial^2 u}{\partial x^2}+\frac{\partial^2 u}{\partial y^2}]=-\cot(u)$$
Or,
$$\frac {d^2 F}{du^2}\times {1}+\frac{dF}{du}\times \cot(u) =-\cot(u)$$
Or,
$$\frac {d^2 F}{du^2}+\cot(u)\frac{dF}{du} =-\cot(u)$$
The above ODE gives us the form for F to be used in PDE (4) which is Laplace’s equation in two dimensions
We obtain: $$ u+F(u)=Soln \;of \;Laplace’s\; eqn.\; in \; two \;dimensions$$
[Differentiating the above relation twice wrt to x and y and adding the results we have,
$$F''(u)[(\frac{\partial u}{\partial x})^2+(\frac{\partial u}{\partial y})^2]+F'(u)[\frac{\partial^2 u}{\partial x^2}+\frac{\partial^2 u}{\partial y^2}]=-[\frac{\partial^2 u}{\partial x^2}+\frac{\partial^2 u}{\partial y^2}]$$
Again F(u) satisfies relation (5):$$F''(u)+\cot(u)F'(u)=-\cot(u)$$
The simplest choice would be that the PDE's (1) and (2) are getting satisfied simultaneously.This a reflection of the fact that the constraint $\psi^2+\chi^2=1$ has been used in the construction of relation D in the Question]
In the final step the particular solutions for F and that for Laplace's equation are chosen in a manner such that equation (2) is satisfied.
[u has been used instead of $\theta$ ,which has been used in the previous postings]
A: A sphere may be flattened by a one to many mapping[strictly speaking these mappings are not functions because of their multiple valued nature]which preserves the value of $ds^2$ . But the metric coefficients are not preserved. The manifold itself changes. The transformed manifold contains multiple images of each point of the sphere.
In our example $\theta$ and $\phi$ [I am referring to the link in the question]are single-valued functions of the ordered pairs(x,y) but x and y may not be single-valued functions of ordered pairs $(\theta,\phi)$. 
You may separate out different subsets from the original image set to get a bijective [one -one ,onto-mapping] for each subset . But for these subsets the curvature elements are not supposed to change[Theorema Ergregium]
So far as the differential equations in the question [or in the link provided in the question] are concerned $\theta$ and $\phi$ are single valued functions of the ordered pairs(x,y). So there is really nothing is wrong or unrigorous about the differential equations.
But we may start our calculations[referring to the ones in the link in the question] with
$x=x(\theta,\phi)$
And
$y=y(\theta,\phi)$
The existence of solutions in either of the procedures will not indicate towards the violation of Theorema Egregium. 
But we can definitely flatten a sphere by suitable mappings for which the value of $ds^2$ is preserved.
