Calculus-in-python
Just differentiate and integrate!
In this project, you will have one common parameter ie: 'f', which certainly means a function f(x). In the polynomial part, f acts as a list of coefficients of decreasing powers of x in the function f(x). In the trigonometry part, f acts as a list of lists of coefficient, power of sine function and power of cosine function.
Example 1: Differentiate f(x) = 5x 3 + 3x 2 + 4x + 1
from calculus.polynomial import differentiate
differentiate(f=[5,3,4,1])
Output-
[15,6,4]
Example 2: Integrate f(x) = 5x 3 + 3x 2 + 4x + 1
from calculus.polynomial import integrate
integrate(f=[5,3,4,1])
Output-
[1.25, 1.0, 2.0, 1.0, 0]
Example 3: Differentiate f(x) = 3sin2xcos3x + 4sin4xcos2x
from calculus.trigonometry import differentiate
differetiate(f=[[3,2,3],[4,4,2]])
Output-
[[6, 1, 4], [-9, 3, 2], [16, 3, 3], [-8, 5, 1]]
Example 4: Differentiate f(x) = 3sin2xcos3x + 4sin4xcos2x at x = 𝝿/2
from calculus.trigonometry import derivative_at_p
derivative_at_p(f=[[3,2,3],[4,4,2]],p=math.pi/2)
Output-
0
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pythcalculus-0.5.tar.gz.
File metadata
- Download URL: pythcalculus-0.5.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2b977019bf827354ac7ce65d37496e7edc98fcb7311e46640351b3e57e0f4fa
|
|
| MD5 |
ea23bb52d0d979f192702ff2b40d4fa7
|
|
| BLAKE2b-256 |
4672091fd5649c5718623c9918a5ce3cf5ca7fc66824b3d56596e01b6dad0c7c
|