# Differential Equation Question

• Oct 13th 2009, 10:18 AM
craig
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
• Oct 13th 2009, 10:23 AM
Chris L T521
Quote:

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.
• Oct 13th 2009, 10:36 AM
craig
Quote:

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