# Solve the partial differential equation

Solve

$$yU_{xy} + 2U_x = x \\ U=U(x,y)$$

I have the solution to this question. I was told to integrate over $x$ at first. After integrating over $x$ I obtained: $$yU_y + 2yU= (x^2)/2 +yC(y)$$ Then to solve further, one can use an integrating factor $m(y)=y$. My question is how to find this integrating factor?

-
I don't think you integrated over $x$ correctly. It should be $$yU_y + 2U = \frac {x^2}2 + f(y)$$ – Kaster Feb 15 '13 at 20:09

Anyway, that's how I'd solve it: $$yU_{xy} + 2U_x = x \\ yU_y + 2U = \frac {x^2}2 + f(y) \\ U_y + \frac 2y U = \frac {x^2}{2y} + \frac {f(y)}y$$ General rule to find integrating factor is $$M(y) = e^{\int P(y)dy}$$ if you equation looks like $$U_y + P(y)U = Q(x,y)$$ In your case $P = \frac 2y$, so $M(y) = e^{\int \frac 2y dy} = e^{2\ln y} = y^2$. So multiply your equation to $M(y)$ to get full differential on the left $$y^2U_y+2yU = (y^2U)_y = \frac {x^2y}2+yf(y)$$ After the integration over $y$ $$y^2U = \frac {x^2y^2}4+F(y)+G(x) \\ U = \frac {x^2}4 + \frac{F(y)}y + \frac {G(x)}{y^2}$$