I've some doubts about initial values problems involving differential equation with absolute values.
For example if I have a differential equation like $y'=|x+1|$ with initial condition $y(3)=-2$, since $3>-1$ I can trascurate the absolute value and solve $y'=x+1$, is it correct?
But if the condition is for instance $y(-1)=2$ then I must consider the two different cases? That is, $y'=x+1$ if $x>-1$ and $y'=-x-1$ if $x<-1$
Is this the right way to solve this kind of problems?
You have two ODEs: $$y_1' = x + 1\tag{1}$$ which holds for $x \ge -1$, and $$y_2' = -x-1\tag{2}$$ which holds for $x \le -1$. The solutions combine to give the solution $y$ to $y' = |x + 1|$: $$y(x) = \begin{cases} y_1(x) & x \ge -1\\y_2(x) & x \le -1\end{cases}$$ Since $y$ is continuous, it is required that $y_1(-1) = y_2(-1)$.
In your first example, ODE (1) has initial value $y_1(3) = -2$, which uniquely defines $y_1(x)$ for $x \in [-1, \infty)$. ODE (2) is then uniquely defined by the continuity condition $y_2(-1) = y_1(-1)$.
In your second example, both (1) and (2) have initial value $y_1(-1) = y_2(-1) = 2$, which automatically meets the continuity condition.
In either case, in order to get the full solution, you have to examine both sides of $x = -1$.