# Finding a function given its partial derivatives, stuck on finding g'(x)

1. Aug 7, 2012

### mitch_1211

Hi all,

I have the following partial derivatives

∂f/∂x = cos(x)sin(x)-xy2

∂f/∂y = y - yx2

I need to find the original function, f(x,y).

I know that df = (∂f/∂x)dx + (∂f/∂y)dy

and hence

f(x,y) = ∫∂f/∂x dx + g(y) = -1/2(x2y2+cos2(x)) + g(y)

Then to find g(y) I took the partial derivative of f(x,y) that I just found wrt y and equate to the original given ∂f/∂y

i.e -x2y +g'(y) = y-x2
which is a first order differential equation of the form

dg/dy = - (y+x2)/(x2y)

and now I am not sure how to proceed and solve this DE

Mitch

2. Aug 7, 2012

### micromass

That's a typo, no? It should be

$$-x^2y+g^\prime(y)=y-yx^2$$

3. Aug 7, 2012

### mitch_1211

oh you're right, I must have typed it out incorrectly from my notes.

so it becomes

dg/dy = y

∴ ∫dg = ∫y dy

so g = y2/2