# I Solved This D.E. Equation by accident

1. Oct 1, 2015

### Crush1986

1. The problem statement, all variables and given/known data
5dx - Exp[y-x]dy = 0

2. Relevant equations
partial of M with respect to y equals partial of N with respect to x.

3. The attempt at a solution

So, I multiplied the equation by Exp[x] and voila that solved it for me by making it an exact D.E. and from there finding the solution was trivial... I was really just trying to make it prettier to look at.

I've tried using the method where you try to find a mu that is equal to Exp[(dN/dx-dM/dy)/M] but that didn't pan out as I was left with an integral dependent on x and y. I have no idea how to deal with that.

If someone could give me a nudge I'd greatly appreciate it!

2. Oct 1, 2015

### sa1988

You can separate it all out by using ey-x = ey/ex, then rearrange a bit to get all the various bits in comfortable looking places, then solve as a standard f(x)dx = f(y)dy sort of thing.

That's essentially what you did, although you say you did it by accident, heh. It seems you simply overlooked the part where you use basic laws of indices to separate the ey-x part.

3. Oct 1, 2015

### HallsofIvy

Staff Emeritus
It "didn't pan out" because that method of finding an "integrating factor" only works for linear equations and this equation is not linear. It is, instead, separable-it is easy separate x and y. I am sure you realized that $e^{y- x}= e^ye^{-x}$. The differential equation can be written as $5dx= e^ye^{-x}dy$ and, multiplying by $e^x$ as you did gives $5e^x dx= e^y dy$. You now have all x terms, including 'dx', on one side of the equation and all y terms, including 'dy' on the other. Integrate both sides.

That's a perfectly valid method of solving such an equation. What more are you asking for?

Last edited by a moderator: Oct 1, 2015
4. Oct 1, 2015

### Crush1986

I mean I knew how to get that -x out of the exponential. Are you saying that you will pretty much always do that in D.E's?

5. Oct 1, 2015

### sa1988

I've not properly done DEs for a while but yeah generally the aim is to separate the x and y variables as best as possible so it's easier to work with.

6. Oct 1, 2015

### Crush1986

Oh yah, that I knew.

I was just wondering what was the most general method used to solve an equation like that. I tried some algorithms the professor talked about in class and couldn't get anywhere. I then looked in the book and found a few more tricks to try but kept failing.

Then I gave up and just tried to make the equation look better.

I know that is kind of in the spirit of solving D.E.'s. I just don't know if I'll be as lucky on a test, haha.

7. Oct 1, 2015

### HallsofIvy

Staff Emeritus
There is NO general method for solving even first order differential equations. If a differential equation is separable, then that is the simplest method.

8. Oct 1, 2015

### Crush1986

I understand that. But I believe I was supposed to find an integrating factor. (I should have said that before, sorry). How would someone go about doing that?

9. Oct 1, 2015

### Staff: Mentor

What was the exact wording of the problem? If the problem didn't explicitly say to find and use an integrating factor, then you should go for the simplest technique. In this case, it is separation of variables, as described in post # 3.

10. Oct 1, 2015

### Crush1986

It wanted me to find an integrating factor. It said, "Verify that the D.E. is not exact. Find an integrating factor and solve it.

I meant to include that information but I guess it slipped my mind. Again, sorry.

11. Oct 1, 2015

### Crush1986

NM I GOT IT!! WHHHHHEEEEEWWW.

I just had to do some easier problems, and then not fail at algebra... Thanks everyone!