Define a relation -- with functions and derivatives Here is the problem I am working on:

I am in a beginning level abstract math/proofs class, and haven't had much experience with calculus in any proof (or in any relation).
Here is my understanding about relations (and how it was presented in my course):
A relation, $R$, from a set $A$ to a set $B$ is a subset of $A \times B$. 
I interpret this as a relationship between the domain and range between sets $A$ and $B$. So, for the problem I am working on I need to define a relation between two functions, $f(x)$ and $g(x)$ and their respective derivatives. 
I am struggling to start off defining the relation, $D$. How much calculus will I actually need to start my definition of the relation? Will I need to use the information I know regarding derivatives? I have a tendency to make these relation problems more complicated than need be, so a step in the right direction (so I don't sit here and continue to work with the limit definition of the derivative-- like I have been for the past 25 minutes) would be appreciated. 
Additionally, if anyone has any good resources regarding relations (links, textbooks, etc.) I would appreciate the suggestion. I am taking Real Analysis this Fall and would like to try to make sure I get this down before I start the class.
 A: In fewer symbols, the relation you are trying to show is an equivalence relation is that two functions $f$ and $g$ are equivalent if their derivatives are the same.  The definition of an equivalence relation is a relation which is symmetric, reflexive, and transitive, so all you need to do is to prove the relation is each of these three things.
Again in fewer symbols (and expanding the definitions), here is what you need to prove: (some might come across as too obvious for proof; that's because the equality is already an equivalence relation)


*

*(Symmetric). Let $f$ and $g$ be differentiable functions.  If $f$'s derivative is equal to $g$'s derivative then $g$'s derivative is equal to $f$'s derivative.

*(Reflexive)  Let $f$ be a differentiable function.  Then $f$'s derivative is equal to itself.

*(Transitive) Let $f,g,h$ be differentiable.  Then if $f$'s derivative is equal to $g$'s and $g$'s is equal to $h$'s, then $f$'s is equal to $h$'s.
Once this is done, one may entertain the relation's equivalence classes.  One way to do this is to find a representative for each.  This is basically the way to the answer: if $f$ and $g$ are in the same equivalence class, then they have the same derivative.  By the Mean Value Theorem, we can deduce that $f$ and $g$ are different by at most a constant (i.e., $f(x) = g(x) + c$ for some real number $c$).  Conversely, if $f$ and $g$ are two differentiable functions different by a constant, then they are equivalent (easy exercise).  Thus, there is one equivalence class for each function, modulo addition by a constant.
