Forming recurrence relations


I have this 2 examples in my textbook:

Example 1

public void f(int n) {     if (n = 1)         return 1;     else         return n * f (n-1); } 

The textbook shows how the recurrence relation is being form from by the above code

T(0) = a           for some constant a T(n) = T(n-1)+b    for some constant b and a recursive term 

Example 2

public int myFunction (int n) {     if (n == 1)         return 1;     else         return 2 * myFunction(n/2) + myFunction(n/2) + 1; } 

The textbook shows how the recurrence relation is being form from by the above code

T(1) = c              for some constant c T(n) = 2T(n/2) + b    for some constant b and a recursive term 

The problem

Despite reading the textbook multiple time (and failed attempt at searching online), I still do not understand how the +b come about for both examples. Is anyone able to enlighten on this?

Thanks.