Package edu.cmu.tetrad.util
Class TaylorSeriesDerivativeCheck
java.lang.Object
edu.cmu.tetrad.util.TaylorSeriesDerivativeCheck
Tests if the derivative f'(x) is positive for a Taylor series function over a range of x given its derivatives at 0.
- Author:
- ChatGPT 4o, josephramsey
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidThe main method initializes an array of derivatives and tests whether the first derivative f'(x) is positive in a specified range.static booleantestDerivativePositivity(double[] derivatives, double xMin, double xMax, double step) Tests if the first derivative f'(x) is positive for all x in the given range.
-
Method Details
-
main
The main method initializes an array of derivatives and tests whether the first derivative f'(x) is positive in a specified range.- Parameters:
args- Command-line arguments passed to the program, not used in this method.
-
testDerivativePositivity
public static boolean testDerivativePositivity(double[] derivatives, double xMin, double xMax, double step) Tests if the first derivative f'(x) is positive for all x in the given range.- Parameters:
derivatives- The array of Taylor series derivatives expanded about 0.xMin- The minimum value of x to test.xMax- The maximum value of x to test.step- The step size for testing x in the range.- Returns:
- True if f'(x) > 0 for all x in the range, false otherwise.
-