# Simple Differential Solution

Doing this question for revision

Find solutions to: $\ x(dy/dx)=x^2e^{-x} + y$

satisfying $\ y(1) = 0$

I've divided through by$\ x$ and rearranged to get

$\ (dy/dx)-y/x=xe^{-x}$

Then I used $\ -1/x$ as an integrating factor getting $\ e^{∫-1/x}= 1/x$ which gives me

$\ y/x= ∫e^{-x}$

$\ y/x = -e^{-x} + c$

$\ y = -xe^{-x} + cx$

Plugging in initial values I get

$\ 0=-e^{-1} + c$ and thus $\ c=e^{-1}$ so

Finally I have:

$\ y = -xe^{-x} + xe^{-1}$

Is my working correct, I have no answers for the paper I'm getting this question from.

-
Yessir! Congratulations. – Did Aug 20 '11 at 16:53
The calculation is correct. The lack of answers in this case need not be a problem. By substitution, you can check whether your answer satisfies the initial condition. By differentiation, you can check whether your answer satisfies the DE. – André Nicolas Aug 20 '11 at 17:12

The working is correct. (It can be dangerous to leave out the "$dx$" from integrals.)
The fact that there are no answers given need not have been an issue. By putting $x=1$ into your answer, you can check whether your answer satisfies the initial condition. By differentiating your answer, you can check whether it satisfies the differential equation. We have the same phenomenon in integration problems. Finding an indefinite integral may take some effort, but checking that it is correct is mechanical.