$$y^\prime=(y-1)^2, \qquad y(0)=1.01$$
I have tried: $$\begin{align} \int \frac{dy}{(y-1)^2} &= \int dx \\[4pt] -(y-1)^{-1} &= x \\ y &= 1-\frac{1}{x}+C \end{align}$$
Then I cannot find the $C$, because if $x=0$, then $y= -\infty$.
What's wrong?
$$y^\prime=(y-1)^2, \qquad y(0)=1.01$$
I have tried: $$\begin{align} \int \frac{dy}{(y-1)^2} &= \int dx \\[4pt] -(y-1)^{-1} &= x \\ y &= 1-\frac{1}{x}+C \end{align}$$
Then I cannot find the $C$, because if $x=0$, then $y= -\infty$.
What's wrong?
On
I would emphasize:
$$ - (y-1)^{-1} = x - E $$ for a constant $E$ $$ (y-1)^{-1} = E - x $$ $$ y-1 = \frac{1}{E-x} $$ $$ y = 1 + \frac{1}{E-x} $$
Writing it this way, $E$ is positive. Furthermore, the graph has a vertical asymptote at $x=E.$ The solution does not exist for all $x,$ it blows up.
On
A modified approach is to let $f(t) = y(t) - 1$ to obtain a solution to the modified problem $$f' = f^2 \, \hspace{5mm} \, f(0) = \frac{1}{100}.$$ With this then \begin{align} \frac{d f}{dt} &= f^2 \\ \int \frac{df}{f^2} &= \int dt \\ - \frac{1}{f} &= t + c_{0}. \end{align} When $t = 0$ this leads to $c_{0} = - 100$ and $$f(t) = - \frac{1}{t - 100}.$$ In terms of $y(t)$ this result provides $$y(t) = 1 + \frac{1}{100 - t} = \frac{101 - t}{100 - t}.$$
Check: $$y'(t) = \frac{1}{(100 - t)^2} = (y-1)^2$$ and $y(0) = 101/100$.
$$\int \frac{dy}{(y-1)^2}=-(y-1)^{-1}+C = \int dx = x+C.$$
Consolidate the $C$'s:
$$-(y-1)^{-1}=x+C.$$
Set $x=0,y=1.01$ and solve for $C$.
It looks to me like you integrated both sides with respect to $y$, which is not actually what is happening when you solve an ODE by separation of variables. One side gets integrated with respect to $y$ and the other gets integrated with respect to $x$.