# Find function $f$ having it's gradient

I need to find function $f$ having it's gradient. $$\operatorname{grad} f = (x \cos y − 2)j + i \sin y$$ I think $i$ and $j$ are some sort of vectors, but I'm not sure.. how to find function f?

I know, that a gradient is a vector of the fastest growth, but I don't see any vector right here.

• i, j, and k are often used to denote the unit vectors in the x, y, and k directions respectively. So if someone wrote 5i+2j+9k what they mean is the vector <5,2,9>. – jemmy.bruce May 31 '13 at 17:22

Searching a proper $f(x,y)$ will lead us to have $$f_x=\sin y,~~~f_y=x\cos y-2$$ Let $f_x=\sin y$ then $f(x,y)=x\sin y+h(y)$ for some proper function $h(y)$. Now we have $f_y=x\cos y+h'(y)$, but $f_y=x\cos y-2$. So, $$h'(y)=2$$ and then $h(y)=2y$.
• @TomDavies92: $\nabla f=f_x\textbf{i}+f_y\textbf{j}$ – Mikasa May 31 '13 at 17:40
• @TomDavies92: Dear Tom, I really don't know the way you asked (using brackets) or I don't understand. Because $\nabla f$ is that normal vector and you have it in your hand. – Mikasa May 31 '13 at 17:50