Skip to main content

This my package. Can use to Roots of Equation in One Variable and Initial Value Problems for a frist-order differential equation

Project description

Package name : scm203lab267100370

adisak_utils is a lightweight Python package that provides simple utility functions for Roots of Equation in One Variable, and Initial Value Problems for a first-order differential equation. It is designed mainly for learning purposes and as an example of Python packaging.


Features

  • Roots of Equation in One Variable: Solve f(x)=0, where funtion is a continuous function. Methods include : Bisection Method and Fixed-Point Iteration

  • Initial Value Problems for a first-order differential equation:Solve a differential equation. Methods include : Euler’s Method and 4-order Runge-Kutta method.


Installation

You can install the package directly from PyPI:'

pip install adisak_utils

Example

  • Roots of Equation in One Variable
    f = lambda x: x**3 - x - 2
    g = lambda x: (x + 2)**(1/3)
    
    a, b = 1, 2
    x0 = 1.5
    nMax = 10
    TOL = 0.0001

    print("Bisection Method:")
    bisection_data = bisection(f, a, b, nMax, TOL)

    print("Fixed Point Iteration Method:")
    fixpoint_data = fixpoint(g, x0, nMax, TOL)
  • Initial Value Problems for a first-order differential equation
    f = lambda x,y: x + y
    x0, y0 = 0, 1
    xStop = 0.4
    h = 0.1
    n = int((xStop - x0) / h)
    
    print("Euler's Method:")
    euler_method(f, x0, y0, xStop, h)
    
    print("Runge-Kutta 4th Order Method:")
    kut4(f, x0, y0, xStop, h)

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

scm203lab267100370-0.1.1.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

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

scm203lab267100370-0.1.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scm203lab267100370-0.1.1.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for scm203lab267100370-0.1.1.tar.gz
Algorithm Hash digest
SHA256 850710637c03cab6bb30cc28176b50adbf75cae4f21300e7d3cb64e4773551da
MD5 0c2a17e5aae33ce6803c3c5d335629b4
BLAKE2b-256 b0d394a2a65b5f1cd394b80ec24ae16b2a9a8a27a9434d26b8c8e53843056fe3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scm203lab267100370-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a7041f96884d05bf1243a87ee8a75066db5e83452f62ef026d7126d884b6cc1f
MD5 8da0cdfb879fb74e96d4ae9484e88328
BLAKE2b-256 32544de7eff37af80db609f3c2291088a1ecde6b5f2dcf3a20118f2d06c6e00f

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