ODEs and PDEs for Engineers: Differential Equations Fundamentals

(Level 4)

Level 4 introduces differential equations as the mathematical framework used to describe how quantities evolve. Unlike earlier levels, where functions are given explicitly, differential equations define relationships between a function and its derivatives.

At this stage, mathematics shifts from evaluating functions to solving equations that define functions.

Defining Functions Through Derivatives

A differential equation is an equation that contains unknown functions and their derivatives. Unlike algebraic equations, which solve for numbers, differential equations solve for functions. For example, the equation dy/dx = 2x is a differential equation that describes functions whose derivative is 2x. The solution to this equation is y = x² + C, where C is an arbitrary constant. Every function of the form y = x² + C is a solution.

Differential equations have families of solutions (i.e. one doesn't get a single answer to a problem, rather many possible solutions), additional information is needed (such as initial conditions or boundary conditions) to determine a particular solution or solutions, i.e. to choose from the family of solutions the function that one is interested in.

Example

Ordinary differential equation

dydx = 2x

The solution is not a single value, but a family of functions: the "cosecant" function, for example, is the inverse of the sine function, and the "secant" function is the reciprocal of the cosine function.

y = x² + C

Ordinary Differential Equations for Engineering Models

Ordinary refers to one independent variable, usually expressed as time (t) or position (x). In ODEs ordinary means nonpartial derivatives (dy/dx, d²y/dt²) as opposed to partial derivatives (∂y/∂x). Ordinary differential equations can be first order (one derivative) or second order (two derivatives) with higher orders also defined, although their use is often avoided due to their inordinate complexity.

First-order ODE: dy/dx = 3x²
Solution: y = x³ + C

Reuse Integration Building Blocks (RIBs) provide the means to integrate one constant. One degree of freedom.

Second-order ODE: d²y/dx² = 6x
Integrate once: dydx = 3x² + C₁
Integration for pieces together: y = x³ + C₁x + C₂

That is 2 integrated equations (with 2 constants). Having increased degrees of freedom requires additional constraints.

Why This Matters Later

Newton's second law states that F = ma. This means that, given knowledge of the force and mass of an object, we can solve for the position of the object as a function of time (x(t)). Problems that are second-order ODEs (e.g., Spring-mass systems, pendulums, and circuits with inductors) require us to do this. There are also problems that are first order ODEs, for example decay (radioactive or RC circuits), problems of population growth, and problems of cooling.

Initial and Boundary Conditions for Unique Solutions

Differential equations can have infinitely many solutions. You need initial conditions or boundary conditions in order to get a unique solution to a differential equation. Initial conditions tell you the value of the function (and possibly the derivative) at a particular point, i.e. y(0) = 1, y'(0) = 0. Boundary conditions give you information about the function at two points, i.e. y(0) = 1 and y(L) = 0. Either initial or boundary conditions will allow you to find the unique solution from all of the solutions of the differential equation.

Example: Solve the differential equation dy/dx = 2x with the initial condition y(0) = 1.
General solution: y = x² + C
ANOTHER APPLY CONDITION: 1 = 0² + C : C = 1
Unique solution: y = x² + 1

The condition selected one of the infinite number of possible cases.

Why This Matters Later

Physical problems always come with conditions. It is not enough to know the equation of motion of a mass-spring system, one also needs to know the initial displacement and velocity. Similarly for the problem of heat flow, it is not enough to know the heat equation, one also needs to know the initial temperature distribution and the temperature on the boundary. These are conditions and they are not merely a formal requirement of the mathematical formulation, they are physical information that makes a problem meaningful.

Linear vs Nonlinear Behavior in Differential Equations

These are linear differential equations, in which the function of the independent variable and its derivatives appear only to the first power. There are systematic methods for solving such equations, while for nonlinear equations, it is sometimes possible to find an analytical solution, but such instances are the exception rather than the rule. Typically, one resorts to numerical methods or qualitative behavior.

Linear ODE: dy/dx + y = eˣ

Does not involve powers of y, or products of y. These types can be solved using integrating factors and/or variation of parameters.

Nonlinear ODE: dy/dx = y²

y^2 seems to appear as a square. The equation is still separable, but many nonlinear equations cannot be solved analytically and so numerical integration is required.

Why This Matters Later

Most real engineering systems are nonlinear. Fluid dynamics (Navier-Stokes), large deflection of structures, turbulence, chaos, and systems with feedback loops all involve nonlinear differential equations. Linearization is the name of the game in order to obtain tractable approximations to realistic systems.

Systems of Differential Equations for Coupled Dynamics

But one equation is not enough. Two quantities are each varying, affecting each other. Models of predator and prey, of coupled oscillators, or of many interconnected bodies fall into this class. We have equations for the evolution of x and y together: dx/dt = f(x,y), dy/d/t = g(x,y). Solving for x yields nothing, because you do not know y. Such systems evolve together.

Example: Coupled system
dxdt = y
dydt = -x

I can think of a solution to this problem given by x(t) = cos(t) , y(t) = -sin(t) assuming x(0)=1, y(0)=0. Such solutions are called oscillatory solutions and they simply trace out a circle. Unfortunately, such solutions cannot be decoupled.

Why This Matters Later

Control theory, in particular control design, already has many years of experience with `state-space models' of systems: these are represented by the matrix differential equation dx/dt = Ax + Bu. Finite element analysis on the other hand normally produces massive systems of ODEs with thousands of equations. Numerical solvers such as Runge–Kutta methods have been developed to deal with systems like these. However, understanding systems is naturally more powerful and generally more useful than understanding static objects.

Partial Differential Equations in Space and Time

Ordinary Differential Equations (ODEs) model change with respect to a single variable. Partial Differential Equations (PDEs) model change with respect to multiple variables (often space and time). The heat equation, ∂u/∂t = α(∂²u/∂x²), is an example of a PDE that describes how the temperature u changes over time based on how curved the temperature profile is in space. Other important PDEs include the wave equation, the diffusion equation, and the Laplace equation. These equations are harder to solve than ODEs, but provide a better model of physical reality.

Heat equation (1D):
∂u∂t = α∂²u∂x²

Here we show the heat equation. The temperature, u(x,t) at a point, x, and time, t, is equal to α (thermal diffusivity) times the second derivative of u with respect to space, plus the second derivative of u with respect to time. The heat equation relates the change in temperature over time to the curvature of temperature over space.

Partial differential equations (PDEs) are categorized into elliptic, parabolic and hyperbolic types. Each type of PDE has different solution characteristics. In addition, PDEs demand different types of boundary and initial conditions for well-posed problems.

Why This Matters Later

Numerical methods for PDEs such as stress analysis, fluid flow, electromagnetic fields, and heat transfer, are almost entirely based on two approaches: finite element methods and finite difference methods. As a result most PDEs are solved as systems of algebraic equations that can be solved by computers. Very few PDEs are solved exactly by hand, so it is very important that one understands the structure of the equation you are trying to solve, so that you can properly set up a simulation, and so that you can meaningfully analyze results.

Laplace Transforms for Solving Linear Systems

Laplace transforms (ℒ{ )) turn differential equations into algebra. For example, ℒ{dy/dt} = ℒ{y'(t)} = sY(s) - y(0). Differentiation of a function yields the Laplace transform of that function multiplied by s plus the inverse transform of that function evaluated at zero, i.e. its initial condition. You solve for Y(s) in the algebraic equation and then inverse-transform back to y(t). Surprisingly, this detour around difficult differential equations can make for an easier journey.

Transform definition:
ℒ{f(t)} = F(s) = ∫₀^∞ e^(-st)f(t) dt
Key property:
ℒ{dfdt} = sF(s) - f(0)

Differentiation (calculus) converted to Multiplication (algebra).Initial Conditions are set for you.

Why This Matters Later

So the first thing to note is that Control systems engineers often use Laplace transforms for a variety of reasons, particularly for constructing transfer functions, for stability analysis, for looking at frequency response. And all of that is done in the s-domain. Now, this isn't the only way of doing things, and in some situations, another method is cleaner. However for linear time-invariant systems, the Laplace transform is certainly a clean and convenient method.

Why Engineers Use Differential Equations

Almost every fundamental physical law can be written as a differential equation. Newton's laws, Maxwell's equations, the conservation of energy, and the laws of heat transfer and fluid flow are all dynamic physical laws that describe the rates of change of various physical quantities. To model and design physical systems is to write differential equations and solve them. So it is no surprise that calculus, with its focus on derivatives and integrals, is not only consistent with physical laws, but provides the principal tools for describing and solving physical differential equations. In short, this is what engineering modeling is all about.

Apply Differential Equations in Specializations

Differential equation modeling is fundamental to several engineering specializations:

Ready for the Next Level?

Once you understand differential equations and engineering modeling, you're ready to explore advanced mathematical methods and specialized topics.

Continue to Level 5: Advanced Topics →