document.write( "Question 67665This question is from textbook
\n" ); document.write( ": I am working with recursive functions. I do not understand the examples given in the book.
\n" ); document.write( "Example 1 is evaluating a recursive function. Use the following defintion to find the value of f(4).
\n" ); document.write( "f(1)=3 and f(n)= f(n-1) + n
\n" ); document.write( "solution:
\n" ); document.write( "f(1)=3
\n" ); document.write( "f(2)= f(1)+2=3+2=5 This is where I get lost.
\n" ); document.write( "f(3)=f(2)+3=5+3=8
\n" ); document.write( "f(4)=f(3)+4=8+4=12\r
\n" ); document.write( "\n" ); document.write( "I understand factorals but this I do not understand. Also is there a website that would guide me slower through the recursive functions?\r
\n" ); document.write( "\n" ); document.write( "Thank you
\n" ); document.write( "Kate
\n" ); document.write( "

Algebra.Com's Answer #48140 by stanbon(75887)\"\" \"About 
You can put this solution on YOUR website!
Use the following defintion to find the value of f(4).
\n" ); document.write( "f(1)=3 and
\n" ); document.write( "f(n)= f(n-1) + n
\n" ); document.write( "You are given a starting point f(1)=3
\n" ); document.write( "You are given a rule for generating the next number in the sequence:
\n" ); document.write( "f(n) means any number of the sequence.
\n" ); document.write( "f(n-1) means the number just before the one you are generating
\n" ); document.write( "or the last one you generated.
\n" ); document.write( "n is the number of the sequence you are generating.\r
\n" ); document.write( "\n" ); document.write( "solution:
\n" ); document.write( "f(1)=3
\n" ); document.write( "-------------
\n" ); document.write( "f(2)= f(1)+2 because f(1) comes just before f(2)
\n" ); document.write( "then you add 2 because that is the number of sequence element.
\n" ); document.write( "Since you were told f(1)=3, that is the 1st term below.
\n" ); document.write( "=3+2
\n" ); document.write( "=5
\n" ); document.write( "---------------
\n" ); document.write( "Now you go through the same process to generate f(3)
\n" ); document.write( "f(3)=f(2)+3
\n" ); document.write( "=5+3
\n" ); document.write( "=8
\n" ); document.write( "---------------
\n" ); document.write( "f(4)=f(3)+4
\n" ); document.write( "=8+4
\n" ); document.write( "=12
\n" ); document.write( "---------
\n" ); document.write( "Do you see that f(5)would be f(4)+5
\n" ); document.write( "=12+5
\n" ); document.write( "=17
\n" ); document.write( "---------
\n" ); document.write( "Do you see that this process could go on forever?
\n" ); document.write( "That's what makes it recursive.
\n" ); document.write( "-----------
\n" ); document.write( "Cheers,
\n" ); document.write( "Stan H.
\n" ); document.write( "
\n" ); document.write( "
\n" );