Skip to content

AdityaB2007/PyCalcEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

PyCalcEngine

Installation

  1. Clone this repository:
git clone https://github.com/yourusername/PyCalcEngine.git
  1. Install required packages:
pip install numpy matplotlib
  1. Open PyCalcEngine.ipynb in Jupyter Notebook

Usage

  1. Import the functions in a notebook:
from PyCalcEngine import derivative, integral, plot_function
  1. Define a function and use the engine:
# Plot function, derivative, and integral
plot_function(np.sin, 0, 2*np.pi)

# Compute integral
result = integral(lambda x: x**2, 0, 1)
print(result)
  1. Experiment with different families of functions:
f_poly = lambda x: x**3 + 2*x**2 - x # polynomial
print("Integral of f_poly from 0 to 2:", integral(f_poly, 0, 2))
plot_function(f_poly, -5, 5)

f_sin = np.sin # trigonometric
print("Integral of sin(x) from 0 to pi:", integral(f_sin, 0, np.pi))
plot_function(f_sin, 0, 2*np.pi)

f_exp = np.exp # exponential
print("Integral of exp(x) from 0 to 1:", integral(f_exp, 0, 1))
plot_function(f_exp, 0, 3)

License

This project is open-source and free to use. Feel free to fork, experiment, and improve!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors