+ Reply to Thread
Results 1 to 4 of 4

Central Difference Approximation with VBA

  1. #1
    Registered User
    Join Date
    10-04-2010
    Location
    Blacksburg, Virginia
    MS-Off Ver
    Excel 2003
    Posts
    34

    Central Difference Approximation with VBA

    Can someone answer this Question For me:

    Write a function named SecondDerivative that returns the second derivative of the function at a specified x based on a central approximation. The function should take 2 arguements: the value of x where the derivative is to be evaluated and the value of DeltaX to be used for the central difference. Assume that the function is available in a VBA function termed myf(). myf() takes 1 arguement: the x value where the function is to be evaluated. For example, if the function is 3x^2+2x-1, then assume that the following code is already available:

    Option Explicit
    Function myf(x as double) as double
    myf = 3*x^2+2*x-1
    End Function

    Thanks for any help,
    Brandon

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Central Difference Approximation with VBA

    at this point we usually ask you to try for yourself,if the code doesn't work post it and ask for help!
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    10-04-2010
    Location
    Blacksburg, Virginia
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Central Difference Approximation with VBA

    I don't even know where to start, i've been looking at this thing for hours

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Central Difference Approximation with VBA

    Brandon,

    These are all homework questions. We will help if there are specific elements you don't understand, we will not do your homework for you.

    Make an attempt, write some pseudocode, and then ask a specific question. Get some skin in the game.
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1