Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Math & Sciences (https://www.askmehelpdesk.com/forumdisplay.php?f=402)
-   -   Recursive functions (https://www.askmehelpdesk.com/showthread.php?t=192803)

  • Mar 9, 2008, 03:20 PM
    kari1818
    recursive functions
    f(0)=7
    f(n)=n^2 - f(n-1)

    I have no idea how to do this, so any help will be appreciated:D
  • Mar 10, 2008, 10:23 AM
    ebaines
    Assuming that n takes on vaues 0, 1,2, 3... You already know that f(0) = 7. To find f(1), use the equation you were given with n = 1. Continue for n= 2, 3, 4, etc.

    f(1) = 1^2 - f(0) = 1 - 7 = -6
    f(2) = 2^2 - f(1) = 4 - (-6) =10
    f(3) = 3^2 - f(2) = 9 - 10 = -1
    etc.
  • Mar 11, 2008, 05:51 AM
    galactus
    Perhaps we can find a closed form. If we look close there is a pattern amongst the ven and odd recursions. I will use instead of .









    .
    .
    .
    .

    Using finite difference or what not we find the closed form for the evens is



    For the odds:



    Combine the two and get:



    Which can be written as

    Notice the formula for the sum of the integers, plus or minus 7.

  • All times are GMT -7. The time now is 11:57 PM.