Class TaylorSeriesDerivativeCheck

java.lang.Object
edu.cmu.tetrad.util.TaylorSeriesDerivativeCheck

public class TaylorSeriesDerivativeCheck extends Object
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 Type
    Method
    Description
    static void
    main(String[] args)
    The main method initializes an array of derivatives and tests whether the first derivative f'(x) is positive in a specified range.
    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.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • main

      public static void main(String[] args)
      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.