Skip to main content

Librería de métodos numéricos para resolver ecuaciones lineales y no lineales

Project description

📘 MM18021UNO

Librería de Métodos Numéricos en Python para resolver sistemas de ecuaciones lineales y hallar raíces de funciones no lineales.


✅ Métodos disponibles

Método Descripción
gauss Eliminación de Gauss
gauss_jordan Eliminación de Gauss-Jordan
cramer Regla de Cramer
descomposicion_lu Descomposición LU (retorna matrices L y U)
jacobi Método iterativo de Jacobi
gauss_seidel Método iterativo de Gauss-Seidel
biseccion Método de bisección para encontrar raíces de funciones
newton_raphson Método de Newton-Raphson para encontrar raíces (requiere sympy)

⚙️ Instalación

Para instalar localmente esta librería desde el directorio del proyecto:

pip install .

## 🧪 Ejemplos de uso

### Gauss

```python
from MM18021UNO import gauss
import numpy as np

A = np.array([[2, 1, -1], [-3, -1, 2], [-2, 1, 2]])
b = np.array([8, -11, -3])
print(gauss(A, b))

Gauss-Jordan

from MM18021UNO import gauss_jordan
import numpy as np

A = np.array([[2, 1], [1, 3]])
b = np.array([8, 13])
print(gauss_jordan(A, b))

Cramer

from MM18021UNO import cramer
import numpy as np

A = np.array([[2, -1], [1, 3]])
b = np.array([1, 12])
print(cramer(A, b))

Descomposición LU

from MM18021UNO import descomposicion_lu
import numpy as np

A = np.array([[2, 3], [5, 4]])
L, U = descomposicion_lu(A)
print("L =", L)
print("U =", U)

Jacobi

from MM18021UNO import jacobi
import numpy as np

A = np.array([[10, -1, 2], [-1, 11, -1], [2, -1, 10]])
b = np.array([6, 25, -11])
print(jacobi(A, b))

Gauss-Seidel

from MM18021UNO import gauss_seidel
import numpy as np

A = np.array([[4, 1, 2], [3, 5, 1], [1, 1, 3]])
b = np.array([4, 7, 3])
print(gauss_seidel(A, b))

Bisección

from MM18021UNO import biseccion

def f(x):
    return x**3 - x - 2

raiz = biseccion(f, 1, 2)
print("Raíz aproximada:", raiz)

Newton-Raphson

from MM18021UNO import newton_raphson

raiz = newton_raphson("x**3 - x - 2", x0=1.5)
print("Raíz con Newton-Raphson:", raiz)

🔧 Requisitos

  • Python 3.6 o superior
  • numpy
  • sympy =======

MM18021UNO

0e04099b927e577632edfd3ead7904ffd5331bb8

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

mm18021uno-0.1.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mm18021uno-0.1.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file mm18021uno-0.1.1.tar.gz.

File metadata

  • Download URL: mm18021uno-0.1.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for mm18021uno-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6a06570bc888fe6a8776bc35d7f6cf6e8963faea0c1ca294b08b8fb89067b412
MD5 fd064bd2bfff1bad6daa87e80a6eeae6
BLAKE2b-256 c8eca9d372ef4133f3cdc0de5c5e1aa3cfdc9fef8728144b5532c95c35f13a40

See more details on using hashes here.

File details

Details for the file mm18021uno-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mm18021uno-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for mm18021uno-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e9f63b803082fe7d27a5f7e64c8efe3bacd350e56f16513aaceb0d0f20a7298a
MD5 ea1144d27d1955ac5235688841777b59
BLAKE2b-256 ca1bdfb3d704f1a8b48fe210c734684114e6b50df3aafe7d0a62257e3cb1d5c4

See more details on using hashes here.

Supported by

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