Separation of variables
About this app
Explore separable differential equations, direction fields and solution families. Drag an initial point, follow separation and integration, and compare initial-value and boundary-value problems.
The method
A first-order ODE of the form y′ = f(x)/g(y) is called separable. Read y′ as dy/dx, move all y terms to one side and all x terms to the other: g(y)·dy = f(x)·dx. Integrate both sides, ∫g(y)dy = ∫f(x)dx + C, and solve for y. The constant C gives a family of solutions, and an initial value y(x₀) = y₀ picks one solution branch on its interval of definition. Constant solutions such as y = 0 must be checked separately before dividing by y.
What the app shows
The first mode offers six examples: y′ = −x/y, y′ = y, y′ = y/x, y′ = x/y, y′ = −2xy and the logistic equation y′ = y(1−y). The direction field and the solution family can be toggled on. You set the initial point by clicking, dragging or typing x₀ and y₀; the matching curve appears with its domain, open endpoints and the worked steps separate, integrate, solve, with numbers filled in. The second mode covers y″ + 9y = 0 with general solution y = C₁·sin 3x + C₂·cos 3x.
Initial vs. boundary value problems
In the initial value problem, y(0) and y′(0) fix C₁ and C₂ uniquely. In the boundary value problem you prescribe y(0) and a second value y(x₂), and you can drag the boundary point. If sin(3x₂) ≠ 0 there is exactly one solution. If sin(3x₂) = 0, for example at x₂ = π/3, 2π/3 or π, there are either no solutions or infinitely many, depending on the boundary value. Try the presets y(π) = 0 and y(π) = −1 and compare.
Frequently asked questions
- When is a differential equation separable?
- When the right-hand side can be written as a product or quotient of a function of x alone and a function of y alone, i.e. y′ = f(x)·h(y) or y′ = f(x)/g(y). Then x and y terms can be moved to separate sides and integrated independently.
- How does separation of variables work step by step?
- First write y′ as dy/dx and rearrange to g(y)dy = f(x)dx. Second, integrate both sides and add a constant C. Third, solve for y and determine C from the initial value. Check whether dividing lost any constant solutions.
- Why does a boundary value problem sometimes have no solution?
- A boundary value problem imposes conditions at two different points. For y″ + 9y = 0 with y = C₁ sin 3x + C₂ cos 3x, sin 3x vanishes at certain x₂, and then the second condition cannot determine C₁. It is either satisfied automatically (infinitely many solutions) or contradicts the first condition (no solution).
- Which examples does the app include?
- Six separable first-order ODEs, including y′ = y, y′ = −2xy and the logistic equation y′ = y(1−y). It also has a mode for y″ + 9y = 0 where you compare initial and boundary value problems directly.
Subject: Differential equations
More from Differential equations
- Homogeneous ODEs y′ = F(y/x)
- Initial value problem: dropping a ball
- ODE: the line-up
- Linear first-order ODEs
- Linear substitution
- Direction field y'(x) = -x/y
- Worlds of differential equations
A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps