Is it possible to find a function if we know its differential? Not something we were taught at uni yet, just something that peaked my curiosity.
If I was given a derivative of a scalar function, for example $f'(x)=x$ then I know that $f(x)=\frac{x^2}{2}$ (let's just simplify and say $c=0$).
I can do this for all scalar functions, if the derivative is integratable.
What about non scalar functions however?
if $f:\mathbb R^n \to \mathbb R^n$ is not known to us, but we know its differential, $D_f$ which is an $n$ by $n$ matrix.
Is it possible to find $f$ if we know $D_f$? when can we? when cant we?
 A: If $f=(f_1,f_2,\dots,f_m): \mathbb R^n\to\mathbb R^m$, then $D_f$ is an $m\times n$ matrix whose rows are $\nabla f_1, \nabla f_2,\dots,\nabla f_m$. Now if we know that the rows of $D_f$ are the functions $g_1,\dots,g_m$ then finding $f$ amounts to solving the following system of partial differential equations (PDEs):
\begin{align}
\nabla f_1 &= g_1 \\
\nabla f_2 &= g_2 \\
&\cdots \\
\nabla f_m &= g_m.
\end{align}
Although this is a system of equations, we can solve each equation independent of the others since each coordinate function $f_i$ is independent of the other coordinate functions. In summary, if we knew how to answer the following question we could answer your original question:

Given a function $g:\mathbb R^n\to \mathbb R^n$, does there exist a function $f:\mathbb R^n\to\mathbb R$ such that $\nabla f=g$?

In general, the answer to this question is "no". A vector field $g$ which is the gradient of some function is called conservative, and most vector fields are not conservative. When $n=3$, for example, a necessary condition that a vector field $f$ be conservative is that $\nabla\times f=0$.
There's probably more to be said on this question, but I can't say it because I'm not very familiar with PDEs. In any case, your problem does not always have a solution. For example, the matrix
$$
\begin{bmatrix}
-y & x \\ x & y
\end{bmatrix}
$$
is not the derivative of any function because the vector field $(x,y)\mapsto(-y,x)$ is not conservative.
A: Yes it is generally possible. You integrate in essentially the same way. For example suppose that $$\nabla f(x,y)=(1,1)$$ Then $$\frac{\partial f}{\partial x}=1$$ so $$f(x,y)=x+\phi(y)$$ where $\phi$ is the "constant" of integration. Now, $$\frac{\partial f}{\partial y}=0+\phi'(y)=1$$ so we must have $$\phi(y)=y+c$$ $c$ an arbitrary constant. Therefore the general function is $$f(x,y)=x+y+c$$ If you had a vector-valued function, you would treat each of the gradients in the matrix separately to find each component. 
