Metadata-Version: 2.1
Name: pyposolver
Version: 0.1
Summary: A Python library for mathematical and physics calculations.
Home-page: https://github.com/prakhardoneria/pyposolver
Author: Prakhar Doneria
Author-email: prakhardoneria3@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Requires-Dist: numpy

# pyposolver

pyposolver is a Python library for mathematical and physics calculations. It provides functions for various mathematical operations and physics calculations, including numerical methods, integration, root-finding, linear algebra, and more.

## Installation

You can install pyposolver using pip:

```bash
pip install pyposolver
```

## Usage

### Numerical Methods

#### Bisection Method

```python
from pyposolver.maths.root_finding import bisection_method
```

# Define a test function
def f(x):
    return x**3 - 6*x**2 + 11*x - 6

# Find the root of f(x) = x^3 - 6x^2 + 11x - 6 in the interval [1, 3]
root = bisection_method(f, 1, 3)
print("Root:", root)
```

#### Newton-Raphson Method

```python
from pyposolver.maths.root_finding import newton_raphson_method

# Define a test function and its derivative
def f(x):
    return x**3 - 6*x**2 + 11*x - 6

def df(x):
    return 3*x**2 - 12*x + 11

# Find the root of f(x) = x^3 - 6x^2 + 11x - 6 with an initial guess of 2
root = newton_raphson_method(f, df, 2)
print("Root:", root)
```

### Integration

#### Trapezoidal Rule

```python
from pyposolver.maths.integration import trapezoidal_rule

# Define a test function
def f(x):
    return x**2

# Integrate f(x) = x^2 from 0 to 1 using the trapezoidal rule
result = trapezoidal_rule(f, 0, 1)
print("Result of integration:", result)
```

### Linear Algebra

#### Dot Product

```python
from pyposolver.maths.linear_algebra import dot_product

# Define two vectors
vector1 = [1, 2, 3]
vector2 = [4, 5, 6]

# Calculate the dot product of the two vectors
result = dot_product(vector1, vector2)
print("Dot Product:", result)
```

### Physics Calculations

#### Velocity

```python
from pyposolver.physics.mechanics import velocity

# Calculate the final velocity using the kinematic equation: v = u + at
initial_velocity = 10  # m/s
acceleration = 2  # m/s^2
time = 5  # seconds
final_velocity = velocity(initial_velocity, acceleration, time)
print("Final Velocity:", final_velocity)
```

#### Electric Field Strength

```python
from pyposolver.physics.electromagnetism import electric_field_strength

# Calculate the electric field strength due to a point charge
charge = 2e-6  # Coulombs
distance = 0.1  # meters
electric_field = electric_field_strength(charge, distance)
print("Electric Field Strength:", electric_field)
```

## Contributing

Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue on GitHub or submit a pull request.# pyposolver-prod
