Skip to main content

Derivative Library

This code is a library for calculating derived functions.

Installation

To install the library, use pip:

pip install derivative_lib

Usage

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

from derivative_lib 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.

Metadata

Release files for derivative-lib 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for derivative-lib 0.2
File Size Uploaded
derivative_lib-0.2.tar.gz 2.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for derivative-lib 0.2
File Interpreter ABI Platform
derivative_lib-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 5.1 kB

Release files / derivative_lib-0.2.tar.gz

Download URL derivative_lib-0.2.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4ffb2aa2f0190e86dabe35d1fbfcc1c36d1e035aa69102c2383ff63f244bf1fe
BLAKE2b-256 checksum
How to use checksums
0814aadc80ff9f8b764ea77c30ffb2d21f9988bafb7a32ae78b823cc556b7110
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.2

Release files / derivative_lib-0.2-py3-none-any.whl

Download URL derivative_lib-0.2-py3-none-any.whl
Size 2.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47a43052efe3a92559da1a6321c5186b1ff66897620bdc10c4c5ea7e6e55be3d
BLAKE2b-256 checksum
How to use checksums
96d18dce9926721527f32e9400239f478b886b1522d305a939a5df95d8b26eeb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.2

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page