Methods lecture 2 Classification of Differential Equations, Taylor Series Expansions, and Finite Difference Discretization
Classification of Differential Equations: Ordinary, Partial, Initial Value, and Boundary Value Problems
Fundamental Classification by Independent Variables:
- An ordinary differential equation (ODE) contains exactly one independent variable.
- A partial differential equation (PDE) contains multiple independent variables (strictly greater than one).
Initial Value Problems (IVPs):
- An initial value problem is defined as a differential system where all boundary/initial conditions are specified at a single point in the independent variable domain.
- Because all constraints are anchored at a single location, the state of the system at any subsequent point depends strictly on the state at the initial point and intermediate history leading up to that point.
- The flow of physical information in an IVP is strictly unidirectional, propagating along a forward trajectory.
- Physical Example: A three-mass vibration system undergoing transverse displacement .
- Governed by a second-order ordinary differential equation in time .
- Requires exactly two initial conditions specified at the base time .
- Initial deflection: .
- Initial velocity / derivative: or , representing the initial slope.
- Damping behavior is governed by the damping coefficient . If , the system exhibits zero damping, resulting in undamped harmonic vibration represented by a pure cosine response: .
Boundary Value Problems (BVPs):
- A boundary value problem is defined as a differential system where conditions are specified at two or more distinct points of the independent variable domain.
- Information does not propagate in a single direction; the solution at any interior point depends simultaneously on conditions on both sides of the domain.
- Physical Example: Steady-state heat conduction across a solid block governed by a second-order ODE where temperature is a function of the spatial coordinate ().
- Because the equation is second-order with respect to space, two conditions must be specified at different boundary locations (e.g., at and ).
- If the boundary temperature on the right end is abruptly altered from degrees to degrees, or cooled to degrees, or subjected to heat flux via a parabolic solar collector directing concentrated solar rays onto the boundary, that change propagates inward and impacts the temperature at every single interior point across the entire domain.
Information Propagation: One-Way Versus Two-Way Coordinates
One-Way Coordinates:
- An independent variable along which physical information propagates strictly in one direction is termed a one-way coordinate.
- Time () serves as the primary physical archetype of a one-way coordinate.
- The solution state at any future time is entirely determined by prior history and the immediate local state; it cannot depend on states at subsequent or future times.
- Numerical Design Constraint: Numerical algorithms formulated for IVPs must reflect this physical causality by computing approximations using only current and prior states.
Two-Way Coordinates:
- An independent variable along which physical information travels in both directions simultaneously is termed a two-way coordinate.
- Spatial dimensions (, , ) typically function as two-way coordinates.
- Interior points act as bidirectional receivers where states are governed by upstream and downstream boundary conditions concurrently.
Mixed Propagation in Partial Differential Equations:
- Many physical PDEs exhibit mixed coordinate behaviors.
- Example: A PDE second-order in space and first-order in time for field variable .
- Requires specification of an initial field profile across all spatial coordinates at the base time: .
- Requires two spatial boundary conditions at the domain extremes for all .
- Information propagates unidirectionally along the temporal coordinate and bidirectionally along the spatial coordinate .
System Reduction: Converting Higher-Order Equations to First-Order Systems
Motivation for System Reduction:
- Standard numerical solvers and algorithmic integrators are designed exclusively to integrate systems of first-order differential equations.
- Any single higher-order differential equation of order can be systematically recast into an equivalent coupled system of first-order differential equations.
Transformation Procedure for an -th Order ODE:
- Introduce a set of auxiliary state variables representing the function and its successive derivatives up to order .
- Demonstration for a Third-Order Equation ():
- Define the primary state variable: .
- Define the second state variable as the first derivative of : .
- Differentiate with respect to to obtain the second derivative: .
- Represent the third derivative by isolating it in terms of , , and .
- Linear Algebraic Rearrangement Example: For an equation containing terms such as , moving terms across the equality yields a closed system of three first-order ODEs:
- Multibody Dynamics Example: The mechanical modeling of a basketball trajectory utilizes a system of coupled first-order ODEs, which is fundamentally equivalent to a single -order differential equation collapsed into component state variables.
Mathematical Foundations of Taylor Series and Continuity Requirements
Role of Taylor Series in Numerical Analysis:
- Taylor series expansions provide the foundational theoretical framework for constructing finite difference approximations and discretization schemes for differential operators.
- Taylor series converts differential operators into algebraic expressions relating discrete nodal values.
Continuity and Differentiability Hypotheses:
- Classical Taylor series expansion relies on the prerequisite that the target function is continuous and infinitely differentiable () across the analytical domain.
- Continuous and Differentiable Example: The sine function is defined, continuous, and smoothly differentiable across all .
- Continuous but Non-Differentiable Example (Ramp / Triangular Wave):
- A continuous ramp or saw-tooth wave contains sharp directional changes ("kinks").
- At each kink, the first derivative is undefined because the left-sided limit of the slope does not equal the right-sided limit of the slope:
- This results in a jump discontinuity in the derivative profile, violating the smooth differentiability requirement.
- Analytical Remedy: Functions with discontinuous slopes can be approximated using Fourier series expansions, which synthesize non-smooth waveforms into infinite linear combinations of continuous sine and cosine basis functions.
Primary Engineering Applications of Taylor Series:
- Derivation of power series representations for transcendental functions.
- Formulation of finite difference algebraic approximations for derivatives within differential equations.
Taylor Series Formulation and Truncation Error
General Formulation Around an Anchor Point:
- Let represent an anchor (base) point where the function value and all higher-order derivatives are known.
- The function value at an arbitrary neighboring target point is given by the infinite series:
Power Series Expansion of Around :
- Base function value: .
- Derivatives: for all integers .
- Substituting these derivatives into the Taylor series yields the standard exponential power series:
Convergence and Error Mechanics:
- Approximating (Exact analytical value: ):
- One-term approximation: (high percentage truncation error).
- Two-term approximation: .
- Three-term approximation: .
- Four-term approximation: .
- Incorporating successive higher-order terms systematically decreases the percentage error toward machine precision.
- Effect of Step Size on Truncation Error:
- Evaluating the series at yields significantly higher accuracy with fewer polynomial terms compared to evaluation at .
- Proximity principle: The closer the target evaluation point is to the anchor point (i.e., the smaller the displacement ), the fewer terms are required to achieve a specified error tolerance.
- Series Truncation: Numerical implementations cannot sum infinite terms. Series are truncated after a designated number of terms (e.g., retaining the first four terms), discarding all higher-order derivatives as the truncation error residue.
- Approximating (Exact analytical value: ):
Spatial Domain Discretization and Grid Indexing
One-Dimensional Discretization Mechanics:
- A continuous spatial domain of length bounded between coordinates and is partitioned into discrete sub-intervals.
- By convention, the domain origin can be defined such that .
- Partitioning the physical interval into discrete segments requires exactly discrete boundary and interior grid points.
Grid Point Numbering and Coordinate Mapping:
- Grid points are indexed using integer subscripts: .
- Index ranges: .
- In higher-dimensional domains, spatial coordinates utilize distinct spatial indices:
- for the -coordinate.
- for the -coordinate.
- for the -coordinate.
- is typically reserved as a superscript or subscript for the temporal index ().
Uniform Grid Step Size ():
- On a uniform (equidistant) mesh, the step size is constant throughout:
- For a total of uniform segments over span :
- The exact physical coordinate of the -th node is determined algebraically:
- When , this simplifies to .
- Non-Uniform Grids: Equidistant spacing simplifies algebraic formulations, but non-uniform grids are deployed when localized physical gradients demand localized spatial resolution.
- On a uniform (equidistant) mesh, the step size is constant throughout:
Compact Discrete Function Notation:
- The value of the continuous function evaluated at a discrete grid point is denoted in compact subscript form:
- The value of the continuous function evaluated at a discrete grid point is denoted in compact subscript form:
Discrete Grid Taylor Series Expansions
Forward Taylor Series Expansion ( about ):
- Anchor point: .
- Target forward point: .
- Displacement: .
- Expansion:
Backward Taylor Series Expansion ( about ):
- Anchor point: .
- Target backward point: .
- Displacement: .
- Because odd powers of produce negative signs and even powers produce positive signs, the series alternates:
Extended Forward and Backward Multi-Step Expansions:
- Double-step forward ( about ):
- Target point: .
- Displacement: .
- Expansion:
- Double-step backward ( about ):
- Target point: .
- Displacement: .
- Expansion:
- Double-step forward ( about ):
Finite Difference Approximations of Derivatives
Algorithmic Objective:
- To replace continuous derivative operators (, , etc.) with algebraic expressions involving only the discrete function values (, , , etc.), eliminating higher-order analytical derivatives from the computational scheme.
Derivation of the First-Order Forward Difference Formula:
- Truncate the forward Taylor series expansion after the linear derivative term:
- Isolate the derivative term :
- Divide through by the grid step size :
- The leading truncation error term is proportional to the first power of , classifying this as a first-order accurate forward difference approximation.
- Truncate the forward Taylor series expansion after the linear derivative term:
Geometric and Physical Interpretation:
- The continuous derivative represents the exact tangent slope to the function curve at coordinate .
- The finite difference quotient represents the slope of the secant line intersecting the two discrete coordinate points and .
- Secant slope formula corresponds directly to the "rise over run" formulation:
Impact of Stencil Width on Approximation Accuracy:
- Using a two-point stencil (, ) yields a basic first-order estimate.
- Incorporating additional information—such as two points on either side (a four-point stencil) or symmetric three-point and five-point stencils—cancels lower-order error terms in the Taylor expansions, yielding higher-order accurate algebraic formulas for the derivative.