https://github.com/fusion809/jscripts
Assorted JavaScripts I have written
https://github.com/fusion809/jscripts
javascript mathematics ode-solver
Last synced: 11 months ago
JSON representation
Assorted JavaScripts I have written
- Host: GitHub
- URL: https://github.com/fusion809/jscripts
- Owner: fusion809
- License: gpl-3.0
- Created: 2016-04-12T06:37:18.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2020-06-16T19:04:13.000Z (over 5 years ago)
- Last Synced: 2025-01-27T10:11:32.124Z (about 1 year ago)
- Topics: javascript, mathematics, ode-solver
- Language: JavaScript
- Size: 1.23 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JScripts
This repository mostly contains scripts, written in JavaScript (JS), for the purpose of scientific computing. Here there be ODE solvers.
## Structure
An example structure for this repository is:
```bash
.
├── lib/
│ └── RK4/
│ ├── 1st-order.js
│ ├── 2nd-order.js
│ └── 3-coupled-1st.js
├── LICENSE
├── math/
│ ├── old/
│ │ ├── RK4-airy.js
│ │ ├── RK4-rosetta.js
│ │ ├── RK4-simpen.js
│ │ └── RK4.js
│ ├── RK4/
│ │ ├── airy.js
│ │ ├── anger.js
│ │ ├── hermite.js
│ │ ├── lorenz.js
│ │ └── rwave.js
│ └── work-in-progress/
│ └── SLE-airy.js
└── README.md
```
The `lib` folder, as one may guess, contains scripts that are used in other scripts (usually because they contain useful functions). The `RK4` subfolder of the `lib` folder contains scripts related to the fourth-order Runge-Kutta Method, although known by the abbreviated RK4. The `1st-order.js` script is for solving equations of the form:

The `2nd-order.js` script is for equations of the form:

## Airy Equation
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
$$ \frac{d^2 y}{dx^2} = xy $$
## How to use these scripts
In order to use these scripts I recommend you have Git, Node.js and NPM installed and run:
```bash
git clone https://github.com/fusion809/JScripts
cd JScripts
npm install gnu-plot mathjs ode-rk4
```
Then when you want to run a script run it using Node.js, that is, use the command:
```bash
node .js
```