0
$\begingroup$

let us consider I have a function $f(x,y)$, I know a value $f_0=f(x=0,y=0)$ but I don't know how $f$ is done. By the way I know his partial derivatives $\frac{\partial f}{\partial x}$ and $\frac{\partial f}{\partial y}$. I want to plot $f$ in a 3D plot respect to $x$ and $y$ in an interval $x_L\leq x\leq x_U$ and $y_L\leq y\leq y_U$.

Which is the relation that I should use to do that? How to evaluate $f$?

I tought about:

$$f(x,y)=f_0+something$$

which depends on derivatives. Am i right?

EDIT:

After some calculation: $$\frac{\partial f}{\partial x}=a$$ with $a$ scalar. $$\frac{\partial f}{\partial y}=b$$ with $b$ scalar.

And $f_0=c$ with $c$ scalar

$\endgroup$
  • $\begingroup$ Do you know what the partial derivatives are everywhere, or just at the origin? $\endgroup$ – Arthur Aug 20 '18 at 13:55
  • $\begingroup$ I know them everywhere or at least in the interval of interest. $\endgroup$ – iacopo Aug 20 '18 at 14:00
1
$\begingroup$

If you know the partial derivatives of the function everywere you can come back to $f(x,y)$ by integration. You just have to be careful when integrating a $2$ variable function with respect to only one variable because the constant of integration will be a function of the variable you didn't integrate on. So $$\int\partial_xf(x,y)dx = f_1(x,y)+g(y)\color{red}{+c_1}\\ \int\partial_yf(x,y)dy = f_2(x,y)+h(x)\color{red}{+c_2}$$ I marked the constants in red because they can be incorporated in the functions $g,h$. This two integral have to be the same because they represent the same function, so, with the value of the function in $(0,0)$ you just have to solve the system $$\begin{cases}f_1(x,y)+g(y) = f_2(x,y)+h(x) \\ f(0,0) = f_0\end{cases}$$

Edit

Your case is very easy! If both partial derivatives are just constants, your function has to be linear in both $x$ and $y$. Integrating as I showed earlier you get $$\int a dx = ax + g(y) \\\int b dy = by + h(x)$$ by confronting the two we get that $$f(x,y) = ax +by +f_0$$ because to be equal the two integrated function you have $$g(y) = by \\ h(x) = ax$$ obviously there only remains the constant which is clearly $f_0$. So in the end $$f(x,y) = ax+by+c$$

$\endgroup$
  • $\begingroup$ I add an edit to the post. Should be useful $\endgroup$ – iacopo Aug 20 '18 at 14:25
  • 1
    $\begingroup$ Is it been useful in any way? $\endgroup$ – Davide Morgante Aug 21 '18 at 18:14
  • 1
    $\begingroup$ Yes very useful, thank you. Rating this as best answer of course. $\endgroup$ – iacopo Aug 22 '18 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.