Git Product home page Git Product logo

eulers-method-python's Introduction

Eulers-Method-Python

Euler's Method approximation in Python.

Usage

Import the library, then call the evaluate method to generate a table of data.

Call the print method to print out the points to the console.

Call the graph method to graph the equation.

Parameters:

  • Derivative expression
  • Starting X
  • Starting Y
  • Ending X
  • Step size

Example:

import euler
calc = euler.EulerCalculator()
points = calc.evaluate(
    derivative="x-2ysin(x)", startX=0, startY=20, endX=2, stepSize=0.1
)
calc.print(points)
calc.graph(points)

Output:

Screenshot

  x         y
---  --------
0    20      
0.1  20      
0.2  19.6107 
0.3  18.8515 
0.4  17.7673 
0.5  16.4235 
0.6  14.8987 
0.7  13.2762
0.8  11.6357
0.9  10.0463
1     8.56238
1.1   7.22138
1.2   6.04423
1.3   5.03754
1.4   4.19675
1.5   3.50961
1.6   2.95945
1.7   2.52781
1.8   2.19646
1.9   1.94866
2     1.76985

eulers-method-python's People

Contributors

kentonishi avatar r2dev2 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.