[DOCS-14703] Derivative and Integral documentation updates Created: 03/Aug/21  Updated: 30/Oct/23  Resolved: 16/Aug/21

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Minor - P4
Reporter: Bora Beran (Inactive) Assignee: Jason Price
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 2 years, 25 weeks, 2 days ago
Epic Link: DOCSP-15042
Story Points: 2

 Description   

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.


 Comments   
Comment by Githook User [ 16/Aug/21 ]

Author:

{'name': 'jason-price-mongodb', 'email': 'jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com'}

Message: DOCS-14703 derivative and integral updates
Branch: master
https://github.com/mongodb/docs/commit/8454aef6ad5fba8b4a910a4feca546c18e8a6340

Generated at Thu Feb 08 08:11:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.