First-Order Differential Equations

An equation relating a function to its own derivative, the two methods that solve the first-order cases, separation of variables and the integrating factor, and the initial condition that selects one solution from the infinite family.

Definition

A differential equation relates an unknown function to its derivatives. It is first-order when only the first derivative appears, and ordinary when the unknown depends on a single variable.

What a solution is. A solution is a function, not a number: y = 3 e x 2 solves d y d x = 2 x y because substituting it makes the equation an identity. Verifying a proposed solution is therefore a differentiation, and it is always available as a check.

The general solution contains an arbitrary constant and describes a family of curves; a particular solution is one member, selected by an initial condition y ( x 0 ) = y 0 . A first-order equation has one constant, so one condition fixes it.

Separable equations. When the equation can be written

d y d x = f ( x ) g ( y ) ,

the variables separate: divide by g ( y ) , multiply by d x , and integrate each side in its own variable.

∫ d y g ( y ) = ∫ f ( x ) d x .

The two integrals are ordinary ones, so this method reduces the problem to the integration unit's techniques. Dividing by g ( y ) requires g ( y ) ≠ 0 , and each root of g gives a constant solution that the division discards and must be restored separately.

Linear equations. When the equation can be written

d y d x + P ( x ) y = Q ( x ) ,

multiply through by the integrating factor

μ ( x ) = e ∫ P ( x ) d x ,

chosen so that the left side becomes the derivative of a product: μ y ′ + μ P y = ( μ y ) ′ . Integrating both sides gives μ y = ∫ μ Q d x , and dividing by μ isolates y .

The two classes overlap and neither contains the other. d y d x = 2 x y is both separable and linear. d y d x = x + y is linear and not separable, since x + y does not factor as f ( x ) g ( y ) . d y d x = y 2 is separable and not linear, since y 2 is not a linear function of y .

Reading the solution. For y ′ + 2 y = 6 the general solution y = 3 + C e − 2 x splits into a steady state 3, which the solution approaches, and a transient C e − 2 x , which decays. That decomposition, a persistent part plus a vanishing one, is what makes these equations useful as models.

Assumptions and scope

  • A solution is a function, and substituting it must make the equation an identity. Any claimed solution can and should be verified by differentiation.

  • Dividing by g ( y ) during separation discards the constant solutions where g ( y ) = 0 . Those are genuine solutions and must be restored by inspection.

  • The integrating factor method requires the equation in the standard form y ′ + P ( x ) y = Q ( x ) , with the coefficient of y ′ equal to 1. Failing to divide through first produces the wrong μ .

  • Separable and linear are overlapping classes, and neither contains the other. An equation may be both, one, or neither.

  • The constant of integration must be introduced before solving for y , not after. Introducing it late loses the family structure and usually the correct form.

  • An initial condition determines the constant only after the general solution is in hand. Applying it mid-solution to an intermediate expression gives a different and usually wrong constant.

Worked material

Example

The equations that keep appearing

d y d t = k y : exponential growth and decay. Separable, with solution y = y 0 e k t . Positive k grows, negative k decays. For a half-life of 5, k = − ln ⁡ 2 5 = − 0.13862944 , and the ratio y / y 0 reads 1 , 0.5 , 0.25 at t = 0 , 5 , 10 .

Radioactive decay, continuously compounded interest, unconstrained population growth and first-order chemical kinetics are all this equation.

d y d x = y x : solutions are lines through the origin. y = A x , since the equation says the slope equals the ratio y / x , which is exactly the property of a line through the origin. With y ( 1 ) = 4 , the solution y = 4 x has y ′ = 4 = y / x at x = 1 , 2 , 5 .

y ′ + 2 y = 6 : steady state plus transient. Solution y = 3 + C e − 2 x . Whatever the initial value, the solution approaches 3: at x = 3 it is 2.995 . The constant 3 is where y ′ = 0 , the equilibrium the system settles into, and C e − 2 x is the memory of the start, decaying away.

Newton's law of cooling has this shape, with 3 replaced by the ambient temperature.

d y d x = x + y : linear, not separable. Solution y = C e x − x − 1 . The particular part − x − 1 tracks the forcing term and the C e x is the homogeneous solution. Verified at x = 0 , 1 , 2 : the derivative and x + y agree at 0 , 1.718282 .

y ′ = y ( 1 − y ) : the logistic equation. Separable, with general solution y = 1 1 + A e − x . Checked at A = 1 and A = 4 across x = 0 , 2 , 5 , the derivative matches y ( 1 − y ) to eight decimals.

It has two constant solutions, y = 0 and y = 1 , both found by inspection rather than by the method: separation divides by y ( 1 − y ) , which vanishes at both. The general form recovers y = 1 at A = 0 but never reaches y = 0 for any finite A , so that solution must be restored by hand.

This is constrained population growth, where 1 is the carrying capacity.

y ′ = y 2 : a solution that escapes. Separable, giving y = 1 C − x ; with y ( 0 ) = 1 , y = 1 1 − x . Checked at x = 0 , 0.5 , 0.9 , 0.99 , the derivative matches y 2 , and the values climb 1 , 2 , 10 , 100 .

The solution blows up as x → 1 , in finite x , even though the right-hand side y 2 is perfectly well behaved everywhere. A solution need not exist for all x .

Five of the six are separable and three are also linear. Equilibrium, carrying capacity and finite-time blow-up are visible in the solution rather than in the equation.

Non-example

Answers and assumptions that fail

A solution is a function, not a number. Asked to solve d y d x = 2 x y , reporting " x = 0 " or " y = 3 " answers a question that was not posed. The unknown is the function itself, and y = 3 e x 2 is a complete answer, verified by differentiating: y ′ = 6 x e x 2 and 2 x y = 6 x e x 2 .

Attempting separation on a sum. d y d x = x + y cannot be separated, because x + y does not factor as f ( x ) g ( y ) . Dividing by y gives x y + 1 , which still contains both variables. The equation is linear and must be solved that way, giving y = C e x − x − 1 at x = 0 , 1 , 2 .

The test is factoring, not effort: 2 x y factors, y / x factors, y 2 factors, x + y does not.

Computing μ from the wrong P . For 2 y ′ + 4 y = 8 , the standard form is y ′ + 2 y = 4 , so P = 2 and μ = e 2 x . Taking P = 4 from the undivided equation gives μ = e 4 x , and the left side then fails to collapse, ( e 4 x y ) ′ = e 4 x y ′ + 4 e 4 x y , which is not what multiplying produced. Dividing to standard form first is not tidying; it is what makes the method work.

Adding the constant after solving for y . From ln ⁡ | y | = x 2 , writing y = e x 2 + C gives a function that does not solve y ′ = 2 x y : its derivative is 2 x e x 2 , while 2 x y = 2 x e x 2 + 2 x C . The constant must enter at the integration and be carried through the exponentiation, giving y = A e x 2 .

Losing the constant solutions. For the logistic equation y ′ = y ( 1 − y ) , separation divides by y ( 1 − y ) , which vanishes at y = 0 and y = 1 . Both are genuine solutions: each is constant, so y ′ = 0 , and y ( 1 − y ) is 0 at both.

The general solution y = 1 1 + A e − x recovers y = 1 at A = 0 , but no finite A gives y = 0 . That solution exists and the method cannot produce it, which is why the roots of the divisor are noted before dividing.

Assuming a solution exists for all x . y ′ = y 2 with y ( 0 ) = 1 has solution y = 1 1 − x , whose values run 1 , 2 , 10 , 100 at x = 0 , 0.5 , 0.9 , 0.99 and which ceases to exist at x = 1 . The equation is smooth everywhere; the solution still escapes in finite x . Existence is local, and "solve the equation" does not come with a guarantee of a global answer.

Assuming uniqueness. y ′ = y 1 / 3 with y ( 0 ) = 0 has both y = 0 and y = ( 2 x / 3 ) 3 / 2 passing through the origin. A method that returns one of them has not found them all, and uniqueness requires the extra hypothesis on ∂ F / ∂ y that fails here.

Applying the initial condition too early. Substituting y ( 0 ) = 3 into ln ⁡ | y | = x 2 + C before exponentiating gives C = ln ⁡ 3 , which is correct, but doing the same to an intermediate expression that is not yet the general solution fixes a constant in the wrong place. The condition belongs at the end, applied to the finished general solution.

Common errors

Common misconception

Solving a differential equation means finding a value of x or y , as when solving an algebraic equation, so an answer such as y = 3 e x 2 is incomplete.

Related units

Requires

Connected

Learn this topic

Used in

Sources

Results update as you type. Use the up and down arrow keys to move between results, Enter to open one, and Escape to close.

Type to search.

Settings

Appearance

Interface density

Your record

Your progress is stored in this browser and nowhere else: an identifier, the answers you have given, the mastery states and review schedule derived from them, and the lesson you last opened. Clearing it makes you a new learner on this device. It cannot be undone, and it will not affect your appearance or density settings.

Focus timer

Focus--minutes remaining

Phase

Kept in this browser only, and used to label the session in your own history.

Today

Nothing recorded yet. Finish a focus session and it will appear here.

Settings

Focus sessions between long breaks.

Sessions you are aiming for in a day.

Notifications

Your history

Sessions are stored in this browser and nowhere else. They are not evidence and never reach your mastery record.