Initial value problem differential equation $y' = (x-1)(y-2)$ $$y' = (x-1)(y-2)$$
$y(2)= 4$
$$\frac{1}{y-2}dy = (x-1)dx$$
$$\int \frac{1}{y-2}dy =\int (x-1)dx$$
$$\ln(y-2) = \frac{x^2}{2} - x + c$$
$$y - 2 = e^{\frac{x^2}{2} - x + c} $$
$$y = e^{\frac{x^2}{2} - x + c} + 2$$
plug in the inital value
$$y = e^{\frac{2^2}{2} - 2 + c} + 2$$
$$y = e^c+ 2$$
I feel like this is wrong anyways, so where did I go wrong?

For $x=2$ we have $y=4$ so $e^c=4-2=2$ and finally
$$y = 2e^{\frac{x^2}{2} - x } + 2$$
