# Math Help - Problem Solving First Order Differential Equation

1. ## Problem Solving First Order Differential Equation

I'm trying to solve the following D.E: (2yexp(y/x) + x)dy/dx = 2x + y
Here is my current working:
dy/dx = (2x+y) / (2yexp(y/x) + x)
sub y = ux
then dy/dx = (du/dx)x + u
dy/dx - u = (du/dx) x
(2 + u) / (2uexp(u) + 1) - u = (du/dx) x
2(1-u^2exp(u))/(2uexp(u) + 1) = (du/dx) x

So then I have to integrate 1/x dx (easy) but then also (2uexp(u) + 1) / 2 (1-u^2exp(u)) du . Actually this second integration is possible according to wolfram alpha but I can't see what method to use.

Any help would be much appreciated.

2. [SECOND EDIT]: See next post for a correction in the OP.

Hmm. Strange. I don't get quite the same integration you do. Using your substitution, I get

$\left(2\,\dfrac{y}{x}\,e^{y/x}+1\right)y'=2+2\,\dfrac{y}{x}\implies$

$(2ue^{u}+1)(xu'+u)=2+2u\implies$

$xu'+u=\dfrac{2+2u}{2ue^{u}+1}\implies$

$xu'=\dfrac{2+2u}{2ue^{u}+1}-u=\dfrac{2+2u-2u^{2}e^{u}-u}{2ue^{u}+1}=\dfrac{2+u-2u^{2}e^{u}}{2ue^{u}+1}\implies$

$\dfrac{(2ue^{u}+1)\,du}{2+u-2u^{2}e^{u}}=\dfrac{dx}{x}.$

The integral on the left is intractable. Have I made a mistake somewhere?

I wonder if the opposite substitution, that of $vy=x,$ would give you a more do-able integral. *Working it out...*

[EDIT]: Nope, that integral is just as intractable.

It looks to me like the best you can do is reduce the DE to quadratures.

3. My aplogies, the first line should be (2yexp(y/x) + x)dy/dx = 2x + y . I believe the rest of my working is correct though, i'm just left with this nasty-looking integral that I've no idea how to do! If it helps the exact question is http://www.maths.cam.ac.uk/undergrad...erNST_IA_2.pdf Q1c.

Originally Posted by Ackbeet
Hmm. Strange. I don't get quite the same integration you do. Using your substitution, I get

$\left(2\,\dfrac{y}{x}\,e^{y/x}+1\right)y'=2+2\,\dfrac{y}{x}\implies$

$(2ue^{u}+1)(xu'+u)=2+2u\implies$

$xu'+u=\dfrac{2+2u}{2ue^{u}+1}\implies$

$xu'=\dfrac{2+2u}{2ue^{u}+1}-u=\dfrac{2+2u-2u^{2}e^{u}-u}{2ue^{u}+1}=\dfrac{2+u-2u^{2}e^{u}}{2ue^{u}+1}\implies$

$\dfrac{(2ue^{u}+1)\,du}{2+u-2u^{2}e^{u}}=\dfrac{dx}{x}.$

The integral on the left is intractable. Have I made a mistake somewhere?

I wonder if the opposite substitution, that of $vy=x,$ would give you a more do-able integral. *Working it out...*

[EDIT]: Nope, that integral is just as intractable.

It looks to me like the best you can do is reduce the DE to quadratures.

4. Ah, I'm with you now. Right, I think your working is correct. Let me see. You have to evaluate the integral

$\displaystyle\int\frac{2ue^{u}+1}{2(1-u^{2}e^{u})}\,du.$

Here's the trick: multiply top and bottom by $e^{-u}.$ See where that leads.

5. Ahh, It's now just a log as the numerator is the negative derivative of the denominator. I did think of this before but didn't consider multiplying top and bottom by exp(-u). How did you come up with this out of interest? I suppose the next time I have a similar integral I'll know this is something to try.

Originally Posted by Ackbeet
Ah, I'm with you now. Right, I think your working is correct. Let me see. You have to evaluate the integral

$\displaystyle\int\frac{2ue^{u}+1}{2(1-u^{2}e^{u})}\,du.$

Here's the trick: multiply top and bottom by $e^{-u}.$ See where that leads.

6. Originally Posted by StaryNight
Ahh, It's now just a log as the numerator is the negative derivative of the denominator. I did think of this before but didn't consider multiplying top and bottom by exp(-u). How did you come up with this out of interest?
Well, the numerator looked like the derivative of the denominator, so I was already headed in that direction. However, when I took the derivative of the denominator, I had to use the product rule, and I got a whole bunch of terms that I didn't want. So I was wondering if I could possibly separate out the exponentials from the polynomials in order to avoid using the product rule, and then that little trick occurred to me. I've had problems before where that sort of thing comes in handy.

Ultimately, though, the solution came out of my imagination, which is why I've long thought that by far the most important quality a mathematician can possess, is a good imagination. That's why reading great books (as in, literature), is so important. It trains the imagination.

I suppose the next time I have a similar integral I'll know this is something to try.