Differentials with linear equations

1. Mar 26, 2012

1. The problem statement, all variables and given/known data
Suppose that y(x) is the solution to the initial problem, y'=y(1-x), y(1)=e
find y(2)

2. Relevant equations

3. The attempt at a solution
This is my initial attempt:
$\frac{dy}{dx}$=y(1-x)
$\frac{dy}{y}$=(1-x)dx

i then integrated both side to get:
lny=-ln(1-x)+C

and here's the problem, if i plug in 1 to find c, ln(1-x) does not exist at that point....

Last edited: Mar 26, 2012
2. Mar 26, 2012

I tried another approach:
y'+yx=y
(yx)'=y

integrated both sides:
yx=$\frac{1}{2}$($y^{2}$) +C

but with this approach i wasn't able to solve for y

3. Mar 26, 2012

lugita15

First of all, you integrated the right hand side incorrectly. Remember, you're just integrating a polynomial.

4. Mar 26, 2012

lugita15

Wait a minute, (yx)'=xy'+yx'=xy'+y, not y'+yx.