Not sure if that question title makes any sense, but here's my problem. I have a function
$$ f(x,\alpha,\beta) = \begin{cases} {\frac{x-\alpha}{\beta-\alpha}} & {\alpha \leq x \leq \beta}\\ {0} & {x < \alpha} \\ {1} & {x > \beta} \end{cases} $$
defined for real non-negative values of $x$, $\alpha$, and $\beta$ and $\alpha < \beta$. I want to get $\frac{\partial f}{\partial \alpha}$ and $\frac{\partial f}{\partial \beta}$. This is easy enough for values of $x$ in the domain $[\alpha,\beta]$:
$$ \frac{\partial f}{\partial \alpha} = \frac{x-\beta}{(\alpha - \beta)^2} \\ \frac{\partial f}{\partial \beta} = \frac{\alpha - x}{(\alpha-\beta)^2} $$
I also know that $\frac{\partial f}{\partial \alpha}=0$ when $x>\beta$, and $\frac{\partial f}{\partial \beta} = 0$ when $x<\alpha$. (Or at least, I can define them as such for my purposes.)
The tricky part is finding $\frac{\partial f}{\partial \alpha}$ when $x<\alpha$, and $\frac{\partial f}{\partial \beta}$ when $x>\beta$. Theoretically these should be zero. But let's say I increase $\beta$ to $\beta + \epsilon$: Values of the new $f(x)$ where $\beta < x < \beta + \epsilon$ would be less than the value of the original function there (i.e., 1)! This doesn't square with the idea of the partial derivative of the original function with respect to $\beta$ being zero in that domain.
If it matters, this comes up in an iterative model fitting algorithm that uses $\frac{\partial f}{\partial \alpha}$ and $\frac{\partial f}{\partial \beta}$ to generate new parameter guesses at each iteration. At the moment, I have $\frac{\partial f}{\partial \alpha}=0$ and $\frac{\partial f}{\partial \beta}=0$ when $x$ is outside $[\alpha,\beta]$, so it basically thinks, "Okay, I can change $\alpha$ and $\beta$, and any samples with $x$ outside $[\alpha,\beta]$ will be unaffected." This may not be true for some samples, depending on their value of $x$ and the parameter step size.
Any help would be much appreciated! Thanks in advance.
Okay, I went back to the basics. Looking at $\frac{\partial f}{\partial \beta}$,
$$ \frac{\partial f}{\partial \beta} = \lim_{h\to0} \frac{f(x,\alpha,\beta+h) - f(x,\alpha,\beta)}{h} $$
If my work is right, when $x>\beta$…
$$ \frac{\partial f}{\partial \beta} = \lim_{h\to0} \frac{f(x,\alpha,\beta+h) - 1}{h} = \lim_{h\to0} \frac{x-\alpha}{h(\beta+h-\alpha)} - \frac{1}{h} = \frac{\alpha-\beta}{0} = \infty $$
Similarly, when $x<\alpha$,
$$ \frac{\partial f}{\partial \alpha} = \cdots = \frac{x-\alpha}{0} = \infty $$
So is that just how it's going to be? Am I stuck just ignoring those points in my parameterization?