Second Derivative (rate of change of the rate of change)

Version 2



    This calculation computes the approximate second derivative at each point of a function f(x), using finite differences.


    Example Calculation:

    // The below calculation is a second order approximation to the second derivative of f(x).

    // If the current row is the first row, then use a forward difference to compute the endpoint

    IF FIRST()==0 THEN


    // If the current row is the last row, then use a backward difference to compute the endpoint.




    // Otherwise use a second order centered difference






    Inputs and Setup: (for table calculations, delete if not applicable)


    [x] - A numerical field.

    [f(x)] - Another numerical field.

    - Each [x] value in the partition must correspond to a single [f(x)] value in the partition.

    - No two consecutive [x] values can be the same (otherwise we divide by zero).


    Partitioning and Addressing: (for table calculations, delete if not applicable)


    Compute using a field that partitions your data into the points in the view.

    Alternately, if you wish to use all of the available points, you can turn off Aggregate Measures and compute using Table (Across).




    For interior points, the calculation uses a second-order accurate centered difference formula.  This doesn't work for the endpoints (because we don't have data beyond the endpoints), so instead we use a forward or backward difference to compute the derivatives there.

    If the difference between [x] values is too small compared to the difference in [f(x)] values, we may see some numerical instability.


    Related Functions:




    Further Reading/Examples: