Diffrential equations...can't seem to get answer =(.

There are two questions, maybe im doing the same mistake or not doing something in both? Idk...

Answer = $\displaystyle

y = 3 - \frac{4}{x^2}

$

Question = Solve for y in terms of x, the differential equation given that x = 2, when y = 2

$\displaystyle x \frac{dy}{dx} = 2(3 - y)$

I dunno what im doing wrong :(.

$\displaystyle x \frac{dy}{dx} = 2(3 - y)$

So, take over stuff and integrate both sides.

$\displaystyle \int\frac{1}{3-y} = \int\frac{2}{x}$

Gives:

$\displaystyle \ln {3-y} = 2\ln {x} + c $

Rearrange gives $\displaystyle y = 3 - x^2 + c$

Subbing in x = 2 and y = 2 i get c = -3

So my answer is $\displaystyle y = 3 - x^2 - 3$

or $\displaystyle y = x^2$

Which is wrrrrooooonnng lol :(..

Question 2:

Given that y = 1 when x = 0, express y in terms of x if

$\displaystyle \frac{dy}{dx} = \frac{e^x}{e^y}$

Now when i take stuff to side and integrate i get

$\displaystyle e^y = e^ x + c$

And therefore y = x + c

Subbing in values gives c = 1

And i get the answer y = x + 1...which fits the co-ordinates but its WRONG. :(.

** The answer is :** $\displaystyle y = \ln(e^x + e - 1)$

__ I have no idea how they get that.__

Any help would be really appreciated!

Thank-you very much in advance for anything you can give!