A recursive function is a function that uses itself in its definition. An example of such a function is:
This function constantly makes a recursive call to itself until the value x becomes less than 0, then it hits the base case and returns 2. Creating a closed form formula from recurrence equations is a trivial task, Basically, you need to write out the function for several steps.
Since this recursion will continue until x is less than or equal to 0, we can write this function as: