# Finding potential function of $f(x,y)=\hat i+ 2 \,\cdot\hat j$ [closed]

Find the potential function of $f(x,y)=\hat i+ 2 \,\cdot\hat j$

My attempt:

$$\frac{\partial f}{\partial x}=1 \, , \frac{\partial f}{\partial y}=2 \, .$$ Integration with respect to $x:$ $$\displaystyle\int 1 dx=x+g(y) \, .$$ Derivative with respect to $y:$ $$\frac{\partial}{\partial y} (x + g(y))=g'(y)$$ Integration with respect to $y:$ $$\int g'(y) \, .dy = g(y) + c \, .$$

The answer should be: $$\boxed{f(x,y)=x+2y+c} \, .$$

Where em I wrong?

• I'm voting to close this question as off-topic because it's a strictly math question. – DanielSank Jul 14 '15 at 16:26
• I'm math student, but here the answers are better in this type of questions – 3SAT Jul 14 '15 at 16:28
• Welcom ! to SEM – zeraoulia rafik Jul 14 '15 at 16:29
• I'm not new in stack exchange I have another account my rep there is higher then this account – 3SAT Jul 14 '15 at 16:31
• @Nehorairaphael I understand that, but if we were to open this site to all topics on which physicists give good answers it would not be called "physics.stackexchange" any more. You can always post in the math stack exchange site and then mention your question in the physics chat room. I answer questions on the math site. – DanielSank Jul 14 '15 at 16:34

You have to integrate (i.e. find the primitive) in $dy$ as well, and then compare derivatives of both equations:

$$f(x,y) = \int 1 d x = x + g(y)$$ $$f(x,y) = \int 2 d y = 2 y + h(x)$$

now compare derivative terms

$$\frac{\partial f}{\partial x} = h'(x) = 1$$

and

$$\frac{\partial g}{\partial y} = g'(y) = 2$$

therefore

$$h(x) = x + c_x$$

and

$$g(y) = 2 y + c_y$$

putting all together

$$f(x,y) = x + 2 y + c_x + c_y = x + 2 y + c$$

• you are just wrote his same Attempt, it's enought to answer him :your answer is correct ...!:!!!!! – zeraoulia rafik Jul 14 '15 at 16:34

Use the definition that, if a potential exists, then it is given by $\phi(x,\,y) = -\int_{(0,\,0)}^{(x,\,y)} \vec{F}\cdot\mathrm{d}\vec{x}$ and the result must be independent of the path between the endpoints in the path integral. So, let's integrate along the straight line $\vec{x} = t (x\,\hat{i} + y\,\hat{j})$, then, with $\vec{F}=\hat{i}+2\hat{j}$, we have $\vec{F}\cdot\mathrm{d}\vec{x} = (x+2\,y)\,\mathrm{d}t$, whence $\phi(x,\,y)=-(x+2\,y)\int_0^1\mathrm{d}t=-x-2\,y$. Now, we can add an arbitrary constant to this: our definition corresponds to defining the potential at the origin to be nought. Whence $\phi(x,\,y)=-x-2\,y-const$. Now check your answer by finding $\vec{F}=-\nabla\phi = \hat{i}+2\,\hat{j}$.

If you use this method correctly and you don't get your original force at the check step, then that tells you that the force cannot be represented by a potential and is not conservative.

Lastly, I have a negative sign that's not present in the other answer. My answer is the usual convention in physics: if a particle is acted on by the force and travels in the direction of the force, so that $\vec{F}\cdot\mathrm{d}\vec{x}>0$, then the force field is doing work on the particle, which, accordingly is moving to a point of lower potential energy.