# Two scalar fields whose gradients are orthogonal

Given a sufficiently smooth scalar field $\phi$, how to get another scalar field $\psi$ so that their gradients are orthogonal. In 2D case, this is equivalent to:$$\nabla \phi \cdot \nabla \psi=\frac{\partial\phi}{\partial x}\frac{\partial\psi}{\partial x}+\frac{\partial\phi}{\partial y}\frac{\partial\psi}{\partial y}=0$$.

Notice the solution of $\psi$ may be up to a constant. This may be similar to the problem of finding a orthogonal curvlinear coordinate. I just want to know when does the solution exist and how to calculate it.

• You can see a scalar field as a surface. This surface is parallel to the gradient at each point. You are looking for a surface whose gradient is then perpendicular to your given surface, at each point. So will be the solution. This helps? Commented Oct 20, 2017 at 10:13
• You are solving a homogeneous, linear, partial differential equation in two variables to find your field. Look in an introductory book on PDE's maybe?
– Paul
Commented Oct 20, 2017 at 10:31
• @DaniloGregorin I know that this is equivalent to finding two scalars whose isosurfaces are orthogonal at each point. But I don’t know how to find one given another. Commented Oct 20, 2017 at 14:39
• @Paul is there a clear simple expression of solution to this problem?or standard numerical procedure to get he solution? A link from the web will be much appreciated. Commented Oct 20, 2017 at 14:44
• Sorry, away for the weekend. Don't know a website sorry.
– Paul
Commented Oct 23, 2017 at 10:17