Separable Differential Equations Solver (dy/dx = g(x)·h(y))
Enter dy/dx = g(x)·h(y), initial y(x₀)=y₀ and target x; compute the particular solution y(x) by RK4 and show the separated form.
Input Data
Results
At a glance:A separable ODE has the form dy/dx = g(x)·h(y). Separate: dy/h(y) = g(x)dx; integrate both sides ∫dy/h(y) = ∫g(x)dx + C for the general solution; plug y(x₀)=y₀ to fix C for the particular solution. This tool also integrates numerically by RK4.
Formula
Separate: dy / h(y) = g(x) dx.
Integrate: ∫ dy/h(y) = ∫ g(x) dx + C.
Numeric (RK4): y_{n+1} = y_n + (h/6)(k₁+2k₂+2k₃+k₄).
Common: dy/dx = k·y → y = y₀ e^{k(x−x₀)}.
$$\frac{dy}{dx} = g(x)\,h(y)$$$$\int \frac{dy}{h(y)} = \int g(x)\,dx + C$$How to Use
- Enter g(x) (expression in x) and h(y) (expression in y).
- Enter the initial condition (x₀, y₀) and the target x.
- The tool gives y(target x) by RK4 and the separated form.
- Case studies show analytic particular solutions to compare.
Common separable particular solutions
| Equation | Particular (y(x₀)=y₀) | Note |
|---|---|---|
| dy/dx = y | y = y₀ e^{x−x₀} | exponential growth |
| dy/dx = k y | y = y₀ e^{k(x−x₀)} | k<0 decay |
| dy/dx = x/y | y = √(x² + y₀²) | implicit square |
| dy/dx = x y | y = y₀ e^{(x²−x₀²)/2} | Gaussian-type |
RK4 is numeric; if the analytic solution is simple, compare with it.
Case Studies
dy/dx = y, y(0)=1
Separate: dy/y = dx → ln|y| = x + C.
Particular: y = eˣ; at x=1, y=e ≈ 2.718282.
dy/dx = k·y (decay)
General y = C e^{kx}; from y(0)=y₀, y = y₀ e^{kx}.
k<0 is exponential decay (radioactive, cooling).
dy/dx = x/y, y(0)=1
Separate: y dy = x dx → y²/2 = x²/2 + C.
Particular: y² = x² + 1 → y = √(x²+1); at x=1, y=√2≈1.414214.
dy/dx = x·y, y(0)=1
dy/y = x dx → ln y = x²/2 + C.
Particular y = e^{x²/2}; at x=1, y=e^{0.5}≈1.648721.
dy/dx = 2x (h(y)=1)
dy = 2x dx → y = x² + C.
y(0)=1 → y = x²+1; at x=2, y=5.
Logistic dy/dx = r y (1−y/K)
h(y)=y(1−y/K) has no simple closed integral; RK4 solves numerically.
Solution approaches carrying capacity K (S-curve).
FAQ
What is a separable ODE?
If dy/dx can be written as g(x)·h(y) (x and y parts separable), you can separate variables and integrate each side. It is the most basic first-order ODE type.
What is RK4?
The 4th-order Runge–Kutta method is a high-accuracy numeric integrator using four weighted slopes; error scales with step size to the 4th power, more accurate than Euler.
General vs particular solution?
The general solution contains an arbitrary constant C (a family of curves); substituting the initial condition (x₀,y₀) fixes C to give the unique particular solution.
Numeric differs from analytic?
RK4 is very accurate; a large gap suggests the solution diverges in your interval (y blows up) or a wrong expression. Check the domain.
What if h(y)=0?
If h(y)=0 then dy/dx=0 and y is constant; separation divides by zero, and the tool reports a constant solution.
Non-separable equations?
This tool is limited to separable form dy/dx=g(x)h(y). Linear, exact, Bernoulli etc. need other methods, outside this version.
Meaning of dy/dx = k y?
A growth/decay model: k>0 exponential growth (population, bacteria), k<0 decay (radioactive, cooling), half-life t½=ln2/|k|.
Must x₀ be below target x?
No. RK4 integrates forward or backward; stepping to xTarget < x₀ also works for tracing backward.
Related Tools
References
Content review: Calculatorism Science Team. Separation form and RK4 numeric particular solution verified. Results are for reference only.