C/C++ First Derivative Code

In calculus, the first derivative test uses the first derivative of a function to determine whether a given critical point of a function is a local maximum, a local minimum, or neither. The idea behind the first derivative test is to examine the monotonicity properties of a function just to the left and right of a given point in its domain. If the function “switches” from increasing to decreasing at the point, then close to that point, it will achieve a highest value at that point. Similarly, if the function “switches” from decreasing to increasing at the point, then close to that point, it will achieve a least value at that point. If the function fails to “switch”, and remains increasing or remains decreasing, then no highest or least value is achieved.

From this first derivative description, I create a C/C++ first derivative code.

Output from this first derivative function is firstderv. firstderv have same size with input data (variable data). This is output from data processed with first derivative code :

Source :

http://en.wikipedia.org/wiki/First_derivative_test
6 Comments

Add a Comment

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.