Proof that the derivative of a function $f$ and $g$ are equivalent $\forall x \in$ the domain of $f(x)$ and $g(x)$ Set $ g(x) = \left\{
                      \begin{array}{lr}
                          \frac{1}{x}     & : x > 0 \\
                          \frac{1}{x} + 1 & : x < 0
                      \end{array}
                  \right.
         $ and $f(x) = \dfrac{1}{x}$. Show that $f^\prime(x) = g^\prime(x)$ $\forall x \in$ the domain of $f(x), g(x)$. From this, state if it can be concluded that $f-g = c$, where $c$ is a constant function.

Set $ g(x) = \left\{
                 \begin{array}{lr}
                     \frac{1}{x}     & : x > 0 \\
                     \frac{1}{x} + 1 & : x < 0
                 \end{array}
             \right.
    $ and $f(x) = \dfrac{1}{x}$. Hence $g(x)$ and $f(x)$ are defined $\forall x \in \mathbb{R} \wedge x \neq 0$. For a function $k(x) \implies \exists k'(x)$ $\forall x$ in the domain of $k$ where $x = c \wedge \exists \lim_{h \to 0} \frac{k(c + h) - k(c)}{h} \implies \exists f'(x), g'(x)$ $\forall x \in \mathbb{R} \wedge x \neq 0$. Since the derivative of a constant $c$ is $0 \implies \frac{d}{dx}[h(x) + c] = h'(x) = \frac{d}{dx}[h(x)]$. It follows that $g'(x) = -\frac{1}{x^2}$ $\forall x \in$ the domain of $g$, and $f'(x) = -\frac{1}{x^2}$ $\forall x \in$ the domain of $f$. Since the domain of $f$ and $g$ are equivalent, $g' = f'$. However, because $f - g$ differs in values as $x$ passes from negative to positive values, it may not be concluded that $f$ and $g$ differs by a constant value $c$ $\forall x \in $ the domain of $f$ and $g$ such that $f - g = c$.

 A: Your proof that $f^\prime(x)=g^\prime(x)$ is rather confusing. There seems to be little to prove and I don't see where the function $k(x)$ comes into it. Since differentiation is a completely local operation and both of your functions are differentiable everywhere they are defined, you can just differentiate both of the functions in a straightforward way using the standard differentiation rules.
Your conclusion though is incorrect. Which you can even easily see by actually performing the subtraction. $f-g$ is obviously not constant. Now the trick is to figure out where you went wrong.
Hint Consider the claim that $\forall x\in\text{Dom}(h)\;\;(h^\prime(x)=0) \implies (h(x)=c)$. Is that a correct claim? 
A: Let me give a general (rather long) comment. 
We have something like this: 
If $h(x)$ is a continuous function defined on $[a, b]$, differentiable on $(a, b)$ and $h'(x) = 0$ for all $x\in (a, b)$. Then $h$ is a constant (that is, $h(x) = c$ for all $x \in [a, b]$). 
To show this, let $x\in (a, b]$. Then by mean value theorem (applied on $h : [a, x] \to\mathbb R)$, there is $y\in (a, x)$ so that 
$$h'(y) = \frac{h(x) - h(a)}{x-a}\Rightarrow h(x) = h(a)$$
as $h'(y) = 0$ by assumption. Thus $h$ is constant ($h(x) = h(a) = c$ for all $x$). 
Note that in the proof, we use heavily that $h$ is defined on $[a, x]$ for all $x$. In particular, if $h$ is defined on (e.g.) $(-\infty, 0)\cup (0,+\infty)$ which is not connected, then the above statement does not hold. 
An example is $h = f - g$ given in your question. $h'(x) = 0$ for all $x$, while $h$ is NOT a constant. 
