[Math] How to undo a gradient function

calculusmultivariable-calculus

If we are given a vector, how can we tell if that is a gradient of a vector? And how would we find the original function? I was assigned this problem, and I know how to get a gradient of a function, but not how to go backwards.

$$\bigl(6\cos(x^2+4y^2) – 12x^2 \sin(x^2+4y^2)\bigr)\vec \imath + \bigl(-48xy\sin(x^2+4y^2)\bigr)\vec\jmath$$

Thank you for all and any help you could provide.

Best Answer

To undo, you need to play a guessing game: Note that if $\vec{v} = \vec{\nabla}f$, then for your case, we have $$\dfrac{\partial f}{\partial x} = 6 \cos(x^2+4y^2) - 12x^2\sin(x^2+4y^2) \tag{$\star$}$$ and $$\dfrac{\partial f}{\partial y} = - 48xy\sin(x^2+4y^2)\tag{$\dagger$}$$ It is easier to deal with $\dagger$ than $\star$. Note that $$\dfrac{\partial f}{\partial y} = 6x\dfrac{d(y^2)}{dy}\dfrac{d\left(\cos(x^2+4y^2)\right)}{d(y^2)} = \dfrac{\partial}{\partial y}\left(6x \cos(x^2+4y^2)\right)$$ Hence, $$f(x,y) = 6x \cos(x^2+4y^2) + g(x)$$ Now plug in $f(x,y)$ into $\star$; we then get that $g(x) = \text{constant}$. Hence, $$f(x,y) = 6x \cos(x^2+4y^2) + \text{constant}$$

Related Question