Differential Equations: First- and Second-Order Equations

Differential Equations: First- and Second-Order Equations

Course notes on first- and second-order ordinary differential equations, initial/boundary-value problems, vibration and resonance together with systems of ODEs, eigenvalues, phase planes, and local linearization.

Differential equations treat derivatives not only as quantities to compute but as components of equations that define system behaviour. The material covers first- and second-order equations, initial conditions and solution methods together with the conditions under which each method applies.

Solving a differential equation is more than obtaining a symbolic function. Existence, uniqueness, initial or boundary conditions, and numerical stability can change the engineering result directly. I therefore organize the methods primarily by problem class rather than by a sequence of formulas.

Unit 1: Fundamental Concepts and Definitions

Definition of a differential equation

A differential equation relates an unknown function to one or more of its derivatives. In an ordinary differential equation, the unknown function depends on a single independent variable. A basic first-order example is

dy/dx = f(x,y)

while a second-order equation may contain y'', y', and y together.

Classification

Differential equations are commonly classified by the number of independent variables, order, degree when defined, linearity, and whether the equation is homogeneous. The scope here concentrates on ordinary differential equations.

A linear equation has the unknown function and its derivatives only to the first power and does not multiply them together. Nonlinear equations do not satisfy that structure.

Order and degree

The order is the order of the highest derivative occurring in the equation. The degree is the algebraic degree of the highest-order derivative after the equation has been written as a polynomial in the derivatives; it is not defined for every differential equation.

Forms of representation

A first-order equation can be written in forms such as

y' = f(x,y)

or

M(x,y) dx + N(x,y) dy = 0.

The form often determines which solution method is convenient.

Types of solutions

A general solution contains the number of arbitrary constants expected from the order of the equation. A particular solution results after those constants are fixed by additional conditions. A singular solution, when it exists, may not be obtained from the general family by choosing constant values.

Initial-value problem

An initial-value problem specifies the value of the unknown function and, for higher-order equations, enough derivatives at one point. For example,

y' = f(x,y),   y(x0) = y0

combines a differential equation with one initial condition.

Boundary-value problem

A boundary-value problem gives conditions at different points. A second-order equation may, for example, specify y(a) and y(b). Unlike a standard initial-value problem, a boundary-value problem may have no solution, one solution, or multiple solutions.

Existence and uniqueness

The fact that an equation is written down does not by itself guarantee a unique solution. For a first-order initial-value problem, continuity of f helps establish local existence, while suitable regularity with respect to y provides a standard route to uniqueness. The exact hypotheses matter.

Modeling physical phenomena

Differential equations model change. Population growth, radioactive decay, heat transfer, mechanical vibration, electrical circuits, and control systems can all be described by relations between state variables and their rates of change. The mathematical equation is a model, so the assumptions behind it remain part of the engineering problem.

Existence, uniqueness, and the role of the initial condition

A differential equation can have no solution, one solution, or many solutions depending on the equation and imposed conditions. For an initial-value problem

y' = f(t,y), y(t0)=y0,

continuity of f supports local existence, while an appropriate Lipschitz condition in y supports local uniqueness.

These conditions explain why solving symbolically is only part of the problem. A formula that satisfies the differential equation may still fail the required initial or boundary condition.

Initial-value and boundary-value problems

An initial-value problem specifies the state at one point and propagates from it. A boundary-value problem constrains the solution at different points. The numerical and analytical methods can therefore differ even when the differential equation is the same.

Unit 2: Classification of First-Order Equations

Forms of representation

Before applying a method, the equation should be rewritten into a form that exposes its structure. Typical patterns are separable, exact, homogeneous, linear, and Bernoulli equations.

Classification

A first-order equation may satisfy more than one recognizable pattern. Classification is therefore not only a naming exercise; it is a way of selecting an efficient transformation or integration method.

Unit 3: Separable Equations

General solution

An equation of the form

dy/dx = g(x) h(y)

is separable when it can be rearranged as

dy / h(y) = g(x) dx.

Integrating both sides gives the implicit or explicit general solution.

Points to check in practice

Division by a function of y can discard solutions at points where that function is zero. Constant solutions should therefore be checked before division. Domains and integration constants must also be handled consistently.

Application areas

Separable models arise in elementary growth and decay, simple cooling models, some motion equations, and other systems where the state and independent variable factors can be isolated.

Unit 4: Exact Differential Equations

Exact differential

For a differentiable function F(x,y),

dF = Fx dx + Fy dy.

This gives the basis for identifying an equation as the differential of a potential function.

Exact differential equation

An equation

M(x,y) dx + N(x,y) dy = 0

is exact on a suitable domain if there is a function F such that

Fx = M,   Fy = N.

Its solution is then

F(x,y) = C.

Exactness criterion

Under the usual differentiability assumptions, exactness is tested locally by

∂M/∂y = ∂N/∂x.

Domain conditions should not be ignored when a global conclusion is required.

Finding the general solution

Integrate M with respect to x or N with respect to y, retain the unknown function of the other variable, and determine that function by differentiating and comparing with the remaining coefficient.

Integrating factor

A non-exact equation can sometimes be multiplied by a function μ so that

μM dx + μN dy = 0

becomes exact. An integrating factor is not arbitrary; its useful form depends on the structure of the equation.

Unit 5: Homogeneous Differential Equations

Homogeneous function

A function is homogeneous of degree k if

f(tx,ty) = t^k f(x,y).

Homogeneous differential equation

For a first-order homogeneous equation, the right-hand side can often be expressed as a function of the ratio y/x or x/y.

Solution method

With the substitution

y = vx

we have

dy/dx = v + x dv/dx.

The resulting equation is commonly separable in v and x. After integration, substitute v = y/x back into the result.

Equations reducible to homogeneous form

Translations of the variables can sometimes eliminate constant terms and convert an equation into homogeneous form. The transformation should be chosen from the algebraic structure rather than applied mechanically.

Unit 6: First-Order Linear Equations

Definition

The standard form is

y' + P(x)y = Q(x).

When A(x) and B(x) in an equivalent representation satisfy suitable regularity conditions, the integrating-factor method gives a systematic general solution.

Method 1: variation of the constant

First solve the homogeneous equation

y' + P(x)y = 0.

Instead of treating the integration constant as fixed, replace it by a function and determine that function from the nonhomogeneous equation.

Method 2: general solution formula

Using the integrating factor

μ(x) = exp(∫P(x) dx),

the equation becomes

(μy)' = μQ.

Therefore

y = [∫ μ(x)Q(x) dx + C] / μ(x).

Method 3: integrating factor

The integrating-factor derivation is often the most direct because it turns the left-hand side into a product derivative. The formula is meaningful on intervals where the coefficient functions satisfy the required conditions.

Bernoulli equation

A Bernoulli equation has the form

y' + P(x)y = Q(x)y^n.

For n ≠ 0,1, the substitution

z = y^(1-n)

reduces it to a first-order linear equation.

Mechanical application

First-order linear equations occur when a force or response is proportional to a state variable or its first derivative. The differential equation describes the dynamic law, while initial conditions select the physical trajectory.

Unit 7: Second-Order Linear Homogeneous Equations with Constant Coefficients

Definition

The standard equation is

ay'' + by' + cy = 0,   a ≠ 0.

Structure of the solutions

Because the equation is linear and homogeneous, linear combinations of independent solutions are again solutions. A second-order equation requires two linearly independent solutions for its general solution.

Characteristic equation

Assuming y = e^(rx) gives

ar^2 + br + c = 0.

The roots determine the solution form:

  • two distinct real roots: C1 e^(r1 x) + C2 e^(r2 x),
  • one repeated real root: (C1 + C2 x)e^(rx),
  • complex roots α ± iβ: e^(αx)[C1 cos(βx) + C2 sin(βx)].

Mechanical vibrations

The mass-spring-damper model leads to

m x'' + c x' + kx = 0.

The characteristic roots distinguish underdamped, critically damped, and overdamped behavior.

Simple harmonic motion

When damping is absent,

m x'' + kx = 0

has sinusoidal solutions. The natural angular frequency is

ωn = sqrt(k/m).

Damped vibration

Underdamped second-order system spiraling toward equilibrium in the phase plane with its decaying time response
Damped oscillator phase portrait

Damping modifies the amplitude envelope and may also modify the observed oscillation frequency. The discriminant of the characteristic equation gives the basic classification.

Unit 8: Second-Order Linear Nonhomogeneous Equations with Constant Coefficients

Structure of the general solution

For

ay'' + by' + cy = f(x),

the solution is

y = yh + yp,

where yh solves the homogeneous equation and yp is any particular solution.

Variation of parameters

Variation of parameters constructs a particular solution from two independent homogeneous solutions. It is general but usually requires integration.

Method of undetermined coefficients

When f(x) belongs to a suitable family such as polynomials, exponentials, sines, cosines, or finite combinations of them, a trial function with unknown coefficients can be substituted into the equation.

Resonance

Forced second-order frequency response for several damping ratios showing the resonance peak
Forced resonance response

If the trial form overlaps with a homogeneous solution, it must be multiplied by a sufficient power of x. In vibration models, forcing near a natural frequency can produce resonance behavior; damping changes the physical response.

Comparing the methods

Undetermined coefficients is efficient for restricted forcing functions. Variation of parameters is more general. Method selection should follow the form of the forcing term and the desired representation of the solution.

Variation of parameters, forcing frequency, and resonance

For a linear nonhomogeneous equation, variation of parameters constructs a particular solution from the homogeneous fundamental solutions without assuming a special polynomial or exponential trial form. It is therefore more general than undetermined coefficients, although usually more algebraically expensive.

In forced oscillation, resonance occurs when the forcing interacts strongly with a natural mode. In the ideal undamped model the response can grow without bound; damping changes the amplitude and phase response and prevents the textbook singular behavior.

The engineering interpretation should distinguish the mathematical idealization from the physical system and its dissipation.

Unit 9: Operator Method

Differential operator

Let

D = d/dx.

Then a constant-coefficient equation can be written as

P(D)y = f(x).

This notation exposes the polynomial structure of the differential operator.

Finding a particular solution with operators

Formally,

yp = 1/P(D) f(x).

The expression is interpreted through algebraic operator rules that depend on the forcing function; it is not ordinary scalar division.

Polynomial forcing

For a polynomial f(x), expansions of the inverse operator can terminate after finitely many differentiations because higher derivatives vanish.

Exponential forcing

For

f(x) = e^(ax),

the shift property leads to evaluation involving P(a) when P(a) ≠ 0. If P(a) = 0, the overlapping homogeneous factor must be handled separately.

Sine or cosine forcing

Trigonometric forcing can be handled by using the relation between repeated derivatives and the operator polynomial, or by representing sine and cosine through complex exponentials.

Exponential times another function

For e^(ax)v(x), the shift rule effectively replaces D by D+a in the operator acting on v.

Sum of different forcing types

Linearity allows the particular solution for a sum of forcing terms to be formed by adding particular solutions for the individual terms.

Place of the method

Operator notation is compact for constant-coefficient linear equations, but it does not replace the conceptual distinction between homogeneous and particular solutions or the conditions behind each algebraic shortcut.

Unit 10: Systems of Differential Equations and the Phase Plane

A higher-order differential equation can be rewritten as a system of first-order equations by introducing state variables. This representation is particularly useful in control, robotics, and physical-system modeling.

First-order state system

For:

x'' + a x' + b x = u(t)

define:

x1 = x
x2 = x'

Then:

x1' = x2
x2' = -b x1 - a x2 + u(t)

or, in matrix form:

x' = A x + B u

This transformation does not introduce new physics; it expresses the same dynamics through explicit state variables.

Eigenvalues and natural behavior

For the linear homogeneous system:

x' = A x

the eigenvalues of A describe the growth, decay, and oscillatory structure of the natural response.

In two dimensions, a useful first interpretation is:

  • negative real parts: trajectories tend toward equilibrium,
  • a positive real part: at least one direction is unstable,
  • a complex-conjugate pair: oscillatory behavior may appear,
  • real parts near zero: slow or marginal behavior may occur.

These rules should not be extended blindly to arbitrary nonlinear systems.

The phase plane

For a two-state system, every point (x1, x2) represents one instantaneous system state. As time progresses, the solution traces a curve in the phase plane.

x2
^
|      -> ->
|   ->      |  * eq.     |
|   <-      /
|      <- <-
+-------------> x1

A phase portrait exposes direction in state space rather than only separate time plots. Equilibria, trajectories, limit cycles, and stability become easier to relate geometrically.

Local linearization of nonlinear systems

A nonlinear system:

x' = f(x)

can be approximated near an equilibrium by its Jacobian:

A = ∂f/∂x |_(x*)

This is a local model. Strong nonlinearities, saturation, or initial conditions far from the equilibrium may require a separate global analysis.

The connection between differential equations and state-space representation provides the mathematical bridge to state feedback and estimation in Automatic Control.

General Conceptual Framework

The course can be read as a sequence of structural questions:

What type of equation is this?
        ↓
Can it be separated, made exact, or reduced by substitution?
        ↓
If it is linear, what does its homogeneous part imply?
        ↓
Which initial or boundary conditions select the required solution?
        ↓
What assumptions make existence and uniqueness valid?

First-order equations emphasize classification and transformations. Second-order constant-coefficient equations connect algebraic roots with dynamic behavior. Initial conditions determine a trajectory; boundary conditions impose constraints at different points. A solution method is valid because the equation has a certain structure, not because a formula is memorized.

Conceptual Distinctions

Order ≠ degree. Order is determined by the highest derivative; degree is an algebraic property that is defined only when the equation is polynomial in its derivatives.

General solution ≠ particular solution. A general solution contains arbitrary constants; a particular solution satisfies specified conditions or corresponds to fixed constants.

Initial-value problem ≠ boundary-value problem. Initial conditions are imposed at one point, whereas boundary conditions can be imposed at different points.

Existence ≠ uniqueness. A solution may exist without being unique. Standard theorems require explicit hypotheses.

Exact equation ≠ arbitrary differential form. Exactness means that the coefficients are partial derivatives of a common potential function on the relevant domain.

Homogeneous first-order equation ≠ homogeneous linear equation. The word homogeneous refers to different structural properties in these two contexts.

Complementary solution ≠ particular solution. For a linear nonhomogeneous equation, the complete solution is the sum of a homogeneous solution and one particular solution.

Characteristic roots ≠ initial conditions. Characteristic roots determine the form of the homogeneous solution; initial conditions determine the constants.

Undetermined coefficients ≠ variation of parameters. The first is efficient for restricted forcing families; the second is more general.

For first- and second-order equations, method selection follows from the structure of the equation. Separability, linearity, homogeneity, and characteristic-root structure determine the route; if that classification is wrong, correct algebra can still be applied to the wrong problem.

Stiff systems and solver choice

Not every numerical integrator behaves well on every differential equation. Stiff systems with widely separated time scales can force explicit methods to use extremely small steps for stability, while implicit methods may be more efficient.

Step size should be chosen through error control and stability considerations rather than the assumption that smaller is always better.

Physical invariants such as mass, energy, or positivity should also be monitored because small local error can accumulate into unrealistic long-term drift.

Checking that a solution actually satisfies the equation

After deriving a closed-form solution, substitute it back into the differential equation and the initial/boundary conditions. Many sign, coefficient, and initial-value errors become visible immediately.

For numerical solvers, report step size, error tolerances, and method family. On stiff systems, an explicit method may require very small steps because its stability region is a poor match for the problem.

Long-time simulations can also monitor physical invariants such as energy, mass, or positivity. Persistent drift may indicate a physically unsuitable numerical solution even when pointwise error appears small.

From Dynamical Systems to Learning Models

Differential equations describe systems that evolve over continuous time. Their strongest connection to AI appears when dynamics are known, partially known, or estimated from observations.

A general state equation is:

dx/dt = f(x, u, t)

In classical modeling, f comes from physics or system identification. A hybrid model may learn only the unknown residual:

dx/dt = f_phys(x, u) + f_learned(x, u; θ)

This keeps explicit physics and empirical approximation distinguishable.

Neural ODEs define hidden-state evolution through a learned differential equation:

dh/dt = f(h, t, θ)

The output is obtained by numerically integrating from an initial state. The differential equation does not replace learning; it provides a continuous-time structure for the learned dynamics.

Physics-informed neural networks create another bridge by adding differential-equation residuals to the training objective:

L = L_data + λ L_equation

A small residual alone does not prove physical correctness. Boundary conditions, initial conditions, scaling, collocation points, and uniqueness remain important.

System identification connects learning to control engineering: parameters or dynamics can be inferred from observed input-output data. The objective is not only prediction but a usable dynamical model. Automatic Control places that model in stability and controller-design context.

Numerical solver choice also matters. Stiff learned dynamics may require appropriate solvers and tolerances. Changing integration tolerance can change model output even when learned parameters are identical.

Differential equations are not a universal prerequisite for AI; many tasks have no explicit continuous-time model. They provide a strong common foundation for physical dynamical systems, scientific machine learning, continuous-depth models, and data-driven dynamics.

Classifying the Equation before Choosing a Solution Method

The step that saves the most time in a differential-equation problem is often not integration but correct classification. A first-order equation may be separable, linear, exact, or reducible to one of these forms by a suitable substitution. For second-order linear equations with constant coefficients, the characteristic equation is directly useful; variable coefficients or nonlinear terms generally require a different line of reasoning.

The distinction between homogeneous and particular solutions is also more than algebraic organization. In a linear system, the homogeneous part represents the system's natural behaviour, while a particular solution represents the response to external forcing. Initial conditions determine the coefficients of the combined solution. When forcing approaches a natural frequency, resonance may become important, so interpreting growth or decay in time matters as much as obtaining a closed form.

An initial-value problem and a boundary-value problem impose different structures. Initial-value data are specified at an initial point and the solution is propagated from there. Boundary conditions may be specified at different points. The same differential equation can therefore require different numerical methods depending on how its conditions are given.

A candidate solution can be checked directly by differentiating it and substituting it back into the original equation and conditions. This inexpensive step detects many sign and integration-constant errors. For a physical model, dimensional consistency and limiting behaviour provide additional checks.

A useful workflow is therefore classify the equation -> choose a valid method -> obtain the general solution -> apply conditions -> verify -> interpret physically. Recognizing the mathematical structure behind a method is more durable than memorizing method names.

References

  • Ahmet Yesevi Üniversitesi Bilgisayar Mühendisliği Bölümü. Diferansiyel Denklemler (TBIL204) ders materyalleri.
  • Dennis G. Zill. A First Course in Differential Equations with Modeling Applications, 11th Edition. Cengage, 2018.
  • Ernst Hairer, Syvert P. Nørsett, Gerhard Wanner. Solving Ordinary Differential Equations I: Nonstiff Problems, 2nd Revised Edition. Springer, 1993.
  • George F. Simmons. Differential Equations with Applications and Historical Notes, 3rd Edition. CRC Press, 2016.
  • Maziar Raissi, Paris Perdikaris, George E. Karniadakis. “Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations.” Journal of Computational Physics, 378, 2019. https://doi.org/10.1016/j.jcp.2018.10.045
  • Morris Tenenbaum, H. P. Ordinary Differential Equations. Dover, 1985.
  • Ricky T. Q. Chen, Yulia Rubanova, Jesse Bettencourt, David Duvenaud. “Neural Ordinary Differential Equations.” Advances in Neural Information Processing Systems, 31, 2018.
  • William E. Boyce, Richard C. DiPrima, Douglas B. Meade. Elementary Differential Equations and Boundary Value Problems, 11th Edition. Wiley, 2017.
Contents
QR code for this page