I have a question that is probably silly to many.
I was given the function $f(x)=x^2-|2x-1|$ and was requested to find its extrema. Notice that $f'(x)=2x-\frac{2(2x-1)}{|2x-1|}$, so that $f$ is not differentiable in $x=0.5$ and this therefore constitutes a critical point.
To find the extrema I solved $f'(x)=0$, which gives three results: {$1, -1, 0.5$}. But $0.5$ must be excluded, since it's not on the domain.
My question is the following. Since $0.5$ is on the domain of $f$, and is a solution for $f'(x)=0$, is $x=0.5$ an extremum? My first instinct was to say no; that this point would only constitute a critical point, but not an extreum, since $x=0.5$ is not really a root of the derivative, because it's not part of its domain. But then I saw the graph of $f$ and $x=0.5$ was indeed an extremum! I'm very confused about this, could anyone clarify?

What you write is not consistent. You write that $f$ is not differentiable at $\frac12$. I agree. But that's the same thing as asserting the $\frac12$ doesn't belong to the domeain of $f'$. However, you write later that $\frac12$ is a solution of the equation $f'(x)=0$. There is a contradiction here.
In fact, $f$ is not differentiable at $\frac12$ and therefore $\frac12$ is not a solution of the equation $f'(x)=0$. However, $f$ may very well have an extrema there. Take, for instance, the function $g(x)=\lvert x\rvert$. It attains its minimum at $0$, a point at which $g$ is not differentiable.