Engineering Mathematics I

Chapter 13
Introductory Ordinary Differential Equations

Bachelor Program in Mechatronics Engineering
Engineering Mathematics I   •   Bachelor

Introductory Ordinary Differential Equations

Introduction and Context

An ordinary differential equation (ODE) is an equation involving an unknown function of one independent variable and one or more of its derivatives. ODEs are fundamental in mechatronics because physical systems are commonly described through rates of change: velocity is the rate of change of position, current is the rate of change of charge, and temperature changes according to the balance between stored and transferred energy.

A mathematical model usually connects four elements:

  1. State variables, such as position, velocity, current, or temperature.
  2. Parameters, such as mass, resistance, capacitance, or thermal conductance.
  3. Inputs, such as force, voltage, or ambient temperature.
  4. Initial conditions, which specify the state at a known time.

This chapter develops two important classes of first-order ODEs: separable equations and first-order linear equations. Their solutions are used to interpret equilibrium, transient response, steady state, and time constants in elementary engineering systems.

Learning Objectives

By the end of this chapter, you should be able to:

  • identify the order and type of a first-order ODE;
  • solve separable differential equations;
  • solve first-order linear equations using an integrating factor;
  • apply initial conditions to determine particular solutions;
  • interpret equilibrium and stability in simple models;
  • explain transient and steady-state behavior;
  • formulate elementary mechanical, electrical, thermal, and control-system models;
  • assess assumptions, units, and limitations in an ODE model.

1. Basic Terminology and Classification

For an unknown function y(t), a first-order ODE may be written generally as

F(t, y, dy/dt) = 0

where t is the independent variable and dy/dt is the first derivative. The order is the highest derivative present. Thus, an equation containing d2y/dt2 is second order, whereas an equation containing only dy/dt is first order.

A solution is a function that satisfies the differential equation on an interval. A general solution contains an arbitrary constant; a particular solution satisfies an additional condition, such as y(0) = y0. Such a condition is called an initial condition.

A first-order ODE is autonomous if the independent variable does not appear explicitly:

dy/dt = f(y)

It is nonautonomous if the right-hand side depends explicitly on time:

dy/dt = f(t, y)

A model is linear in y if it can be written as

dy/dt + p(t)y = q(t)

where p(t) and q(t) are known functions. The dependent variable and its derivative must occur only to the first power and must not be multiplied together. For example, dy/dt + 3y = t is linear, while dy/dt + y2 = 0 is nonlinear.

2. Separable Differential Equations

A first-order equation is separable when it can be rearranged into the form

g(y) dy/dt = f(t)

or, equivalently,

h(y) dy = f(t) dt

The variables can then be integrated separately:

∫ h(y) dy = ∫ f(t) dt + C

where C is an arbitrary constant. The resulting relation may be explicit, y = y(t), or implicit.

2.1 General Procedure

  1. Rewrite the equation so that all terms involving y are on one side and all terms involving t are on the other.
  2. Integrate both sides.
  3. Include one integration constant.
  4. Use the initial condition, if supplied.
  5. Check the domain and any values excluded during division.

Worked Example 1: Exponential Decay

Solve

dx/dt = -0.4x, x(0) = 10

Assume x is measured in units such as metres and t in seconds. Separating variables gives

dx/x = -0.4 dt

Integration yields

ln|x| = -0.4t + C

Therefore,

x(t) = Ae^(-0.4t)

where A is a constant. Applying x(0) = 10 gives A = 10, so

x(t) = 10e^(-0.4t)

The coefficient 0.4 has units of s^(-1), ensuring that the exponent is dimensionless. The solution decreases toward zero. Its time constant is τ = 1/0.4 = 2.5 s; after one time constant, the remaining value is approximately 36.8% of its initial value.

Worked Example 2: Logistic Growth

Consider

dP/dt = 0.2P(1 - P/100), P(0) = 10

Here P may represent a population or a bounded resource level, and 100 is the carrying capacity. Separating variables gives

dP/[P(1 - P/100)] = 0.2 dt

The standard solution is

P(t) = K/[1 + ((K - P0)/P0)e^(-rt)]

where K is the carrying capacity, P0 is the initial value, and r is the growth constant. Substitution of K = 100, P0 = 10, and r = 0.2 gives

P(t) = 100/[1 + 9e^(-0.2t)]

The model predicts initial growth followed by saturation near 100. The formula is applicable when the rate of growth is proportional both to the existing population and to the unused capacity.

3. Equilibrium and Stability

For an autonomous equation

dy/dt = f(y)

an equilibrium or constant solution ye satisfies

f(ye) = 0

If the system starts exactly at ye, it remains there. An equilibrium is stable if small disturbances produce trajectories that remain close to it, and unstable if small disturbances move away from it.

For a one-dimensional autonomous system, a useful graphical test is based on the sign of f(y). If f(y) > 0, the state increases; if f(y) < 0, it decreases. Arrows on a phase line point toward a stable equilibrium and away from an unstable one.

For the logistic model, the equilibria are P = 0 and P = K. For positive growth rate and positive initial population below K, the state moves toward K. The zero equilibrium is unstable for the idealized logistic model, while the carrying-capacity equilibrium is stable.

4. First-Order Linear Differential Equations

The standard first-order linear form is

dy/dt + p(t)y = q(t)

The integrating factor is

μ(t) = e^(∫p(t)dt)

Multiplying the ODE by μ(t) gives

μ dy/dt + μp y = μq

Since dμ/dt = pμ, the left side is the product derivative

d/dt [μ(t)y(t)] = μ(t)q(t)

Integration gives the general solution

μ(t)y(t) = ∫ μ(t)q(t)dt + C

and therefore

y(t) = [∫ μ(t)q(t)dt + C]/μ(t)

The method assumes that p(t) and q(t) are sufficiently well behaved on the interval under consideration.

Worked Example 3: Constant Input

Solve

dy/dt + 2y = 6, y(0) = 1

Here p(t) = 2, so

μ(t) = e^(∫2dt) = e^(2t)

Multiplication by the integrating factor gives

e^(2t)dy/dt + 2e^(2t)y = 6e^(2t)

Thus,

d/dt[e^(2t)y] = 6e^(2t)

Integrating,

e^(2t)y = 3e^(2t) + C

Hence,

y(t) = 3 + Ce^(-2t)

Using y(0) = 1 gives C = -2, so

y(t) = 3 - 2e^(-2t)

The steady-state value is 3, and the transient term is -2e^(-2t). The transient approaches zero as time increases.

Worked Example 4: Time-Varying Input

Solve

dy/dt + y = t, y(0) = 2

The integrating factor is μ(t) = et. Therefore,

d/dt[et y] = tet

Integration by parts gives

∫tet dt = et(t - 1) + C

Thus,

y = t - 1 + Ce^(-t)

Applying y(0) = 2 gives 2 = -1 + C, so C = 3. The particular solution is

y(t) = t - 1 + 3e^(-t)

In this example, the exponential term is transient, while t - 1 is the forced response associated with the continuing ramp input.

5. Engineering Models

5.1 Mechanical Model: Dashpot and Mass

For a mass m moving with velocity v(t), subject to an applied force F(t) and viscous damping coefficient c, Newton’s law gives

m dv/dt + cv = F(t)

Here m has units kg, c has units N·s/m, v has units m/s, and F has units N. For a constant force F0, the solution is

v(t) = F0/c + [v(0) - F0/c]e^(-ct/m)

The steady velocity is F0/c, and the mechanical time constant is

τm = m/c

This model neglects dry friction, nonlinear drag, and changes in mass.

5.2 Electrical Model: Series RL Circuit

Kirchhoff’s voltage law for a series resistor–inductor circuit is

L di/dt + Ri = V(t)

where L is inductance in henries, R is resistance in ohms, i(t) is current in amperes, and V(t) is applied voltage in volts. For a constant voltage V0 and zero initial current,

i(t) = V0/R [1 - e^(-Rt/L)]

The electrical time constant is

τe = L/R

At t = τe, the current has reached approximately 63.2% of its final value. The dimensions are consistent because L/R has units of seconds.

5.3 Thermal Model: Lumped Cooling

Newton’s law of cooling can be represented by

Cth dT/dt = -Gth(T - Ta)

where T is object temperature, Ta is ambient temperature, Cth is thermal capacitance in J/K, and Gth is thermal conductance in W/K. The solution is

T(t) = Ta + [T(0) - Ta]e^(-Gth t/Cth)

The thermal time constant is τth = Cth/Gth. The lumped model assumes the object has nearly uniform temperature throughout its volume.

5.4 Control-System Interpretation

A common first-order control model is

τ dy/dt + y = Ku(t)

where u(t) is the input, y(t) is the output, K is the static gain, and τ > 0 is the time constant. For a step input u(t) = U0 and initial output y(0) = y0,

y(t) = KU0 + [y0 - KU0]e^(-t/τ)

The final-value prediction is valid for this stable first-order model and a constant input. A smaller positive τ gives a faster response, but it may also reflect design trade-offs involving actuator effort, noise sensitivity, or neglected dynamics.

6. Transient, Steady-State, and Time-Constant Behavior

Many first-order solutions can be expressed as

response = forced response + natural response

The natural response is determined by the system’s initial energy or initial state. In a stable system it commonly has the form Ae^(-t/τ). The forced response is determined by the input. The steady-state response is the behavior remaining after transient terms have decayed.

For a stable exponential transient, useful approximations are:

TimeRemaining transient magnitude
τ36.8%
2τ13.5%
3τ5.0%
4τ1.8%
5τ0.67%

These percentages apply to e^(-t/τ), not automatically to every nonlinear or unstable system.

Initial conditions have physical meaning. A capacitor voltage cannot change instantaneously under a finite current, and an inductor current cannot change instantaneously under a finite voltage. Similarly, a mass velocity changes continuously unless an impulsive force is present. Such continuity conditions help determine correct initial values in coupled models.

7. Illustrative Case Study: Temperature Control of an Enclosure

Background

Consider a small instrument enclosure containing sensors and electronics. A heater supplies constant power, while heat escapes to an ambient environment at 25 °C. The enclosure is treated as a lumped thermal system.

Problem

Suppose the thermal capacitance is Cth = 5000 J/K, the thermal conductance is Gth = 10 W/K, and the heater power is P = 100 W. The initial enclosure temperature is T(0) = 25 °C. Estimate the temperature response and time required to reach 95% of the eventual temperature rise.

Analysis and Solution

An energy balance is

Cth dT/dt = P - Gth(T - Ta)

Rearranging,

dT/dt + (Gth/Cth)T = P/Cth + (Gth/Cth)Ta

The equilibrium temperature satisfies dT/dt = 0, so

T_∞ = Ta + P/Gth

Thus,

T_∞ = 25 + 100/10 = 35 °C

The time constant is

τ = Cth/Gth = 5000/10 = 500 s

Because the initial temperature equals ambient temperature,

T(t) = T_∞ + [T(0) - T_∞]e^(-t/τ)

and therefore

T(t) = 35 - 10e^(-t/500) °C

A 95% temperature rise corresponds to 5% of the remaining error:

e^(-t/500) = 0.05

Taking natural logarithms,

t = -500 ln(0.05) ≈ 1498 s ≈ 25.0 min

Outcome and Engineering Interpretation

The enclosure approaches 35 °C asymptotically. It does not reach the equilibrium exactly in finite time according to this ideal model. If the electronics must remain below 32 °C, the model can be used to calculate a maximum heater duty cycle. In practice, radiation, airflow, temperature-dependent properties, sensor delay, and heater saturation may require a more detailed model.

Learning Points

  • The equilibrium follows from a balance of input power and heat loss.
  • The time constant depends on stored thermal energy and heat-transfer conductance.
  • Initial conditions determine the transient amplitude.
  • A model is useful only within its assumptions and validated operating range.

8. Modeling Assumptions, Limitations, and Best Practice

ODE models are idealizations. Before solving an equation, the engineer should ask:

  • Are parameters constant over the operating range?
  • Is the system lumped or spatially distributed?
  • Are nonlinear effects such as saturation, friction, or temperature dependence important?
  • Are the input and initial conditions known accurately?
  • Are the units consistent?
  • Does the predicted solution remain physically meaningful, such as nonnegative temperature or concentration?

A reliable workflow is to define the system boundary, identify stored quantities, write a conservation law, choose signs consistently, substitute parameter values only after obtaining the symbolic model, apply initial conditions, and compare predictions with measurements. Numerical simulation software is valuable for verification, but it does not replace correct model formulation. In safety-critical mechatronic systems, assumptions, parameter estimates, validation evidence, and model limitations should be documented.

Chapter Summary

First-order ordinary differential equations describe systems whose state changes according to current conditions and inputs. Separable equations are solved by rearranging variables and integrating. First-order linear equations are solved using an integrating factor. Initial conditions select one particular trajectory from a family of solutions.

Autonomous equations permit equilibrium and stability analysis through the zeros and signs of their rate function. In engineering models, stable first-order systems commonly consist of a steady-state response plus an exponentially decaying transient. The time constant determines the speed of response: approximately 63.2% of a step change occurs after one time constant, and approximately 95% occurs after three time constants.

Mass–damper, RL electrical, thermal, and elementary control models all share the same mathematical structure. Their parameters and units differ, but the methods of formulation and interpretation are closely related. Sound engineering practice requires checking assumptions, dimensions, initial conditions, physical feasibility, and agreement with experimental behavior.

Key Terms

Ordinary differential equation: An equation involving an unknown function of one independent variable and its derivatives.

First-order ODE: A differential equation whose highest derivative is first order.

Autonomous equation: An ODE in which the independent variable does not appear explicitly.

Linear ODE: An ODE in which the dependent variable and its derivative occur linearly.

Separable equation: An ODE that can be rearranged into a product of a function of the dependent variable and a function of the independent variable.

General solution: A family of solutions containing arbitrary constants.

Particular solution: A solution obtained after applying specified conditions.

Initial condition: A value of the state at a known independent-variable value.

Equilibrium: A constant state satisfying zero rate of change.

Stability: The tendency of a system to remain near an equilibrium after a small disturbance.

Integrating factor: A function that converts a first-order linear ODE into a product derivative.

Transient response: The portion of a response that changes and eventually decays or evolves away.

Steady-state response: The long-term response after transient behavior has diminished.

Time constant: A parameter measuring the characteristic speed of a first-order response.

Static gain: The ratio between steady output and constant input in a stable linear model.

Natural response: The response caused by initial stored energy or initial conditions.

Forced response: The response caused by an external input.

Lumped model: A model that assumes the state is uniform throughout the system.

Review Questions

5 Short Answer Questions

  1. What distinguishes an autonomous ODE from a nonautonomous ODE?
  2. Define an equilibrium solution for dy/dt = f(y).
  3. What is the integrating factor for dy/dt + p(t)y = q(t)?
  4. What physical quantities are represented by m, c, and v in a mass–damper model?
  5. What percentage of a stable exponential transient remains after three time constants?

5 Long Answer Questions

  1. Derive the solution of dy/dt + ay = b for constant a ≠ 0 and b, subject to y(0) = y0. Interpret the two terms.
  2. Explain how equilibrium and stability can be determined for a one-dimensional autonomous ODE using a phase line.
  3. Formulate and solve the temperature response of a lumped object cooling toward an ambient temperature. State all assumptions.
  4. Derive the current response of a series RL circuit connected to a constant voltage with nonzero initial current.
  5. Compare the meanings of time constant in mechanical, electrical, thermal, and control-system models.

3 Analytical / Application Questions

  1. A motor-load approximation is 0.8 dv/dt + 4v = 12 with v(0) = 0. Determine the velocity response, final velocity, and time constant. Check the units of each coefficient.
  2. A sensor output follows dy/dt + 0.5y = 0.5u, where the input changes suddenly from 0 to 10 and y(0) = 2. Determine the output and the time required for the output to reach 95% of its final value.
  3. For dx/dt = x(1 - x/20), identify the equilibria and determine their stability. Explain the long-term behavior for positive initial values below and above 20.

Multiple Choice Questions with Answers

Question 1

Which equation is separable?

A. dy/dt + y = t

B. dy/dt = t y

C. dy/dt + y2 = t

D. dy/dt = sin(t + y)

Correct Answer: B. dy/dt = t y

Question 2

The equilibrium values of dy/dt = y(4 - y) are:

A. 0 and 2

B. 2 and 4

C. 0 and 4

D. -4 and 4

Correct Answer: C. 0 and 4

Question 3

The integrating factor for dy/dt + 3y = t is:

A. et

B. e^(3t)

C. 3et

D. t3

Correct Answer: B. e^(3t)

Question 4

The solution of dx/dt = -2x with x(0) = 5 is:

A. 5e^(2t)

B. 2e^(-5t)

C. 5e^(-2t)

D. 5 - 2t

Correct Answer: C. 5e^(-2t)

Question 5

For τ dy/dt + y = KU0 with constant input and positive τ, the steady-state output is:

A. τKU0

B. KU0/τ

C. K/U0

D. KU0

Correct Answer: D. KU0

Question 6

A first-order system has time constant 2 s. Approximately what percentage of a step response has occurred at 2 s?

A. 36.8%

B. 50.0%

C. 63.2%

D. 95.0%

Correct Answer: C. 63.2%

Question 7

For a series RL circuit, the time constant is:

A. R/L

B. L/R

C. LR

D. 1/(LR)

Correct Answer: B. L/R

Question 8

In a mass–damper model m dv/dt + cv = F0, the steady velocity for constant force is:

A. mF0/c

B. cF0/m

C. F0/c

D. F0/m

Correct Answer: C. F0/c

Question 9

For dy/dt + 2y = 6, the equilibrium value is:

A. 0

B. 2

C. 3

D. 6

Correct Answer: C. 3

Question 10

After five time constants, the magnitude of a stable exponential transient is approximately:

A. 36.8%

B. 13.5%

C. 5.0%

D. 0.67%

Correct Answer: D. 0.67%

Engineering Mathematics I
Chapter 13 of 14