2.4 Differential Equations and Numerical Methods

Key Takeaways

  • First-order ODEs are resolved via separation of variables, integrating factor I(x) = exp(∫ P dx) for linear forms dy/dx + Py = Q, or exactness tests (∂M/∂y = ∂N/∂x).

  • Newton's Law of Cooling models thermal dissipation in curing mass concrete: T(t) = T_m + (T₀ - T_m)e^(-kt), establishing thermal cracking control.

  • Second-order linear ODEs with constant coefficients yield three structural vibration regimes: overdamped (Δ > 0), critically damped (Δ = 0), and underdamped harmonic oscillation (Δ < 0).

  • Root-finding methods balance reliability and speed: Bisection guarantees linear convergence, while Newton-Raphson provides quadratic convergence x_{n+1} = x_n - f(x_n)/f'(x_n).

  • Simpson's 1/3 Rule requires an even number of intervals n and integrates cubic polynomials exactly with global error O(h⁴), outperforming the Trapezoidal Rule O(h²).

Last updated: October 2026

2.4 Differential Equations and Numerical Methods

Differential equations and numerical methods bridge pure mathematics and applied engineering mechanics in civil engineering. While first-order and second-order ordinary differential equations (ODEs) model hydraulic seepage, thermal dissipation in curing mass concrete, and structural dynamics, practical field problems often resist closed-form analytical solutions. Numerical methods—including root-finding iterations (Bisection, Newton-Raphson) and numerical integration (Trapezoidal, Simpson's 1/3 and 3/8 rules)—provide accurate numerical approximations required on the board examination.


First-Order Ordinary Differential Equations (ODEs)

A first-order differential equation involves independent variable xx, dependent variable yy, and the first derivative dydx\frac{dy}{dx}.

1. Variable Separable ODEs

The equation can be manipulated algebraically into isolated single-variable differentials: f(x) dx+g(y) dy=0  ⟹  ∫f(x) dx+∫g(y) dy=Cf(x)\,dx + g(y)\,dy = 0 \implies \int f(x)\,dx + \int g(y)\,dy = C

2. Homogeneous Differential Equations

An equation in the differential form M(x,y) dx+N(x,y) dy=0M(x, y)\,dx + N(x, y)\,dy = 0 is homogeneous of degree nn if M(kx,ky)=knM(x,y)M(kx, ky) = k^n M(x, y) and N(kx,ky)=knN(x,y)N(kx, ky) = k^n N(x, y).

  • Standard Substitution: Let y=vx  ⟹  dy=v dx+x dvy = vx \implies dy = v\,dx + x\,dv (or x=vy  ⟹  dx=v dy+y dvx = vy \implies dx = v\,dy + y\,dv).
  • Substituting transforms the equation into a separable ODE in terms of vv and xx.

3. Exact Differential Equations

The equation M(x,y) dx+N(x,y) dy=0M(x, y)\,dx + N(x, y)\,dy = 0 is exact if and only if: ∂M∂y=∂N∂x\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x} The general solution is F(x,y)=CF(x, y) = C, found by: F(x,y)=∫M(x,y) ∂x+g(y),where g′(y)=N(x,y)−∂∂y[∫M(x,y) ∂x]F(x, y) = \int M(x, y)\,\partial x + g(y), \quad \text{where } g'(y) = N(x, y) - \frac{\partial}{\partial y}\left[\int M(x, y)\,\partial x\right]

4. First-Order Linear Differential Equations

The standard canonical form is: dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x)y = Q(x) Where P(x)P(x) and Q(x)Q(x) are continuous functions of xx alone.

  • Integrating Factor (I(x)I(x)): I(x)=e∫P(x) dxI(x) = e^{\int P(x)\,dx}
  • General Closed-Form Solution: y⋅I(x)=∫Q(x)I(x) dx+Cy \cdot I(x) = \int Q(x) I(x)\,dx + C

Engineering Applications of First-Order Models

1. Newton's Law of Cooling (Thermal Curing of Concrete)

Mass concrete structures (such as gravity dams and bridge piers) generate substantial internal hydration heat that must dissipate to the ambient environment. Newton's Law states that the rate of temperature change of a body is proportional to the difference between its temperature TT and the surrounding ambient temperature TmT_m: dTdt=−k(T−Tm)\frac{dT}{dt} = -k(T - T_m) Separating variables and integrating yields: T(t)=Tm+(T0−Tm)e−ktT(t) = T_m + (T_0 - T_m)e^{-kt} Where T0T_0 is the initial temperature at t=0t = 0, and kk is the cooling rate constant (time−1\text{time}^{-1}).

2. Exponential Growth and Decay

Governed by dNdt=kN  ⟹  N(t)=N0ekt\frac{dN}{dt} = kN \implies N(t) = N_0 e^{kt}. If k<0k < 0, it models radioisotope decay or contaminant breakdown; half-life is t1/2=ln⁡2∣k∣t_{1/2} = \frac{\ln 2}{|k|}.


Second-Order Linear Homogeneous ODEs with Constant Coefficients

Second-order equations describe dynamic mechanical vibrations, structural frame oscillations, and beam deflections: ad2ydx2+bdydx+cy=0(a≠0)a \frac{d^2 y}{dx^2} + b \frac{dy}{dx} + c y = 0 \quad (a \ne 0)

The Characteristic (Auxiliary) Equation

Assuming trial solution y=erxy = e^{rx} yields the characteristic quadratic equation: ar2+br+c=0a r^2 + b r + c = 0

Roots are obtained via r=−b±b2−4ac2ar = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}. The physical and mathematical nature of the response is classified by the discriminant Δ=b2−4ac\Delta = b^2 - 4ac:

Discriminant (Δ\Delta)Nature of Characteristic RootsGeneral Solution y(x)y(x)Physical Structural Behavior
Δ>0\Delta > 0Two distinct real roots r1≠r2r_1 \ne r_2y=C1er1x+C2er2xy = C_1 e^{r_1 x} + C_2 e^{r_2 x}Overdamped: Non-oscillatory exponential decay to equilibrium
Δ=0\Delta = 0Repeated real root r1=r2=r=−b2ar_1 = r_2 = r = -\frac{b}{2a}y=(C1+C2x)erxy = (C_1 + C_2 x) e^{r x}Critically Damped: Fastest non-oscillatory return to rest without overshoot
Δ<0\Delta < 0Complex conjugate roots r=α±iβr = \alpha \pm i\betay=eαx(C1cos⁡βx+C2sin⁡βx)y = e^{\alpha x}(C_1 \cos\beta x + C_2 \sin\beta x)Underdamped: Decaying harmonic oscillations (α=−b2a,β=4ac−b22a\alpha = -\frac{b}{2a}, \beta = \frac{\sqrt{4ac-b^2}}{2a})

Numerical Root-Finding Algorithms

When non-linear transcendental equations f(x)=0f(x) = 0 (such as pipe friction factor formulas or open channel critical depths) cannot be solved analytically, numerical iterative algorithms are employed.

1. The Bisection Method

Based on the Intermediate Value Theorem: If a continuous function f(x)f(x) satisfies f(a)⋅f(b)<0f(a) \cdot f(b) < 0, at least one real root exists within the bracket [a,b][a, b].

  • Iteration Formula: Midpoint c=a+b2c = \frac{a + b}{2}. If f(a)f(c)<0f(a)f(c) < 0, root lies in [a,c][a, c]; otherwise root lies in [c,b][c, b].
  • Convergence Rate: Linear (error halves each iteration, convergence factor =0.5= 0.5).
  • Number of Iterations for Tolerance ϵ\epsilon: n≥ln⁡(b−aϵ)ln⁡2n \ge \frac{\ln\left(\frac{b - a}{\epsilon}\right)}{\ln 2}
  • Strengths & Weaknesses: Absolutely guaranteed convergence, but slow compared to gradient methods.

2. The Newton-Raphson Method

Uses the local tangent line approximation at trial point xnx_n to project to the next root estimate: xn+1=xn−f(xn)f′(xn)x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}

  • Convergence Rate: Quadratic near a simple root (∣en+1∣≈M∣en∣2|e_{n+1}| \approx M |e_n|^2), doubling the number of significant correct decimal places with each iteration.
  • Common Failure Modes:
    1. Zero Derivative (f′(xn)=0f'(x_n) = 0): Horizontal tangent causes division by zero.
    2. Oscillatory Cycles: Diverges or enters an infinite periodic loop around points of inflection.
    3. Poor Starting Value: Converges to an unintended distant root if x0x_0 is poorly chosen.
    4. Multiple Roots: If a root has multiplicity m>1m > 1, convergence slows from quadratic to linear.

Numerical Integration Methods

Numerical quadrature approximates the definite integral I=∫abf(x) dxI = \int_a^b f(x)\,dx using nn equal panels of step size h=b−anh = \frac{b - a}{n} across discrete ordinates yi=f(xi)y_i = f(x_i).

1. The Trapezoidal Rule

Approximates the region under each subinterval with a linear trapezoid: ∫abf(x) dx≈h2[f(x0)+2∑i=1n−1f(xi)+f(xn)]\int_a^b f(x)\,dx \approx \frac{h}{2}\left[f(x_0) + 2\sum_{i=1}^{n-1} f(x_i) + f(x_n)\right]

  • Polynomial Exactness: Degree ≤1\le 1 (exact for linear profiles).
  • Global Truncation Error: ET=−(b−a)h212f′′(ξ)=O(h2)E_T = -\frac{(b - a)h^2}{12} f''(\xi) = O(h^2)

2. Simpson's 1/3 Rule

Approximates consecutive pairs of panels with quadratic parabolas.

  • Strict Constraint: Requires an even number of intervals nn (an odd number of ordinates n+1n + 1). ∫abf(x) dx≈h3[f(x0)+4∑odd if(xi)+2∑even if(xi)+f(xn)]\int_a^b f(x)\,dx \approx \frac{h}{3}\left[f(x_0) + 4\sum_{\text{odd } i} f(x_i) + 2\sum_{\text{even } i} f(x_i) + f(x_n)\right]
  • Polynomial Exactness: Degree ≤3\le 3 (exact for cubics as well as quadratics due to error cancellation!).
  • Global Truncation Error: ES=−(b−a)h4180f(4)(ξ)=O(h4)E_S = -\frac{(b - a)h^4}{180} f^{(4)}(\xi) = O(h^4)

3. Simpson's 3/8 Rule

Approximates sets of three panels with cubic polynomials.

  • Strict Constraint: Requires the number of intervals nn to be a multiple of 3. ∫abf(x) dx≈3h8[f(x0)+3f(x1)+3f(x2)+2f(x3)+3f(x4)+3f(x5)+2f(x6)+⋯+f(xn)]\int_a^b f(x)\,dx \approx \frac{3h}{8}\left[f(x_0) + 3f(x_1) + 3f(x_2) + 2f(x_3) + 3f(x_4) + 3f(x_5) + 2f(x_6) + \dots + f(x_n)\right]
  • Polynomial Exactness: Degree ≤3\le 3.
  • Global Truncation Error: E3/8=−(b−a)h480f(4)(ξ)=O(h4)E_{3/8} = -\frac{(b - a)h^4}{80} f^{(4)}(\xi) = O(h^4)

Step-by-Step Worked Problems

Worked Example: Thermal Dissipation in Curing Mass Concrete

Problem: A freshly cast mass concrete bridge pier foundation is placed at an initial core temperature of T0=65∘CT_0 = 65^\circ\text{C}. The ambient surrounding air temperature is maintained at Tm=25∘CT_m = 25^\circ\text{C}. After 4 hours4\text{ hours} of cooling, the core temperature drops to 55∘C55^\circ\text{C}. Assuming Newton's Law of Cooling governs heat transfer:

  1. Determine the cooling rate constant kk (in hr−1\text{hr}^{-1}).
  2. What will be the concrete core temperature after a total elapsed time of 12 hours12\text{ hours}?

Solution:

  1. Apply Newton's Law of Cooling formula: T(t)=Tm+(T0−Tm)e−ktT(t) = T_m + (T_0 - T_m)e^{-kt} T(t)=25+(65−25)e−kt=25+40e−ktT(t) = 25 + (65 - 25)e^{-kt} = 25 + 40e^{-kt}
  2. Use the condition at t=4 hourst = 4\text{ hours} (T=55∘CT = 55^\circ\text{C}): 55=25+40e−4k55 = 25 + 40e^{-4k} 30=40e−4k  ⟹  e−4k=3040=0.7530 = 40e^{-4k} \implies e^{-4k} = \frac{30}{40} = 0.75 −4k=ln⁡(0.75)≈−0.28768-4k = \ln(0.75) \approx -0.28768 k=0.287684≈0.07192 hr−1k = \frac{0.28768}{4} \approx 0.07192\text{ hr}^{-1}
  3. Compute the core temperature at t=12 hourst = 12\text{ hours}: T(12)=25+40e−0.07192(12)=25+40e−0.86304T(12) = 25 + 40e^{-0.07192(12)} = 25 + 40e^{-0.86304} e−0.86304=(e−4k)3=(0.75)3=0.421875e^{-0.86304} = (e^{-4k})^3 = (0.75)^3 = 0.421875 T(12)=25+40(0.421875)=25+16.875=41.88∘CT(12) = 25 + 40(0.421875) = 25 + 16.875 = 41.88^\circ\text{C}
  4. The core temperature after 12 hours12\text{ hours} is 41.88∘C41.88^\circ\text{C}.

CELE Board Exam Traps & Strategic Checklists

Warning

Simpson's Rule Parity Trap: Simpson's 1/3 Rule strictly requires an even number of subintervals nn (meaning an odd count of ordinates). If given an odd number of panels (e.g., n=5n = 5), you cannot apply Simpson's 1/3 Rule directly across the entire domain; you must combine Simpson's 1/3 for the first 4 panels and the Trapezoidal Rule for the final panel (or use Simpson's 3/8 Rule for 3 panels + 1/3 Rule for 2 panels).

Linear ODE Standard Form: Before calculating the integrating factor I(x)=e∫P(x)dxI(x) = e^{\int P(x)dx}, you must ensure the leading coefficient of dydx\frac{dy}{dx} is normalized to exactly 11. For example, if given xdydx+2y=4x2x\frac{dy}{dx} + 2y = 4x^2, divide by xx first to obtain dydx+2xy=4x\frac{dy}{dx} + \frac{2}{x}y = 4x so that P(x)=2/xP(x) = 2/x.

Newton-Raphson Sign: Remember the minus sign in xn+1=xn−f(xn)f′(xn)x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}. When f(xn)f(x_n) is negative, subtracting a negative produces an addition!

Loading diagram...
Classification and Solution Workflow for Differential Equations & Numerical Methods
Test Your Knowledge

What is the general solution of the first-order linear ordinary differential equation dy/dx + (2/x) y = 4x (for x > 0)?

A

y = x³ + C / x²

B

y = 4x² + C x²

C

y = x² + C / x²

D

y = 2x² + C / x

Test Your Knowledge

In hydraulic channel design, a civil engineer must determine the critical depth x that satisfies the transcendental energy equation f(x) = x³ - 2x - 5 = 0. Using the Newton-Raphson method with an initial trial value of x₀ = 2.0, what is the computed estimate x₁ after the first iteration?

A

2.10

B

2.15

C

2.05

D

1.90

Test Your Knowledge

A highway civil engineer uses Simpson's 1/3 Rule with 6 equal intervals (n = 6) of width h = 5.0 m to compute the cross-sectional area of an irregular cut. Which of the following statements correctly identifies the mathematical properties and constraints of this numerical method?

A

Simpson's 1/3 Rule strictly requires an even number of intervals and integrates any polynomial up to third degree (cubic) with zero theoretical truncation error.

B

Simpson's 1/3 Rule requires the number of intervals to be a multiple of 3 and yields exact results only for quadratic polynomials.

C

Simpson's 1/3 Rule requires an odd number of panels and approximates irregular boundaries using linear segments with O(h²) global error.

D

Simpson's 1/3 Rule can be applied to any arbitrary number of intervals and achieves O(h⁵) global error on transcendental profiles.

Sections you finish are checked off in the contents.