# Find the function $f(x,y)$ if $f_y(x,y)=x^2+2y$ and $f(x,x^2)=1$

I'm trying to find a function $f(x,y)$ which applies the conditions $f_y(x,y)=x^2+2y$ and $f(x,x^2)=1$.

I tried to compute $f_x(x,x^2)=f_x(x,x^2)+2xf_y(x,x^2)$ so I get that $f_y(x,x^2)=0$. I don't really have a direction of how I should solve this. I'd love your help with this one.

Edit: Is there any solution without using integrals? I don't how to integrate with respect to one variable.

Thanks a lot!

-
$f(x,y)=x^2y+y^2+g(x)$ where $g$ is arbitrary, until you use the second condition. Note that the second condition says that $f(x,x^2)$ is identically equal to $1$. – André Nicolas Jan 24 '12 at 21:33

Hint: integrate $x^2 + 2 y$ with respect to $y$ to get $f(x,y)$ up to an arbitrary function of $x$. Then use the equation $f(x,x^2)=1$ to see what that arbitrary function of $x$ must be.
Which part don't you get? Do you know how to integrate $x^2+2y$ with respect to $y$? – Gerry Myerson Jan 25 '12 at 0:52
@Jozef: If you're learning partial differential equations, I'm sure you can integrate w.r.t. $y$. Just integrate w.r.t. $y$ holding $x$ constant! – Clive Newstead Jan 25 '12 at 8:39
Thanks @CliveNewstead ! Ok, so it's $yx^2+y^2$, I consider it as $f$? – Jozef Jan 25 '12 at 8:50