# Math Help - Differential Equation Question

1. ## Differential Equation Question

Hi again, not posted in a while but started my degree course now and getting back into the swing of things.

Anyway, I was reading ahead in the differential equations module and had a go at a couple of questions. Not got any answers for them though so if someone would be kind enough to take a quick look would be appreciated

Solve $xy' + x +y = e^x$

First divide through by x, $y' + x^{-1}y = x^{-1}e^x - 1$

Then using the integrating factor of $e^{\int{\frac{1}{x}}}$, I get the following equation:

$xy' + y = e^x - x$

Integrating both sides gives me:

$xy = e^x - \frac{x^2}{2} + C$

Which can be tidied up to give $y = \frac{e^x}{x} - \frac{x}{2} + \frac{C}{x}$

Just realised that if I had spotted the implicit differentiation I could have saved myself a lot of time, however is my rather long winded attempt still ok?

Thanks

Craig

2. Originally Posted by craig
Hi again, not posted in a while but started my degree course now and getting back into the swing of things.

Anyway, I was reading ahead in the differential equations module and had a go at a couple of questions. Not got any answers for them though so if someone would be kind enough to take a quick look would be appreciated

Solve $xy' + x +y = e^x$

First divide through by x, $y' + x^{-1}y = x^{-1}e^x - 1$

Then using the integrating factor of $e^{\int{\frac{1}{x}}}$, I get the following equation:

$xy' + y = e^x - x$

Integrating both sides gives me:

$xy = e^x - \frac{x^2}{2} + C$

Which can be tidied up to give $y = \frac{e^x}{x} - \frac{x}{2} + \frac{C}{x}$

Just realised that if I had spotted the implicit differentiation I could have saved myself a lot of time, however is my rather long winded attempt still ok?

Thanks

Craig
You're longer way is still correct, since this is a linear differential equation.

3. Originally Posted by Chris L T521
You're longer way is still correct, since this is a linear differential equation.

Craig