Enter your values
Enter the equation and initial condition
Solve the linear equation
What is a first-order differential equation calculator?
A first-order differential equation contains the first derivative of an unknown function. This calculator solves the constant-coefficient linear family y′ = ay + b together with an initial condition y(x₀) = y₀. The equation has a closed-form solution, so the reported value is evaluated from that formula rather than approximated by numerical time steps.
Important terms
- First-order equation
- A differential equation whose highest derivative is the first derivative, y′.
- Initial-value problem
- A differential equation paired with a condition such as y(x₀) = y₀, which selects one particular solution from a family.
- Equilibrium solution
- A constant value y* for which the derivative is zero. For y′ = ay + b with a ≠ 0, it is y* = −b/a.
- Linear constant-coefficient equation
- An equation in which y and y′ appear linearly and the coefficients a and b are constants.
When this method is useful
- Solve growth, decay, cooling, and constant-forcing models that reduce to y′ = ay + b.
- Evaluate the solution at a chosen x-value without stepping through a numerical approximation method.
- See how the initial value approaches or moves away from the equilibrium level.
Formula and variables
- a
- constant multiplying the unknown y
- b
- constant forcing term
- x₀, y₀
- the known initial point
- y*
- equilibrium value −b/a when a ≠ 0
Set y′ = 0 to find the equilibrium y* = −b/a. Subtracting y* from y gives z′ = az, whose solution is exponential. Applying y(x₀) = y₀ determines the constant. If a = 0, the equation is instead y′ = b and its solution is the line y(x) = y₀ + b(x − x₀).
Domain note: This exact solver supports only the scalar first-order linear equation y′ = ay + b with constant real coefficients and a specified initial value. It does not parse arbitrary right-hand sides such as y′ = x + y, nonlinear equations such as y′ = y², systems, or higher-order equations. Use the Differential Equation Calculator for supported general first-order IVPs solved numerically.
How to use this calculator
- 1
Enter the constants a and b in y′ = ay + b.
- 2
Enter the initial condition y(x₀) = y₀ and the x-value where you want to evaluate the solution.
- 3
The calculator finds the equilibrium y* = −b/a when a ≠ 0, or uses the constant-slope case when a = 0.
- 4
Read the closed-form solution, endpoint value, instantaneous slope, graph, and selected values table.
Step-by-step examples
Example 1
Problem: Solve y′ = y with y(0) = 1, then find y(1).
Substitution: Here a = 1 and b = 0, so the equilibrium is y* = 0. The initial-value formula gives y(x) = 0 + (1 − 0)eˣ.
Result: y(x) = eˣ, so y(1) = e ≈ 2.718282.
The positive coefficient makes the solution grow exponentially from its initial value. The slope at x = 1 equals y(1), because the original equation is y′ = y.
Example 2
Problem: Solve y′ = −y, y(0) = 1, and evaluate at x = 2.
Substitution: a = −1, b = 0, so y* = 0 and y(x) = e^(−x).
Result: y(2) = e^(−2) ≈ 0.135335.
The negative coefficient produces exponential decay toward the equilibrium y = 0.
Example 3
Problem: Solve y′ = −0.5y + 2 with y(0) = 0.
Substitution: The equilibrium is y* = −2/(−0.5) = 4. Therefore y(x) = 4 + (0 − 4)e^(−0.5x).
Result: y(x) = 4(1 − e^(−0.5x)); at x = 3, y(3) ≈ 3.107479.
The solution rises toward the stable equilibrium 4 but does not cross it for this initial condition.
Rules, edge cases, and related ideas
Exponential response around equilibrium
When a ≠ 0, the distance from equilibrium satisfies y(x) − y* = (y₀ − y*)e^(a(x−x₀)). Thus a < 0 makes the difference shrink as x increases, while a > 0 makes its magnitude grow unless the initial value is already at equilibrium.
The zero-coefficient case
When a = 0, no y-dependent term remains: y′ = b. The derivative is constant, so integrating gives a straight-line solution y(x) = y₀ + b(x−x₀). There is no unique equilibrium unless b is also zero.
Why the initial value matters
The differential equation describes a family of solution curves. Specifying y(x₀) = y₀ chooses one curve and fixes the constant in the general solution.
Edge cases and limitations
- If the requested x equals x₀, the answer is exactly the entered initial value y₀.
- A = 0 and b ≠ 0 gives a linear solution with constant slope b.
- A = 0 and b = 0 gives the constant solution y(x) = y₀.
- If a ≠ 0 and y₀ = −b/a, the solution remains at equilibrium for every x.
- Very large coefficients or evaluation intervals can overflow floating-point arithmetic and are rejected instead of displaying an invalid result.
How this differs from a related concept
The Differential Equation Calculator handles a broader supported class y′ = f(x,y) using Euler, Heun, or RK4 and reports numerical approximations. This First-Order Differential Equation Calculator is narrower: it solves y′ = ay + b exactly and evaluates the resulting closed form directly.
Understand the result
The graph is the exact closed-form solution for the selected initial condition over the interval from x₀ to x. Its marked endpoints are the initial value and requested evaluation. The displayed slope is computed from the original differential equation, y′ = ay + b, at the requested point.
Common mistakes
- Treating this as a general first-order solver. The entered model must be y′ = ay + b with constant a and b.
- Using y₀ as the value at the target x. It is the value at the separately entered initial point x₀.
- Forgetting that the equilibrium is −b/a, including the minus sign.
- Assuming every solution approaches equilibrium. This occurs forward in x when a < 0; when a > 0, deviations generally grow.
Frequently asked questions
What equation does this calculator solve?
It solves first-order linear constant-coefficient initial-value problems of the form y′ = ay + b with y(x₀) = y₀.
Is the answer exact or numerical?
The formula is exact for this equation family. The value shown at the requested x is a decimal evaluation of that exact expression, rounded to the selected number of places.
What if a is zero?
The equation becomes y′ = b, so y(x) = y₀ + b(x − x₀). If b is also zero, y stays constant at y₀.
How is equilibrium calculated?
An equilibrium has y′ = 0. Solving 0 = ay* + b gives y* = −b/a when a ≠ 0.
Can I enter y′ = x + y or y′ = y²?
Those equations are outside this exact calculator’s supported form. Use the Differential Equation Calculator for supported y′ = f(x,y) initial-value problems, which it approximates numerically.