First-Order Ordinary Differential EquationsIntroduction and engineering contextA differential equation relates an unknown function to one or more of its derivatives. In engineering, the unknown function often represents position, temperature, voltage, current, concentration, or fluid level, while the independent variable is commonly time or position. A first-order ordinary differential equation (ODE) contains only the first derivative of the unknown function. Despite their apparent simplicity, first-order ODEs model many essential mechatronic systems, including actuator motion, sensor dynamics, thermal processes, charging circuits, mixing tanks, and feedback systems. A general first-order ODE may be written as a(x,y) dy/dx + b(x,y) = 0 where y = y(x) is the unknown function and x is the independent variable. If the equation is solved for the derivative, it has the form dy/dx = f(x,y) An initial-value problem (IVP) adds a condition such as y(x0) = y0. A solution is a differentiable function satisfying both the differential equation and the initial condition on an interval of interest. The principal goals of this chapter are to formulate and solve separable, exact, linear, homogeneous, Bernoulli, and autonomous equations, and to interpret equilibrium, stability, transient response, and engineering initial-value problems. Learning objectivesBy the end of this chapter, you should be able to: - Classify a first-order ODE according to its mathematical structure.
- Solve separable equations and apply initial conditions correctly.
- Test an equation for exactness and construct an implicit or explicit solution.
- Solve first-order linear equations using an integrating factor.
- Transform homogeneous and Bernoulli equations into separable or linear forms.
- Analyze equilibrium points and their stability in autonomous equations.
- Interpret transient and steady-state components in engineering models.
- Formulate and solve an IVP, check dimensions, and assess the physical validity of its solution.
Fundamental terminology and existenceThe order of an ODE is the highest derivative present. A first-order equation contains dy/dx but no higher derivative. An equation is linear in y if it can be written as dy/dx + P(x)y = Q(x) where P and Q depend only on x. Terms such as y2, sin(y), or y dy/dx make the equation nonlinear. A solution may be explicit, y = g(x), or implicit, F(x,y) = C. An implicit form is acceptable when solving explicitly for y is difficult or would introduce unnecessary restrictions. For the IVP dy/dx = f(x,y), y(x0)=y0, if f and its partial derivative with respect to y are continuous in a region containing (x0,y0), the existence-and-uniqueness theorem guarantees a unique local solution. This theorem does not necessarily guarantee a solution for all values of x, and it does not replace physical checks such as positivity or boundedness. A useful general procedure is: - Identify the dependent and independent variables.
- Classify the equation.
- Solve symbolically, retaining all relevant constants.
- Apply the initial or boundary condition.
- Verify by differentiation and substitution.
- Interpret the result using units, limiting behavior, and physical constraints.
Separable equationsAn equation is separable if it can be rearranged into g(y) dy = f(x) dx Integration gives ∫g(y) dy = ∫f(x) dx + C where C is an arbitrary constant. Division by a function of y requires care: any constant solutions lost by dividing must be tested separately. Worked example 1: a cooling modelNewton's law of cooling assumes that the rate of temperature change is proportional to the difference between the object temperature T and the surrounding temperature Ta, which is assumed constant: dT/dt = -k(T - Ta), k > 0 Here t is time and k has units of inverse time. Separating variables gives dT/(T-Ta) = -k dt and hence ln|T-Ta| = -kt + C Therefore, T(t) = Ta + C1 e^(-kt) If T(0)=T0, then C1=T0-Ta, so T(t) = Ta + (T0-Ta)e^(-kt) Suppose Ta=20 °C, T0=80 °C, and k=0.25 min^(-1). After 4 minutes, T(4) = 20 + 60e^(-1) ≈ 42.1 °C The exponential factor is dimensionless because kt is dimensionless. The object approaches, but in this ideal model does not cross, the ambient temperature. Exact equationsAn equation in differential form is M(x,y) dx + N(x,y) dy = 0 It is exact in a region if there exists a potential function Ψ(x,y) such that ∂Ψ/∂x = M, ∂Ψ/∂y = N A sufficient condition for exactness, when the first partial derivatives are continuous on a simply connected region, is ∂M/∂y = ∂N/∂x The solution is Ψ(x,y)=C. To construct Ψ, integrate M with respect to x, treating y as constant, then determine the missing function of y by differentiating with respect to y. Worked example 2: exactnessSolve (2xy + 3) dx + (x2 + 4y) dy = 0 Here M=2xy+3 and N=x2+4y. Since ∂M/∂y = 2x = ∂N/∂x the equation is exact. Integrating M with respect to x gives Ψ(x,y) = x2y + 3x + h(y) Differentiating with respect to y and comparing with N: ∂Ψ/∂y = x2 + h'(y) = x2 + 4y Thus h'(y)=4y and h(y)=2y2. The implicit solution is x2y + 3x + 2y2 = C If the equation is not exact, it may still have an integrating factor, but no universal integrating factor exists. Common special cases include an integrating factor depending only on x or only on y, identified from suitable combinations of M and N. Such factors must be verified by checking exactness after multiplication. First-order linear equationsThe standard linear form is dy/dx + P(x)y = Q(x) The integrating factor is μ(x) = e^(∫P(x) dx) Multiplication by μ gives d/dx [μ(x)y] = μ(x)Q(x) so the general solution is y = [∫μ(x)Q(x) dx + C]/μ(x) The integrating factor is nonzero, and changing the arbitrary constant in its exponent only rescales the constant of integration. Worked example 3: actuator position with an inputConsider the normalized first-order actuator model dx/dt + 4x = 12, x(0)=1 The coefficient 4 has units of inverse time, and 12 has units of output per unit time. The integrating factor is μ(t)=e^(4t). Thus d/dt [e^(4t)x] = 12e^(4t) Integration gives e^(4t)x = 3e^(4t) + C and therefore x=3+Ce^(-4t). Applying x(0)=1 gives C=-2, so x(t) = 3 - 2e^(-4t) The steady-state value is 3, while the transient component is -2e^(-4t). The time constant is τ=1/4 time units: after one time constant, the magnitude of the transient is multiplied by e^(-1)≈0.368. For the general constant-input model τ dy/dt + y = K u0, τ > 0 with constant input u0 and initial value y0, the response is y(t) = Ku0 + [y0 - Ku0]e^(-t/τ) The units are consistent: t/τ is dimensionless, and both terms on the right have units of y. Homogeneous first-order equationsA first-order equation is homogeneous in the special ratio sense if it can be written as dy/dx = F(y/x) or equivalently if M(x,y) and N(x,y) are homogeneous functions of the same degree. Use the substitution v = y/x, y = vx, dy/dx = v + x dv/dx which often produces a separable equation in v and x. This method applies where x≠0; solutions on other intervals must be considered separately. Worked example 4Solve dy/dx = 1 + y/x Set y=vx. Then v + x dv/dx = 1 + v so x dv/dx=1, or dv=dx/x. Integration gives v=ln|x|+C. Since v=y/x, y = x(ln|x| + C), x ≠ 0 The absolute value is needed for a real solution on either interval x>0 or x<0. Bernoulli equationsA Bernoulli equation has the form dy/dx + P(x)y = Q(x)yn, n ≠ 0, 1 For a nonzero solution, divide by yn and use z = y^(1-n) Then dz/dx = (1-n)y^(-n)dy/dx and the equation becomes the linear equation dz/dx + (1-n)P(x)z = (1-n)Q(x) The zero solution may need to be tested separately, particularly when n is positive. Worked example 5Solve dy/dx + y = xy2 Here n=2. Let z=y^(-1)=1/y. Since dz/dx=-y^(-2)dy/dx, multiplying the original equation by -y^(-2) yields dz/dx - z = -x The integrating factor is e^(-x). Thus d/dx [e^(-x)z] = -xe^(-x) An antiderivative is (x+1)e^(-x), so e^(-x)z = (x+1)e^(-x) + C and z = x+1+Cex Therefore, for nonzero solutions, y = 1/(x+1+Cex) The solution y=0 must also be checked directly and is indeed a solution. A denominator equal to zero indicates a singularity of the explicit solution and limits its interval of validity. Autonomous equations and phase-line analysisAn autonomous equation has no explicit independent-variable dependence: dy/dt = f(y) An equilibrium or critical point is a constant solution y(t)=ye satisfying f(ye)=0 If f'(ye)<0, the equilibrium is locally asymptotically stable; nearby solutions move toward it. If f'(ye)>0, it is unstable. If f'(ye)=0, linearization is inconclusive and the sign of f(y) on either side must be examined. In a phase line, arrows point in the direction of increasing y when f(y)>0 and downward when f(y)<0. Example: logistic growthThe logistic model is dP/dt = rP(1-P/K), r>0, K>0 where P is population, r is the intrinsic growth rate, and K is carrying capacity. The equilibria are P=0 and P=K. For 0<P<K, the derivative is positive; for P>K, it is negative. Thus 0 is unstable and K is stable for positive populations. The explicit solution with P(0)=P0 is P(t) = K/[1 + ((K-P0)/P0)e^(-rt)] for P0≠0. The formula assumes constant parameters and unlimited time for the model; real populations may violate these assumptions. Transient response, equilibrium, and stabilityA solution can often be decomposed as response = steady-state component + transient component The steady-state component is the long-time behavior forced by a persistent input. The transient component depends on the initial condition and generally decays in a stable system. For the homogeneous linear equation dy/dt + ay = 0 with constant a, the solution is y=Ce^(-at). If a>0, transients decay; if a<0, they grow; and if a=0, they persist. For a nonlinear autonomous equation, stability is a local property unless global behavior is established. A solution can approach an equilibrium without reaching it in finite time. Singularities, constraints, saturation, backlash, switching, and noise can invalidate a simple ODE model outside its operating range. Engineering initial-value problem: thermal sensorConsider an illustrative thermistor interface whose first-order thermal behavior is approximated by Cth dT/dt = P - h(T-Ta), T(0)=T0 Here Cth is thermal capacitance in joules per kelvin, P is constant dissipated power in watts, h is a heat-transfer coefficient in watts per kelvin, and Ta and T are ambient and sensor temperatures in degrees Celsius or kelvin differences. Since watts equal joules per second, the units are consistent. Rearranging gives dT/dt + (h/Cth)T = P/Cth + (h/Cth)Ta The equilibrium temperature is found by setting dT/dt=0: Te = Ta + P/h The time constant is τ = Cth/h and the IVP solution is T(t) = Te + (T0-Te)e^(-t/τ) Suppose Ta=25 °C, P=0.8 W, h=0.10 W/K, Cth=20 J/K, and T0=25 °C. Then Te = 25 + 0.8/0.10 = 33 °C, τ = 20/0.10 = 200 s Thus T(t)=33-8e^(-t/200) °C At t=200 s, T≈33-8e^(-1)≈30.06 °C. The response is stable because τ>0, and the sensor approaches 33 °C rather than ambient temperature because it generates heat internally. Case analysisBackground. A mechatronic controller uses the sensor to regulate a precision actuator. The sensor's self-heating causes a measurement offset. Problem. Determine the long-term temperature, settling tendency, and whether the sensor can be treated as instantaneous. Analysis. The model predicts an equilibrium of 33 °C, an 8 °C rise above ambient, and a 200-second time constant. After approximately five time constants, the remaining transient magnitude is e^(-5)≈0.0067 of its initial value, so the sensor is close to equilibrium after about 1000 seconds. It cannot be treated as instantaneous during rapid thermal changes. Approach and solution. The controller should compensate for the predicted steady offset only after validating P and h experimentally. If fast measurements are required, the designer may reduce self-heating, improve heat transfer, or identify a dynamic sensor model and include it in the control design. Outcome. The first-order model provides both a bias estimate and a time-scale estimate. It does not establish that the real sensor is exactly first order; calibration and experiments remain necessary. Learning points. Equilibrium is obtained by setting the derivative to zero, stability depends on the sign of the dynamic coefficient, and a physically meaningful model requires dimensional consistency and parameter identification. Numerical and computational considerationsClosed-form solutions are valuable for interpretation, but many engineering equations have variable coefficients, discontinuous inputs, or nonlinearities that prevent elementary solutions. Numerical methods such as Euler's method can approximate an IVP. For dy/dt=f(t,y), y(t0)=y0 Euler's update with step size h is yn+1=yn+h f(tn,yn), tn+1=tn+h The method has local truncation error of order h2 and global error of order h under suitable smoothness assumptions. A smaller step is not automatically sufficient if the model is poorly conditioned or the physical parameters are inaccurate. Runge–Kutta methods, adaptive step control, and validated software are commonly preferred in professional simulation. Computer algebra and AI tools can assist with classification, integration, plotting, and parameter fitting, but they may divide by zero, omit special solutions, choose an inappropriate interval, or return expressions that are dimensionally meaningless. Engineering responsibility remains with the analyst: state assumptions, inspect singularities, verify by substitution, and compare predictions with measured data. Limitations, safety, and professional practiceFirst-order models are abstractions. Linear models generally apply near an operating point; parameters may vary with temperature, position, load, or aging. A stable mathematical solution may still violate actuator limits, temperature ratings, concentration positivity, or sensor range. Model uncertainty should be reported rather than hidden. In safety-critical mechatronic systems, an ODE solution must not be treated as the sole assurance of safety. Independent limits, fault detection, saturation models, worst-case analysis, experimental validation, and applicable engineering standards are required. Data used to estimate parameters should be traceable, and automated tools should preserve units and document assumptions. Chapter SummaryFirst-order ODEs model rates of change in many mechatronic and physical systems. Separable equations are solved by isolating variables and integrating. Exact equations are recognized through equality of cross partial derivatives and solved using a potential function. Linear equations are solved with the integrating factor μ=e^(∫P dx). Homogeneous equations use y=vx, while Bernoulli equations become linear after the substitution z=y^(1-n). Autonomous equations permit phase-line analysis. Equilibria satisfy f(ye)=0, and the signs of f or f'(ye) determine local stability when the derivative test is applicable. Linear engineering responses commonly consist of a steady-state value plus an exponentially decaying or growing transient. Initial-value solutions must be checked symbolically, dimensionally, numerically, and physically. Closed-form mathematics, numerical computation, experimental identification, and professional engineering judgment should be used together. Key TermsFirst-order ODE: A differential equation whose highest derivative is the first derivative. Initial-value problem: A differential equation together with a specified value of the unknown function at an initial point. Separable equation: An equation that can be rearranged into a function of the dependent variable times its differential equal to a function of the independent variable times its differential. Exact equation: An equation whose differential form is the differential of a scalar potential function. Integrating factor: A nonzero function that converts a linear first-order equation into an exact derivative. Linear ODE: An ODE in which the unknown function and its derivative occur only to the first power and are not multiplied together. Homogeneous first-order equation: An equation expressible as a function of the ratio y/x. Bernoulli equation: An equation of the form y' + P(x)y = Q(x)yn. Autonomous equation: An equation in which the independent variable does not appear explicitly. Equilibrium: A constant solution at which the derivative is zero. Stable equilibrium: An equilibrium toward which nearby solutions move, locally or globally according to the stated analysis. Transient response: The part of a response determined by initial conditions and normally vanishing in a stable system. Steady-state response: The persistent long-time component of a system response. Time constant: A characteristic time, commonly τ, governing exponential approach to equilibrium. Phase line: A one-dimensional diagram showing the direction of motion and equilibria of an autonomous equation. Implicit solution: A relation between independent and dependent variables that need not be solved explicitly for the dependent variable. Existence and uniqueness: Conditions ensuring that an IVP has a solution and that it is locally the only solution through the initial point. Model validation: Comparison of model predictions with observations or experiments to assess suitability. Review Questions5 Short Answer Questions- What distinguishes a linear first-order ODE from a nonlinear first-order ODE?
- State the exactness test for M dx + N dy = 0.
- What is the integrating factor for y' + P(x)y = Q(x)?
- Define an equilibrium solution of an autonomous equation.
- What physical information is represented by the time constant in a stable first-order system?
5 Long Answer Questions- Derive the solution of Newton's cooling equation for constant ambient temperature and explain the role of the initial condition.
- Explain how a potential function is constructed for an exact differential equation, including the role of the arbitrary function.
- Derive the integrating-factor solution of a general first-order linear ODE.
- Explain the Bernoulli substitution and identify why the cases n=0 and n=1 are excluded from the Bernoulli procedure.
- Discuss how equilibrium, stability, steady state, and transient response are related in a first-order engineering model.
3 Analytical / Application Questions- A thermal component obeys 10 dT/dt + 0.5(T-30)=5, with T(0)=20. Find the equilibrium temperature, time constant, and temperature after one time constant.
- For dy/dt=y(2-y), determine all equilibria, classify their stability using a phase-line argument, and describe the behavior for positive initial values.
- A controller model is τ dy/dt+y=Ku(t). Derive the response to a constant input u(t)=u0, explain the effect of the initial condition, and state two assumptions that should be tested before using the model in hardware design.
Multiple Choice Questions with AnswersQuestion 1Which equation is separable? A. dy/dx + xy = x B. dy/dx = x(1+y2) C. dy/dx = x+y D. dy/dx + y = sin(x) Correct Answer: B. dy/dx = x(1+y2) Question 2For dy/dx + 3y = ex, what is the integrating factor? A. ex B. e^(3x) C. 3ex D. e^(x/3) Correct Answer: B. e^(3x) Question 3Which condition tests exactness of M dx + N dy = 0? A. ∂M/∂x = ∂N/∂y B. ∂M/∂y = ∂N/∂x C. M=N D. MN=0 Correct Answer: B. ∂M/∂y = ∂N/∂x Question 4For dy/dt = y(2-y), which point is an equilibrium? A. y=1 B. y=2 C. y=3 D. y=-2 Correct Answer: B. y=2 Question 5The substitution normally used for a homogeneous first-order equation is: A. v=x+y B. v=xy C. v=y/x D. v=1/y Correct Answer: C. v=y/x Question 6For τ y' + y = Ku0, with τ>0, the equilibrium value is: A. 0 B. τKu0 C. Ku0/τ D. Ku0 Correct Answer: D. Ku0 Question 7The Bernoulli substitution for y' + P(x)y = Q(x)yn is: A. z=yn B. z=y^(1-n) C. z=ln(y) D. z=1-y Correct Answer: B. z=y^(1-n) Question 8The solution of y' + 4y=12, y(0)=1, is: A. y=3+2e^(-4t) B. y=12-11e^(-4t) C. y=3-2e^(-4t) D. y=1-3e^(-4t) Correct Answer: C. y=3-2e^(-4t) Question 9For a stable response with time constant τ, the transient magnitude after one time constant is approximately: A. 0.05 of its initial value B. 0.368 of its initial value C. 0.632 of its initial value D. Zero exactly Correct Answer: B. 0.368 of its initial value Question 10Euler's method for y'=f(t,y) uses which update? A. yn+1=yn+h f(tn,yn) B. yn+1=yn+f(tn,yn)/h C. yn+1=h yn+f(tn,yn) D. yn+1=yn-h2 f(tn,yn) Correct Answer: A. yn+1=yn+h f(tn,yn)
|