Suppose the solution to my equation blows up at 0 and is well defined everywhere else. Then why can't we just take R-{0} as the domain of the function? Also can someone give an example of a nonzero function whose first order derivative is zero?
Edit: sorry, nonzero function which is not constant. Suppose the solution to a differential equation is 1/x then why do we have to take an interval and not R-{0}
Suppose your equation is $$ y'(x)=-\frac 1{x^2}\\ y(1)=1 $$ just to keep it simple. Then clearly, for positive $x$, the solution is $\frac1x$. However, the equation itself says nothing about what the value of the function is for negative numbers. Maybe for negative $x$ we have $y=\frac1x +1000$? There is just no way to use the equation to extend a solution uniquely past a point of singularity like that.
As for a function with a zero derivative, such a function must be constant on any connected component of its domain. Maybe that can give you some hint on how to find one.