Solve the differential equation $$ u'(t) = \frac{u^2(t) - u(t)}{t} $$ and then solve the initial value problem with $u(1) = \frac{1}{2}$.
I know the general solution is given by $u(t) = \frac{1}{c_1 t + 1}$ for all $t \in \mathbb{R}$ and some $c_1 \in \mathbb{R}$ determined by the initial condition, which is not always positive.
My problem is that when I integrate $\frac{1}{t}$ when using separation of variables, is my result $\ln|t|$ or just $\ln(t)$?
Here's what I've done so far: We exclude the constant solutions $u :\equiv 0$ and $u : \equiv 1$ Then our differential equation is equivalent to $$ \frac{u’(t)}{u^2(t) - u(t)} = \frac{1}{t}. $$ Integrating and substituting gives \begin{align*} \int_{u(t_0)}^{u(t)} \frac{1}{s(s - 1)} ds = \int_{t_0}^{t} \frac{1}{s} ds \implies & \int_{u(t_0)}^{u(t)} \frac{1}{s - 1} - \frac{1}{s} ds = \ln\left| \frac{t}{t_0} \right| \\ \implies & \ln\left|\frac{u(t_0) ( u(t) - 1 )}{u(t) ( u(t_0) - 1)} \right| = \ln\left| \frac{t}{t_0} \right| \\ \implies & \frac{| u(t) |}{|u(t) - 1|} = \frac{|t_0| |u(t_0)|}{|t| | u(t_0) - 1|} \end{align*} Do I now do a case distinction or how can I solve for $u$ now?
The absolute values in your calculation were applied properly where they are needed. However, in the next step you can remove them as follows:
As you observed, there are constant solutions at $u=0$ and $u=1$. Due to uniqueness of solutions any solution starting in $(0,1)$ stays inside that interval, the same for $(-\infty,0)$ and $(1,\infty)$. Thus the signs of the expressions under the absolute values are constant and can be merged into the integration constant. Resp. in a formulation with the initial condition, those fractions $\frac{u(t)}{u(t_0)}$ and $\frac{u(t)-1}{u(t_0)-1}$ are always positive, so that the absolute value is equal to the term within.
The ODE has a singularity at $t=0$, thus the whole vertical line there is excluded from the domain of the ODE. Thus the domain of the solution with initial condition at $t=1$ is $(0,\infty)$, not the whole of $\Bbb R$. So also $\frac{t}{t_0}$ is positive over the domain of the solution.
Then you continue with (with the correct signs in the partial fraction decomposition) \begin{align} \frac{u(t_0)(u(t)-1)}{u(t)(u(t_0)-1)}&=\frac{t}{t_0}\\[.8em] u(t)\Bigl(t_0u(t_0)-t(u(t_0)-1)\Bigr)&=t_0u(t_0)\\[.8em] u(t)=\frac{t_0u(t_0)}{t_0u(t_0)+(1-u(t_0))t} \end{align}