Results 1 to 3 of 3

Math Help - Cannot get my head around these functions - guidance needed please

  1. #1
    Newbie
    Joined
    Dec 2012
    From
    UK
    Posts
    5

    Cannot get my head around these functions - guidance needed please

    Hi everyone, I'm normally ok with algebra, functions and the like but this question was posed in a clicker question in class and I don't know how to approach answering it.

    The following functions produce the same answer, true or false?
    f(n) = if n=0 then 1, else n + f(n-1)
    g(n) = n(n+1)/2

    As I have stated, this question formed part of a clicker question is class - but I would like to know the steps to solving it should something similar pop up again. The question takes a max of 3 mins to answer (clicker question limit) so I don't imagine a long rambling solution is required. As I say, any steps in solving this bad boy would be appreciated.


    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Oct 2009
    Posts
    5,545
    Thanks
    780

    Re: Cannot get my head around these functions - guidance needed please

    g(0) = 0, but f(0) = 1, so these are different functions.

    On the other hand, if we had

    f(n)=\begin{cases}0&n=0\\n+f(n-1)&n>0\end{cases}

    then

    \begin{align*}f(n)&=n+f(n-1)\\&=n+(n-1)+f(n-2)\\&\hspace{1cm}\dots\\&=n+(n-1)+\dots+1+f(0)\\&=n+(n-1)+\dots+1\\&=n(n+1)/2\\&=g(n)\end{align*}

    The second last equality is the sum of an arithmetic progression.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor

    Joined
    Apr 2005
    Posts
    15,957
    Thanks
    1630

    Re: Cannot get my head around these functions - guidance needed please

    Did it not ever occur to you to actually evaluate g(0)?
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Elephants and Stats going head to head
    Posted in the Statistics Forum
    Replies: 1
    Last Post: March 25th 2012, 10:52 PM
  2. Guidance needed with regards product prediction
    Posted in the Business Math Forum
    Replies: 2
    Last Post: September 28th 2010, 06:57 AM
  3. Replies: 3
    Last Post: March 7th 2010, 02:41 PM
  4. Linear Functions Help needed!
    Posted in the Algebra Forum
    Replies: 1
    Last Post: September 5th 2009, 06:25 AM
  5. A few pre-calc guidance needed
    Posted in the Pre-Calculus Forum
    Replies: 1
    Last Post: January 9th 2008, 09:04 PM

Search Tags


/mathhelpforum @mathhelpforum