How do you find a function $f(x,y,z)$ given its gradient $ \nabla f = \langle a(x,y,z) , b(x,y,z), c(x,y,z) \rangle $. Should we just integrate each equation with respect to the different variables? In this case, with respect to $x$, $y$ and $z$. How is that achieved?
Multivariable and gradient
42 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 2 best solutions below
On
The usual method that is taught is alternating integration and differentiation, as in felasfa’s answer. This can get tedious for functions of more than two variables. There’s another method that gets you an antiderivative of $F(x_1,\dots,x_n)$ in two steps regardless of the number of variables.
- In the expression $F(x_1,\dots,x_n)\cdot\langle dx_1,\dots,dx_n\rangle$ make the substitutions $x_k\to tx_k$ and $dx_k\to x_k\,dt$.
- Integrate the result with respect to $t$ from $0$ to $1$.
For example, if $F(x,y)=\langle3x^2y^2,2x^3y+y^5\rangle$ we substitute into $3x^2y^2\,dx+(2x^3y+y^5)\,dy$: $$3(tx)^2(ty)^2x\,dt+(2(tx)^3(ty)+(ty)^5)y\,dt = (5x^3y^2t^4+y^6t^5)\,dt$$ and integrate: $$\int_0^1 5x^3y^2t^4+y^6t^5\,dt=x^3y^2+\frac16y^6.$$ We can find an antiderivative of $F(x,y,z)=\langle3x^2y^2-y^2e^z,2x^3y+y^5-2xye^z,-xy^2e^z\rangle$ as easily: $$\int_0^1 x(3(tx)^2(ty)^2-(ty)^2e^{tz})+y(2(tx)^3(ty)+(ty)^5-2(tx)(ty)e^{tz})-z((tx)(ty)^2e^{tz})\,dt \\ = \int_0^1 t^5y^6+5t^4x^3y^2-(t^3z+3t^2)xy^2e^{tz}\,dt \\ =\frac16y^6+x^3y^2-xy^2e^z.$$
This method takes advantage of the fact that, if the curl-closed vector field $F:\mathbb R^n\to\mathbb R^n$ is defined on a star-shaped region centered on the origin, then the function $f:\mathbb R^n\to\mathbb R$ defined as $f(P)=\int_\Gamma F\cdot d\mathbf r$, where $\Gamma$ is a smooth path joining the origin to the point $P$, is an antiderivative of $F$. The line integral is computed along the line segment from the origin to $P$ using the obvious parameterization.
To illustrate the method, I will give you two examples. Let's consider a rather simple case.
Find $f(x,y)$ given $\nabla f = \langle x^2, y^2\rangle $. To do this, notice that, $\frac{\partial f}{\partial x} = x^2$. We can simply integrate this and obtain $f(x,y) = \frac{x^3}{3}+g(y)$. Note the constant is $g(y)$. Now, we just have to find $g(y)$. To do so, let's differentiate $f(x,y)$ with respect to $y$. We get $\frac{\partial f}{\partial y}=g'(y)= y^2$. Integrating with respect to $y$, we get $g(y)= \frac{y^3}{3}+c$. Hence, the function $f(x,y)$ is given by $$ f(x,y)= \frac{x^3}{3} + \frac{y^3}{3}+c $$ where $c$ is some constant. In fact, you could say, we could just have integrated each part with respect to $x$ and $y$ and get the answer. Not always! Look at the example below.
Find $f(x,y)$ given that $\nabla f = \langle 3x^2y^2, 2x^3y+y^5 \rangle $. Repeating the above procedure, note that $\frac{\partial f}{\partial x}=3x^2y$. Integrating with respect to $x$, we obtain $f(x,y)=x^3y^{2}+g(y)$. Now differentiate this with respect to $y$. $\frac{\partial f}{\partial y} = 2x^{3}y + g'(y)= 2x^{3}y+y^{5}$. Comparing both sides, we have $g'(y)=y^{5}$ which implies that $g(y)= \frac{y^6}{6}+c$. Hence, $f(x,y)$ is given by $$ f(x,y)= x^3y^2+\frac{y^6}{6}+c $$