https://github.com/yevhenbk/arc-length-calculator
This app calculates the arc length of a given function over the interval [0, 4] using numerical integration
https://github.com/yevhenbk/arc-length-calculator
numpy python scipy
Last synced: about 1 month ago
JSON representation
This app calculates the arc length of a given function over the interval [0, 4] using numerical integration
- Host: GitHub
- URL: https://github.com/yevhenbk/arc-length-calculator
- Owner: Yevhenbk
- Created: 2024-10-20T17:25:27.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-10-20T19:51:43.000Z (7 months ago)
- Last Synced: 2025-03-29T10:14:47.908Z (about 1 month ago)
- Topics: numpy, python, scipy
- Language: Python
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Arc Length Calculator and Plotter
This Python app calculates the arc length (longitud del recorrido) of a given function f(x) = x^3 - 5x^2 + 6x over the interval [0,4], using numerical integration.
The app also optionally plots the function to visualize the profile of the curve.## Features
**Numerical Integration:** Calculates the arc length of the function using SciPy's `quad()` function.
**Plotting:** Optionally generates a plot of the function 𝑓(𝑥) to visualize its shape.## Install the required packages
```
pip install numpy scipy matplotlib
```
## How to Use
To calculate the arc length and (optionally) plot the function, simply run the Python script:
```
python arc_length_with_plot.py
```
## Example
The result will be displayed as follows:
```
Longitud del recorrido: 15.1234 metros
```
## Additionally, the function's graph will be displayed to visualize the profile
