# Exact differential equation. Is my answer ok?

I'm self teaching and working though Cliff's quick review on Differential Equations. Asked to solve the following one

$$x(1 - \sin y) \, dy = (\cos x - \cos y - y) \, dx$$

The answer I got was $$\sin x - x\cos y - xy = c$$ the book says $$xy + x\cos y - \sin x = c$$

I feel like I'm asking a probably obvious question, but can someone confirm my answer is ok? My rationale is it's fine as the constant of integration could be negative, therefore negating the terms on the LHS.

-
One nice thing about solving DE's is that you can substitute your answer back into the equation to see if it holds true. WA is another great resource for re-affirming answers. :) cheers – tentaclenorm May 2 '12 at 14:45
@tentaclenorm: Thank you. I use WA most days but didn't even think about using it to check this. – PeteUK May 2 '12 at 14:56

## 1 Answer

It's fine. Take your answer and move every term to the other side of the equation. You'll get $$-c=xy+x\cos y -\sin x.$$ But $c$ is an arbitrary constant, you can drop the negative sign on the left hand side of the above.

-
Thanks for speedy answer! – PeteUK May 2 '12 at 14:39