MHB Solving a first-order differential equation

Saitama
Messages
4,244
Reaction score
93
Problem:
Solve the differential equation:
$$\left(\frac{1}{x}-\frac{y^2}{(x-y)^2}\right)\,dx+\left(\frac{x^2}{(x-y)^2}-\frac{1}{y}\right)\,dy=0$$

Attempt:
Let
$$M=\left(\frac{1}{x}-\frac{y^2}{(x-y)^2}\right)$$
and
$$N=\left(\frac{x^2}{(x-y)^2}-\frac{1}{y}\right)$$
I noticed that
$$\frac{\partial M}{\partial y}=\frac{\partial N}{\partial x}$$
Hence, the given D.E is an exact D.E. Thus the solution of the D.E is:
$$y=\int M (\text{y constant}) \,dx+\int N (\text{terms independent of x})\,dy$$
The first integral is:
$$\int M\,dx=\ln x+\frac{y^2}{x-y}$$
The second integral is:
$$\int N\,dy=\int \frac{-1}{y} \,dy=-\ln y$$
Hence, the solution is:
$$y=\ln \frac{x}{y}+\frac{y^2}{x-y}+C$$
But this is incorrect. :confused:

Any help is appreciated. Thanks!
 
Physics news on Phys.org
Pranav said:
Problem:
Solve the differential equation:
$$\left(\frac{1}{x}-\frac{y^2}{(x-y)^2}\right)\,dx+\left(\frac{x^2}{(x-y)^2}-\frac{1}{y}\right)\,dy=0$$

Attempt:
Let
$$M=\left(\frac{1}{x}-\frac{y^2}{(x-y)^2}\right)$$
and
$$N=\left(\frac{x^2}{(x-y)^2}-\frac{1}{y}\right)$$
I noticed that
$$\frac{\partial M}{\partial y}=\frac{\partial N}{\partial x}$$
Hence, the given D.E is an exact D.E. Thus the solution of the D.E is:
$$y=\int M (\text{y constant}) \,dx+\int N (\text{terms independent of x})\,dy$$
The first integral is:
$$\int M\,dx=\ln x+\frac{y^2}{x-y}$$
The second integral is:
$$\int N\,dy=\int \frac{-1}{y} \,dy=-\ln y$$

This is incorrect, because the first term of $N$ has a $y$ in it.

Here's how I was taught to do exact equations: your goal is to recognize that if the equation is exact, it can be made to look like this:
$$f_x(x,y) \, dx+f_y(x,y) \, dy=0.$$
Hence, you integrate the first term w.r.t. (that's an abbreviation for "with respect to") $x$, and that's your solution $f(x,y)$. But it'll have an arbitrary function of $y$ in it that you have to get a handle on. In your case,
$$f(x,y)= \frac{y^2}{x-y}+ \ln(x)+g(y).$$
So, we differentiate w.r.t. $y$ to obtain
$$f_y(x,y)= \frac{y(2x-y)}{(x-y)^2}+g'(y),$$
which we set equal to what it should be. That is, we set
$$ \frac{y(2x-y)}{(x-y)^2}+g'(y)= \frac{x^2}{(x-y)^2}- \frac{1}{y}.$$
Solving for $g'(y)$ yields
$$g'(y)= \frac{y-1}{y}.$$
Integrating yields
$$g(y)=y- \ln(y)+C.$$
Hence, the solution is
$$f(x,y)= \frac{y^2}{x-y}+y+ \ln \left( \frac{x}{y} \right)+C.$$
 
Hi Ackbach! :)

Ackbach said:
Here's how I was taught to do exact equations: your goal is to recognize that if the equation is exact, it can be made to look like this:
$$f_x(x,y) \, dx+f_y(x,y) \, dy=0.$$

Sorry if this is going to be silly but how do I make it look like that in the given case? Is the following condition:
$$\frac{\partial M}{\partial y}=\frac{\partial N}{\partial x}$$
of no use while solving the exact D.Es? :confused:

I understand what you have done after this.

Sorry for the delay in reply. :o
 
Pranav said:
Hi Ackbach! :) Sorry if this is going to be silly

Not silly at all, I assure you.

but how do I make it look like that in the given case?

By following the procedure I outlined in the previous post. The result of that procedure is $f(x,y)$, which you can differentiate to obtain either $f_x$ or $f_y$. If you have
$$f_x(x,y) \, dx+ f_y(x,y) \, dy=0,$$
then you solve the DE by integrating to obtain $f(x,y)=C$.

Is the following condition:
$$\frac{\partial M}{\partial y}=\frac{\partial N}{\partial x}$$
of no use while solving the exact D.Es? :confused:

It is definitely of use. Without knowing that this is the case, you cannot know in advance whether the procedure I outlined (or your integration method, assuming it's correct) will work.

I understand what you have done after this.

Sorry for the delay in reply. :o

We're pretty laid-back here, so no problem, mate.
 
Ackbach said:
By following the procedure I outlined in the previous post. The result of that procedure is $f(x,y)$, which you can differentiate to obtain either $f_x$ or $f_y$. If you have
$$f_x(x,y) \, dx+ f_y(x,y) \, dy=0,$$
then you solve the DE by integrating to obtain $f(x,y)=C$.

It is definitely of use. Without knowing that this is the case, you cannot know in advance whether the procedure I outlined (or your integration method, assuming it's correct) will work.

Thanks a lot Ackbach! I think I understand the procedure. Will be practicing some more questions to make myself comfortable with exact D.Es. :)
 
Thread 'Direction Fields and Isoclines'
I sketched the isoclines for $$ m=-1,0,1,2 $$. Since both $$ \frac{dy}{dx} $$ and $$ D_{y} \frac{dy}{dx} $$ are continuous on the square region R defined by $$ -4\leq x \leq 4, -4 \leq y \leq 4 $$ the existence and uniqueness theorem guarantees that if we pick a point in the interior that lies on an isocline there will be a unique differentiable function (solution) passing through that point. I understand that a solution exists but I unsure how to actually sketch it. For example, consider a...
Back
Top