Solving and Understanding a Tricky Differential Equation

In summary, the conversation discusses the process of making an equation exact and solving it. The integration factor is calculated and multiplied by both sides of the equation, resulting in a new M(x,y) and N(x,y). The partial derivatives of M(x,y) and N(x,y) are taken to verify that the solution is correct. The formula for implicit functions is also mentioned as a way to extract meaningful data from the solution. The conversation ends with a discussion about analyzing the solution in terms of the Lambert W function.
  • #1
krusty the clown
I am supposed to make this equation exact and then solve it. I can do the problem, but I don't understand why I am doing what I am. Is the final answer right?

[tex] cos(x) dx + (1 + \frac {2}{y}) sin(x) dy = 0 [/tex]

[tex] M(x,y)=cos(x) [/tex]

[tex]N(x,y)=(1 + \frac{2}{y}) sin(x) [/tex]

[tex] \frac{\partial M(x,y)}{\partial y} = 0[/tex]

[tex] \frac{\partial N(x,y)}{\partial x} = (1 + \frac {2}{y}) cos(x)[/tex]

The integration factor is then

[tex] u(x)= e^{\int\frac{(1+\frac{2}{y})cos(x)}{cos(x)}dy)}=e^{y+2\ln(y)} = y^2 e^y[/tex]

Multiplying the integration factor by both sides,

[tex] y^2 e^y cos(x) dx + (y^2 e^y + 2ye^y)sin(x)dy=0 [/tex]

I confirmed that this was exact, the new M(x,y) and N(x,y) are
[tex] M(x,y)=y^{2}e^{y}cos(x) \ \ \ N(x,y)=ye^{y}(y+2)sin(x)[/tex]

[tex] g(x,y)=\int{M(x,y)dx}+g(y)=\int{(2ye^{y}cos(x)+y^{2}e^{y}cos(x))dx}+g(y)=sin(x)2ye^{y}+sin(x)y^{2}e^{y}+g(y) [/tex]

[tex]N(x,y)=\frac{\partial}{\partial y}(2ye^{y}sin(x)+y^{2}e^{y}sin(x)+g(y))[/tex]

[tex]=e^{y}sin(x)(2+4y+y^{2})+g'(y) [/tex]

set this equal to N(x,y), and solve for g'(x)

[tex]e^{y}sin(x)(2+4y+y^{2})+g'(y)=y^{2}e^{y}sin(x)+2ye^{y}sin(x)[/tex]

[tex]g'(x)=-4e^{y}sin(x) \ \ \ \ \ \ \ \ \ \\ \ g(x)=-4e^{y}sin(x)+c [/tex]

[tex]g(x,y)=e^{y}sin(x)(2y+y^{2}-4)=C[/tex]

Thanks-Erik
 
Physics news on Phys.org
  • #2
Did you choose to do it the way you did, or was it prescribed to do it like that? You should be able to solve it via separation of variables.
 
  • #3
I was told to do it that way.
 
  • #4
Did u try to see whether your solution verifies the initial equation...?

Daniel.
 
  • #5
The answer looks reasonable. Take the partial of x and y then stick those into the original eqn to verify that they do indeed equal something (zero in this case). As far as not understanding what your doing its nothing more than a recipe to follow. If you look at the original eqn then you see the partial of x times some thing plus the partial of y times something to yield. The procedure used simply gives "an" answer which will work in the original question. I don't know what you are looking for other than that.
 
  • #6
krusty the clown said:
[tex] M(x,y)=y^{2}e^{y}cos(x) \ \ \ N(x,y)=ye^{y}(y+2)sin(x)[/tex]

[tex] g(x,y)=\int{M(x,y)dx}+g(y)=\int{(2ye^{y}cos(x)+y^{2}e^{y}cos(x))dx}+g(y)=sin(x)2ye^{y}+sin(x)y^{2}e^{y}+g(y) [/tex]

This is where I made my mistake, I inserted the partial derivative of M that I had when I checked to make sure it was exact instead of plain old M. I realized this after the internet at my school went down and I did the problem for the third time. After doing it the correct way I get the same answer as when I use separation of variables.
 
  • #7
faust9 said:
The answer looks reasonable. Take the partial of x and y then stick those into the original eqn to verify that they do indeed equal something (zero in this case). As far as not understanding what your doing its nothing more than a recipe to follow. If you look at the original eqn then you see the partial of x times some thing plus the partial of y times something to yield. The procedure used simply gives "an" answer which will work in the original question. I don't know what you are looking for other than that.

I am currently taking calc 3 and diff eq at the same time so I haven't formally learned about partial derivatives, how would I put them back into the equation?

the answer is (I think) (y^2)(e^y)(sin(x))+c=0

partial derivative wrt y
2y(e^y)sin(x)+(y^2)(e^y)sin(x)

wrt x
(y^2)(e^y)cos(x)

At this point is there a way to combine these to get dy/dx, or am I going about this all wrong?
 
Last edited by a moderator:
  • #8
Do you know the formula inside the theorem of implicit functions...?

Daniel.
 
  • #9
[tex] \frac{dy}{dx}=-\frac{F_x}{F_y} [/tex]

Looked this up in my book, that would do the trick

Thanks
 
  • #10
That's right.That's what i was talking about.

Daniel.
 
  • #11
Perfect, I was able to verify that

(y^2)(e^y)(sin(x))+c=0

is an answer.

Thanks everybody for all your help.

Erik
 
  • #12
krusty the clown said:
Perfect, I was able to verify that

(y^2)(e^y)(sin(x))+c=0

is an answer.

Thanks everybody for all your help.

Erik

Wait a minute. I'm not done yet . . . well, I'd like a plot. I mean, I don't want to be anoying but that's only half of it. What happens if we needed to use it? I'm going to work on it and I know you guys have school but me personally, well, it ain't done yet. Can anyone in the group suggest a way of extracting meaningful data from it? Looks like the Lambert W function you know:

[tex]
y ye^y=k\csc(x)
[/tex]
 
  • #13
You can explicitate it on a certain interval using "arcsin":
[tex] x=\arcsin \frac{C}{y^{2}e^{y}} [/tex]

Is this function u assessed with the name of Lambert...?It looks horrible... :yuck:

Daniel.
 
  • #14
dextercioby said:
You can explicitate it on a certain interval using "arcsin":
[tex] x=\arcsin \frac{C}{y^{2}e^{y}} [/tex]

Is this function u assessed with the name of Lambert...?It looks horrible... :yuck:

Daniel.

Thanks Daniel, that's a good start to begin analyzing it and I'll start there. It's kind of the inverse though and yes, I would like to analyze it also in terms of the Lambert W function if possible. As these functions are sometimes the solution of DDEs, perhaps this implicit function is a solution of some DDE as well. Interesting.
 
  • #16
A summary

My thanks to the members of this group for helping me prepare the following report (any errors in it are solely my own):

For the ODE:

[tex] \cos(x)dx+(1+\frac{2}{y})\sin(x)dy=0 [/tex]

The solution is:

[tex] y^2e^y=k\csc(x) [/tex]

In order to use this equation, it's best to first express it in terms of the generalized Lambert W-function. Some basics first:

The W-function is defined as the inverse of the following:

[tex]
f(x)=xe^x=y
[/tex]

then:

[tex]f^{-1}(y)=x=W(y) [/tex]

With W being the Lambert W-function for [itex]y>-e^{-1}[/itex]

and in general if:

[tex] h(x)=x^ne^x=y[/tex]

then:

[tex] h^{-1}(y)=nW(\frac{y^\frac{1}{n}}{n})
[/tex]

Thus the solution can be expressed as:

[tex] y(x)=2W(\frac{1}{2}\sqrt{k\csc(x)}) [/tex]

Note first that for the solution to be real, only x-values in which csc(x) are greater than 0 are allowed. Therefore, the domain for this function is:

[tex] x\in ({2n\pi},(2n+1)\pi) [/tex]

This of course is the positive values of csc(x).

It's not supprising that the function has asymptotes at [itex] n\pi [/itex] since the ODE is singular at these values. This can be seen by writing the ODE as follows:

[tex]\frac{dy}{dx}=\frac{-\cos(x)}{\sin(x) (1+\frac{2}{y}) }[/tex]

I've plotted a graph of the solution for k=1 and included it as an attachment.
 

Attachments

  • dif3.JPG
    dif3.JPG
    4.4 KB · Views: 339
  • #18
A correction

I wish to make a correction to the above summary.

I've analyzed the ODE numerically and it seems a solution is valid throughout the reals with the exception of the singular points.

Thus a more accurate description of the solution is:

[tex] y(x)=2W(\frac{1}{2}\sqrt{k\csc(x)})[/tex]

such that:

k>0 for [itex]x\in (2n\pi,(2n+1)\pi)[/itex]

k<0 for [itex]x\in ((2n+1)\pi,(2n+2)\pi)[/itex]

Just wish to be precise that's all.
 

What is a differential equation?

A differential equation is a mathematical equation that describes the relationship between a function and its derivatives. It is used to model systems that change over time, such as in physics, engineering, economics, and biology.

What are the types of differential equations?

The types of differential equations include ordinary differential equations, which involve a single independent variable, and partial differential equations, which involve multiple independent variables.

What are the applications of differential equations?

Differential equations are used in many fields of science and engineering to model and analyze complex systems, such as in mechanics, electricity and magnetism, fluid dynamics, and population dynamics.

How do you solve a differential equation?

The method for solving a differential equation depends on its type and complexity. Some common techniques include separation of variables, substitution, and using specific formulas for certain types of equations.

What is the significance of differential equations?

Differential equations are important in understanding and predicting the behavior of systems in the natural world. They allow us to make quantitative predictions and understand the underlying principles and relationships that govern these systems.

Similar threads

  • Introductory Physics Homework Help
Replies
8
Views
693
  • Introductory Physics Homework Help
Replies
1
Views
184
  • Introductory Physics Homework Help
Replies
6
Views
2K
  • Introductory Physics Homework Help
Replies
9
Views
900
  • Introductory Physics Homework Help
Replies
1
Views
864
  • Introductory Physics Homework Help
Replies
11
Views
1K
  • Introductory Physics Homework Help
Replies
2
Views
236
  • Introductory Physics Homework Help
Replies
8
Views
1K
  • Introductory Physics Homework Help
Replies
10
Views
893
Back
Top