How do I factorize this exact differential?

76 Views Asked by At

I know for a fact that $$(x+y)dx + (x-y)dy$$ is an exact differential since their partial derivatives are the same (both equates to 1). How do I find that $df$ that could capture this entire equation? I can't see how since there is a $-1$ to the $y$. My closest guess is $\frac{1}{2}(x+y)^2$ but I cannot get the negative $y$.

1

There are 1 best solutions below

2
On BEST ANSWER

Don't guess! There are algorithms for doing this. Integrate $\partial f/\partial x = x+y$ with respect to $x$ to get $f(x,y) = \frac12 x^2 + xy + g(y)$, where $g$ is the "constant of integration." Now compare $\partial f/\partial y$ and figure out $g(y)$, similarly. (By the way, there are numerous posts showing how to do this on this site. I know I've posted several answers myself.)