Home

Separable Equations

Separable-equation solver. Enter f(x), g(y) and an initial value to separate variables and solve y(x) numerically, with steps.

展开更多 ▾
dy/dx = f(x)·g(y) ⇒ ∫ dy/g(y) = ∫ f(x) dx + C
function of x, e.g. x
function of y, e.g. y
initial x
initial y(x₀)
target point

📖 Tutorial|Separable Equations

1. Definition
A first-order ODE that can be written as dy/dx = f(x)·g(y), i.e. the RHS splits into a function of x alone times a function of y alone, is called a separable equation.
2. Symbols
SymbolMeaning
f(x)factor depending only on x
g(y)factor depending only on y
Cconstant of integration
x₀, y₀initial condition y(x₀)=y₀
3. How this tool works
  • Move y-terms to the left and x-terms to the right: dy/g(y) = f(x)dx;
  • Integrate both sides: ∫dy/g(y) = ∫f(x)dx + C;
  • This tool applies Euler's method to dy/dx=f(x)g(y) to approximate the IVP.
4. Steps
  1. Enter f(x) and g(y);
  2. Enter initial values x₀, y₀ and target x₁;
  3. Click Calculate to see the separated form and numerical y(x₁).
5. Example
Example: dy/dx = x·y, y(0)=1. Separating: dy/y = x dx, ln|y| = x²/2 + C; y(0)=1 gives C=0, y(x)=e^(x²/2). Numerical y(1)≈1.6487 matches the exact value.
6. Pitfalls
Handle points where g(y)=0 separately, as they may be lost particular solutions;
Euler's method is approximate; larger steps give larger errors;
The constant C must be fixed by the initial condition.

❓ FAQ|Separable Equations

When is an equation separable?
When the RHS can be written as f(x) times g(y), with x and y fully separated.
Why a constant C?
Each indefinite integration produces a constant; they merge into one arbitrary constant C.
How close is the numerical solution?
Euler has truncation error; with 500 steps the error is usually under 1%, enough for teaching.
What if g(y)=0?
The RHS becomes 0, giving a constant particular solution y=const that division by g(y) would lose.
Which expressions are supported?
+ − * / ^ parentheses and sin cos tan sqrt exp log; variables x, y; never omit the multiplication sign.