Solving a first-order differential equation

In summary, the given differential equation is an exact D.E because $\frac{\partial M}{\partial y}=\frac{\partial N}{\partial x}$. The solution of an exact D.E can be found by integrating the first term w.r.t. $x$ and the second term w.r.t. $y$ of the given equation. The resulting equation will have an arbitrary function of $y$ that needs to be determined. By differentiating this equation w.r.t. $y$ and setting it equal to the given equation, we can solve for the arbitrary function and obtain the solution. In this case, the solution is $y=\ln \frac{x}{y}+\frac{y^2}{x-y}
  • #1
Saitama
4,243
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
  • #2
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.$$
 
  • #3
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. :eek:
 
  • #4
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. :eek:

We're pretty laid-back here, so no problem, mate.
 
  • #5
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. :)
 

FAQ: Solving a first-order differential equation

1. What is a first-order differential equation?

A first-order differential equation is a mathematical equation that relates an unknown function to its derivative. It contains only one independent variable and one dependent variable.

2. How do you solve a first-order differential equation?

To solve a first-order differential equation, you can use several methods such as separation of variables, integrating factors, or using a substitution. The specific method used depends on the form of the equation and the initial conditions given.

3. What is the difference between an ordinary and a partial differential equation?

An ordinary differential equation involves functions of a single variable, while a partial differential equation involves functions of multiple variables. Additionally, ordinary differential equations can be solved using standard calculus techniques, while partial differential equations require more advanced methods.

4. Can all first-order differential equations be solved analytically?

No, not all first-order differential equations can be solved analytically. Some equations may require numerical methods or computer simulations to find a solution.

5. What are the applications of solving first-order differential equations?

First-order differential equations have many real-world applications, including modeling population growth, predicting the spread of diseases, and analyzing chemical reactions. They are also used in engineering and physics to describe various physical phenomena.

Back
Top