Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-14703

Derivative and Integral documentation updates

      It would be better to rephrase the definitions of derivative and integral functions as shown below to make them more technically accurate.

       

      Current

       

      $integral

      Returns an approximation for the mathematical integral value, which is calculated using the trapezoidal rule with each set of adjacent documents forming a trapezoid using the:

       

      Updated

       

      $integral

      Returns the approximation of the area under the curve calculated using the trapezoidal rule where each set of adjacent documents form a trapezoid using the:

       

      Current

      $derivative

      Returns the mathematical derivative value, which is calculated using the:

      • First and last documents in the $setWindowFields stage window.
      • Numerator, which is set to the result of subtracting the numeric expression value for the first document from the expression value for the last document.
      • Denominator, which is set to the result of subtracting the sortBy field value for the first document from the sortBy field value for the last document.

       

      Updated

       

      $derivative

      Returns the average rate of change within the specified window, which is calculated using the:

      • First and last documents in the $setWindowFields stage window.
      • Numerator, which is set to the result of subtracting the numeric expression value for the first document from the expression value for the last document.
      • Denominator, which is set to the result of subtracting the sortBy field value for the first document from the sortBy field value for the last document.

            Assignee:
            jason.price@mongodb.com Jason Price
            Reporter:
            bora.beran@mongodb.com Bora Beran (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              2 years, 35 weeks, 4 days ago