Metadata-Version: 2.1
Name: derivative-mode
Version: 0.5
Summary: This module destined to calculation of derivatives using numerical methods
Home-page: https://github.com/Mun-Robbery
Author: antrisole
Author-email: gleb.zar.03@mail.ru
Project-URL: GitHub, https://github.com/Mun-Robbery
Keywords: numerical derivative
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.25.1

# Derivative Library

This code is a library for calculating derived functions.

## Installation

To install the library, use pip:

    pip install derivative_mode

## Usage

To use the library, import the `Derivative` class from the library:

    from derivative_mode import Derivative

Then you can create an instance of the `Derivative` class by passing the function you want to differentiate as an argument:

    python def func(x):
    return x**2
    derivative = Derivative(func)

## Methods

### tailor_app

Calculates the derivative of the function at the point `x0` using the Taylor method.

Usage example:

    result = derivative.tailor_app(2)

### polinom_app

Calculates the derivative of the function at the point `x0` using the polynomial method.

Usage example:

    result = derivative.polinom_app(2)

### second_derivative

Calculates the second derivative of the function at the point `x0`.

Usage example:

    result = derivative.second_derivative(2)

### threepoint_pattern(x0, second_deriv=False)

Calculates the first or second derivative of a function at the point `x0` using the three-point method.

Usage example:

    result = derivative.threepoint_pattern(2, second_deriv=True)

## Exception handling

If the function was set using a grid, the methods `tailor_app`, `polinom_app` and `threepoint_pattern` will throw an exception. If an error occurred while using the function, the methods will also throw an exception.

## License

This library is available under the MIT license.
