By the end of this chapter, you will be able to:
Mastering these skills will help you tackle real-world engineering problems with confidence and precision.
This chapter focuses on solving partial differential equations (PDEs) and ordinary differential equations (ODEs) that are fundamental in biomedical engineering contexts in Kenya. Biomedical devices and systems often involve complex dynamic processes described by PDEs and ODEs, such as heat transfer in tissues, diffusion of drugs, and electrical activity in the heart. Mastery of first and second order partial derivatives is essential for modeling these phenomena accurately. The following sections develop techniques to compute and apply these derivatives in biomedical engineering problems.
Biomedical engineering problems often involve functions of multiple variables, such as temperature distribution in a tissue depending on time and spatial coordinates. The first order partial derivatives describe how the function changes with respect to one independent variable while keeping others constant, which is crucial in analyzing gradients and rates of change in multidimensional systems.
A function \( u(x,y) \) depends on two variables \( x \) and \( y \). The first order partial derivative with respect to \( x \) is denoted as \( \frac{\partial u}{\partial x} \) and with respect to \( y \) as \( \frac{\partial u}{\partial y} \). These derivatives measure how \( u \) changes when one variable varies while the other is fixed.
$$ \frac{\partial u}{\partial x} = \lim_{h \to 0} \frac{u(x+h,y) - u(x,y)}{h} $$
$$ \frac{\partial u}{\partial y} = \lim_{h \to 0} \frac{u(x,y+h) - u(x,y)}{h} $$
Example 1: Temperature in a skin tissue varies as \( T(x,y) = 3x^2y + 2xy^3 \), where \( x \) and \( y \) are in cm. Find \( \frac{\partial T}{\partial x} \) and \( \frac{\partial T}{\partial y} \) at \( (x,y) = (1,2) \).
Given: \( T = 3x^2y + 2xy^3 \), \( x=1 \), \( y=2 \).
$$ \frac{\partial T}{\partial x} = \frac{\partial}{\partial x} (3x^2y + 2xy^3) = 6xy + 2y^3 $$
$$ \frac{\partial T}{\partial x} \bigg|_{(1,2)} = 6 \times 1 \times 2 + 2 \times 2^3 = 12 + 16 = 28 $$
$$ \frac{\partial T}{\partial y} = \frac{\partial}{\partial y} (3x^2y + 2xy^3) = 3x^2 + 6xy^2 $$
$$ \frac{\partial T}{\partial y} \bigg|_{(1,2)} = 3 \times 1^2 + 6 \times 1 \times 2^2 = 3 + 24 = 27 $$
Answer: \( \frac{\partial T}{\partial x} = 28 \), \( \frac{\partial T}{\partial y} = 27 \).
Example 2: Drug concentration in a tissue is modeled as \( C(x,t) = e^{-0.1t} \sin(\pi x/10) \), where \( x \) is distance (cm) and \( t \) is time (minutes). Find \( \frac{\partial C}{\partial x} \) and \( \frac{\partial C}{\partial t} \) at \( x=5 \) cm and \( t=10 \) min.
Given: \( C = e^{-0.1t} \sin(\frac{\pi x}{10}) \), \( x=5 \), \( t=10 \).
$$ \frac{\partial C}{\partial x} = e^{-0.1t} \cdot \frac{\pi}{10} \cos(\frac{\pi x}{10}) $$
$$ \frac{\partial C}{\partial x} \bigg|_{(5,10)} = e^{-1} \times \frac{\pi}{10} \times \cos(\frac{\pi \times 5}{10}) = 0.3679 \times 0.3142 \times \cos(\frac{\pi}{2}) = 0 $$
$$ \frac{\partial C}{\partial t} = -0.1 e^{-0.1t} \sin(\frac{\pi x}{10}) $$
$$ \frac{\partial C}{\partial t} \bigg|_{(5,10)} = -0.1 \times e^{-1} \times \sin(\frac{\pi}{2}) = -0.1 \times 0.3679 \times 1 = -0.03679 $$
Answer: \( \frac{\partial C}{\partial x} = 0 \), \( \frac{\partial C}{\partial t} = -0.03679 \).
Example 3: Voltage in a nerve fiber is given by \( V(x,t) = 10 e^{-0.05 t} \cos(2 \pi x) \), where \( x \) is distance in cm and \( t \) in ms. Find \( \frac{\partial V}{\partial x} \) and \( \frac{\partial V}{\partial t} \) at \( x=0.25 \) cm and \( t=20 \) ms.
Given: \( V = 10 e^{-0.05 t} \cos(2 \pi x) \), \( x=0.25 \), \( t=20 \).
$$ \frac{\partial V}{\partial x} = 10 e^{-0.05 t} \times (-2 \pi) \sin(2 \pi x) = -20 \pi e^{-0.05 t} \sin(2 \pi x) $$
$$ \frac{\partial V}{\partial x} \bigg|_{(0.25,20)} = -20 \pi \times e^{-1} \times \sin(\pi/2) = -20 \pi \times 0.3679 \times 1 = -23.11 $$
$$ \frac{\partial V}{\partial t} = 10 \times (-0.05) e^{-0.05 t} \cos(2 \pi x) = -0.5 e^{-0.05 t} \cos(2 \pi x) $$
$$ \frac{\partial V}{\partial t} \bigg|_{(0.25,20)} = -0.5 \times e^{-1} \times \cos(\pi/2) = -0.5 \times 0.3679 \times 0 = 0 $$
Answer: \( \frac{\partial V}{\partial x} = -23.11 \), \( \frac{\partial V}{\partial t} = 0 \).
Example 4: Oxygen diffusion concentration in a lung alveolus is \( O(x,y) = 4x^2 y^3 - 5xy \), where \( x \) and \( y \) are spatial coordinates in mm. Find \( \frac{\partial O}{\partial x} \) and \( \frac{\partial O}{\partial y} \) at \( (x,y) = (2,1) \).
Given: \( O = 4x^2 y^3 - 5xy \), \( x=2 \), \( y=1 \).
$$ \frac{\partial O}{\partial x} = 8x y^3 - 5 y $$
$$ \frac{\partial O}{\partial x} \bigg|_{(2,1)} = 8 \times 2 \times 1^3 - 5 \times 1 = 16 - 5 = 11 $$
$$ \frac{\partial O}{\partial y} = 12 x^2 y^2 - 5 x $$
$$ \frac{\partial O}{\partial y} \bigg|_{(2,1)} = 12 \times 4 \times 1^2 - 5 \times 2 = 48 - 10 = 38 $$
Answer: \( \frac{\partial O}{\partial x} = 11 \), \( \frac{\partial O}{\partial y} = 38 \).
Heat transfer in tissues is modeled by temperature functions depending on space and time. The first order partial derivatives represent the rate of temperature change in space or time, crucial for designing medical thermal therapies or hyperthermia treatments.
For a temperature field \( T(x,t) \), the first order partial derivatives are:
$$ \frac{\partial T}{\partial x} = \text{spatial temperature gradient} $$
$$ \frac{\partial T}{\partial t} = \text{rate of temperature change over time} $$
Example 1: Temperature in a tissue is \( T(x,t) = 37 + 5x e^{-0.2 t} \), where \( x \) is cm, \( t \) in minutes. Find \( \frac{\partial T}{\partial x} \) and \( \frac{\partial T}{\partial t} \) at \( x=2 \) cm and \( t=5 \) min.
Given: \( T = 37 + 5x e^{-0.2 t} \), \( x=2 \), \( t=5 \).
$$ \frac{\partial T}{\partial x} = 5 e^{-0.2 t} $$
$$ \frac{\partial T}{\partial x} \bigg|_{(2,5)} = 5 \times e^{-1} = 5 \times 0.3679 = 1.8395 $$
$$ \frac{\partial T}{\partial t} = 5x \times (-0.2) e^{-0.2 t} = -1 x e^{-0.2 t} $$
$$ \frac{\partial T}{\partial t} \bigg|_{(2,5)} = -1 \times 2 \times 0.3679 = -0.7358 $$
Answer: \( \frac{\partial T}{\partial x} = 1.8395 \), \( \frac{\partial T}{\partial t} = -0.7358 \).
Example 2: Heat flux in a prosthetic limb is modeled by \( Q(x,y) = 4x^3 y^2 + 7xy \), where \( x,y \) are in cm. Find \( \frac{\partial Q}{\partial x} \) and \( \frac{\partial Q}{\partial y} \) at \( (x,y) = (1,3) \).
Given: \( Q = 4x^3 y^2 + 7xy \), \( x=1 \), \( y=3 \).
$$ \frac{\partial Q}{\partial x} = 12 x^2 y^2 + 7 y $$
$$ \frac{\partial Q}{\partial x} \bigg|_{(1,3)} = 12 \times 1^2 \times 9 + 7 \times 3 = 108 + 21 = 129 $$
$$ \frac{\partial Q}{\partial y} = 8 x^3 y + 7 x $$
$$ \frac{\partial Q}{\partial y} \bigg|_{(1,3)} = 8 \times 1 \times 3 + 7 \times 1 = 24 + 7 = 31 $$
Answer: \( \frac{\partial Q}{\partial x} = 129 \), \( \frac{\partial Q}{\partial y} = 31 \).
Example 3: Temperature in a kidney dialysis machine is \( T(x,y,t) = 20 + x y e^{-0.1 t} \), with \( x,y \) in cm, \( t \) in min. Find \( \frac{\partial T}{\partial x} \), \( \frac{\partial T}{\partial y} \), and \( \frac{\partial T}{\partial t} \) at \( (x,y,t) = (3,4,10) \).
Given: \( T = 20 + x y e^{-0.1 t} \), \( x=3 \), \( y=4 \), \( t=10 \).
$$ \frac{\partial T}{\partial x} = y e^{-0.1 t} $$
$$ \frac{\partial T}{\partial x} \bigg|_{(3,4,10)} = 4 \times e^{-1} = 4 \times 0.3679 = 1.4716 $$
$$ \frac{\partial T}{\partial y} = x e^{-0.1 t} $$
$$ \frac{\partial T}{\partial y} \bigg|_{(3,4,10)} = 3 \times 0.3679 = 1.1037 $$
$$ \frac{\partial T}{\partial t} = x y \times (-0.1) e^{-0.1 t} = -0.1 \times 3 \times 4 \times 0.3679 = -0.4415 $$
Answer: \( \frac{\partial T}{\partial x} = 1.4716 \), \( \frac{\partial T}{\partial y} = 1.1037 \), \( \frac{\partial T}{\partial t} = -0.4415 \).
When biomedical quantities depend on variables that themselves depend on other variables, the chain rule allows differentiation of composite functions. This is common in physiological models where parameters depend on time or spatial position indirectly.
If \( z = f(x,y) \), and \( x = g(t) \), \( y = h(t) \), then
$$ \frac{d z}{d t} = \frac{\partial f}{\partial x} \frac{d g}{d t} + \frac{\partial f}{\partial y} \frac{d h}{d t} $$
Example 1: Blood glucose concentration is \( G(x,y) = x^2 y + 3y^2 \), where \( x \) and \( y \) depend on time as \( x = 2t + 1 \), \( y = t^2 \). Find \( \frac{dG}{dt} \) at \( t=1 \).
Given: \( G = x^2 y + 3 y^2 \), \( x=2t+1 \), \( y=t^2 \), \( t=1 \).
Calculate partial derivatives:
$$ \frac{\partial G}{\partial x} = 2 x y $$
$$ \frac{\partial G}{\partial y} = x^2 + 6 y $$
Calculate derivatives of \( x \) and \( y \):
$$ \frac{d x}{d t} = 2 $$
$$ \frac{d y}{d t} = 2 t = 2 $$
At \( t=1 \), \( x=2(1)+1=3 \), \( y=1^2=1 \).
Compute:
$$ \frac{dG}{dt} = \frac{\partial G}{\partial x} \frac{d x}{d t} + \frac{\partial G}{\partial y} \frac{d y}{d t} = 2 \times 3 \times 1 \times 2 + (3^2 + 6 \times 1) \times 2 = 12 + (9 + 6) \times 2 = 12 + 30 = 42 $$
Answer: \( \frac{dG}{dt} = 42 \).
Example 2: Cardiac output \( Q(x,y) = e^{xy} \), where \( x = \sin t \), \( y = \cos t \). Find \( \frac{dQ}{dt} \) at \( t = \frac{\pi}{4} \).
Given: \( Q = e^{xy} \), \( x = \sin t \), \( y = \cos t \), \( t = \frac{\pi}{4} \).
Partial derivatives:
$$ \frac{\partial Q}{\partial x} = y e^{xy} $$
$$ \frac{\partial Q}{\partial y} = x e^{xy} $$
Derivatives of \( x,y \):
$$ \frac{d x}{d t} = \cos t $$
$$ \frac{d y}{d t} = -\sin t $$
At \( t = \frac{\pi}{4} \), \( x = \sin \frac{\pi}{4} = \frac{\sqrt{2}}{2} \), \( y = \cos \frac{\pi}{4} = \frac{\sqrt{2}}{2} \).
Calculate:
$$ \frac{d Q}{d t} = \frac{\partial Q}{\partial x} \frac{d x}{d t} + \frac{\partial Q}{\partial y} \frac{d y}{d t} = y e^{xy} \cos t + x e^{xy} (-\sin t) = e^{xy} (y \cos t - x \sin t) $$
Substitute values:
$$ xy = \frac{\sqrt{2}}{2} \times \frac{\sqrt{2}}{2} = \frac{1}{2} $$
$$ e^{xy} = e^{0.5} = 1.6487 $$
$$ y \cos t, x \sin t = \frac{\sqrt{2}}{2} \times \frac{\sqrt{2}}{2} - \frac{\sqrt{2}}{2} \times \frac{\sqrt{2}}{2} = 0 $$
So,
$$ \frac{dQ}{dt} = 1.6487 \times 0 = 0 $$
Answer: \( \frac{dQ}{dt} = 0 \).
Example 3: Concentration \( C(x,y) = x^3 + y^3 \), with \( x = t^2 \), \( y = 3t \). Find \( \frac{dC}{dt} \) at \( t=2 \).
Given: \( C = x^3 + y^3 \), \( x = t^2 \), \( y = 3t \), \( t=2 \).
Partial derivatives:
$$ \frac{\partial C}{\partial x} = 3x^2 $$
$$ \frac{\partial C}{\partial y} = 3y^2 $$
Derivatives:
$$ \frac{d x}{d t} = 2t = 4 $$
$$ \frac{d y}{d t} = 3 $$
At \( t=2 \), \( x=4 \), \( y=6 \).
Calculate:
$$ \frac{dC}{dt} = 3x^2 \times 4 + 3y^2 \times 3 = 3 \times 16 \times 4 + 3 \times 36 \times 3 = 192 + 324 = 516 $$
Answer: \( \frac{dC}{dt} = 516 \).
In biomedical imaging, the gradient vector formed by first order partial derivatives indicates the direction and rate of fastest intensity change, useful in edge detection and image enhancement.
The gradient of \( f(x,y) \) is:
$$ \nabla f = ( \frac{\partial f}{\partial x}, \frac{\partial f}{\partial y} ) $$
The directional derivative in direction \( \mathbf{u} = (u_x, u_y) \) (unit vector) is:
$$ D_{\mathbf{u}} f = \nabla f \cdot \mathbf{u} = \frac{\partial f}{\partial x} u_x + \frac{\partial f}{\partial y} u_y $$
Example 1: Intensity function \( I(x,y) = x^2 + y^2 \). Find gradient and directional derivative at \( (1,2) \) in direction \( \mathbf{u} = \frac{1}{\sqrt{2}} (1,1) \).
Given: \( I = x^2 + y^2 \), \( (x,y) = (1,2) \), \( \mathbf{u} = \frac{1}{\sqrt{2}}(1,1) \).
Calculate partial derivatives:
$$ \frac{\partial I}{\partial x} = 2x = 2 \times 1 = 2 $$
$$ \frac{\partial I}{\partial y} = 2y = 2 \times 2 = 4 $$
Gradient vector:
$$ \nabla I = (2, 4) $$
Directional derivative:
$$ D_{\mathbf{u}} I = 2 \times \frac{1}{\sqrt{2}} + 4 \times \frac{1}{\sqrt{2}} = \frac{2}{\sqrt{2}} + \frac{4}{\sqrt{2}} = \frac{6}{\sqrt{2}} = 4.24 $$
Answer: Gradient \( \nabla I = (2,4) \), directional derivative \( D_{\mathbf{u}} I = 4.24 \).
Example 2: Image brightness \( B(x,y) = 3x y + y^2 \). Find gradient and directional derivative at \( (2,-1) \) in direction \( \mathbf{u} = (3/5, 4/5) \).
Given: \( B = 3xy + y^2 \), \( (x,y) = (2,-1) \), \( \mathbf{u} = (0.6, 0.8) \).
Partial derivatives:
$$ \frac{\partial B}{\partial x} = 3y = 3 \times (-1) = -3 $$
$$ \frac{\partial B}{\partial y} = 3x + 2y = 3 \times 2 + 2 \times (-1) = 6 - 2 = 4 $$
Gradient vector:
$$ \nabla B = (-3, 4) $$
Directional derivative:
$$ D_{\mathbf{u}} B = -3 \times 0.6 + 4 \times 0.8 = -1.8 + 3.2 = 1.4 $$
Answer: Gradient \( \nabla B = (-3,4) \), directional derivative \( D_{\mathbf{u}} B = 1.4 \).
Example 3: Signal intensity \( S(x,y) = e^{x y} \). Find gradient and directional derivative at \( (0,1) \) in direction \( \mathbf{u} = (0,1) \).
Given: \( S = e^{xy} \), \( (x,y) = (0,1) \), \( \mathbf{u} = (0,1) \).
Partial derivatives:
$$ \frac{\partial S}{\partial x} = y e^{x y} = 1 \times e^{0} = 1 $$
$$ \frac{\partial S}{\partial y} = x e^{x y} = 0 \times e^{0} = 0 $$
Gradient vector:
$$ \nabla S = (1, 0) $$
Directional derivative:
$$ D_{\mathbf{u}} S = 1 \times 0 + 0 \times 1 = 0 $$
Answer: Gradient \( \nabla S = (1, 0) \), directional derivative \( D_{\mathbf{u}} S = 0 \).
For \( f(x,y) = x^3 y^2 + 2xy \), find \( \frac{\partial f}{\partial x} \) and \( \frac{\partial f}{\partial y} \) at \( (2,1) \). (5 marks)
A drug concentration \( C(x,t) = 5 e^{-0.3 t} \sin(\pi x / 5) \). Calculate \( \frac{\partial C}{\partial x} \) and \( \frac{\partial C}{\partial t} \) at \( x=2 \) cm and \( t=3 \) min. (5 marks)
Given \( z = x^2 y + y^3 \), \( x = t^2 \), \( y = 3t \), find \( \frac{d z}{d t} \) at \( t=1 \). (6 marks)
For image intensity \( I(x,y) = 4x^2 - y^2 \), find the gradient and directional derivative at \( (1,-1) \) in direction \( \mathbf{u} = \frac{1}{\sqrt{5}} (2,1) \). (6 marks)
Create a free account to open more of this chapter.
Free: practical guides, quick cards, workplace scenarios and more.
Create a free accountThis chapter began by exploring first order partial derivatives, establishing how functions change with respect to one variable while holding others constant. It then progressed to second order partial derivatives, which describe curvature and concavity in multivariable functions. The concept of rates of change and small changes was introduced to quantify how slight variations in variables affect function values. Stationary points of functions of two variables were examined to identify maxima, minima, and saddle points through partial derivatives. The discussion on types of first order differential equations included separable variables, exact, linear, and homogeneous equations, providing methods to classify and approach their solutions. Formation of first order differential equations was covered to show how equations arise from physical relationships. The chapter detailed the solution techniques for first order differential equations, followed by applications including second order differential equations and the method of undetermined coefficients for particular solutions. Finally, the D-operator method was presented as a systematic tool for solving linear differential equations efficiently.
Find the first order partial derivatives \( \frac{\partial f}{\partial x} \) and \( \frac{\partial f}{\partial y} \) for the function \( f(x,y) = 3x^2y + 5xy^3 \). (2 marks)
Calculate the second order partial derivatives \( \frac{\partial^2 f}{\partial x^2} \), \( \frac{\partial^2 f}{\partial y^2} \), and the mixed derivative \( \frac{\partial^2 f}{\partial x \partial y} \) for \( f(x,y) = x^3 y^2 + 4xy \). (3 marks)
A biomedical engineer is modelling the temperature distribution \(T(x,y)\) on a prosthetic limb surface. Given \(T(x,y) = 5x^2y + 3xy^2\), find the first order partial derivative \(\frac{\partial T}{\partial x}\) at the point \((2,1)\). (4 marks)
For the function \(C(x,y) = x^3 y + 4xy^2\) representing drug concentration in tissue, calculate the second order partial derivative \(\frac{\partial^2 C}{\partial y^2}\). (4 marks)
At the start of this chapter we promised you would be able to:
Tick each one you can genuinely do.
So, are you there yet?
You're competent when you can confidently do 50% or more of what this chapter promised.
Sign in to record how you're doing.