Mathematics for Food Science & Engineering

Food Science & Technology · Foundations · also Engineering Mathematics (food technology degrees), GATE XE-A Engineering Mathematics, Calculus and Differential Equations, Mathematics I & II

13units
12chapters
6,521words
105practice questions

The calculus, linear algebra, differential equations and numerical methods behind every food engineering calculation: heat penetration curves, drying rates, reaction kinetics and process optimisation. GATE XE makes this section compulsory for every candidate who takes the Food Technology section.

In the exams: GATE XE-A (compulsory section for XE candidates); foundation for every numerical question in GATE XE-G Section 4 and ICAR AIEEA-PG Code 18 Unit II

Syllabus

  1. Matrices, determinants, rank and systems of linear equations
  2. Eigenvalues, eigenvectors and the Cayley-Hamilton theorem
  3. Limits, continuity, mean value theorems and Taylor's theorem
  4. Partial derivatives, maxima and minima and Lagrange multipliers
  5. Definite, improper and double integrals and their applications
  6. Sequences, series, power series and Fourier series
  7. Vector calculus: gradient, divergence, curl and Green's theorem
  8. Complex numbers, analytic functions and Cauchy-Riemann equations
  9. First-order and second-order ordinary differential equations
  10. Partial differential equations: one-dimensional heat equation and Laplace equation by separation of variables
  11. Numerical methods: Gauss elimination, LU decomposition, interpolation and Newton-Raphson
  12. Numerical integration and Euler's method for ODEs
  13. Applications in food science: first-order kinetics, exponential decay and logarithmic survivor curves

Study manual

Mathematics is the language in which food engineering is written. A heat penetration curve, a drying-rate curve, the decline of a vitamin during storage, the flow of a sauce through a pipe and the optimum recipe from a designed experiment are all described by functions, derivatives, integrals and equations. A food technologist who can set up and solve these equations can size a heat exchanger, predict a shelf life, calculate the lethality of a sterilisation process or decide whether two analytical methods agree; one who cannot is limited to reading other people's tables.

This subject covers the engineering mathematics that food science and engineering degrees teach in their first two years: linear algebra (matrices, determinants, rank, systems of equations, eigenvalues), single- and multi-variable calculus (limits, mean value theorems, Taylor series, partial derivatives, optimisation with and without constraints, single and double integrals), infinite and Fourier series, vector calculus, complex variables, ordinary and partial differential equations, and the numerical methods used when equations cannot be solved by hand. Each chapter ends its theory with the food engineering problems that use it, and the last chapter brings them together in the kinetics of microbial death and quality loss.

Engineering mathematics is examined in most graduate engineering entrance examinations, where it is usually a compulsory section for candidates who choose food technology as their subject area; in university entrance and postgraduate admission tests in food science and engineering; and in national technical qualifications for food engineers. The questions are short and computational: find a rank, an eigenvalue, a limit, a critical point, an integral, the solution of an ODE or one step of a numerical method, usually with numeric answers. The practice questions with this manual follow that pattern and give the full working for every calculation.

1. 1. Matrices, determinants, rank and systems of linear equations

Matrices and determinants

A matrix is a rectangular array of numbers; an m × n matrix has m rows and n columns. A square matrix A is symmetric if it equals its transpose (A = Aᵀ), skew-symmetric if A = −Aᵀ (its diagonal is then zero), orthogonal if AᵀA = I, and singular if its determinant is zero. Matrix multiplication AB is defined only when the number of columns of A equals the number of rows of B, and in general AB ≠ BA.

The determinant of a 2 × 2 matrix [[a, b], [c, d]] is ad − bc. Larger determinants are expanded by cofactors along any row or column, or, more efficiently, reduced to triangular form, because the determinant of a triangular matrix is the product of its diagonal elements. The rules students use most are: det(Aᵀ) = det(A); det(AB) = det(A)·det(B); swapping two rows changes the sign; adding a multiple of one row to another leaves the determinant unchanged; multiplying one row by k multiplies the determinant by k, so for an n × n matrix det(kA) = kⁿ det(A); a matrix with two identical or proportional rows has determinant zero; and det(A⁻¹) = 1/det(A).

A square matrix has an inverse only if its determinant is non-zero, and then A⁻¹ = adj(A)/det(A), where the adjoint is the transpose of the matrix of cofactors. For [[a, b], [c, d]] the inverse is (1/(ad − bc))·[[d, −b], [−c, a]]. For example, [[1, 2], [3, 4]] has determinant 4 − 6 = −2 and inverse [[−2, 1], [1.5, −0.5]]. Inverses of large matrices are never computed by cofactors in practice; Gauss elimination and LU decomposition (chapter 11) are used instead.

Rank and the solution of linear systems

The rank of a matrix is the number of linearly independent rows (equal to the number of linearly independent columns), the order of its largest non-zero minor, and the number of non-zero rows left after reduction to row-echelon form. A 3 × 3 matrix whose second row is twice its first, such as [[1, 2, 3], [2, 4, 6], [1, 0, 1]], has rank 2.

A system of m linear equations in n unknowns, Ax = b, is tested with the augmented matrix [A | b]. The system is consistent only if rank(A) = rank([A | b]). If that common rank equals n, the solution is unique; if it is r < n, there are infinitely many solutions with n − r free parameters. If rank(A) < rank([A | b]), the system is inconsistent and has no solution. A homogeneous system Ax = 0 always has the trivial solution x = 0; a square homogeneous system has non-trivial solutions only if det(A) = 0. Cramer's rule, xᵢ = det(Aᵢ)/det(A), solves a square system with non-zero determinant and is convenient for two or three unknowns.

Food formulation is linear algebra. Suppose a technologist must blend three ingredients so that the blend has a set mass, protein content and fat content. Each constraint is one linear equation in the three ingredient masses; the composition matrix must be non-singular for a unique blend to exist. With only two ingredients and one target, the Pearson square gives the same answer as the two-equation system: blending a 10 per cent protein flour with a 40 per cent protein concentrate to reach 25 per cent needs equal masses, because 0.10x + 0.40(1 − x) = 0.25 gives x = 0.5. Mass balances over mixers, separators and evaporators with several components also give linear systems, and the rank tells the engineer whether enough streams have been measured to close the balance.

Remember

2. 2. Eigenvalues, eigenvectors and the Cayley-Hamilton theorem

Eigenvalues and eigenvectors

A non-zero vector v is an eigenvector of a square matrix A if Av = λv for some scalar λ, the eigenvalue. The eigenvalues are the roots of the characteristic equation det(A − λI) = 0, a polynomial of degree n. For each eigenvalue, the eigenvectors are the non-zero solutions of (A − λI)v = 0. For A = [[2, 1], [1, 2]] the characteristic equation is (2 − λ)² − 1 = 0, so λ = 1 and λ = 3, with eigenvectors along (1, −1) and (1, 1).

Several properties save time in examinations. The sum of the eigenvalues equals the trace (the sum of the diagonal elements) and their product equals the determinant, so a matrix is singular exactly when one eigenvalue is zero. The eigenvalues of a triangular or diagonal matrix are its diagonal elements. If λ is an eigenvalue of A, then λᵏ is an eigenvalue of Aᵏ, 1/λ of A⁻¹, λ + c of A + cI and cλ of cA, with the same eigenvectors. A and Aᵀ have the same eigenvalues. A real symmetric matrix has real eigenvalues and eigenvectors for distinct eigenvalues that are orthogonal; this is why a covariance matrix can always be diagonalised. Eigenvectors belonging to distinct eigenvalues of any matrix are linearly independent, and an n × n matrix with n independent eigenvectors can be written as A = PDP⁻¹, with D diagonal, which makes powers easy: Aᵏ = PDᵏP⁻¹.

The Cayley-Hamilton theorem and uses in food science

The Cayley-Hamilton theorem states that every square matrix satisfies its own characteristic equation. If the characteristic polynomial of a 2 × 2 matrix is λ² − 5λ + 6 = 0, then A² − 5A + 6I = 0. Multiplying by A⁻¹ gives A − 5I + 6A⁻¹ = 0, so A⁻¹ = (5I − A)/6, an inverse obtained without cofactors; multiplying by A repeatedly expresses any higher power of A as a combination of A and I. For a 2 × 2 matrix the characteristic polynomial is always λ² − (trace)λ + det.

Eigen-analysis appears in food science in at least three places. In chemometrics, principal component analysis of spectra or sensory data finds the eigenvectors of the covariance (or correlation) matrix; the eigenvalues give the variance explained by each component, and their sum equals the total variance (the trace). In compartmental models, such as a drug or a contaminant moving between body compartments or a solute moving between phases, the system dx/dt = Ax has solutions that are sums of terms e^(λt) times eigenvectors, so negative real eigenvalues mean decay to equilibrium and the least negative one sets the slow time constant. In Markov-chain models of, for example, consumer brand switching, the steady state is the eigenvector of the transition matrix for eigenvalue 1. In each case the mathematics is the same: find det(A − λI) = 0, then the vectors.

Remember

3. 3. Limits, continuity, mean value theorems and Taylor's theorem

Limits, continuity and differentiability

The limit of f(x) as x approaches a is L if f(x) can be made as close to L as desired by taking x close enough to a. The standard limits are sin x / x → 1 as x → 0, (1 + 1/n)ⁿ → e as n → ∞, (eˣ − 1)/x → 1 and ln(1 + x)/x → 1 as x → 0. Indeterminate forms 0/0 and ∞/∞ are resolved by L'Hôpital's rule: the limit of f/g equals the limit of f′/g′ if the latter exists. Other forms (0·∞, ∞ − ∞, 1^∞, 0⁰, ∞⁰) are first rearranged into 0/0 or ∞/∞, often by taking logarithms. For example, the limit of (1 − cos x)/x² as x → 0 is 1/2, obtained by applying the rule twice.

A function is continuous at a if f(a) is defined, the limit exists, and the two are equal. It is differentiable at a if the limit of (f(a + h) − f(a))/h exists. Differentiability implies continuity, but not the reverse: |x| is continuous at 0 but has a corner there, with left derivative −1 and right derivative +1. Food properties often change abruptly: the apparent specific heat of a food has a sharp peak at the initial freezing point, and enthalpy has a change of slope there, so models of freezing must handle functions that are continuous but not smooth.

Mean value theorems and Taylor's theorem

Rolle's theorem: if f is continuous on [a, b], differentiable on (a, b) and f(a) = f(b), then f′(c) = 0 for some c between a and b. Lagrange's mean value theorem removes the equal-end condition: f′(c) = (f(b) − f(a))/(b − a) for some c in (a, b), so the instantaneous rate somewhere equals the average rate. For f(x) = x² on [1, 3], the average slope is (9 − 1)/2 = 4, and f′(c) = 2c = 4 at c = 2. Cauchy's mean value theorem generalises this to the ratio of two functions and is the basis of L'Hôpital's rule.

Taylor's theorem expresses a smooth function near a point a as f(a) + f′(a)(x − a) + f″(a)(x − a)²/2! + … plus a remainder; with a = 0 it is the Maclaurin series. The series to remember are eˣ = 1 + x + x²/2! + x³/3! + …, ln(1 + x) = x − x²/2 + x³/3 − … for −1 < x ≤ 1, sin x = x − x³/3! + …, cos x = 1 − x²/2! + …, and the binomial series (1 + x)ⁿ = 1 + nx + n(n − 1)x²/2! + … for |x| < 1.

Engineers use Taylor's theorem to linearise. Near a reference temperature the Arrhenius rate constant can be approximated by an exponential in temperature difference, which is why the z-value model of thermal death and the Arrhenius model agree over a narrow temperature range but diverge over a wide one. Small-argument approximations, e^(−x) ≈ 1 − x and ln(1 + x) ≈ x, simplify kinetic and heat-transfer expressions when x is much less than one, and the size of the first neglected term tells how large the error is. Finite-difference formulas in numerical methods (chapters 11 and the modelling subjects) are also derived from truncated Taylor series.

Remember

4. 4. Partial derivatives, maxima and minima and Lagrange multipliers

Partial derivatives and the total differential

For a function of several variables, f(x, y), the partial derivative ∂f/∂x is the derivative with y held constant. For smooth functions the mixed partials are equal, f_xy = f_yx. The total differential df = f_x dx + f_y dy estimates the change in f for small changes in x and y. It is the basis of error propagation: if the density of a cylindrical sample is ρ = m/(πr²h), then the relative error is dρ/ρ = dm/m − 2dr/r − dh/h, so a 1 per cent error in the radius contributes 2 per cent to the density error. In general, for a product of powers the relative errors add, weighted by the powers.

The chain rule for composite functions states that if z = f(x, y) with x and y functions of t, then dz/dt = f_x dx/dt + f_y dy/dt. Euler's theorem on homogeneous functions states that if f is homogeneous of degree n, meaning f(tx, ty) = tⁿf(x, y), then x f_x + y f_y = n f. Implicit differentiation follows from the total differential: if F(x, y) = 0 then dy/dx = −F_x/F_y.

Extrema with and without constraints

A critical point of f(x, y) is where f_x = f_y = 0. The second-derivative test classifies it using D = f_xx f_yy − (f_xy)². If D > 0 and f_xx < 0, the point is a local maximum; if D > 0 and f_xx > 0, a local minimum; if D < 0, a saddle point; if D = 0, the test is inconclusive. For f(x, y) = x² + y² − 4x − 6y the only critical point is (2, 3), with D = 4 > 0 and f_xx = 2 > 0, a minimum. In food research the fitted second-order polynomials of response surface methodology are analysed in exactly this way: the stationary point of the fitted surface is a maximum, minimum or saddle, and the response surface subject in statistics adds canonical analysis to the same idea.

When the variables are tied by a constraint g(x, y) = c, the method of Lagrange multipliers finds extrema by solving ∇f = λ∇g together with the constraint. The classic packaging problem is the cylindrical can of fixed volume V = πr²h that uses the least metal, so the surface area A = 2πr² + 2πrh is minimised. The Lagrange conditions give 4πr + 2πh = λ·2πrh and 2πr = λπr²; eliminating λ gives h = 2r, a can whose height equals its diameter. Real cans depart from this because the ends are thicker than the body, seams use material, and handling and labelling favour other shapes, but the calculation shows how a constraint changes an optimum. The same method appears in least-cost formulation with a nutrient constraint, in allocating a fixed energy supply between process steps and in the economics of production.

Remember

5. 5. Definite, improper and double integrals and their applications

Definite and improper integrals

The fundamental theorem of calculus links integration and differentiation: if F′ = f, then the integral of f from a to b is F(b) − F(a). Useful properties include reversal of limits changing the sign; the integral of an odd function over a symmetric interval [−a, a] being zero; and the integral of an even function over [−a, a] being twice that over [0, a]. Integration by parts, ∫u dv = uv − ∫v du, handles products such as x eˣ, and substitution handles composite functions.

An improper integral has an infinite limit or an integrand that is unbounded on the interval; it is defined as a limit and converges if the limit is finite. The p-integrals are the reference cases: the integral of 1/xᵖ from 1 to ∞ converges only if p > 1, and from 0 to 1 converges only if p < 1. The integral of e^(−ax) from 0 to ∞ is 1/a for a > 0, and the Gaussian integral of e^(−x²) over the whole real line is √π. The gamma function, Γ(n) = ∫₀^∞ x^(n−1) e^(−x) dx, satisfies Γ(n + 1) = nΓ(n), so Γ(n + 1) = n! for whole numbers, and Γ(1/2) = √π.

In food engineering, integration accumulates a rate over time. The lethality of a heat process is F = ∫ 10^((T − T_ref)/z) dt, the time integral of the lethal rate; the total heat removed during cooling is the integral of the heat flow; and the total moisture lost during drying is the integral of the drying rate. When the integrand is known only at measured times, the integral is evaluated numerically (chapter 11).

Double integrals and their applications

A double integral ∬f(x, y) dA sums f over a region of the plane. Over a rectangle it is evaluated as an iterated integral in either order. Over a general region the limits of the inner integral depend on the outer variable, and changing the order of integration requires redrawing the region and rewriting the limits: the region 0 ≤ x ≤ 1, x² ≤ y ≤ x can also be described as 0 ≤ y ≤ 1, y ≤ x ≤ √y. For regions with circular symmetry, polar coordinates are easier, with x = r cos θ, y = r sin θ and dA = r dr dθ; the factor r is the Jacobian and is the most commonly forgotten step.

Applications follow from what is being summed. With f = 1 the double integral gives the area of the region; with f a height it gives a volume; dividing ∬f dA by the area gives the mean value of f over the region. A mass is the integral of density, and a centroid is the first moment divided by the area. In food engineering, the volume-average temperature of a can cross-section, the mean concentration of a solute in a slice during diffusion, and the total heat in a cylindrical product all require integration over an area or a volume. For a circle of radius R the area is ∫₀^(2π)∫₀^R r dr dθ = πR², which checks the Jacobian.

Remember

6. 6. Sequences, series, power series and Fourier series

Convergence of sequences and series

A sequence converges if its terms approach a finite limit. An infinite series Σaₙ converges if its partial sums converge. If Σaₙ converges, then aₙ → 0; the converse is false, as the harmonic series Σ1/n shows, since it diverges although its terms approach zero. The geometric series Σarⁿ (n from 0) converges to a/(1 − r) when |r| < 1 and diverges otherwise. The p-series Σ1/nᵖ converges only for p > 1.

The tests used most are: comparison with a known series; the ratio test, in which L = lim|aₙ₊₁/aₙ| gives convergence if L < 1, divergence if L > 1 and no conclusion if L = 1; the root test using lim|aₙ|^(1/n) with the same thresholds; the integral test for positive decreasing terms; and Leibniz's test for alternating series, which converge if the terms decrease in magnitude to zero. A series is absolutely convergent if Σ|aₙ| converges, and absolute convergence implies convergence.

A power series Σaₙ(x − c)ⁿ converges for |x − c| < R, the radius of convergence, which can be found from R = lim|aₙ/aₙ₊₁| when that limit exists. The series for eˣ has infinite radius; the series for 1/(1 − x) and ln(1 + x) have radius 1. Inside the radius, a power series can be differentiated and integrated term by term.

Fourier series

A periodic function f(x) with period 2L that satisfies the Dirichlet conditions (finite numbers of maxima, minima and discontinuities in a period, and bounded) can be represented by a Fourier series: f(x) = a₀/2 + Σ[aₙ cos(nπx/L) + bₙ sin(nπx/L)], with aₙ = (1/L)∫ f(x) cos(nπx/L) dx and bₙ = (1/L)∫ f(x) sin(nπx/L) dx over one period. With this convention a₀/2 is the mean value of f over the period. Even functions have only cosine terms (bₙ = 0); odd functions have only sine terms (aₙ = 0). At a jump discontinuity the series converges to the average of the left and right limits. A function defined only on [0, L] can be extended as an even function (a half-range cosine series) or an odd function (a half-range sine series), and the choice depends on the boundary conditions of the problem.

Fourier series are the heart of the analytical solutions of heat conduction and diffusion. The temperature in a slab heated from both faces is a sum of terms, each a sine or cosine in position multiplied by a decaying exponential in time; the higher terms decay much faster than the first. For Fourier numbers above about 0.2 the first term alone describes the centre temperature closely, which is why heat-penetration curves become straight lines on semi-logarithmic paper after an initial lag, and why the slope parameter f_h of the Ball formula method is a property of the first term of a series. Periodic process signals, such as temperature fluctuations from an on-off controller, are also analysed by their Fourier components.

Remember

7. 7. Vector calculus: gradient, divergence, curl and Green's theorem

Gradient, divergence and curl

For a scalar field φ(x, y, z), the gradient ∇φ = (φ_x, φ_y, φ_z) is a vector that points in the direction of fastest increase of φ, has magnitude equal to that maximum rate, and is normal to the level surfaces φ = constant. The directional derivative in the direction of a unit vector u is ∇φ·u; it must use a unit vector, so a given direction is first divided by its length. For φ = x² + y² + z² at (1, 1, 1), ∇φ = (2, 2, 2) and the directional derivative along (1, 0, 0) is 2.

For a vector field F = (P, Q, R), the divergence ∇·F = P_x + Q_y + R_z is a scalar that measures net outflow per unit volume, and the curl ∇×F is a vector that measures local rotation. A field with zero divergence is solenoidal; a field with zero curl is irrotational and can be written as the gradient of a scalar potential. Two identities always hold for smooth fields: the curl of a gradient is zero, and the divergence of a curl is zero. The divergence of a gradient is the Laplacian, ∇²φ = φ_xx + φ_yy + φ_zz.

These operators carry the physics of transport. Fourier's law of heat conduction is q = −k∇T: heat flows down the temperature gradient. Fick's first law of diffusion has the same form for mass. The continuity equation for an incompressible fluid is ∇·v = 0. Combining Fourier's law with an energy balance gives the heat equation ∂T/∂t = α∇²T, which is solved in chapter 10.

Line integrals, Green's theorem and the integral theorems

A line integral of a vector field along a curve, ∫F·dr, gives the work done by a force or the circulation of a flow. If F is the gradient of a potential φ, the line integral depends only on the end points, equal to φ(end) − φ(start), and around any closed curve it is zero.

Green's theorem in the plane converts a line integral around a closed curve C into a double integral over the region D it encloses: ∮(P dx + Q dy) = ∬(∂Q/∂x − ∂P/∂y) dA, with C traversed anticlockwise. Taking P = −y/2 and Q = x/2 gives the area of D as (1/2)∮(x dy − y dx), the principle of the planimeter. The Gauss divergence theorem extends the idea to three dimensions: the outward flux of F through a closed surface equals the volume integral of ∇·F inside it. Stokes' theorem relates the circulation around a curve to the flux of the curl through any surface bounded by the curve.

The divergence theorem is how conservation equations are derived. The rate of accumulation of heat in a small volume equals the net heat flowing in through its surface, plus any heat generated; converting the surface integral to a volume integral and letting the volume shrink gives the differential energy equation. Every heat-, mass- and momentum-transfer equation in food engineering, from the heating of a can to the flow of a sauce through a pipe, is obtained this way.

Remember

8. 8. Complex numbers, analytic functions and Cauchy-Riemann equations

Complex numbers

A complex number z = x + iy, with i² = −1, has real part x, imaginary part y, modulus |z| = √(x² + y²) and argument θ = arg z, the angle with the positive real axis. In polar form z = r(cos θ + i sin θ) = re^(iθ) by Euler's formula. Multiplication multiplies moduli and adds arguments; division divides moduli and subtracts arguments. De Moivre's theorem gives (cos θ + i sin θ)ⁿ = cos nθ + i sin nθ, which yields powers and the n distinct nth roots of a number, equally spaced around a circle. The complex conjugate z̄ = x − iy satisfies z z̄ = |z|².

Complex numbers are a practical tool in food engineering. In oscillatory rheology a small sinusoidal strain is applied to a sample and the stress response is described by the complex modulus G* = G′ + iG″, where the storage modulus G′ measures elastic, solid-like behaviour and the loss modulus G″ measures viscous, liquid-like behaviour. The magnitude |G*| = √(G′² + G″²), and the loss tangent tan δ = G″/G′ is below one for gel-like samples and above one for liquid-like ones. The same algebra describes electrical impedance in dielectric heating and impedance spectroscopy of tissues, and the response of control loops in frequency analysis.

Analytic functions and the Cauchy-Riemann equations

A complex function f(z) = u(x, y) + iv(x, y) is analytic in a region if it has a derivative at every point there. A necessary condition is that u and v satisfy the Cauchy-Riemann equations, u_x = v_y and u_y = −v_x; if the partial derivatives are also continuous, the conditions are sufficient. Polynomials, eᶻ, sin z and cos z are analytic everywhere; z̄ and |z|² are not analytic anywhere except, for |z|², the point z = 0 where it is differentiable but still not analytic. The real and imaginary parts of an analytic function are harmonic: each satisfies Laplace's equation, u_xx + u_yy = 0. Given u, the harmonic conjugate v is found by integrating the Cauchy-Riemann equations; for u = x² − y², v = 2xy, so f = z².

Cauchy's integral theorem states that the integral of an analytic function around a closed curve, within a region where it is analytic, is zero. Cauchy's integral formula gives f(a) = (1/2πi)∮f(z)/(z − a) dz for a inside the curve. The residue theorem extends this to functions with isolated singularities: the closed integral equals 2πi times the sum of the residues inside. For a simple pole at a, the residue of f is the limit of (z − a)f(z). These results evaluate real integrals that are hard by elementary methods and underpin the Laplace transform inversion used in process dynamics. Because analytic functions map solutions of Laplace's equation to solutions, conformal mapping was historically used to solve steady two-dimensional heat-conduction and potential-flow problems, now usually solved numerically.

Remember

9. 9. First-order and second-order ordinary differential equations

First-order equations

An ordinary differential equation relates a function of one variable to its derivatives; its order is that of the highest derivative and its degree is the power of that derivative once the equation is free of radicals. First-order equations are solved by recognising their type. Separable equations, dy/dx = g(x)h(y), are solved by integrating dy/h(y) = g(x)dx. Linear equations, dy/dx + P(x)y = Q(x), are solved with the integrating factor e^(∫P dx): y·e^(∫P dx) = ∫Q e^(∫P dx) dx + C. Exact equations, M dx + N dy = 0 with ∂M/∂y = ∂N/∂x, have a potential function whose level curves are the solutions. Bernoulli equations, dy/dx + Py = Qyⁿ, become linear with the substitution v = y^(1−n).

First-order equations describe most simple food processes. Newton's law of cooling, dT/dt = −k(T − T_a), is separable and gives T − T_a = (T₀ − T_a)e^(−kt): the temperature difference decays exponentially. It is exact for a body with negligible internal resistance, the lumped-capacitance case, which applies when the Biot number hL/k is below about 0.1, and then k = hA/(ρcV). A stirred tank of volume V into which brine of concentration c_in flows at rate q, with outflow at the same rate, obeys V dc/dt = q(c_in − c), giving an exponential approach to c_in with time constant V/q. First-order microbial death and nutrient loss (chapter 12) are the same equation again.

Second-order linear equations with constant coefficients

The equation ay″ + by′ + cy = f(x) is solved as y = y_c + y_p, the complementary function plus a particular integral. The complementary function comes from the auxiliary equation am² + bm + c = 0. Two distinct real roots m₁ and m₂ give y_c = C₁e^(m₁x) + C₂e^(m₂x); a repeated root m gives (C₁ + C₂x)e^(mx); complex roots α ± iβ give e^(αx)(C₁ cos βx + C₂ sin βx). For y″ − 5y′ + 6y = 0 the roots are 2 and 3; for y″ + 4y = 0 they are ±2i, giving sinusoidal solutions with angular frequency 2. The particular integral is found by undetermined coefficients (guessing a form like the forcing function, multiplied by x when the guess duplicates a term of y_c) or by variation of parameters. The Euler-Cauchy equation x²y″ + axy′ + by = 0 is solved by trying y = xᵐ, which gives m(m − 1) + am + b = 0.

Second-order equations arise wherever two first-order effects combine. Steady conduction with heat generation in a slab, such as ohmic or microwave heating, gives k d²T/dx² + q = 0. Steady heat transfer along a fin or a thin probe with convection to the surroundings gives d²θ/dx² − m²θ = 0, with exponential or hyperbolic solutions. A damped spring-mass system, such as a vibrating screen or a texture-analyser probe, is described by m x″ + c x′ + k x = F(t): it is overdamped, critically damped or underdamped as c² − 4mk is positive, zero or negative. Two tanks in series, or a thermometer in a well, give second-order dynamics that are analysed the same way in process control.

Remember

10. 10. Partial differential equations: one-dimensional heat equation and Laplace equation by separation of variables

Classification and the heat equation

A second-order linear partial differential equation A u_xx + B u_xy + C u_yy + (lower-order terms) = 0 is classified by its discriminant B² − 4AC: negative gives an elliptic equation (Laplace's equation u_xx + u_yy = 0, for steady states), zero a parabolic one (the heat equation u_t = α u_xx, for diffusion), and positive a hyperbolic one (the wave equation u_tt = c² u_xx, for vibration). The type decides what boundary and initial conditions make the problem well posed: the heat equation needs one initial condition and two boundary conditions in x.

The one-dimensional heat equation ∂T/∂t = α ∂²T/∂x², where α = k/(ρc_p) is the thermal diffusivity, describes conduction in a slab. Fick's second law of diffusion, ∂c/∂t = D ∂²c/∂x², has exactly the same form, so every solution for heating also solves moisture or salt diffusion with D in place of α. Separation of variables tries T(x, t) = X(x)·τ(t). Substituting gives X″/X = τ′/(ατ) = −λ², a constant because the left side depends only on x and the right only on t. Then τ = e^(−αλ²t) and X = A cos λx + B sin λx. For a slab of thickness L with both faces held at zero (measuring temperature from the surface temperature), X(0) = X(L) = 0 forces A = 0 and λ = nπ/L. The solution is T = Σ bₙ sin(nπx/L) exp(−α n²π² t/L²), with bₙ the Fourier sine coefficients of the initial temperature profile.

What the solution means for food processing, and Laplace's equation

Three features of this solution are used every day in food engineering. First, time enters only through the dimensionless Fourier number Fo = αt/L², so a slab twice as thick takes four times as long to reach the same centre temperature, and a material with half the diffusivity takes twice as long. Second, the terms decay at rates proportional to n², so after a short time only the first term matters; the logarithm of the centre temperature difference then falls linearly with time, the straight-line part of a heat-penetration curve. Third, when the surface is cooled or heated by a fluid rather than held at a fixed temperature, the boundary condition involves the Biot number Bi = hL/k, the eigenvalues change, and the solutions are tabulated as Heisler charts or one-term approximations. The same separation applies to a cylinder and a sphere, with Bessel functions and sin(λr)/r replacing sines.

Laplace's equation, u_xx + u_yy = 0, describes the steady temperature in a region with no heat generation, and also potential flow and steady diffusion. In a rectangle with three edges at zero and one edge with a prescribed temperature, separation gives products of sines in one direction and hyperbolic sines in the other, again summed as a Fourier series to fit the non-zero edge. Solutions of Laplace's equation have no interior maxima or minima, so the hottest and coldest points of a steady conduction problem lie on the boundary. Real foods have irregular shapes and temperature-dependent properties, and the modelling subject solves these equations numerically by finite differences and finite elements, but the analytical solutions remain the check on every numerical model.

Remember

11. 11. Numerical methods: linear systems, interpolation, roots, integration and Euler's method

Linear systems, interpolation and root finding

Gauss elimination solves Ax = b by reducing A to upper-triangular form with row operations and then back-substituting; it needs of the order of n³/3 multiplications. Partial pivoting, swapping rows to bring the largest available element to the pivot position, avoids division by small numbers and controls round-off. LU decomposition factorises A = LU into lower- and upper-triangular matrices (Doolittle's method puts ones on the diagonal of L, Crout's on U); once A is factorised, each new right-hand side needs only a forward and a back substitution, which is efficient when the same system is solved repeatedly, as in a time-stepping heat-transfer model. Iterative methods (Jacobi, Gauss-Seidel) converge when the matrix is diagonally dominant and suit the large sparse systems of finite-difference models.

Interpolation estimates values between tabulated points, such as steam-table properties or thermal-death data. The Lagrange polynomial through n + 1 points has degree at most n; Newton's forward-difference formula builds the same polynomial from a difference table for equally spaced data. Linear interpolation between (x₀, y₀) and (x₁, y₁) gives y = y₀ + (x − x₀)(y₁ − y₀)/(x₁ − x₀).

Roots of f(x) = 0 are found iteratively. Bisection halves a bracketing interval each step, so it always converges, but only linearly, gaining one binary digit per step. Newton-Raphson uses x_(n+1) = xₙ − f(xₙ)/f′(xₙ) and converges quadratically near a simple root, roughly doubling the number of correct digits each step, but it can fail if f′ is near zero or the start is poor. For f(x) = x² − 2 from x₀ = 1, one step gives 1.5 and the next 1.4167, already close to √2 = 1.4142. The secant method replaces f′ by a difference quotient. Engineers use these methods for implicit equations such as the Colebrook equation for pipe friction or the eigenvalue equation of a Biot-number heat-transfer problem.

Numerical integration and Euler's method for ODEs

The trapezoidal rule approximates an integral with step h as (h/2)[y₀ + 2(y₁ + y₂ + … + y_(n−1)) + yₙ]; its error falls as h², and it is exact for straight lines. Simpson's one-third rule, (h/3)[y₀ + 4(y₁ + y₃ + …) + 2(y₂ + y₄ + …) + yₙ], needs an even number of intervals, has error proportional to h⁴, and is exact for polynomials up to the third degree. Simpson's three-eighths rule uses groups of three intervals. The general (improved general) method of thermal-process calculation is numerical integration: the cold-point temperatures recorded at equal time steps are converted to lethal rates 10^((T − 121.1)/z) and summed by the trapezoidal or Simpson rule to give F₀.

Euler's method solves dy/dt = f(t, y) by stepping y_(n+1) = yₙ + h f(tₙ, yₙ): it follows the tangent at the start of each step. Its global error is proportional to h, so halving the step roughly halves the error. For dy/dt = −0.1y with y(0) = 100 and h = 1, one step gives 90, against the exact 100e^(−0.1) = 90.48. The modified Euler (Heun) method averages the slopes at the start and the predicted end of the step and has error proportional to h²; the classical fourth-order Runge-Kutta method combines four slope evaluations and has error proportional to h⁴, the workhorse for systems of ODEs in drying, fermentation and kinetic models. Explicit methods become unstable when the step is too large relative to the fastest time constant; for the decay equation with rate k, Euler's method oscillates or diverges unless h < 2/k. The same limit appears in the explicit finite-difference solution of the heat equation, where the mesh Fourier number αΔt/Δx² must not exceed 1/2.

Remember

12. 12. Applications in food science: first-order kinetics, exponential decay and logarithmic survivor curves

Reaction orders and exponential decay

Most changes in food during processing and storage can be described by the rate equation dC/dt = −kCⁿ, where C is the concentration of a nutrient, a pigment, a flavour or a population of microbes, k the rate constant and n the order. Zero-order reactions (n = 0) lose a constant amount per unit time, C = C₀ − kt; non-enzymatic browning and some lipid-oxidation indicators in the early stage behave this way. First-order reactions (n = 1) lose a constant fraction per unit time: integrating dC/dt = −kC gives ln(C/C₀) = −kt, or C = C₀e^(−kt). The half-life is t₁/₂ = ln 2/k = 0.693/k, independent of the starting concentration; a vitamin with k = 0.0231 per minute has a half-life of 30 minutes. Second-order reactions give 1/C − 1/C₀ = kt. The order is identified by which transformation (C, ln C or 1/C against time) gives a straight line, and k is the slope found by linear regression.

The temperature dependence of k is described by the Arrhenius equation, k = A e^(−Ea/RT), so ln k plotted against 1/T (in kelvin) is a straight line of slope −Ea/R. The ratio of rate constants at two temperatures is k₂/k₁ = exp[(Ea/R)(1/T₁ − 1/T₂)]. Shelf-life work often uses Q₁₀, the factor by which the rate increases for a 10 °C rise: a reaction with Q₁₀ = 2 runs eight times faster at 30 °C above the reference. These are the equations behind accelerated shelf-life testing, which is valid only when the mechanism does not change with temperature.

Logarithmic survivor curves, D and z values

Microbial inactivation by heat is usually treated as first order. The survivor curve, log₁₀N against time at constant temperature, is then a straight line, and its negative reciprocal slope is the decimal reduction time D, the time for a tenfold (one log) reduction: log₁₀(N₀/N) = t/D. Because log₁₀ and ln differ by the factor ln 10 = 2.303, D = 2.303/k. A process of n D-values reduces the population by n logs: with D = 4 minutes, a 6-log reduction needs 24 minutes, and starting from 10⁶ spores per container the expected survivor count is 10⁰ = 1 per container, so a 12-log reduction is needed to bring it to 10⁻⁶. The z value is the temperature change that changes D tenfold: log₁₀(D₁/D₂) = (T₂ − T₁)/z. With z = 10 °C, a process at 131.1 °C has one-tenth the D-value it has at 121.1 °C. The equivalent time at a reference temperature is the lethality F = ∫10^((T − T_ref)/z) dt (chapter 5).

Not all survivor curves are straight. Shoulders appear when cells must be injured before they die or when clumps act as single units; tails appear with resistant subpopulations or protective food matrices. The Weibull model, log₁₀(N/N₀) = −(t/δ)ᵖ, describes these curves with a scale parameter δ and a shape parameter p; p = 1 gives the log-linear model, p < 1 a concave curve with tailing and p > 1 a convex curve with a shoulder. Fitting such models is non-linear regression, done numerically, and the uncertainty in the fitted parameters carries into the uncertainty of the process design. A food technologist moves constantly between the exponential and logarithmic forms of the same equation, and most numerical slips in examinations come from mixing log₁₀ with ln or minutes with seconds.

Remember

What the exams ask

How it is used, across a career

As a student

A student uses this subject in every engineering course that follows. Typical tasks: solve a three-ingredient blending problem as a linear system, find the stationary point of a fitted response surface, integrate lethal rates from a heat-penetration test by Simpson's rule, solve Newton's law of cooling for a cooling time, and recognise that the straight part of a heat-penetration curve is the first term of a Fourier series. In examinations the decisive skill is fast, exact arithmetic with units, and recognising which standard result (trace and determinant, D = 2.303/k, h = 2r) shortcuts a calculation.

Five years in

Five years into a process, quality or development job, a technologist uses this mathematics in spreadsheets and software: fitting first-order and Weibull models to inactivation or shelf-life data, computing F₀ from data-logger records, interpolating property tables, propagating measurement error through a calculated result, and checking whether a supplier's or a simulator's output is plausible by a quick analytical estimate, such as Fourier-number scaling when a pack thickness changes.

Twenty-five years in

A plant or technical director with twenty-five years' experience rarely solves equations by hand but decides on the basis of models: approving a thermal process schedule, accepting a shelf-life prediction from accelerated tests, or investing in a simulation of a new line. The value of the mathematics at this level is judgement: knowing when a first-order or Arrhenius assumption breaks, when an explicit numerical scheme is unstable, and which assumptions in a consultant's model change the decision.

PhD, twenty-five years in

A researcher at this level builds and tests mathematical models of food processes: coupled heat and mass transfer with moving boundaries, non-linear kinetic models with parameter uncertainty, eigenvalue analysis of multi-compartment systems, and numerical solutions verified against analytical limits. The mathematics here is the foundation for the modelling, transport and statistics subjects, and for reviewing whether a published model is mathematically well posed and correctly solved.

Written from

Probability and statistics, which most engineering mathematics syllabi also include, are taught in statistics-experimental-design-food and are not repeated here. Proofs are omitted; theorems are stated with their conditions and used. Laplace transforms, Bessel functions, finite-element methods and stability analysis of numerical schemes are only mentioned; the transport and modelling subjects (food-transport-phenomena, food-process-modelling-optimisation) go further. Statistical tables and step-by-step software instructions are not provided.

Original practice questions written to the syllabus and pattern of the exams named in each question's examTags. They are not past papers and do not reproduce any board's questions.

Practise it, and prove it

These notes are free to read here, with no account.

What the Laisha app adds:

Free for ten days, then a subscription. We would rather write that here than have you find it later.

Open Laisha →