Edit: This question originally contained a typo where the function $f$ specified below was equal to $x$, not $x^2$ as currently written, outside an interval $[-T,T]$, and the accepted answer was written before the correction. This question has nonetheless been resolved through that answer.
I am practising on a couple of old exams in algebraic topology, and one of the problems asks the student to compute $\displaystyle\sum_{x\in f^{-1}(0)}\frac{f'(x)}{|f'(x)|}$, where $f(x)=x^2$ for $x\notin [-T,T]$, for some $T>0$, and $0$ is a regular value. In this problem, we have $f:\mathbb{R}\to \mathbb{R}$ be a differentiable map.
My attempt is basically as follows: I note that the desired sum is equal to the (Brouwer) degree of $f$ at the point $0$. Since the degree is the same at any regular point of $f$, I want to switch the regular point under consideration, and move out of the problem area $[-T,T]$. Since $[-T,T]$ is a compact interval and $f$ differentiable (hence continuous), $f$ takes a finite (necessarily positive) maximum value, say $m$, on that interval.
So let's take $m+1$ as our new regular value, with the only inverses being $\pm \sqrt{m+1}$. Clearly the slope is negative at the negative root, and positive at the other, so the degree should then be zero?
The conclusion doesn't really convince me, as I expect a quadratic to have degree 2 in general. But I cannot deduce where I have gone wrong. Can anyone help me understand how to tackle this?
For reference, we used as course literature Milnor's "Topology From A Differentiable Viewpoint" and "Differential Forms In Algebraic Topology" by Bott, Tu.
A slight addendum for further readers: I realized that we might have to compare the maximum of $f$ in the interval $[-T,T]$ with $T^2$, in case the maximum of $f$ in the interval would be too small for an escape out of it. Other than that, the reasoning should hold.
Edit: the question has been changed since this answer was written.
I'm slightly confused as to where $\pm \sqrt{m+1}$ has come from... Your function is $f(x) = x$ outside the interval $[-T, T]$, so if you take $m+1$ as your new regular value then your only preimage is $m+1$ itself and your function has degree 1.
In general a quadratic with non-degenerate roots has degree 0: it has one root with a positive value of $f'(x)$ and one root with a negative value of $f'(x)$. However, a quadratic doesn't fit the description of the function you're describing: for $x \not \in [-T,T]$ we have $f(x) = x$, so to transition between the region where $f(x) = x$ and $f(x) = ax^2 + bx + c$ you need to have an "extra" root (i.e. one that you wouldn't expect to occur in $ax^2 + bx + c$) that gives you degree 1 as desired.