Separable Equation Solver
Solve separable first-order ODEs dy/dx = g(x)·h(y) numerically with RK4.
About Separable Equation Solver
A separable ODE has the form dy/dx = g(x)·h(y), meaning the right-hand side factors into a function of x alone times a function of y alone. Theoretically, ∫dy/h(y) = ∫g(x)dx + C. This calculator solves it numerically using RK4, which works even when the antiderivatives have no closed form. Enter g(x) using x, and h(y) using x or y as the variable.
Formulas
Separable form
dy/dx = g(x) · h(y)
- g(x)
- Function of x only
- h(y)
- Function of y only
Analytical approach
∫ dy/h(y) = ∫ g(x) dx + C
- C
- Integration constant from initial condition
Worked example
With the default values below, Separable Equation Solver returns y(target x) of 1.64872127. Change any input above and every figure here is recalculated in your browser.
Inputs used
- g(x) factor
- x
- h(y) factor
- y
- Initial x₀
- 0
- Initial y₀
- 1
- Target x
- 1
- Stepsaccepts 10–10,000
- 200
Results
- y(target x)
- 1.64872127
- Steps used
- 200
Step by step
- 1Values used
- 2Separable form
- 3Analytical approach
- 4y(target x)= 1.64872127
- 5Steps used= 200
Assumptions and limits
- The result is derived only from the 6 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 8 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
What makes an ODE separable?
An ODE is separable when dy/dx can be written as a product of a function of x alone and a function of y alone: dy/dx = g(x)·h(y).
Why use numerical methods for separable equations?
While separable equations can theoretically be solved by integration, the integrals may not have closed-form solutions. Numerical methods always work.
