Finding an unknown function using inverse of a gradient vector

167 Views Asked by At

I have a function $F = (x + 2y+4z) \hat i +(2x-3y-z) \hat j + (4x-y+2z) \hat z$, while another one is unknown $\psi$ function. The problem is $F = \nabla \psi $ to find the unknown function $\psi$. I know $\nabla$ is a gradient function and how to calculate it if a known valued function is given. Is it possible to reverse a gradient ($\vec{\nabla}$) operation? provided an example, but it doesn't solve my problem. Any suggestions are highly appreciable.

1

There are 1 best solutions below

0
On BEST ANSWER

We have to find the potential function $\psi(x,y,z)$, of $\vec F = (x + 2y+4z) \hat i +(2x-3y-z) \hat j + (4x-y+2z) \hat z = P \hat i + Q \hat j + R \hat z$. Let's for the time being treat it as $f(x,y,z)$ for generality. Here we have to prove $\vec F = \nabla f$. $$ \frac{\partial f}{\partial x} = P,\quad \frac{\partial f}{\partial y} = Q, \quad \frac{\partial f}{\partial z} = R. \tag{1}\label{1}$$ We also use notation as $\frac{\partial f}{\partial x} = f_x$,... etc. Now integrating w.r.t z we get: $$\int f_z dz = \int (4x-y-2z)dz = 4xz-yz+z^2 + g(x,y) \tag{2}\label{2} $$ where g(x,y) is a constant of integration, because if we differentiate w.r.t z the all terms except those containing z variable would vanish. So, from equation \eqref{1}, differentiating w.r.t x and equating to P gives us. $$\begin{equation}f_x = x + 2y + 4z + g_x(x,y) = x + 2y + 4z = P \\ \implies g_x(x,y) = 0 \quad and \quad \int g_x(x,y) = g(x,y) = h(y) \\ \implies f(x,y,z) = 4xz-yz+z^2 + h(y) \end{equation}$$ So, in order to find the constant of integration h(y), we can compute using equation \eqref{1}, and finding only those terms containing y. $$\implies f_y = 2x - z + h^{'}(y) = 2x - 3y - z = Q \\ \implies h^{'}(y) = -3y \implies h(y) = -\frac{3}{2}y^2 + c$$ Hence, the potential function $f(x,y,z)$ would be w.r.t integration of z, so we can write: $$f(x,y,z)_z = 4xz - yz + z^2 -\frac{3}{2}y^2 + c \tag{3}\label{3}$$

But this is not complete solution. So we have to repeat steps from equation \eqref{2} to \eqref{3}. Take first term (i.e., P) and integrate w.r.t x we have: Step 2: $$ \int f_x = f(x,y,z) = \frac{1}{2}x^2 + 2xy + 4xz + g(y,z) \\ \implies \frac{\partial f}{\partial y} = 2x-z-3y + g_y(y,z) = 2x-z-3y = Q \\ \implies g^{'}(y,z) = 0 \implies g(y,z) = h(z) \\ \frac{\partial f}{\partial z} = 4x-y-h^{'}(z) = 4x-y + 2z = R \\ \implies h^{'}(z) = 2z \implies h(z) = z^2 + c $$ So we have $$\bbox[5px,border:2px solid red] {f(x,y,z)_x = \frac{1}{2}x^2 + 2xy + 4xz + z^2 + c}\tag{4}\label{4}$$ Step 3: Now again using integration w.r.t y and repeat above steps. $$\int f_Y = f(x,y,z) = 2xy + \frac{3}{2}y^2 - yz + g(x,z) \\ \implies g^{'}(x,z) = 0 \implies g(x,z) = h(z) \\ \implies h^{'}(z) = 2z \implies h(z) = z^2 . $$ So we have $$\bbox[5px,border:2px solid red] {f(x,y,z)_y = \frac{3}{2}y^2 + 2xy - yz + z^2 + c}\tag{5}\label{5}$$ From equations \eqref{3}, \eqref{4}, \eqref{5}, take all common and non-common terms but only write them once. So we obtain final resultant in the form $$f(x,y,z) = \psi (x,y,z) = \frac{1}{2}x^2 + 2xy + 4xz + z^2 -yz - \frac{3}{2}y^2 + c$$ Let's prove our results using $\nabla f$ to obtain $\vec F$. $$ \left[\begin{array}{c} \frac{\partial}{\partial x}\\ \frac{\partial}{\partial y}\\ \frac{\partial}{\partial z} \end{array}\right]f = \left[\begin{array}{c} x+2y+4z\\ 2x-3y-z\\ 4x+2z-y\end{array} \right] = \vec F $$ Hope this makes sense. If am wrong in any part and as whole calculation please notify me.