Ordinary differential equations (ODEs) are fundamental in chemical engineering for modelling dynamic systems such as reaction kinetics, heat transfer, and fluid flow. Solutions to these equations enable engineers to predict system behaviour and optimize processes. This chapter focuses on solving first and second order ODEs relevant to chemical engineering systems encountered in Kenya’s industrial and research settings.
First order differential equations describe rates of change with respect to one independent variable. Common types include separable, linear, and homogeneous equations. Understanding these forms is essential for modelling chemical reaction rates and mass transfer phenomena.
Separable equations can be expressed as a product of a function of \(x\) and a function of \(y\). The equation takes the form:
$$ \frac{dy}{dx} = f(x) \cdot g(y) $$
Rearranged for integration:
$$ \frac{1}{g(y)} dy = f(x) dx $$
Example 1: A chemical reactor concentration \(C\) changes with time \(t\) according to
$$ \frac{dC}{dt} = 3t \cdot C^2 $$
Given initial concentration \(C = 1 \, \mathrm{mol/L}\) at \(t=0\), find \(C\) as a function of time.
$$ \frac{dC}{dt} = 3t \cdot C^2 $$
Rearranged:
$$ \frac{1}{C^2} dC = 3t dt $$
Integrate both sides:
$$ \int C^{-2} dC = \int 3t dt $$
$$ -C^{-1} = \frac{3}{2} t^{2} + k $$
Apply initial condition \(t=0, C=1\):
$$ -1 = 0 + k \Rightarrow k = -1 $$
Solve for \(C\):
$$ -\frac{1}{C} = \frac{3}{2} t^{2} - 1 $$
$$ \frac{1}{C} = 1 - \frac{3}{2} t^{2} $$
$$ C = \frac{1}{1 - \frac{3}{2} t^{2}} $$
Answer: \(C(t) = \frac{1}{1 - \frac{3}{2} t^{2}} \, \mathrm{mol/L}\)
Example 2: The temperature \(T\) of a cooling liquid changes with time \(t\) according to
$$ \frac{dT}{dt} = -k (T - T_{\infty}) $$
where \(k = 0.1\, \mathrm{min}^{-1}\) and \(T_{\infty} = 25^\circ C\). If initial temperature is \(80^\circ C\) at \(t=0\), find \(T(t)\).
Rearranged:
$$ \frac{dT}{dt} = -0.1 (T - 25) $$
$$ \frac{dT}{(T - 25)} = -0.1 dt $$
Integrate:
$$ \int \frac{1}{T - 25} dT = \int -0.1 dt $$
$$ \ln |T - 25| = -0.1 t + k $$
Initial condition \(t=0, T=80\):
$$ \ln(80 - 25) = k $$
$$ k = \ln 55 $$
Solve for \(T\):
$$ \ln |T - 25| = -0.1 t + \ln 55 $$
$$ |T - 25| = 55 e^{-0.1 t} $$
Since \(T > 25\), drop absolute value:
$$ T - 25 = 55 e^{-0.1 t} $$
$$ T = 25 + 55 e^{-0.1 t} $$
Answer: \(T(t) = 25 + 55 e^{-0.1 t} \, ^\circ C\)
Example 3: In a batch reactor, the concentration \(C\) of a reactant changes as
$$ \frac{dC}{dt} = -k C^{1.5} $$
with \(k = 0.02 \, \mathrm{L^{0.5} mol^{-0.5} min^{-1}}\), initial concentration \(C_0 = 2 \, \mathrm{mol/L}\). Find \(C(t)\).
Rearranged:
$$ \frac{dC}{dt} = -0.02 C^{1.5} $$
$$ \frac{dC}{C^{1.5}} = -0.02 dt $$
Integrate:
$$ \int C^{-1.5} dC = \int -0.02 dt $$
Recall:
$$ \int x^{n} dx = \frac{x^{n+1}}{n+1} $$
For \(n = -1.5\),
$$ \int C^{-1.5} dC = \frac{C^{-0.5}}{-0.5} = -2 C^{-0.5} $$
So,
$$ -2 C^{-0.5} = -0.02 t + k $$
Apply initial condition \(t=0, C=2\):
$$ -2 (2)^{-0.5} = k $$
$$ -2 \times \frac{1}{\sqrt{2}} = k $$
$$ k = -\frac{2}{\sqrt{2}} = -\sqrt{2} \approx -1.414 $$
Solve for \(C\):
$$ -2 C^{-0.5} = -0.02 t -1.414 $$
Multiply both sides by \(-1\):
$$ 2 C^{-0.5} = 0.02 t + 1.414 $$
Divide by 2:
$$ C^{-0.5} = 0.01 t + 0.707 $$
Invert both sides:
$$ C^{0.5} = \frac{1}{0.01 t + 0.707} $$
Square both sides:
$$ C = \frac{1}{(0.01 t + 0.707)^2} $$
Answer: \(C(t) = \frac{1}{(0.01 t + 0.707)^2} \, \mathrm{mol/L}\)
Linear first order equations have the form:
$$ \frac{dy}{dx} + P(x) y = Q(x) $$
The integrating factor (I.F.) is:
$$ \mu(x) = e^{\int P(x) dx} $$
The solution is:
$$ y \cdot \mu(x) = \int \mu(x) Q(x) dx + C $$
Example 1: The concentration \(C\) of a substance in a reactor obeys
$$ \frac{dC}{dt} + 0.5 C = 10 $$
with initial concentration \(C(0) = 0\). Find \(C(t)\).
Calculate integrating factor:
$$ \mu(t) = e^{\int 0.5 dt} = e^{0.5 t} $$
Multiply both sides:
$$ e^{0.5 t} \frac{dC}{dt} + 0.5 e^{0.5 t} C = 10 e^{0.5 t} $$
Left side is derivative:
$$ \frac{d}{dt} (C e^{0.5 t}) = 10 e^{0.5 t} $$
Integrate both sides:
$$ C e^{0.5 t} = \int 10 e^{0.5 t} dt + k $$
$$ \int e^{0.5 t} dt = \frac{2}{1} e^{0.5 t} = 2 e^{0.5 t} $$
So:
$$ C e^{0.5 t} = 10 \times 2 e^{0.5 t} + k = 20 e^{0.5 t} + k $$
Apply initial condition \(t=0, C=0\):
$$ 0 = 20 + k \Rightarrow k = -20 $$
Solve for \(C\):
$$ C = 20 + k e^{-0.5 t} = 20 - 20 e^{-0.5 t} $$
Answer: \(C(t) = 20 (1 - e^{-0.5 t})\)
Example 2: A liquid level \(h\) in a tank changes as
$$ \frac{dh}{dt} + 0.3 h = 5 $$
with \(h(0) = 2\). Find \(h(t)\).
Integrating factor:
$$ \mu(t) = e^{0.3 t} $$
Multiply:
$$ \frac{d}{dt} (h e^{0.3 t}) = 5 e^{0.3 t} $$
Integrate:
$$ h e^{0.3 t} = \int 5 e^{0.3 t} dt + k = \frac{5}{0.3} e^{0.3 t} + k = \frac{50}{3} e^{0.3 t} + k $$
Apply initial condition \(t=0, h=2\):
$$ 2 = \frac{50}{3} + k \Rightarrow k = 2 - \frac{50}{3} = \frac{6 - 50}{3} = -\frac{44}{3} $$
Solve for \(h\):
$$ h = \frac{50}{3} + k e^{-0.3 t} = \frac{50}{3} - \frac{44}{3} e^{-0.3 t} $$
Answer: \(h(t) = \frac{50}{3} - \frac{44}{3} e^{-0.3 t} \, \mathrm{units}\)
Example 3: Concentration \(C\) in a continuously stirred tank reactor satisfies
$$ \frac{dC}{dt} + \frac{2}{t} C = t^2 $$
Find the general solution.
Integrating factor:
$$ \mu(t) = e^{\int \frac{2}{t} dt} = e^{2 \ln t} = t^{2} $$
Multiply both sides:
$$ t^{2} \frac{dC}{dt} + 2 t C = t^{4} $$
Rewrite as:
$$ \frac{d}{dt} (t^{2} C) = t^{4} $$
Integrate:
$$ t^{2} C = \int t^{4} dt + k = \frac{t^{5}}{5} + k $$
Solve for \(C\):
$$ C = \frac{t^{3}}{5} + \frac{k}{t^{2}} $$
Answer: \(C(t) = \frac{t^{3}}{5} + \frac{k}{t^{2}}\)
Homogeneous equations have the form:
$$ \frac{dy}{dx} = F(\frac{y}{x}) $$
Substitute \(v = \frac{y}{x}\), so \(y = vx\), and
$$ \frac{dy}{dx} = v + x \frac{dv}{dx} $$
Rearranged equation becomes:
$$ v + x \frac{dv}{dx} = F(v) $$
Separate variables to solve for \(v\).
Example 1: Solve
$$ \frac{dy}{dx} = \frac{x + y}{x} $$
Given \(y(1) = 2\).
Rewrite right side:
$$ \frac{x + y}{x} = 1 + \frac{y}{x} = 1 + v $$
Substitute:
$$ \frac{dy}{dx} = 1 + v $$
Recall:
$$ \frac{dy}{dx} = v + x \frac{dv}{dx} $$
Equate:
$$ v + x \frac{dv}{dx} = 1 + v $$
Simplify:
$$ x \frac{dv}{dx} = 1 $$
Separate:
$$ \frac{dv}{dx} = \frac{1}{x} $$
Integrate:
$$ \int dv = \int \frac{1}{x} dx $$
$$ v = \ln |x| + k $$
Recall \(v = \frac{y}{x}\):
$$ \frac{y}{x} = \ln |x| + k $$
$$ y = x \ln |x| + k x $$
Apply initial condition \(x=1, y=2\):
$$ 2 = 1 \times 0 + k \times 1 \Rightarrow k=2 $$
Answer: \(y = x \ln |x| + 2x\)
Example 2: Solve
$$ \frac{dy}{dx} = \frac{y}{x} + (\frac{y}{x})^2 $$
Rewrite:
$$ \frac{dy}{dx} = v + v^{2} $$
Recall:
$$ \frac{dy}{dx} = v + x \frac{dv}{dx} $$
Equate:
$$ v + x \frac{dv}{dx} = v + v^{2} $$
Simplify:
$$ x \frac{dv}{dx} = v^{2} $$
Separate:
$$ \frac{dv}{v^{2}} = \frac{dx}{x} $$
Integrate:
$$ \int v^{-2} dv = \int \frac{1}{x} dx $$
$$ -v^{-1} = \ln |x| + k $$
Invert:
$$ \frac{1}{v} = -\ln |x| - k $$
Recall \(v = \frac{y}{x}\):
$$ \frac{x}{y} = -\ln |x| - k $$
$$ y = \frac{x}{- \ln |x| - k} $$
Answer: \(y = \frac{x}{- \ln |x| - k}\)
Example 3: Given
$$ \frac{dy}{dx} = \frac{x^{2} + y^{2}}{2 x y} $$
Solve for \(y(x)\).
Rewrite numerator and denominator:
$$ \frac{dy}{dx} = \frac{x^{2} + y^{2}}{2 x y} = \frac{x^{2}}{2 x y} + \frac{y^{2}}{2 x y} = \frac{x}{2 y} + \frac{y}{2 x} $$
Express in terms of \(v = \frac{y}{x}\):
$$ \frac{dy}{dx} = \frac{x}{2 y} + \frac{y}{2 x} = \frac{1}{2 v} + \frac{v}{2} $$
Recall:
$$ \frac{dy}{dx} = v + x \frac{dv}{dx} $$
Equate:
$$ v + x \frac{dv}{dx} = \frac{1}{2 v} + \frac{v}{2} $$
Rearranged:
$$ x \frac{dv}{dx} = \frac{1}{2 v} + \frac{v}{2} - v = \frac{1}{2 v} - \frac{v}{2} $$
Simplify:
$$ x \frac{dv}{dx} = \frac{1 - v^{2}}{2 v} $$
Separate variables:
$$ \frac{2 v}{1 - v^{2}} dv = \frac{dx}{x} $$
Partial fraction decomposition of left side:
Let’s integrate:
$$ \int \frac{2 v}{1 - v^{2}} dv = \int \frac{dx}{x} $$
Rewrite denominator:
$$ 1 - v^{2} = (1 - v)(1 + v) $$
However, better to use substitution:
Let \(u = 1 - v^{2}\), then \(du = -2 v dv\), so:
$$ -du = 2 v dv $$
Therefore:
$$ \int \frac{2 v}{1 - v^{2}} dv = - \int \frac{1}{u} du = - \ln |u| + C = - \ln |1 - v^{2}| + C $$
Integrate right side:
$$ \int \frac{dx}{x} = \ln |x| + k $$
Equate:
$$ - \ln |1 - v^{2}| = \ln |x| + k $$
Rewrite:
$$ \ln |1 - v^{2}| = - \ln |x| - k $$
Exponentiate both sides:
$$ |1 - v^{2}| = \frac{c}{x} $$
Where \(c = e^{-k} > 0\).
Recall \(v = \frac{y}{x}\):
$$ 1 - (\frac{y}{x})^{2} = \frac{c}{x} $$
Multiply both sides by \(x^{2}\):
$$ x^{2} - y^{2} = c x $$
Answer: \(x^{2} - y^{2} = c x\)
Create a free account to open more of this chapter.
Free: practical guides, quick cards, workplace scenarios and more.
Create a free accountThis chapter explores various types of first order differential equations, detailing their characteristics and classifications. It explains how to form first order differential equations from given physical or engineering scenarios. Several methods for solving first order differential equations are presented, including separation of variables, integrating factors, and exact equations. The chapter also demonstrates practical applications of first order differential equations in engineering contexts. Moving to higher order equations, it covers the formation of second order differential equations for different systems. The solution of second order differential equations is addressed using the method of undetermined coefficients. Finally, the chapter discusses how second order differential equations are applied to model and solve engineering problems effectively.
A chemical reaction in a batch reactor follows the rate equation \(\frac{dC}{dt} = -kC\), where \(k = 0.03 \, \text{min}^{-1}\). If the initial concentration \(C_0 = 2.0 \, \text{mol/L}\), find the concentration after 30 minutes. (2 marks)
The temperature \(T\) of a chemical mixture cools according to Newton’s law of cooling: \(\frac{dT}{dt} = -k(T - T_{\text{env}})\), where \(k = 0.05 \, \text{min}^{-1}\) and ambient temperature \(T_{\text{env}} = 25^\circ C\). If initial temperature is \(100^\circ C\), find \(T\) after 20 minutes. (2 marks)
A chemical reactor temperature \(T\) changes according to the first order differential equation \(\frac{dT}{dt} = -k(T - T_a)\), where \(T_a\) is ambient temperature and \(k\) is a positive constant. Identify the type of differential equation and solve for \(T\) given \(T(0) = T_0\). (4 marks)
Formulate a first order differential equation representing the rate of change of concentration \(C\) in a continuously stirred tank reactor (CSTR) where the inflow concentration is \(C_0\), flow rate is \(Q\), and volume \(V\). (4 marks)