1.2 Calculus and Differential Equations
Key Takeaways
- Differentiation rules including product, quotient, and chain rules, along with L'Hôpital's Rule for indeterminate limits
- Optimization techniques using the first and second derivative tests to locate local extrema and inflection points
- Integration methods such as substitution and integration by parts for calculating reactor volumes and areas
- Solving first-order separable and linear ordinary differential equations (ODEs) using integrating factors
- Solving second-order linear homogeneous ODEs with constant coefficients and applying Laplace transforms to process control models
Calculus and differential equations represent the mathematical language of chemical engineering rate processes. Whether describing the rate of heat transfer through a reactor wall, mass transfer across a boundary layer, or the dynamic response of a feedback control loop, chemical engineers rely on differential and integral calculus to build and solve governing equations.
Differential Calculus and Optimization
Differential calculus examines rates of change. The derivative of a function $f(x)$ represents the slope of the tangent line at any point $x$ and is defined as:
The FE Reference Handbook details standard differentiation rules, including the product, quotient, and chain rules:
- Product Rule: \frac{d}{dx}[u(x)v(x)] = u'v + uv'
- Quotient Rule: \frac{d}{dx}\left[\frac{u(x)}{v(x)}\right] = \frac{u'v - uv'}{v^2}
- Chain Rule: \frac{d}{dx}[f(g(x))] = f'(g(x)) \cdot g'(x)
L'Hôpital's Rule:
For evaluating limits that result in indeterminate forms (such as $0/0$ or $\infty/\infty$), L'Hôpital's Rule states that:
provided the limit on the right exists and $g'(x)
eq 0$.
Optimization: In chemical engineering design, maximizing yields or minimizing costs requires optimization.
- Critical Points: Occur where the first derivative is zero ($f'(x) = 0$) or undefined.
- First Derivative Test: If $f'(x)$ changes from positive to negative, the point is a local maximum. If $f'(x)$ changes from negative to positive, it is a local minimum.
- Second Derivative Test: If $f'(x_c) = 0$:
- If $f''(x_c) < 0$, $x_c$ is a local maximum.
- If $f''(x_c) > 0$, $x_c$ is a local minimum.
- If $f''(x_c) = 0$, the test is inconclusive.
- Inflection Points: Points where the concavity changes, occurring where $f''(x) = 0$ and the second derivative changes sign.
In process design, optimization is applied to determine the most cost-effective operating conditions. For example, when sizing a pipe, there is a trade-off between the capital cost of the pipe (which increases with pipe diameter) and the operating cost of pumping (which decreases with diameter due to lower frictional losses). Differentiating the total cost function with respect to diameter and setting it to zero allows engineers to find the optimum economic pipe diameter.
Integral Calculus
Integration represents accumulation and is the inverse process of differentiation. The Fundamental Theorem of Calculus relates the two: where $F'(x) = f(x)$.
Key integration techniques include:
- Integration by Substitution: Letting $u = g(x)$ and $du = g'(x)dx$ to simplify the integrand.
- Integration by Parts: Derived from the product rule of differentiation: This is highly useful for integrating products of algebraic, exponential, or trigonometric functions.
Applications: Integration is widely applied to calculate the volume of a Plug Flow Reactor (PFR), where reactor volume $V$ is defined as $V = F_{A0} \int_0^X \frac{dX}{-r_A}$. It is also used to find centroids and moments of inertia. In fluid mechanics, integration is used to calculate the average velocity of a fluid across a cross-section by integrating the local velocity profile.
Ordinary Differential Equations (ODEs)
An ordinary differential equation contains functions of a single independent variable and its derivatives.
First-Order ODEs:
- Separable Equations: Can be written in the form $g(x)dx = h(y)dy$. Integrate both sides directly:
- Linear First-Order Equations: Written in the standard form: This is solved using an integrating factor, $I(x) = e^{\int P(x) dx}$. Multiplying the entire equation by $I(x)$ allows it to be written as \frac{d}{dx}[I(x)y] = I(x)Q(x), which integrates to:
First-order ODEs are commonly used to model dynamic processes, such as Newton's Law of Cooling for a heat exchanger tube, or the transient concentration change in a Continuously Stirred Tank Reactor (CSTR) during startup or disturbance.
Second-Order Linear Homogeneous ODEs with Constant Coefficients: These take the form $a y'' + b y' + c y = 0$. The characteristic equation is $a r^2 + b r + c = 0$. The roots $r_1$ and $r_2$ determine the general solution:
| Root Type | Roots | General Solution |
|---|---|---|
| Distinct Real | $r_1 \ | |
| eq r_2$ | $y(x) = C_1 e^{r_1 x} + C_2 e^{r_2 x}$ | |
| Repeated Real | $r_1 = r_2 = r$ | $y(x) = (C_1 + C_2 x) e^{r x}$ |
| Complex Conjugate | $r = \alpha \pm i\beta$ | $y(x) = e^{\alpha x} (C_1 \cos\beta x + C_2 \sin\beta x)$ |
These second-order equations represent physical systems with damping. In process control, a second-order system can be underdamped (oscillatory response), critically damped (fastest return to steady state without oscillation), or overdamped (slow response without oscillation).
Partial Differential Equations (PDEs)
Unlike ODEs, partial differential equations involve functions of multiple independent variables (such as space $x, y, z$ and time $t$) and their partial derivatives. PDEs govern transport phenomena in chemical engineering:
- Heat Equation (Parabolic): \frac{\partial T}{\partial t} = \alpha \frac{\partial^2 T}{\partial x^2} (unsteady-state heat conduction).
- Diffusion Equation (Parabolic): \frac{\partial C_A}{\partial t} = D_{AB} \frac{\partial^2 C_A}{\partial x^2} (Fick's second law for transient mass diffusion).
- Laplace Equation (Elliptic): \frac{\partial^2 T}{\partial x^2} + \frac{\partial^2 T}{\partial y^2} = 0 (steady-state two-dimensional heat conduction).
On the FE exam, you may be asked to classify a second-order PDE of the form $A \frac{\partial^2 u}{\partial x^2} + B \frac{\partial^2 u}{\partial x \partial y} + C \frac{\partial^2 u}{\partial y^2} + \dots = 0$. The classification is determined by the discriminant $B^2 - 4AC$:
- If $B^2 - 4AC < 0$, it is elliptic.
- If $B^2 - 4AC = 0$, it is parabolic.
- If $B^2 - 4AC > 0$, it is hyperbolic.
Solving these equations typically requires specifying boundary conditions, which can be Dirichlet (specified value of the variable), Neumann (specified gradient or flux), or Robin (combination of value and gradient, such as convective cooling at a boundary).
Laplace Transforms
The Laplace transform converts differential equations in the time domain ($t$) to algebraic equations in the complex frequency domain ($s$), which is essential for process dynamics and control.
The Laplace transform of $f(t)$ is defined as:
Key properties for derivatives include:
To solve an ODE using Laplace transforms:
- Apply the Laplace transform to all terms of the differential equation, converting it to an algebraic equation in terms of $F(s)$.
- Substitute the initial conditions (e.g., $f(0)$, $f'(0)$).
- Solve the algebraic equation for $F(s)$.
- Perform partial fraction expansion if necessary to break down $F(s)$ into recognizable terms.
- Apply the inverse Laplace transform $\mathcal{L}^{-1}\{F(s)\}$ to find the time-domain solution $f(t)$ using the transform table in the FE Reference Handbook.
This method is central to process control, where the ratio of the output Laplace transform to the input Laplace transform defines the transfer function of the process. Transfer functions allow engineers to evaluate system stability and design PID controllers.
Worked Example: Transient Tank Draining
A liquid storage tank drains such that the liquid height $h(t)$ satisfies the first-order differential equation: Find the liquid height as a function of time.
Solution: This is a first-order linear homogeneous ODE, which is also separable: Integrating both sides: Apply the initial condition $h(0) = 5$: Thus, the height of the liquid decays exponentially according to:
A manufacturing process produces a product where the profit P(x) as a function of the production rate x is given by P(x) = -x^3 + 12x^2 - 36x + 100. What production rate x maximizes the profit?
Solve the first-order linear differential equation dy/dx - 2xy = x with the initial condition y(0) = 1. What is the value of y(1)?
The second-order linear differential equation governing a process control model is given by d^2y/dt^2 + 4 * dy/dt + 4y = 0, with initial conditions y(0) = 2 and y'(0) = 1. What is the expression for y(t)?