I have a PDE of the form
$$\left(\frac{\partial u}{\partial x}\right)^2 + \left(\frac{\partial u}{\partial y}\right)^2 = f(x,y)$$
and I am looking for a way to solve it. I tried the Method of Characteristics for the same but the Lagrange-Charpit equations turn out to be equally complicated. I am primarily looking for an analytical method to solve it. Any help or suggestions would be appreciated. Thanks
As proposed here, let us use the fact that $u_y = \pm\sqrt{f-u_x^2}\,$ to compute $$ u_{yx} = \frac{f_x-2u_xu_{xx}}{\pm 2\sqrt{f-u_x^2}}\, . $$ This step amounts to differentiating the original PDE w.r.t. $x$. If we substitute $v=u_x$, then we have $$ vv_{x} \pm\sqrt{f-v^2}\,v_{y} = \tfrac12 f_x $$ for sufficiently smooth solutions. For this first-order quasi-linear PDE, the Lagrange-Charpit equations read $$ \frac{\text d x}{v} = \frac{\text d y}{\pm\sqrt{f-v^2}} = \frac{\text d v}{\tfrac12 f_x} $$ from which we obtain the following characteristic families:
Thus, we can write \begin{aligned} |u_y| &= F\big(\textstyle\int^y f_x(x,\eta)\,\text d\eta - 2 u_y u_x\big) \\ |u_x| &= \sqrt{f - u_y^2} \end{aligned} for some $F$. Once $u_x$, $u_y$ are determined, it remains to integrate to find $u$. Fully explicit analytical solutions may be obtained for some particular functions $f$, and for some particular boundary conditions. Note that this is an eikonal equation, for which some particular solutions are known (see e.g. this post, this post and linked ones).
Note: Here, only real unknowns $u$ were considered. There might be complex solutions too.