Separable ODE Solver

Numerically solve separable first-order ODEs dy/dx = f(x)·g(y) using the RK4 method and plot the solution curve.

Presets:

ODE: dy/dx = f(x) · g(y)

Solution Table

x y
Press "Solve ODE" to compute the solution.

Solution Curve

Summary

Numerically solve separable first-order ODEs dy/dx = f(x)·g(y) using the RK4 method and plot the solution curve.

How it works

  1. A separable ODE has the form dy/dx = f(x)·g(y). The solver evaluates f(x) and g(y) at each step using math.js, then applies the RK4 formula: k1=h·F(xn,yn), k2=h·F(xn+h/2, yn+k1/2), k3=h·F(xn+h/2, yn+k2/2), k4=h·F(xn+h, yn+k3), yn+1 = yn + (k1+2k2+2k3+k4)/6. The solution is plotted with Chart.js and listed in a scrollable table.

Use cases

Frequently Asked Questions

Last updated: 2026-05-23 · Reviewed by Nham Vu