# Help Me Find Mistake in Exact Differential Equation

I am working on exact differential equations and I just cannot seem to understand them and was hoping to have my method checked and please provide feedback on that.

$$(18xy^2 - \sin(x))dx + (8 + 18x^2y)dy = 0;\,\, y(0) = 1$$ I first calculated the crossed partial derivatives for both terms to check they were equal which I found they both came out to be 36xy.

Then I have said that $$\frac{\partial u}{\partial x} = 18xy^2 - sin(x)$$ and therefore $$u = 9y^2 x^2 + cos(x) + h(y)$$

Now I have said that $$\frac{\partial u}{\partial y} = 18yx^2 + h'(y) = 8 + 18yx^2$$ which I believe is not a problem.

This says that h'(y) = 8 which I have then integrated with respect to y and found h(y) = 8y + C

I believe this means my final result for the answer which in our notes is always denoted as $$u(x,y) = 36xy + 8y + C$$

So far I cannot understand how these exact differential equations work and have been told my answer is wrong. I am yet to find the exact solution using the initial condition as I am unsure how to do that as well because I am confused by a few things with these problems however if possible could we please discuss the method how to solve these types of DEs and check to see if my answer is correct.

Thank you very much,

Michael

• Micheal, I have started the edits so take a look at the first question and hopefully you can fix the other equations? All details can be found here. Mar 3, 2016 at 10:18
• Thanks I wasn't sure until now how to properly do the formatting thank you. Mar 3, 2016 at 10:46
• No problem. I think the site experience will become even better for you now :) Mar 3, 2016 at 10:52

HIT:

You found $\quad u = 9y^2 x^2 + \cos(x) + h(y)\quad$ which is correct.

You also found $\quad h(y) = 8y + C\quad$ which is correct.

Then obviously the result is not : $u(x,y) = 36xy + 8y + C$ but is : $$u(x,y) = 9y^2 x^2 + \cos(x) +8y+C$$

Then you can solve $u(x,y)$=constant for $y(x)$.

$$\left(18xy(x)^2-\sin(x)\right)\space\text{d}x+\left(8+18x^2y(x)\right)\space\text{d}y=0$$

Let $\text{P}(x,y)=18xy^2-\sin(x)$ and $\text{Q}(x,y)=18x^2y+8$.

This is an exact equation, because $\frac{\partial\text{P}(x,y)}{\partial y}=36xy=\frac{\partial\text{Q}(x,y)}{\partial x}$.

Define $f(x,y)$ such that $\frac{\partial f(x,y)}{\partial x}=\text{P}(x,y)$ and $\frac{\partial f(x,y)}{\partial y}=\text{Q}(x,y)$.

Then, the solution will be given by $f(x,y)=\text{C}$, where $\text{C}$ is an arbitrary constant.

Integrate $\frac{\partial f(x,y)}{\partial x}$ with respect to $x$ in order to find $f(x,y)$:

$$f(x,y)=\int(18y^2x-\sin(x))\space\text{d}x=9y^2x^2+\cos(x)+g(y)$$

Differentiate $f(x,y)$ with respect to $y$ in order to find $g(y)$:

$$\frac{\partial f(x,y)}{\partial y}=\frac{\partial}{\partial y}(9y^2x^2+\cos(x)+g(y))=18yx^2+\frac{\text{d}g(y)}{\text{d}y}$$

Substitute into $\frac{\partial f(x,y)}{\partial y}=\text{Q}(x,y)$:

$$18yx^2+\frac{\text{d}g(y)}{\text{d}y}=18yx^2+8$$

Solve for $\frac{\text{d}g(y)}{\text{d}y}$:

$$\frac{\text{d}g(y)}{\text{d}y}=8\Longleftrightarrow$$ $$\int\frac{\text{d}g(y)}{\text{d}y}\space\text{d}y=\int8\space\text{d}y\Longleftrightarrow$$ $$g(y)=8y$$

Substitute $g(y)$ into $f(x,y)$:

$$f(x,y)=9y^2x^2+8y+\cos(x)$$

The solution is $f(x,y)=\text{C}$:

$$9y^2x^2+8y+\cos(x)=\text{C}$$

$$9y(x)^2x^2+8y(x)+\cos(x)=\text{C}\Longleftrightarrow$$ $$y(x)=\frac{-4\pm\sqrt{16+9\text{C}x^2-9x^2\cos(x)}}{9x^2}$$

We know that $y(0)=1$ we can't use the solution with the '-' sign before the square root:

$$1=\lim_{x\to0}\frac{-4+\sqrt{16+9\text{C}x^2-9x^2\cos(x)}}{9x^2}\Longleftrightarrow$$ $$1=\frac{\text{C}-9}{72}\Longleftrightarrow$$ $$\text{C}=81$$

So the solution is:

$$y(x)=\frac{-4+\sqrt{81x^2-9x^2\cos(x)+16}}{9x^2}$$

• Thank you for the super clear and detailed answer! I think I should easily be able to follow this process through and apply it to any other problems :) Mar 3, 2016 at 11:23
• @Michael You're welcome. Yes you can do that!! Mar 3, 2016 at 11:46