Skip to main content

Integrate and Differentiate over here!

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pythcalculus-0.5.tar.gz (11.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page