Uploaded by Edgar Muhumuza

Applied Mathematical Methods for Chemical Engineers Third Edition

advertisement
ENGINEERING – CHEMICAL
Focusing on the application of mathematics to chemical engineering,
Applied Mathematical Methods for Chemical Engineers addresses the
setup and verification of mathematical models using experimental or other
independently derived data. The book provides an introduction to differential
equations common to chemical engineering, followed by examples of
first-order and linear second-order ordinary differential equations. Later
chapters examine Sturm–Liouville problems, Fourier series, integrals,
linear partial differential equations, regular perturbation, combination of
variables, and numerical methods emphasizing the method of lines with
MATLAB® programming examples.
Fully revised and updated, this Third Edition:
• Includes additional examples related to process control, Bessel Functions, and contemporary areas such as drug delivery
• Introduces examples of variable coefficient Sturm–Liouville problems both in the regular and singular types
• Demonstrates the use of Euler and modified Euler methods alongside the Runge–Kutta order-four method
• Inserts more depth on specific applications such as nonhomogeneous cases of separation of variables
• Adds a section on special types of matrices such as upper- and
lower-triangular matrices
• Presents a justification for Fourier–Bessel series in preference to a complicated proof
• Incorporates examples related to biomedical engineering applications
• Illustrates the use of the predictor-corrector method
• Expands the problem sets of numerous chapters
APPLIED
MATHEMATICAL
METHODS for
CHEMICAL
ENGINEERS
Third Edition
Applied Mathematical Methods for Chemical Engineers, Third Edition
uses worked examples to expose several mathematical methods that are
essential to solving real-world process engineering problems.
K15249
ISBN: 978-1-4665-5299-9
Norman W. Loney
90000
9 781466 552999
K15249_Cover_PubGr.indd All Pages
9/1/15 1:52 PM
APPLIED
MATHEMATICAL
METHODS for
CHEMICAL
ENGINEERS
Third Edition
This page intentionally left blank
APPLIED
MATHEMATICAL
METHODS for
CHEMICAL
ENGINEERS
Third Edition
Norman W. Loney
MATLAB® is a trademark of The MathWorks, Inc. and is used with permission. The MathWorks does not
warrant the accuracy of the text or exercises in this book. This book’s use or discussion of MATLAB® software or related products does not constitute endorsement or sponsorship by The MathWorks of a particular
pedagogical approach or particular use of the MATLAB® software.
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
© 2015 by Taylor & Francis Group, LLC
CRC Press is an imprint of Taylor & Francis Group, an Informa business
No claim to original U.S. Government works
Version Date: 20160203
International Standard Book Number-13: 978-1-4665-5301-9 (eBook - PDF)
This book contains information obtained from authentic and highly regarded sources. Reasonable efforts
have been made to publish reliable data and information, but the author and publisher cannot assume
responsibility for the validity of all materials or the consequences of their use. The authors and publishers
have attempted to trace the copyright holders of all material reproduced in this publication and apologize to
copyright holders if permission to publish in this form has not been obtained. If any copyright material has
not been acknowledged please write and let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented,
including photocopying, microfilming, and recording, or in any information storage or retrieval system,
without written permission from the publishers.
For permission to photocopy or use material electronically from this work, please access www.copyright.
com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood
Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and
registration for a variety of users. For organizations that have been granted a photocopy license by the CCC,
a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used
only for identification and explanation without intent to infringe.
Visit the Taylor & Francis Web site at
http://www.taylorandfrancis.com
and the CRC Press Web site at
http://www.crcpress.com
Dedication
To my sons—Alexander David and Michael Oliver—and to
their sons—Isaiah, Ishmael, and Michael Norman—as well
as to my parents—Ella Esedora and David Alexander
This page intentionally left blank
Contents
Preface to the First Edition���������������������������������������������������������������������������������������xi
Preface to the Second Edition�������������������������������������������������������������������������������� xiii
Preface to the Third Edition������������������������������������������������������������������������������������ xv
Acknowledgments��������������������������������������������������������������������������������������������������xvii
Author���������������������������������������������������������������������������������������������������������������������xix
Chapter 1
Differential Equations........................................................................... 1
Introduction................................................................................1
Ordinary Differential Equations................................................2
Model Development....................................................................3
1.3.1 Turbulent Core Region (0 ≤ r ≤ Rb)................................4
1.3.2 Laminar Sublayer Region (0 < x < δ )...........................5
1.3.3 Outline of Model Development.....................................7
1.3.3.1 Tube Side (Equation of Continuity for
Species A)......................................................8
1.3.3.2 Shell Side....................................................... 9
References........................................................................................... 10
1.1
1.2
1.3
Chapter 2
First-Order Ordinary Differential Equations...................................... 11
2.1
2.2
Linear Equations...................................................................... 11
Additional Information on Linear Equations........................... 18
2.2.1 Proof (non-rigorous).................................................... 19
2.3 Nonlinear Equations................................................................. 22
2.3.1 Separable Equations.................................................... 22
2.3.2 Exact Equations...........................................................24
2.3.3 Homogeneous Equations.............................................26
2.4 Problem Setup..........................................................................26
2.4.1 Problem Statement......................................................26
2.5 Problems................................................................................... 32
References........................................................................................... 35
Chapter 3
Linear Second-Order and Systems of First-Order Ordinary
Differential Equations......................................................................... 37
3.1
3.2
Introduction.............................................................................. 37
Fundamental Solutions of Homogeneous
Equations.................................................................................. 39
3.3Homogeneous Equations with Constant
Coefficients............................................................................... 41
vii
viii
Contents
3.4
Nonhomogeneous Equations.................................................... 45
3.4.1 Method of Variation of Parameters............................. 52
3.5 Variable Coefficient Problems.................................................. 54
3.5.1 Series Solutions Near a Regular Singular Point.......... 56
3.6 Alternative Methods................................................................. 61
3.6.1 Summary..................................................................... 62
3.6.2 Initial Value Problems.................................................64
3.6.3 Some Useful Properties of Laplace Transforms......... 68
3.6.4 Inverting the Laplace Transform................................. 70
3.6.5 Taylor Series Solution of Initial Value Problems........ 75
3.7Applications of Second-Order Differential Equations............. 77
3.7.1 Problem Statement...................................................... 77
3.8Systems of First-Order Ordinary Differential Equations....... 103
3.8.1 Nonhomogeneous Linear Systems............................ 115
3.9 Problems................................................................................. 119
References......................................................................................... 126
Chapter 4
Sturm–Liouville Problems................................................................ 129
4.1
4.2
Introduction............................................................................ 129
Classification of Sturm–Liouville Problems.......................... 130
4.2.1Properties of the Eigenvalues and
Eigenfunctions of a Sturm–Liouville Problem�������� 140
4.3 Eigenfunction Expansion........................................................ 143
4.4 Problems................................................................................. 145
References......................................................................................... 148
Chapter 5
Fourier Series and Integrals.............................................................. 149
5.1 Introduction............................................................................ 149
5.2 Fourier Coefficients................................................................ 151
5.3 Arbitrary Interval................................................................... 155
5.4 Cosine and Sine Series........................................................... 156
5.5 Convergence of Fourier Series............................................... 161
5.6 Fourier Integrals..................................................................... 167
5.7 Problems................................................................................. 173
References......................................................................................... 174
Chapter 6
Partial Differential Equations........................................................... 175
6.1
6.2
6.3
6.4
Introduction............................................................................ 175
Separation of Variables........................................................... 176
6.2.1 Boundary Conditions................................................ 181
Nonhomogeneous Problem and Eigenfunction
Expansion............................................................................... 211
Laplace Transform Methods................................................... 219
ix
Contents
6.5 Combination of Variables.......................................................240
6.6 Fourier Integral Methods........................................................ 247
6.7 Regular Perturbation Approaches.......................................... 250
6.8 Problems................................................................................. 263
References......................................................................................... 267
Chapter 7
Applications of Partial Differential Equations in
Chemical Engineering....................................................................... 269
7.1 Introduction............................................................................ 269
7.2 Heat Transfer.......................................................................... 269
7.3 Mass Transfer......................................................................... 285
7.4 Comparison between Heat and Mass Transfer Results..........300
7.5 Simultaneous Diffusion and Convection................................302
7.6 Simultaneous Diffusion and Chemical Reaction................... 317
7.7Simultaneous Diffusion, Convection, and
Chemical Reaction���������������������������������������������������������������� 330
7.8 Viscous Flow.......................................................................... 343
7.9 Problems................................................................................. 358
References......................................................................................... 365
Chapter 8
Dimensional Analysis and Scaling of Boundary Value Problems...... 369
8.1 Introduction............................................................................ 369
8.2 Classical Approach to Dimensional Analysis........................ 371
8.3 Finding the Πs........................................................................ 372
8.4 Scaling Boundary Value Problems......................................... 378
8.5 Problems................................................................................. 389
References......................................................................................... 390
Chapter 9
Selected Numerical Methods and Available Software Packages........ 393
9.1
9.2
Introduction and Philosophy.................................................. 393
Solution of Nonlinear Algebraic Equations........................... 393
9.2.1 Newton–Raphson Method......................................... 398
9.2.2 Modified Newton–Raphson Method......................... 399
9.3Solution of Simultaneous Linear Algebraic Equations..........400
9.3.1 Error Estimate........................................................... 411
9.3.2 Special Types of Matrices......................................... 416
9.4 Solution of Ordinary Differential Equations.......................... 423
9.4.1 Initial Value Problems............................................... 424
9.4.2 Boundary Value Problems......................................... 437
9.4.3 Systems of Ordinary Differential Equations............. 443
9.5Numerical Solution of Partial Differential Equations............446
9.5.1 Explicit and Implicit Finite Difference Methods......446
9.5.2 Method of Lines........................................................449
x
Contents
9.5.3
Selected Applications Using the Method of Lines��������������������������������������������������������������������� 451
9.6 Summary................................................................................ 458
9.7 Problems................................................................................. 458
9.7.1 Summary...................................................................464
References.........................................................................................464
Appendix A: Elementary Properties of Determinants and Matrices....................... 467
Appendix B: Numerical Method of Lines Example Using MATLAB®.................481
Appendix C: Program for a Transport and Binding Kinetics Model of an Analyte...........................................................................489
Appendix D: Programmed Model of a Drug Delivery System............................... 511
Index���������������������������������������������������������������������������������������������������������������������� 539
Preface to the First Edition
The purpose of this book is to introduce students of chemical engineering to several mathematical methods that are often essential to successfully solve real process
engineering problems. The book emphasizes analytical methods, even though most
realistic models will be solved using numerical methods. However, prior to an extensive and expensive numerical analysis of a model, it is very useful to develop some
understanding of the gross tendencies of the model. This type of understanding usually comes from the derivation of analytical solutions of a modified version of the
problem under consideration.
Typical chemical engineering curriculums consist of the equivalent of three
semesters of calculus capped off by a course in elementary ordinary differential
equations. This usually occurs within the first 2 years of a 4-year program (5 years, if
co-op is an option). The next 2 or 3 years are usually dedicated to solving unit operation problems using prederived formulae. The point being, with few exceptions, the
use of the four semesters’ worth of mathematics is not applied until the first year of
graduate school.
Those graduates who do go on to industry and later encounter the need to understand and apply the results of computer algebraic systems—indeed, to choose a software package for their own applications—have to rely heavily on the salesperson’s
judgment.
This book provides worked-out examples using a number of solution techniques
while exposing the use of mathematics in chemical engineering to the reader.
The first chapter provides an introduction to the three classes of transport common to chemical engineering.
Chapter 2 deals with select first-order ordinary differential equations and provides
chemical engineering examples that demonstrate the use of solution techniques. A
section addressing the formulation of some physically applicable first-order ordinary
differential equations (problem setup) is included.
The third chapter addresses linear second-order ordinary differential equations.
A brief discourse, it reviews elementary differential equations, and the chapter serves
as an important basis to the solution techniques of partial differential equations discussed in Chapter 6. An applications section is also included with 10 worked-out
examples covering heat transfer, fluid flow, and simultaneous diffusion and chemical
reaction. In addition, the residue theorem as an alternative method for Laplace transform inversion is introduced.
Chapter 4 and Chapter 5 introduce Sturm–Liouville problems and Fourier series
and integrals, respectively. These topics contain essential background material for
use in solving linear partial differential equations. Applications of these are postponed until partial differential equations are discussed.
The sixth chapter provides instruction in a number of solution techniques for
linear partial differential equations. Also included is a section introducing regular
perturbation, a common approach to solving some nonlinear differential equations.
xi
xii
Preface to the First Edition
As the material in this chapter will be a new experience for a large segment of the
readership, a substantial number of drill-type examples are included.
Chapter 7 is dedicated entirely to worked-out examples taken from the chemical
engineering research literature. This chapter relies on the mathematics of the earlier
six chapters to solve problems in heat transfer; mass transfer; simultaneous diffusion
and convection; simultaneous diffusion and chemical reaction; simultaneous diffusion, convection, and chemical reaction; and viscous flow.
The eighth chapter briefly discusses dimensional analysis and scaling of boundary
value problems. This is an important topic in chemical engineering. The practicing
engineer is continually faced with justifying the simplifying assumptions invoked in
deriving a solution to some process model of concern to him or her.
Chapter 9 introduces selected numerical methods and available software packages. Because methods that were too effort-consuming earlier are now commercially
available in many software packages, it is more important to mention those packages and leave the algorithmic details to the numerical analysis literature. Here, it
is hoped that enough of an introduction to numerical methods is made so that the
interested reader can independently pursue the subject.
As a goal of this text is to remove the mathematics phobia that usually exists
among some of our bright young chemical engineers, rigor is sacrificed in favor of
exposition. Therefore, the references at the end of each chapter have been carefully
selected to aid the reader who wishes to pursue further study in the discussed subject matter. However, I do wish to point out that those references are not in any way
exhaustive. Bold or italic type is used to draw attention to a term or statement that is
significant to the concept under discussion.
Others and I have successfully used this book as a text for both undergraduate
and first-year graduate courses. Most of the students in the graduate course have
been chemical engineers with varying backgrounds in elementary differential equations. For an undergraduate one-semester course, the applications in Chapter 2 and
Chapter 3 are emphasized, and knowledge of those solution techniques is treated as
a prerequisite. Chapters 4 through 6 are covered in their entirety with some applications taken from Chapter 7. Also, parts of Chapter 9 are covered based on the audience needs. The graduate class uses the entire book in a one-semester course.
Preface to the Second Edition
Because the purpose of this book has not changed, the users of the first edition will
hopefully find the basic content and structure of this edition familiar. Two important
aspects of the application of mathematics to chemical engineering are (1) setting up
a mathematical model and (2) verification of the mathematical model with experimental or other independently derived data.
In this edition of the text, I have attempted to address these two aspects. Chapter 1
has been expanded to include two popular approaches to model development. Each
approach is discussed in the format of an example while using a real application from
research. Both applications are solved as examples in Chapter 7. Further, a model of
a one-dimensional rod is introduced in Chapter 6 and a planar model of heat conduction in one direction is introduced in Chapter 7. The solutions to the two examples of
modeling approaches developed in Chapter 1 are verified with independently derived
experimental data in Chapter 7. In addition, a figure comparing model results to
independently derived experimental data is included for one example of mass transfer in a membrane separator discussed in Chapter 7.
Additional changes have been made in Chapter 3 and Chapter 9. In particular,
Chapter 3 has been expanded to include systems of first-order differential equations.
Chapter 9 has been expanded to include the numerical method of lines. As usual,
an example using the numerical method of lines is provided, which extends into
Appendix B, where an actual MATLAB® program is given.
xiii
This page intentionally left blank
Preface to the Third Edition
Because the purpose of this book has not changed, the users of the first two editions
will hopefully find the basic content and structure of this edition familiar. Feedback
from students motivated the addition of more examples into this edition.
In this edition of the text, changes have been made in Chapters 3, 4, 6, 7, and 9.
More examples related to process control and an expanded problem set constitute
the modification of Chapter 3. Chapter 4 has been modified to introduce examples
of variable coefficient Sturm–Liouville problems both in the regular and singular
types. Also, the examples are renumbered to emphasize the related procedures introduced earlier and the problem set is expanded. Examples in Chapter 6 are renumbered to insert more depth on specific applications such as nonhomogeneous cases
of separation of variables. A justification for Fourier–Bessel series is now provided
in preference to a complicated proof, along with five additional examples involving
Bessel Functions. This chapter’s problem set is also expanded.
Chapter 7 has been expanded to include additional examples on contemporary
areas: absorption with chemical reaction, laminar flow in flat duct with permeable
walls, drug delivery, and wall region velocity profile analysis.
Chapter 9 has been expanded to include examples relating to biomedical engineering applications and an expanded problem set. These examples are solved using
the numerical method of lines. As usual, examples using the numerical method of
lines are provided, which extends into the appendices, where actual MATLAB® programs are provided.
A new section is included in this chapter on special types of matrices, such as
upper- and lower-triangular matrices, how to generate them, and factorization methods (Doolittle, Choleski, and Crout) that exploit their application to solve systems of
equations. An example introduced under the explicit and implicit finite difference
methods incorporates the notion of tridiagonal matrices, which was discussed earlier
but not demonstrated.
In addition, examples are introduced that demonstrate the use of Euler and modified Euler methods alongside the popular Runge–Kutta order-four method. Also
included is an example demonstrating the use of the predictor-corrector procedure
using the four-step Adams–Bashforth as the predictor and the three-step Adams–
Moulton procedure as the corrector.
xv
xvi
Preface to the Third Edition
MATLAB ® are registered trademarks of The MathWorks, Inc. For product
information,
please contact:
The MathWorks, Inc.
3 Apple Hill Drive
Natick, MA 01760-2098 USA
Tel: 508 647 7000
Fax: 508-647-7001
E-mail: info@mathworks.com
Web: www.mathworks.com
Acknowledgments
I am indebted to many who have encouraged me on this project and to all my
Mathematical Methods (ChE626) students for their contributions and patience and
understanding since the printing of the first edition. I thank especially Professor Ali
Elkamel of the University of Waterloo for his very timely suggestions and Professor
William E. Schiesser of Lehigh University for his generosity in sharing his computer
programs with me.
xvii
This page intentionally left blank
Author
Norman W. Loney is professor and department chair of the Otto H. York
Department of Chemical, Biological and Pharmaceutical Engineering at New Jersey
Institute of Technology (NJIT). He has authored or coauthored more than 70 publications and presentations related to the use of applied mathematics to solve transport
phenomena-related problems in chemical engineering since joining the depart­
ment in 1991. Dr. Loney has been awarded several certificates of recognition from
the National Aeronautics and Space Administration and the American Society for
Engineering Education for research contributions. He has also been honored with
the Newark College of Engineering Teaching Excellence award, the Saul K. Fenster
Innovation in Engineering Education award, and the Excellence in Advising award.
Dr. Loney is a fellow of the American Institute for Chemical Engineers.
Prior to joining NJIT, Dr. Loney, a licensed professional engineer, practiced engineering at Foster Wheeler, M.W. Kellogg Company, Oxirane Chemical Company,
and Exxon Chemical Company.
xix
This page intentionally left blank
1
1.1
Differential Equations
INTRODUCTION
There are several significant problems in chemical engineering that require a fundamental understanding of differential equations to fully appreciate the underlying
transport phenomena. In this book, differential equation means an equation containing derivatives of an unknown function to be determined [1]. For example, Fourier’s
law [2–4] for the molecular transport of heat in a fluid or a solid can be written as a
first-order differential equation
qz
d(ρCP T )
= −α
A
dz
(1.1)
for constant density ρ and heat capacity CP. In this equation, qz/A represents the heat
flux (J/s·m2), α the thermal diffusivity (m2/s), and ρ CPT the concentration of heat
(J/m3), with the subscript z indicating that energy is transferred in the z direction.
The unknown function is the temperature T(z). A second example that is familiar to
chemical engineers is Fick’s law [2–4] for the molecular transport of mass in a fluid
or a solid for constant total concentration in the fluid. This fundamental transport
process can be written as
J AZ = − DAB
dCA
dz
(1.2)
where JAZ is the flux of species A (kmol/s·m2), DAB is the molecular diffusivity (m2/s)
of species A in B, and CA is the concentration of A (kmol/m3). In this case, the
unknown function to be determined is CA(z). A third example is Newton’s law [2–4]
of viscosity, written as follows for constant density ρ :
τ zx = −γ
d( ν x ρ)
dz
(1.3)
where τ zx is the flux of x-directed momentum in the z direction [(kg·m/s)/s·m2] and
γ is the kinematic viscosity (μ/ρ ) or momentum diffusivity. Transport or diffusion
takes place in the z direction, and μ is the viscosity (kg/m·s). In this equation, the
unknown function to be determined is the x component of velocity ν x(z).
Differential equations are usually divided into two classes. If the unknown function depends on a single independent variable, then the differential equation is classified as an ordinary differential equation (ODE); if there are two or more independent
variables, then the equation is called a partial differential equation (PDE).
1
2
Applied Mathematical Methods for Chemical Engineers
Equations 1.1 through 1.3 are examples of ODEs. A general equation for the conservation of momentum, thermal energy, or mass can be written as
∂Γ
∂2 Γ
−δ 2 = R
∂t
∂z
(1.4)
where Γ represents the concentration of the property (momentum, energy, or mass), δ
is a proportionality constant (e.g., diffusivity), t is time, z indicates the distance in the
direction of flow, and R is a source term (generation). In this differential equation,
the unknown function to be determined is Γ (z, t), which depends on both distance
and time. This equation is an example of a PDE. Several other examples of PDEs are
given in Chapter 6.
1.2
ORDINARY DIFFERENTIAL EQUATIONS
In discussions involving differential equations, the word order is very prevalent. The
working definition of the order of an ODE is the order of the highest derivative that
appears in that equation. Hence, the equation
f [t , ρ(t ), ρ′(t ), L , ρ( n ) (t )] = 0
(1.5)
is an ODE of the nth order. Equation 1.5 represents a relation between the variable
t (independent) and the values of the dependent variable ρ and its first n derivatives,
ρ ′ , ρ ″ , … , ρ (n). An explicit example of Equation 1.5 is
ρ′′′ + 2et ρ′′ + ρρ′ = t 4
(1.6)
which is a third-order differential equation for ρ = ρ (t).
In this book, we will avoid the common assumption that it is always possible to
solve a given ODE for the highest derivative. However, most of the discussion will
be expedited when the form
ρ( n ) = f (t , ρ, ρ′, ρ′′, L , ρ( n −1) )
(1.7)
can be obtained. It should also be noted that even when the form given by
Equation 1.7 is achievable, it does not generally mean that there is a function ρ = ɸ (t)
that s­ atisfies it. Thus, a solution of the ODE 1.7 on α < t < β is a function ɸ such that
ɸ ″ , ɸ ″ ′, … , ɸ (n − 1) exist and satisfy
φ( n ) (t ) = f [t , φ(t ), φ ′(t ), L , φ( n −1) (t )]
(1.8)
for all t in α < t < β . In other words, a solution of a differential equation is a function
that satisfies the differential equation and the domain of definition of the differential
equation. By way of direct substitution into the first-order equation
dQ
= kQ
dt
(1.9)
3
Differential Equations
it can be shown that
Q(t ) = ce kt, −∞ < t < ∞
(1.10)
is a solution, where c is an arbitrary constant and k is a given constant.
There are three very important issues to be resolved for a given differential
equation:
1.Existence of a solution
2.Uniqueness of the solution
3.How to determine a solution
These issues are covered in detail by Ince 5 and some standard differential equation
texts. However, if an engineering problem is to be formulated as a differential equation it is expected to have a solution. This solution provides one way of verifying the
correctness of the mathematical formulation.
The remaining chapters of this book are dedicated to the exposition of some of the
common mathematical techniques that are useful in chemical engineering. However,
before we address the mathematical techniques it may be helpful to review some
modeling examples that lead to differential equations. In Section 1.3, examples are
provided that use the conservation laws to set up differential equations.
1.3 MODEL DEVELOPMENT
Regardless of the specific techniques used to derive the mathematical model of
chemical processes, the conservation laws must be taken into consideration. This is
the thesis of transport phenomena, and such conservation laws are well documented
in standard textbooks.
Examples 1.1 and 1.2 are provided as reminders of two popular approaches that
lead to differential equations. The techniques used in these examples are the shell
balance and the balance based on a previous mathematically formulated conservation law. Both approaches are acceptable in practice, but the second requires good
judgment and experience to combine the conservation laws and appropriately eliminate the terms that may not be reflecting the current mechanisms under consideration. In Example 1.1, the shell balance [4, 6] is illustrated.
Example 1.1
One approach to deriving correlations for mass transfer coefficients in process systems
is to generate experimental data in momentum transport studies. In this approach, it
is assumed that both molecular and eddy diffusions play a role in the intermediate
region. Then, at any distance y from the wall the rate of mass transfer can be expressed
as a function of both molecular and eddy diffusivities. However, applications of these
models rely on knowledge of eddy diffusivity, ED, as a function of y, a relationship that
is usually inferred from the experimental data [7–10]. There, the eddy diffusivity can
be inferred from the eddy viscosity by similarity arguments. A substantial amount of
published works is along this line [11–13].
4
Applied Mathematical Methods for Chemical Engineers
Consider an alternative approach that does not rely on the knowledge of the eddy
diffusivity as a function of the distance y from the wall. Here, we examine the mass
transfer for a turbulent flowing fluid in a smooth tube. In the tube, a turbulent core
region and a laminar sublayer region are considered separately as contributing to the
total mass transfer of the transferring species from the fluid toward the wall as well as
away from the wall.
1.3.1
TURBULENt CORE REGION (0 ≤ r ≤ Rb)
In this region, the velocity Vb is assumed to be independent of both r and z (Figure 1.1).
The concentration of the transferring species Cb is independent of r but depends on z.
For a core region of radius Rb in a smooth tube of radius R, a mass balance in a shell
of volume πRb2 ∆z is
N Az πRb2 z − N Az πRb2
z +∆z
− N Ar
Rb
2 πRb ∆z = 0
(1.11)
where NAz and NAr are the fluxes of the diffusing species in the z and r directions,
respectively [4, 14]. Dividing by πRb2 ∆z and letting Δ z → 0 in the limit, we get
dN Az
2
N Ar
=−
dz
Rb
(1.12)
Rb
Further, assuming that diffusion in the z direction is negligible in comparison to
bulk flow gives
N Az = − D
dCb
+ x A ( N Az + N Bz ) ≅ CbVb
dz
(1.13)
By combining Equations 1.12 and 1.13, we get
Vb
dCb
2
N Ar
=−
dz
Rb
(1.14)
Rb
where Vb is the bulk velocity whose profile is sketched in Figure 1.2. Also shown in
Figure 1.2 is an expanded view of the laminar sublayer in relation to the turbulent
core.
Rb
x
z
R
d
Turbulent core region
Z
FIGURE 1.1 Turbulent core. (From Huang et al., Chem. Eng. Series, 59, 1191–1197, 2004.
With permission.)
5
Differential Equations
Vb
Rb
z
vz
R
d
x
FIGURE 1.2 Laminar sublayer. (From Huang et al., Chem. Eng. Series, 59, 1191–1198,
2004. With permission.)
1.3.2 LAMINAR SUBLAYER REGION (0 < x < δ )
In the laminar sublayer region, the velocity of the fluid, vz, is assumed to be linear
with respect to x. At the interface of the two regions, x = δ , the velocities are equal,
that is, Vb = vz|x = δ . The concentration of the transferring species, CA, is expected to
depend on both x and z. At the interface, Cb = CA|x = δ .
Consider now a mass balance in a shell of volume Δ x Δ zw and length L over the
laminar sublayer:
w∆xN Az z − w∆x ⋅ N Az
z + ∆z
+ w∆z ⋅ N Ax x − w∆z ⋅ N Ax
x + ∆x
=0
(1.15)
Division by Δ x Δ zw and allowing Δ x and Δ z to go to zero in the limiting process
results in
∂ N Az ∂ N Ax
+
=0
∂x
∂z
(1.16)
Since there is no bulk flow in the x direction
N Ax = − D
∂CA
∂C
+ x A ( N Ax + N Bx ) = − D A
∂x
∂x
(1.17)
Also, assuming that the mass flux of A in the z direction is controlled by bulk flow
N Az = − D
∂CA
+ x A ( N Az + N Bz ) ≅ vz CA
∂z
(1.18)
Therefore, Equation 1.16 can be restated as
vz
∂CA
∂2 CA
=D
∂z
∂x 2
(1.19)
where vz is the velocity profile in the laminar sublayer, as shown in Figure 1.2. Since
we assumed that vz is proportional to the distance from the wall,
vz = hx
(1.20)
6
Applied Mathematical Methods for Chemical Engineers
The proportionality constant h is defined as
h=
Vb
δ
(1.21)
since at x = δ , vz = Vb. Then, Equation 1.20 becomes
vz =
Vb
x
δ
(1.22)
and Equation 1.19 becomes
Vb ∂CA
∂2 CA
=D
x
∂z
∂x 2
δ
(1.23)
where CA is the concentration of the diffusing species in the laminar sublayer and D
is the diffusion coefficient of that species. Equations 1.14 and 1.23 may be subjected
to the conditions
CA = 0 at x = 0
(1.24)
CA = Cb ( z ) at x = δ
(1.25)
CA = C0 at z = 0
(1.26)
when the mass transfer takes place from the fluid through the wall.
The final problem to be solved (Example 7.12) consists of
Vb
dCb
2
N Ar
=−
dz
Rb
Rb
Vb ∂CA
∂2 CA
=D
x
∂z
∂x 2
δ
(1.27)
(1.28)
CA = 0 at x = 0
(1.29)
CA = Cb ( z ) at x = δ
(1.30)
CA = C0 at z = 0
(1.31)
The next example uses a previous mathematically formulated conservation law to
develop a model for a mass exchanger.
7
Differential Equations
CAS0
r
CASL
z
CA0
CAB
CASL
CAS0
0
L
FIGURE 1.3 Tubes-in-shell mass exchanger.
Example 1.2
Large surface area membrane modules, such as hollow fiber units, are often used in the
production of low-alcohol beer, hemodialysis, or desalination. In all these processes,
the rate of transfer is believed to be governed by the concentration difference across
the membrane, molecular size, and permeability characteristics of the membrane. A
model that has shown some promise in correlating the amount removed as a function
of flow rate is discussed here.
The hollow fiber system consists of a shell, which houses a bundle of fibers. These
fibers are grouped together in a parallel array. Both ends terminate in a tube sheet
similar to a shell-and-tube heat exchanger. The length to diameter ratio of a typical
channel in a well-packed hollow fiber system can be as large as 103 –104. The Reynolds
number may be very low, and the system is expected to operate in a laminar flow
regime.
The entry region effect, which is important in traditional heat exchangers, is
­negligible for this type of unit that contains on the order of 102–104 fibers. Figure 1.3
shows the shell-in-tube arrangement of a typical unit. Notice that only one of the many
tubes is shown to emphasize the orientation of solute concentrations in both shell and
tube sides.
The following assumptions are made in the development of a proposed mathematical model:
•
•
•
•
Steady-state conditions prevail.
Fully developed laminar flow on the tube side.
Fick’s law can describe the diffusion process.
Physical properties such as density, diffusivity, and overall mass transfer
coefficient are the constants, independent of concentration.
• Dialyzate-side mass transfer resistance is independent of position.
• Plug flow occurs on the dialyzate side.
1.3.3 OUtLINE OF MODEL DEVELOPMENt
Subdivide the mass exchanger into two subsystems: tube side and shell side.
8
Applied Mathematical Methods for Chemical Engineers
1.3.3.1 Tube Side (Equation of Continuity for Species A)
Following Bird et al. [4], the equation of continuity for species A in terms of wA for
constant ρ and DAB in cylindrical coordinates is
∂ wA ν θ ∂ wA
∂ wA 
 ∂w
ρ  A + νr
+
+ νz

 ∂t
r ∂θ
∂r
∂z 
 1 ∂  ∂ wA  1 ∂ 2 wA ∂ 2 wA 
+ rA
= ρDAB 
+
r
+ 2
2
∂ z 2 
 r ∂r  ∂r  r ∂θ
(1.32)
where wA is the mass fraction of species A, and ρ and DAB represent the mass density
and diffusion coefficient, respectively. Equation 1.32 can be reduced to
 1 ∂  ∂ wA  ∂ 2 wA 
 ∂ wA 
ρ  νz
= ρDAB 

r
+

∂z 
∂ z 2 
 r ∂r  ∂r 
(1.33)
We make the following observations:
∂ wA
=0
∂t
Because we assumed steady state, the radial and θ components of velocity, ν r
and ν θ , are both zero in this system and there is no diffusion in the θ direction, that is,
ρDAB
1 ∂ 2 wA
≡0
r 2 ∂θ2
Also, there is no chemical reaction indicated in this process; therefore, there is no
generation or consumption of species A (rA ≡ 0). Based on the experience, we can
anticipate that the convection contribution in the z direction will be much larger than
the diffusion contribution, that is,
νz
∂ wA
∂ 2 wA
> DAB
∂z
∂z 2
Therefore, the equation of continuity for species A in this system is
 1 ∂  ∂ wA  
 ∂ wA 
ρ  νz
 = ρDAB 
r


∂z 
 r ∂ r  ∂r  
Finally, if we move ρ inside the derivatives and divide each term by the molecular
weight of species A and observe that
ρwA
ρ
= A = CA
MA MA
9
Differential Equations
is the concentration of species A, we get the result
ν z (r )
∂CA
1 ∂  ∂CA 
= DA
r

∂z
r ∂r  ∂r 
(1.34)
subject to the boundary conditions
− DA
CA (0, r ) = CA0
(1.35)
∂CA ( z , 0)
=0
∂r
(1.36)
∂CA ( z , R)
= K (CA r = R − CAS )
∂r
(1.37)
where CAS is the concentration of species A on the shell side and is a function of z
only. CA(z, r) is the local solute concentration in the stream, CA0 is the inlet solute
concentration for the tube side, DA is the diffusivity, and K is an overall mass transfer
coefficient. Since the flow is fully developed, we can replace ν z(r) by the parabolic
velocity profile
r2 

ν z (r ) = νmax  1 − 2 

R 
(1.38)
such that Equation 1.34 becomes
r 2  ∂C
1 ∂  ∂CA 

νmax  1 − 2  A = DA
r


R  ∂z
r ∂r  ∂r 
(1.39)
1.3.3.2 Shell Side
The material balance on the shell side results in
Q
dCAS
= −2 πRNK (CA
dz
r=R
− CAS )
(1.40)
subject to the condition that
CAS ( L ) = CASL
(1.41)
where N is the number of fibers and Q is the volumetric flow rate of the shell side
(sweep) stream. Also, a total mass balance of species A between the two streams
results in
Q(CAS0 − CASL ) =
NπR 2 νmax
2
r=R

4
C
−
CA
 A0
R 2 r ∫= 0

z=L

r2 

 1 − 2  r dr 
R

(1.42)
10
Applied Mathematical Methods for Chemical Engineers
where CAS0 is the outgoing sweep stream concentration of species A (Figure 1.3).
Equations 1.39 through 1.42 along with the conditions given by Equations 1.35
through 1.37 represent the model. The solution to this problem is developed in
Example 7.12.
It is well known that mathematical models are useful tools that contribute to the
understanding of underlying mechanisms occurring in a given process. It is also
known that the most useful models are the ones benchmarked with experimental
data. Although the benchmarking step can be challenging, it does guide the model
development toward the actual physicochemical realities existing in a given system.
Both Examples 1.1 and 1.2 are favorably compared with independently derived and
published experimental data.
REFERENCES
1.Boyce, W.E. and DiPrima, R.C. Elementary Differential Equations and Boundary
Value Problems, 8th ed., John Wiley & Sons, New York, 2005, Chap. 1.
2.Geankopolis, C.J. Transport Processes and Unit Operations, 3rd ed., Prentice Hall,
Englewood Cliffs, NJ, 1978.
3.Bennett, C.O. and Myers, J.E. Momentum, Heat, and Mass Transfer, McGraw-Hill,
New York, 1962.
4. Bird, R.B., Stewart, W.E., and Lightfoot, E.N. Transport Phenomena, John Wiley, New
York, 2002.
5. Ince, E.L. Ordinary Differential Equations, Dover, New York, 1956.
6. Huang, C.R., Denny, A.F., and Loney, N.W. Molecular diffusion in the laminar ­sub-layer
during turbulent flow in a smooth tube, Chem. Eng. Sci., 59, 1191 (2004).
7. Van Shaw, P. and Hanratty, T.J. Fluctuations in the local rate of turbulent mass transfer
to a pipe wall, AIChE J., 10, 475 (1964).
8.Son, J.S. and Hanratty, T.J. Limiting relation for the eddy diffusivity close to a wall,
AIChE J., 13, 689 (1967).
9. Hughmark, G.A. Wall region mass transfer for large Schmidt numbers in turbulent pipe
flow, AIChE J., 23, 601 (1977).
10. Shaw, D.A. and Hanratty, T.J. Turbulent mass transfer rates to a wall for large Schmidt
numbers, AIChE J., 23, 28 (1977).
11. Campbell, J.A. and Hanratty, T.J. Mass transfer between a turbulent fluid and a solid
boundary: linear theory, AIChE J., 28, 988 (1982).
12.Campbell, J.A. and Hanratty, T.J. Turbulent velocity fluctuations that control mass
transfer to a solid boundary, AIChE J., 29, 215 (1983).
13.Na, Y., Papavassiliou, D.V., and Hanratty, T.J. Use of direct numerical simulation to
study the effect of Prandtl number on temperature fields, Int. J. Heat Fluid Flow, 20,
187 (1999).
14. Plawsky, J.L. Transport Phenomena Fundamentals, Marcel Dekker, New York, 2001.
2
First-Order Ordinary
Differential Equations
2.1 LINEAR EQUATIONS
The examples of linear first-order differential equations occur frequently in c­ hemical
engineering practice through unsteady-state mass balances or first-order chemical
reaction problems.
Here, we review a few methods for solving first-order ordinary differential
­equations. Following each method are examples demonstrating the application of
that method. Also, the notion of translating prose into mathematical symbolism is
introduced in Section 2.4.
A brief recap of the definition of linear equations in the context of differential
equations is presented here. Following the recap are the examples of unsteady mass
balances, which lead to linear first-order problems. Also presented are examples
involving chemical reactions that can be treated as linear first-order problems.
In this chapter, attention is focused on differential equations of the form
ρ′ = f (t , ρ)
(2.1)
where f is a given function of t and ρ . By linear equations, we mean any equation
that can be expressed in the polynomial form
an (t )ρ( n ) + an −1 (t )ρ( n −1) +  + a2 (t )ρ′ + a1 (t )ρ(0) + a0 (t ) = g(t )
(2.2)
where ρ (.) symbolizes the derivative of ρ with respect to t. Consequently, the
equation
a2 (t )ρ(1) + a1 (t )ρ(0) + a0 = g(t )
(2.3)
is a linear first-order differential equation and is more familiar in the following
form:
a2 (t )ρ′ + a1 (t )ρ + a0 (t ) = g(t )
(2.4)
11
12
Applied Mathematical Methods for Chemical Engineers
The general solution of Equation 2.4 can be obtained by the following steps:
1. Rewrite Equation 2.4 as follows:
ρ′ +
a1 (t )
g(t ) − a0 (t )
, a2 (t ) ≠ 0 for all t
ρ=
a2 (t )
a2 (t )
(2.5)
2.Determine
 a (t ) 
µ(t ) = exp  ∫ 1 dt 
 a2 (t ) 
(2.6)
where μ(t) is called an integrating factor.
3. Multiply both sides of Equation 2.5 by μ(t)

a1 (t ) 
g(t ) − a0 (t )
µ(t )
ρ′ + a (t ) ρ µ(t ) =
a2 (t )


2
(2.7)
and observe that the left-hand side of Equation 2.7 can be written as
d
[ρµ(t )]
dt
or
 a (t )  d
 a (t ) 
a (t )
ρ′ exp  ∫ 1 dt  + ρ 1 exp  ∫ 1 dt  = [ρµ(t )]
a2 (t )
 a2 (t )  dt
 a2 (t ) 
(2.8)
Thus, Equation 2.7 can be recast as
 a1 (t )   g(t ) − a0 (t )
 a (t ) 
d
dt  =
exp  ∫ 1 dt  (2.9)
ρ exp  ∫
dt 
a2 (t )
 a2 (t )  
 a2 (t ) 
4.Integrate both sides of Equation 2.9 with respect to the independent variable to get
 a (t ) 
 a (t ) 
g(t ) − a0 (t )
exp  1 dt  dt + c
ρ exp  ∫ 1 dt  = ∫
a2 (t )
 a2 (t ) 
 a2 (t ) 
or
 a (t ) 

a (t )  g(t ) − a0 (t )
exp  1 dt  dt
ρ(t ) = exp  − ∫ 1 dt  ∫
a2 (t )
 a2 (t ) 
 a2 (t ) 

a (t ) 
+ c exp  − ∫ 1 dt 
 a2 (t ) 
where c is the constant of integration.
(2.10)
13
First-Order Ordinary Differential Equations
Example 2.1
Water containing 0.5 kg of salt per liter is poured into a tank at a rate of 2 L/min, and
the well-stirred mixture leaves at the same rate [1]. After 10 minutes, the process is
stopped and freshwater is poured into the tank at a rate of 2 L/min, with the new mixture leaving at 2 L/min. Determine the amount (in kilograms) of salt in the tank at the
end of 20 minutes if there were 100 L of pure water initially in the tank.
Solution
Let CA (kg/L) be the concentration of salt in the tank at any time t. Then, from material
balance [5] a salt balance gives
2 L/min,
1/2 kg salt/L
CA
2 L/min, CA(kg/L)
Rate of accumulation = rate of input - rate of output
(2.11)
or in symbols,
100 L
dCA  1/2 kg   2 L 
 2L
=
 
 − CA 


dt
L
min
min 
(2.12)
with the following initial condition:
CA (0) = 0
(2.13)
dCA 1
1
+ CA =
dt
50
100
(2.14)
Equation 2.12 can be rewritten as
as suggested in step 1. Then, following step 2,
t
 1 
µ(t ) = exp  ∫ dt  = e 50
 50 
and Equation 2.14 is recast as
(e
t
50
1 50t
e
CA ′ =
100
)
which is in the form of Equation 2.9, as given in step 3. Following step 4, we get
(2.15)
14
Applied Mathematical Methods for Chemical Engineers
CA (t ) =
50
1
+ ae − 50 t
100
(2.16)
where a is an arbitrary constant. Using the given initial condition, Equation 2.13, we get
50
1
1 − e − 50 t
100
(
CA (t ) =
)
(2.17)
Equation 2.17 is the salt concentration profile for the first 10 minutes of the process. For
the subsequent time during which pure water is added, Equation 2.11 reduces to
Rate of accumulation = − rate of output
(2.18)
and the new initial condition is
CA (10) =
50
10
1 − e − 50
100
(
)
Thus,
dC A
2
=−
CA
dt
100
(2.19)
and
CA (10) =
50
10
1 − e − 50
100
(
)
(2.20)
Equations 2.19 and 2.20 describe the process where no salt (pure water) is being poured
in. The solution of Equations 2.19 and 2.20 gives
CA (t ) = be − 50 t
1
(2.21)
where
b=
1
10
10
1 − e − 50 e 50
2
(
)
Then, at t = 20 minutes or after the second 10-minute period
(
CA (20) = 1/2e − 50 1 − e − 50
10
10
)
and the amount of salt in the tank at the end of this period is
100 CA (20) = 50e −0.2 (1 − e −0.2 ) kg
Example 2.2
Consider a tank with 500-L capacity that initially contains 200 L of water with 100 kg of
salt in solution. Water containing 1 kg of salt per liter is entering at a rate of 3 L/min, and
the mixture is allowed to flow out of the tank at a rate of 2 L/min. Determine the amount
(in kilograms) of salt in the tank at any time prior to the instant when the solution begins
to overflow. Determine the concentration (in kilograms per liter) of salt in the tank when
15
First-Order Ordinary Differential Equations
it is at the point of overflowing. Compare this concentration with the theoretical limiting
concentration if the tank had infinite capacity [1].
Solution
Let CA (t) (kg/L) be the concentration in the tank at any time t, and let V(t) (L) be the volume
of the tank contents, with V0 as the initial volume. Then, Equation 2.11 becomes
d(VCA)  1 kg  3 L 
 2 L
=
 
 − CA 




dt
L
min
min 
(2.22)
but
V (t ) = V0 + (volumetric rate in − volumetric rate out) t
(2.23)
and
dV
= Volumetric rate in − volumetric rate out
dt
Therefore, Equation 2.22 becomes
CA
dV
dC A
+V
= 3 − 2CA
dt
dt
(2.24)
or
CA + (200 + t )
dCA
= 3 − 2CA
dt
subject to
CA (0) = 1/2
kg
L
Equation 2.25 can be solved using the previously given four steps as follows:
Step 1:
dC A
3
3
+
CA =
dt
200 + t
200 + t
Step 2:
3


µ(t ) = exp  ∫
dt = (200 + t )3
 200 + t 
Step 3:
[(200 + t )3 CA ]′ = 3(200 + t )2
(200 + t )3 CA = 3 ∫ (200 + t )2 dt + k
(2.25)
16
Applied Mathematical Methods for Chemical Engineers
or
Step 4:
CA (t ) = 1 +
k
(200 + t )3
at t = 0,
CA =
1
k
= 1+
2
(200)3
thus
1
k = − (200)3
2
1  200 
CA (t ) = 1 − 

2  200 + t 
3
Then, the amount of salt in the tank at any time t prior to the instant when the solution
begins to overflow is V(t)CA.
That is,
V (t )CA (t ) = 200 + t −
100(200)
(200 + t )2
for t < instant of overflow
Noting that the capacity of the tank is 500 L, at the instant of overflow
500 = 200 + t, t = 300.
At t = 300,
CA (300) = 1 −
1/2(200)3 121
=
(500)3
125
in comparison with the theoretical limiting concentration of
lim CA (t ) = 1
t →∞
Example 2.3
Consider the consecutive second-order, irreversible reactions occurring in a batch
reactor [6]:
1
A + S k
→X
2
X + S k
→Y
If one mole of A and two moles of S are initially added, determine the mole fraction of
X remaining after half of A is consumed. Assume that k2/k1 = 2.
17
First-Order Ordinary Differential Equations
Solution
dCX
= k1CACS − k 2CXCS
dt
(2.26)
is the net rate of formation of X in terms of the appropriate concentrations.
dCA
= − k1CACS
dt
(2.27)
dCY
= k 2CXCS
dt
(2.28)
is the rate of disappearance of A.
is the rate of formation of Y. Dividing Equation 2.26 by Equation 2.27 results in
dC X
k C
= −1 + 2 X
dC A
k1 CA
Equation 2.29 is a linear first-order differential equation.
For an integrating factor
µ(CA) = CA−2
the differential equation can be represented as follows:
(CXCA−2 )′ = −CA−2
This integrates to
CX = CA + m1CA2
subject to the following:
CA = 1, CX = 0 at t = 0
Therefore,
CX = CA − CA2
Similarly, dividing Equation 2.28 by 2.27 gives
dC Y
= −2 + 2CA
dC A
which integrates to
CY = 1 − 2CA + CA2
(2.29)
18
Applied Mathematical Methods for Chemical Engineers
based on the initial condition
CA = 1, CY = 0 at t = 0
Finally, the mole fraction of X is
1
CA − CA2
=
C A + CS + C X + C Y 9
when half of A is consumed.
Examples 2.1 through 2.3 demonstrate a technique to solve linear first-order differential equations of the type given by Equation 2.5. Although this method is straightforward, there are three things to note. First, the form given by Equation 2.5 is required,
that is, the coefficient of the derivative term, ρ ′, must be one. Second, the functions
a1(t), b2(t), and [g(t) – a0(t)]/a2(t) must be continuous. Third, Equation 2.8 provides a
check as to whether the derivative of the product of μ and ρ is in fact the appropriate
left-hand side of Equation 2.7.
It should also be noted that each example problem was stated in prose and required
transformation to mathematical symbolism. This transformation or problem setup is
an important step and is usually where most students are left behind. However, in this
book, whenever the demonstration involves physical phenomena such as those encountered in chemical engineering, the formats of Examples 2.1 and 2.2 will be followed.
As an aid to this step, it is suggested that the student invest some time in reviewing
the laws of conservation of mass and energy, as well as the unit operations principles
discussed in undergraduate chemical engineering courses.
2.2
ADDITIONAL INFORMATION ON LINEAR EQUATIONS
In this section, a very important fundamental theorem is discussed. This theorem
is important because it resolves two of the issues raised at the end of Section 1.1.
Specifically, the theorem addresses the existence and uniqueness of a solution.
An initial value problem for a first-order linear equation will always have a unique
solution if the conditions of the following theorem are satisfied [1,2].
Theorem 2.1
If the functions p and g are continuous on an open interval α < x < β containing the
point x = x0, then there exists a unique function y = φ (x) that satisfies the differential
equation
y′ + p( x ) y = g( x )
(2.30)
for α < x < β and that also satisfies the initial condition
y( x 0 ) = y0
where y0 is an arbitrary prescribed initial value.
(2.31)
19
First-Order Ordinary Differential Equations
2.2.1 PROOF (non-rigorous)
We seek a function μ such that if Equation 2.30 is multiplied by μ then the left-hand
side of Equation 2.30 can be written as the derivative of the single function μ(x)y,
that is, μ(x) [y ′ + p(x)y] = [μ(x)y] ′ = μ(x)y ′ + μ ′(x)y.
Thus, μ(x) must satisfy
µ( x ) p( x ) y = µ′( x ) y
or
µ ′( x )
= p( x ), µ( x ) > 0
µ( x )
Then
ln µ( x ) =
∫
x
p(t ) dt
or
x
µ( x ) = exp  ∫ p(t ) dt 


(2.32)
[µ( x ) y]′ = µ( x ) g( x )
(2.33)
Therefore,
following the multiplication of Equation 2.30 by μ(x).
Integrating both sides of Equation 2.33 with respect to x and solving for y give
y=
1  x
µ(s) g(s) d s + c 

µ( x )  ∫
(2.34)
Further, since p is continuous for α < x < β , it follows that μ is defined in this i­ nterval
and is a nonzero differentiable function. Thus, the conversion of Equation 2.30 into
the form of Equation 2.33 is justified. Also, the function μg has an a­ ntiderivative
because μ and g are continuous and Equation 2.34 follows from Equation 2.33.
The assumption that there is at least one solution of Equation 2.30 is verifiable by
­substituting Equation 2.34 into Equation 2.30. The initial condition, Equation 2.31,
determines the integration constant c uniquely.
Sometimes, nonlinear equations can be reduced to linear ones by a substitution.
One example where such a substitution is helpful is in solving the Bernoulli equations. The form of the Bernoulli equations is
y′ + p( x ) y = q( x ) y n
(2.35)
v ( x ) = y1− n ( x )
(2.36)
and if n ≠ 0, 1 then
reduces Equation 2.35 to a linear equation.
20
Applied Mathematical Methods for Chemical Engineers
Example 2.4
Solve: x2y ′ + 2xy − y 3 = 0
Solution
By comparing with Equation 2.35, n = 3, that is,
x 2 y′ + 2 xy = y3
or
y′ +
Let v = y1− 3 = y −2 =
2
1
y = 2 y3
x
x
(2.37)
1
.
y2
dv −2 dy
=
dx y3 dx
Solving for
dy
to get
dx
dy − y3 dv
1
dv
=
= − v −3/ 2
dx
2 dx
2
dx
Substituting for
dy
and y in Equation 2.37 gives
dx
1
dv 2 −1/ 2 1 −3/ 2
− v −3/ 2
+ v
= 2v
2
dx x
x
Following simplification, the differential equation becomes
dv 4
2
− v=− 2
dx x
x
(2.38)
Equation 2.38 is a linear first-order differential equation with a new dependent
variable, v(x). Equation 2.38 can now be solved using the method of Section 2.1.
A more engineering-type example is demonstrated in Example 2.5.
Example 2.5
Suppose that in a certain autocatalytic chemical reaction a compound A reacts to form
a compound B. Further, suppose that the initial concentration of A is CA0 and that CB(t)
is the concentration of B at time t. Then, CA0 – CB(t) is the concentration of A at time t.
Determine CB(t) if CB(0) = CB0.
21
First-Order Ordinary Differential Equations
Solution
Note that in an autocatalytic reaction the substance produced stimulates the reaction;
dCB
is proportional to both CB(t) and CA0 − CB(t), that is,
thus, the reaction rate
dt
dCB (t )
= kCB (t )(CA0 − CB (t ))
dt
(2.39)
subject to
CB (0) = CB0
where k is the reaction rate coefficient.
Equation 2.39 can be restated as
dC B
− kCBCA0 = − kCB2
dt
By comparing with Equation 2.35, n = 2.
1.
Let v (t ) = CB1− 2 =
CB
Then,
dCB
dv
dv
= −CB2
= − v −2
dt
dt
dt
Substitute
dCB
and v(t) into Equation 2.40 to give
dt
− v −2
dv
− kv −1CA0 = − kv −2
dt
Then, multiplying both sides of the resulting equation by −v2 gives
dv
+ kCA0 v = k
dt
µ(t ) = exp
( ∫ kC dt )
A0
Then,
[ v exp ( kCA0t )]′ = k exp( kCA0t )
(2.40)
22
Applied Mathematical Methods for Chemical Engineers
Integrating both sides with respect to t gives
v exp ( kCA0 t ) =
1
exp ( kCA0 t ) + m1
CA0
where m1 is an arbitrary constant.
Therefore,
υ=
1
1
+ m1 exp (− kCA0 t ) =
CA0
CB
such that
CB (t ) =
1
1 / CA0 + m1 exp(− kCA0 t )
with
m1 =
2.3
CA0 − CB0
CA0CB0
NONLINEAR EQUATIONS
For those first-order equations that cannot be expressed in polynomial form, there
is no single analytical method to produce a solution, as seen in Section 2.1. This
difficulty increases the importance of the issues of existence and uniqueness of a
solution. For a very lucid discussion on the existence and uniqueness theorem for
nonlinear first-order differential equations, many excellent texts are available [1,2].
In this section, a few standard methods are presented for use on those first-order
nonlinear differential equations that can be solved analytically.
Even though the form
dρ
= f (t , ρ)
dt
(2.41)
is common, it is sometimes more convenient to rewrite Equation 2.41 in an alternate
form:
M (t , ρ) + N (t , ρ)
dρ
=0
dt
(2.42)
2.3.1 SEPARABLE EQUAtIONs
Suppose M is a function of t only, and N is a function of ρ only; then Equation 2.42
becomes
M (t ) + N (ρ)
dρ
=0
dt
(2.43)
First-Order Ordinary Differential Equations
23
which can be written as
N (ρ)dρ = − M (t ) dt
(2.44)
Whenever a first-order differential equation can be written in either of the forms of
Equation 2.43 or Equation 2.44, the equation is said to be separable.
We reconsider Equation 2.39
dCB
= kCB (CA0 − CB )
dt
subject to
CB (0) = CB0
Then, this differential equation is separable and results in
dC B
= k dt
CB (CA0 − CB )
(2.45)
To solve Equation 2.45, the left-hand side must first be simplified. Consider now the
fraction
1
CB (CA0 − CB )
=
γ
α
+
CB CA0 − CB
where α and γ are constants to be determined. Then,
α (CA0 − CB ) + γCB = 1
If we put
CB = 0: αCA0 = 1
then,
α=
1
CA0
If we put
CB = CA0: γCA0 = 1
then,
γ=
1
CA0
Equation 2.46 can now be expressed as
1
CB (CA0
1
1
CA0
CA0
=
+
− CB ) CB CA0 − CB
(2.46)
24
Applied Mathematical Methods for Chemical Engineers
and Equation 2.45 becomes
1
CA0

 1
1
 C + C − C  dCB = kdt
A0
B 
 B
(2.47)
which integrates to
1
 CB
 CA 0
= m1 exp(kt )
C − C 
B 
 A0
where m1 is an arbitrary constant to be determined with the given initial condition.
At t = 0, CB = CB0; then,
1
 CB0  CA 0
= m1
C − C 
B 
 A0
CB (t ) =
(CA0
CB0 CA0
− CB0 ) exp(− kCA0 t ) + CB0
following simplification.
As evidenced in this later illustration, the potential difficulty in applying this
separation of variable technique lies in one’s ability to carry out the resulting integration that may arise, such as in Equation 2.45.
Another nonlinear problem that is not of the variable-separable type may be solvable if it is exact or can be made exact by use of an appropriate factor.
2.3.2 EXAct EQUAtIONs
Suppose Equation 2.42 is given; then, if a function w(t, ρ ) exists such that
∂ w(t , ρ)
= M (t , ρ),
∂t
∂ w(t , ρ)
= N (t , ρ)
∂ρ
(2.48)
and such that w(t, ρ ) = constant defines ρ = φ (t) implicitly as a differentiable function
of t [1,3], then
M (t , ρ) + N (t , ρ)
dρ ∂ w ∂ w dρ d
=
+
= w(t , ρ(t ))
dt
∂t ∂ρ dt dt
(2.49)
By comparing Equation 2.49 with Equation 2.42, we get
d
w(t , ρ(t )) = 0
dt
(2.50)
25
First-Order Ordinary Differential Equations
When Equations 2.48 through 2.50 hold, Equation 2.50 is called an exact differential equation. To determine whether an equation is exact in a given region R, the
following criteria are essential:
1. The functions M, N, ∂ M , and ∂ N must be continuous in the given region.
∂t
∂ρ
∂M ∂N
must hold at each point in the region.
2. =
∂ρ
∂t
3.The region R must be simply connected, that is, a single closed curve that
does not cross itself or a region without holes.
Sometimes, criterion 2 is not immediately satisfied, and an adjustment can be made
that will remedy such occurrences. Whenever such an adjustment is possible, the
differential equation, Equation 2.42, will become exact. To determine this adjustment, consider
∂
∂
(µM ) = (µN )
∂t
∂ρ
(2.51)
where μ is the adjustment to be determined and can be a function of both t and ρ .
Then,
∂µ  ∂ M ∂ N
1  ∂µ
−M
N
=
−

µ  ∂t
∂ρ  ∂ρ
∂t
(2.52)
Equation 2.52 is not easy to solve in its present form; however, if either μ = μ(t) or μ
= μ(ρ ) then Equation 2.52 simplifies to
1 dµ 1  ∂ M ∂ N 
=
−
µ dt N  ∂ρ
∂t 
(2.53)
1 dµ 1  ∂ N ∂ M 
=
−
µ dρ M  ∂t
∂ρ 
(2.54)
or
Either Equation 2.53 or Equation 2.54 gives a formula to determine ρ μ. If μ = μ(t, ρ ),
Equation 2.52 must be solved directly.
Equation 2.39 can be solved by first finding μ = μ(CB) and multiplying both sides
with μ to get an exact differential equation:
µ(CB )
dCB
− kµ(CB )CB (CA0 − CB ) = 0
dt
(2.55)
26
Applied Mathematical Methods for Chemical Engineers
Homogeneous equations comprise a third group of non linear-type problems that
usually do not yield to either the variable-separable or exact solution techniques.
An equation of this type, however, may yield a solution if a new variable can be
introduced.
2.3.3
HOMOGENEOUs EQUAtIONs
Whenever Equation 2.41 can be rewritten in the form
dρ
= h(ρ / t )
dt
(2.56)
then Equation 2.56 is said to be homogeneous. The quantity ρ /t can now be treated
as a new variable, and one of the solution techniques of the previous sections may
now be applicable.
So far, the examples have assumed that the differential equations are given. However,
as chemical engineers, we know that more often than not the main problem is in the
derivation of the differential equation and the associated conditions. To address that
aspect of mathematical methods in this chapter, a problem setup section follows.
2.4
PROBLEM SETUP
The traditional approach of outlining the theory and presenting some supporting examples has been followed up to now. However, a needed deviation from tradition is a “how
to” or a problem setup section. This section is included to demonstrate one approach to
formulating a physically applicable first-order ordinary differential equation.
2.4.1 PROBLEM StAtEMENt
Consider the continuous extraction of benzoic acid from a mixture of benzoic acid
and toluene, using water as the extracting solvent [4]. Both streams (acidic mixture
and water) are fed into a tank where they are stirred efficiently, and the mixture is
then pumped into a second tank where it is allowed to settle into two layers. The
upper organic phase and the lower aqueous phase are removed separately, and the
problem is to determine what proportion of the acid has passed into the solvent phase.
A list of simplifications for the idealized problem (model) follows:
1.Combine the two tanks into a single stage (Figure 2.1).
2.Express stream-flow rates on a solute-free basis.
3.Assume a steady flow rate for each phase.
4.Assume that toluene and water are immiscible.
5.Assume that feed concentration is constant.
6.Assume that the mixing is efficient enough such that the two streams leaving the stage (Figure 2.1) are always in equilibrium with each other and can
be expressed as
y = mx
(2.57)
27
First-Order Ordinary Differential Equations
R L/min, toluene
CA0 kg/L acid
V1
S L/min, water
x
x kg/L, acid
V2 , y
y kg/L, benzoic acid
FIGURE 2.1
R L/min, toluene
S L/min, water
Equilibrium stage.
where m is the distribution coefficient, x is the concentration of benzoic
acid leaving the stage in the organic phase, and y is the aqueous phase benzoic mass concentration.
7. Assume that the composition of a stream leaving the stage is the same composition as that phase in the stage.
8.Assume that the stage initially contains V1 L of toluene, V2 L of water, and
no benzoic acid.
Then, using Equation 2.11, that is,
Rate of accumulation = rate of input − rate of output
The quantities for any time t can be derived. A helpful procedure [4] is to ­tabulate
the quantities for any time t and for a small change in time ∆t. A typical table,
Table 2.1, is given below.
Then, during a time interval ∆t, input of acid = RCA0∆t while output of acid =
dx 
dy 
dx
dy


R x +
∆t  ∆t + S  y +
∆t  ∆t and accumulation of acid = V1
∆t + V2
∆t.


dt 
dt 
dt
dt
Therefore,
dy 
dx 
dy  
 
 dx

+ V2  ∆t = RCA0 ∆t −  R  x + ∆t  + S  y + ∆t   ∆t
 V1

dt
dt 
dt 
dt  
 
which simplifies to
V1
dx
dy
dx
dy
+ V2
= RCA0 − R  x + ∆t  − S  y + ∆t 
dt
dt
dt 
dt 


Then,
dx
dy
dx 
dy  



lim V1
+ V2  = lim  RCA0 − R  x + ∆t  − S  y + ∆t  



∆
t
→
0
dt 
dt
dt  
 dt

∆t → 0
gives
V1
dx
dy
+ V2
= RCA0 − Rx − Sy
dt
dt
(2.58)
28
Applied Mathematical Methods for Chemical Engineers
TABLE 2.1
Quantities for t and Δt
t
System Property
t + Δt
Flow rate of organic phase
Flow rate of aqueous phase
Volume of organic phase in stage
Volume of aqueous phase in stage
Input acid concentration in organic phase
R
S
V1
V2
CA0
R
S
V1
V2
CA0
Output acid concentration in organic phase
x
x+
dx
∆t
dt
Output acid concentration in aqueous phase
y
y+
dy
∆t
dt
Amount (mass) of acid in organic phase
V1x
V1 x + V1
dx
∆t
dt
Amount (mass) of acid in aqueous phase
V2y
V2 y + V2
dy
∆t
dt
Input acid concentration in aqueous phase
0
0
Source: Jenson, V.G. and Jeffreys, G.V., Mathematical Methods in Chemical Engineering,
Academic Press, London, United Kingdom, 1963.
Equation 2.58 reduces to
V1
dx
dx
+ V2 m
= RCA0 − Rx − Smx
dt
dt
or
(V1 + mV2 )
dx
= RCA0 − ( R + Sm) x
dt
(2.59)
a linear first-order ordinary differential equation subject to the initial condition
(state) of the system (assumption 8)
x = 0 when t = 0
(2.60)
The solution of Equations 2.59 and 2.60 will give the organic phase acid concentration profile as a function of time. Both the organic and the aqueous phase acid
­concentration profiles can be used to forecast the behavior of a single stage liquid–
liquid e­ xtraction unit during start-up.
In the derivation of Equation 2.59, eight assumptions were listed. No general rule
governs the number of assumptions that will result in a perfect model. However, a
balance between too many and too few assumptions must be found if a workable
First-Order Ordinary Differential Equations
29
solution is to be expected. If too many assumptions are made, the result will be in
gross error, while too few assumptions can result in a mathematical problem that is
not tractable.
The earlier format may be modified according to the situation under consideration. The reader should keep in mind that there is no single way to set up problems.
However, there are some key items to pay close attention to:
• Always check for the involvement of some physical law or principle (mass,
momentum, or energy balances).
• Include a consistent set of units (same units in each term).
• Appropriately include given conditions (initial or boundary).
• Check the mode of operation (steady or unsteady process).
Below are some examples (Examples 2.6 through 2.9) for which the straightforward
application of mass or energy balance is sufficient to set up the differential equation.
Example 2.6 Transient Behavior of an Air-Cooling System
Consider an engine that generates heat at a rate of 8530 Btu/min [5]. Suppose this
engine is cooled with air, and the air in the engine housing is circulated rapidly enough
so that the air temperature can be assumed uniform and is the same as that of the
outlet air. The air is fed to the housing at 6.0 lb·mol/min and 65°F. Also, an average
of 0.20 lb·mol of air is contained within the engine housing and its temperature variation can be neglected. If heat is lost from the housing to its surroundings at a rate of Ql
(Btu/min) = 33.0 (T − 65ºF) and the engine is started with the inside air temperature
equal to 65ºF,
1. Derive a differential equation for the variation of the outlet temperature with
time.
2. Calculate the steady-state air temperature if the engine runs continuously for
an indefinite period of time, using Cv = 5.00 Btu/lb·molºF.
Solution
The unsteady-state balance equation for this system (air within the engine housing) is
the first law of thermodynamics for open systems with changes in kinetic and potential
energies neglected. Also, the temperature and composition of the system contents are
assumed independent of position and no phase changes occur. This gives the equation
MCv
dTsys
= mCp (Tm − Tsys ) + Q + Ws
dt
where Ws is the rate of transfer of shaft work, Q is the rate of heat transfer, M is the
mass (or number of moles) of the system contents, and m is the mass flow rate.
Taking
Cp = Cv + R = 6.99 Btu/lb·mol°F
30
Applied Mathematical Methods for Chemical Engineers
then
mCp = (6.0 lb·mol/ min)
(6.99 Btu/lb·mol°F) = 41.9
Btu
min°F
For this problem, Ws = 0, as there are no moving parts and Q = Qgen – Ql. Therefore, the
differential equation becomes
(0.2) (5.0)
dT
= 41.9(65 − T ) + 8530 − 33(T − 65)
dt
which reduces to
dT
= −74.9T + 13398
dt
subject to
t = 0, T = 65°F
The solution to the differential equation and initial condition is
T (t ) = 179 − 112e −74.9t
The steady-state temperature is
lim T (t ) = 179°F
t →∞
Example 2.7 Comminution Operation
Suppose a copper ore is fed to a ball mill at a steady rate Q (kg/h), and crushed ore is
withdrawn at the same rate. At an initial time (t = 0), the total mass of ore in the mill
is M (kg). Further suppose that a series of 10 particle-size ranges is defined and xi
represents the mass fraction of particles in the ith size range, where i = 1 is the largest
size range and i = 10 is the smallest. The rate at which particles are broken out of the
ith size range is
ri = ki mi
where mi is the mass of particles in this size range. Further suppose that of the particles
broken out of size range i in a differential time interval, a fraction bij go into size range
j. Assume that the size distribution of particles is uniform throughout the mill and
equals that of the product, and let xif be the mass fraction of the feed that falls in the ith
size range. Show that a mass balance on the jth size fraction in the tank yields
dx j
dt
j −1
=  Q / M   x jf − x j  − k j x j + ∑ ki xi bij
i =1
First-Order Ordinary Differential Equations
Solution
Accumulation = input + generation − output − consumption
dx j
d
( Mx j ) = M
Accumulation =
dt
dt
Input = Qxif
Generation: The rate at which particles enter the jth size fraction from the ith size
fraction by breakage is kimibif.
Output = Qxj
Consumption = kjmj
Therefore, the balanced equation becomes
M
10
dx j
= Qx jf − Qx j − k j m j + ∑ ki mi bij
dt
i =1
Note that bij = 0 for j ≤ i (particle size cannot increase, and breakage within a size
range i = j does not count as an event); then, dividing by M gives
j −1
dx j Q
= ( x jf − x j ) + ∑ ki xi bij − k j x j
dt
M
i =1
subject to t = 0, xj = xj0 (jth-size fraction of initial contents of the mill) [5].
Example 2.8 Semi-Batch Reacting System
A liquid-phase chemical reaction with the stoichiometry A → B takes place in a semibatch reactor [5]. The rate of consumption of A per unit volume of the reactor is given
by the first-order rate expression
rA (mol/L ⋅ s) = kC A
where CA (mol/L) is the reactant concentration. The tank is initially empty. At time t =
0, a solution containing A at a concentration CA0 (mol/L) is fed to the tank at a steady
rate φ (L/s). Develop differential balances on the total volume of the tank contents, V,
and on the moles of A in the tank, nA.
Solution
Total volume balance: accumulation = input
dV
=φ
dt
t = 0, V = 0
31
32
Applied Mathematical Methods for Chemical Engineers
Moles of A balance: accumulation = input − consumption
CA =
nA
V
dnA
= CA 0φ − knA
dt
t = 0, nA = 0
Example 2.9
Water containing 2 oz. of pollutant per gallon flows through a treatment tank at a rate
of 500 gal/min [7]. In the tank, the treatment removes 2% of the pollutant per minute
and the water is thoroughly stirred. The tank holds 10,000 gal of water. On the day the
treatment plant opens, the tank is filled with pure water. Determine the concentration
profile of the tank effluent.
Solution
Let P(t) be the amount of pollutant in the tank at any time t.
Then,
dP
= input − output
dt

 oz  
gal  
oz
gal 
= 2
 500
 −  P
 500



 gal 
min
10,000 gal
min 

input
effluent
oz
− 0.02 P
min
treatment
subject to P = 0 at t = 0. Therefore,
P(t ) = (100,000 /7)(1− e −0.07t )
2.5
PROBLEMS
1.a.Derive the organic phase benzoic acid concentration profile as a function of time (Section 2.4).
b. Determine the steady-state solution to
(V1 + mV2 )
dx
= RCA0 − ( R + Sm) x
dt
First-Order Ordinary Differential Equations
33
i.Directly.
ii. By taking the limit as t → ∞.
c.If E is the proportion of benzoic acid extracted and α = R/ms, what is
the relationship between E and α for the steady-state process?
2.Consider the two-stage solvent extraction of benzoic acid with the previously made assumptions and
yi = mxi , i = 1,2
where i denotes the stage [4].
a. Develop a table similar to Table 2.1.
b. Use your table to write the time-dependent mass balance of acid for
each stage.
c. Find the steady-state organic (x2) and aqueous (y1) acid concentration
profiles.
d.If E is the proportion of acid extracted and α = R/ms, what is the relationship between E and α for the steady-state process?
3.Give suitable initial conditions for the two first-order differential equations
and outline a solution.
4.Phosgene (COCl2) is formed by reacting CO and Cl2 in the presence of
activated charcoal [5]:
CO 2 + Cl 2 → COCl 2
At a temperature of 303.8 K in the presence of 1 g of charcoal, the rate of
f­ ormation of phosgene is
R f (mol/min) =
8.75[CO][Cl 2]
(1 + 58.6[Cl 2 ] + 34.3[COCl 2 ])2
where “[ ]” denotes concentration (mol/L).
a. Given that the input to a 3.00-L batch reactor is 1.00 g of charcoal and a
gas containing 60 mol% CO and 40 mol% Cl2 and that the initial reactor conditions are 303.8 K and 1 atm, determine the initial concentrations (in moles per liter) of both reactants. The volume occupied by the
charcoal may be neglected.
b. Write a differential balance on phosgene and show that it simplifies to
d[COCl 2 ] 2.92(0.02407 − [COCl 2 ])(0.01605 − [COCl 2 ])
=
dt
(1.941 − 24.3[COCl 2 ])2
5.A gas that contains CO2 is contacted with liquid water in an agitated batch
absorber [5]. Henry’s law gives the equilibrium solubility of CO2 in water
CA = pA /H A
34
Applied Mathematical Methods for Chemical Engineers
where CA (mol/L) is the CO2 concentration in solution, pA (atm) is the partial
pressure of CO2 in the gas phase and HA is Henry’s Law constant. The rate of
transfer of CO2 from the gas to the liquid per unit area of gas–liquid interface
is given by
 = k ( CA* − CA )
ra (mol/cm 2 s)
where CA* is the concentration of CO2 that would be in equilibrium with the
CO2 in the gas phase (CA* = PA/ H A). Suppose the gas-phase total pressure is
P (atm) and contains yA mol fraction of CO2, and the liquid phase initially has
V (cm3) of pure water with the agitation of the liquid phase sufficient to neglect
spatial composition dependency, and if the amount of absorbed CO2 is low
enough for P, V, and yA to be assumed constant, write a differential balance on
CO2 in the liquid phase and solve the differential equation to show that
CA (t ) = CA* [1 − exp(− kSt /V )]
6. An iron bar 2 cm × 3 cm × 10 cm at a temperature of 95 ºC is dropped into
a barrel of water at 25 ºC. The barrel is large enough that the water temperature rises negligibly as the bar cools. The rate at which heat is transferred
from the bar to the water is given by
Q( J /min) = UA(Tb − TW )
where U (= 0.050 J/min·cm2·ºC) is a heat-transfer coefficient, A (cm2) is the
exposed area of the bar, Tb is the surface temperature of the bar, and TW is the
water temperature. Given that the heat capacity of the bar is 0.460 J/g ºC, and
heat conduction in iron is fast enough to assume that the temperature T b(t) is
uniform throughout the bar, write an energy balance on the bar and determine
the steady-state temperature of the bar. Also, calculate the time required for
the bar to cool to 30 ºC.
7.A steam coil is immersed in a stirred heating tank [5]. Saturated steam at
7.50 bar condenses within the coil, and the condensate emerges at its saturation temperature. A solvent with a heat capacity of 2.30 kJ/kg·ºC is fed
to the tank at a steady rate of 12.0 kg/min and a temperature of 25 ºC, and
the heated solvent is discharged at the same rate. The tank is initially filled
with 760 kg of solvent at 25 ºC, at which point the flows of both steam and
solvent commence. The rate at which heat is transferred from the coil to the
solvent is given by
Q(kJ/ min) = UA(Tsteam − T )
where UA = 11.5 kJ/min ºC. The tank is stirred well such that the temperature
can be considered as spatially uniform and is the same as the outlet temperature. Derive a differential energy balance on the tank contents, and calculate the
time required to heat the solvent to an arbitrary temperature Tf (ºC).
First-Order Ordinary Differential Equations
35
REFERENCES
1.Boyce, W.E. and DiPrima, R.C. Elementary Differential Equations and Boundary
Value Problems, 3rd ed., John Wiley & Sons, New York, 1977.
2. Giordano, F.R. and Weir, M.D. Differential Equations, A Modeling Approach, AddisonWesley, New York, 1991.
3.Thomas, G.B. and Finney, R.L. Calculus and Analytic Geometry, 6th ed., AddisonWesley, Reading, MA, 1984.
4.Jenson, V.G. and Jeffreys, G.V. Mathematical Methods in Chemical Engineering,
Academic Press, London, UK, 1963.
5.Felder, R.M. and Rousseau, R.W. Elementary Principles of Chemical Processes,
2nd ed., John Wiley & Sons, New York, 1976.
6. Rice, R.G. and Do, D.D. Applied Mathematics and Modeling for Chemical Engineers,
John Wiley & Sons, New York, 1995.
7.West, B.H. Setting up differential equations from word problems, In Modules in
Applied Mathematics, Vol. 1, Differential Equations, Lucas, W.F., ed., Springer-Verlag,
New York, 1983, Chap. 1.
This page intentionally left blank
3
Linear Second-Order
and Systems of FirstOrder Ordinary
Differential Equations
3.1 INTRODUCTION
Chemical engineers working in the area of transport phenomena must frequently
solve problems that involve linear second-order differential equations. These may
occur as boundary value problems in diffusional systems or initial value problems in
process control or reacting systems, but most frequently, they are the result of reduction of partial differential equations.
In this chapter, linear second-order ordinary differential equations will be
reviewed. There will be examples on applications; however, Chapters 6 and 7 emphasize both mathematical and engineering applications.
Herein, the meaning of linearity is the same as given in Chapter 2. Attention is
now focused on equations that can be written as follows:
ζ = f (t , ζ, ζ′)
(3.1)
Previously, it was observed that in the case of first-order equations, the integrated
solutions contained one arbitrary constant. This constant could be determined by a
given condition at an initial time. In the case of second-order equations, two constants of integration are expected to occur, and therefore two conditions at an initial
time will be needed for the so-called initial value problems, or two conditions at
separate locations for the so-called boundary value problems [1,4,6].
In the discussion of the theory of second-order linear ordinary differential equations, the standard mathematical symbols are employed. In chemical engineering
applications, the usual chemical engineering nomenclature is used whenever there
is no conflict.
The general second-order linear differential equation is of the form
P( x )
d2 y
dy
+ Q ( x ) + R( x ) y = G ( x )
2
dx
dx
(3.2)
where P, Q, R, and G are the given functions.
Three important examples of second-order linear differential equations that
­frequently occur in chemical engineering are Legendre’s equation [3,4] of order α:
(1 − x 2 ) y ′′ − 2 xy ′ + α (α + 1) y = 0
(3.3)
37
38
Applied Mathematical Methods for Chemical Engineers
Bessel’s equation [6,9,10,11] of order n:
x 2 y′′ + xy′ + ( x 2 − n 2 ) y = 0
(3.4)
and the confluent hypergeometric equation [5,7,8,12]:
x
d2 y
dy
+ (c − x ) − ay = 0
2
dx
dx
(3.5)
where the quantities a, n, and c are constants.
In the discussion to follow, unless otherwise stated, the functions P, Q, R, and G
in Equation 3.2 are taken to be continuous on some interval a < x < b (a may be −∞
and b may be +∞).
If the function P(x) ≠ 0 everywhere on the interval, then Equation 3.2 can be
rewritten as
d2 y
dy
(3.6)
+ p( x ) + q( x ) y = g( x )
2
dx
dx
following division by P(x).
Similar to first-order equations, the issue of existence and uniqueness of a solution to second-order equations must be dealt with. Theorem 3.1 [1,4] addresses the
existence and uniqueness of solutions of second-order differential equations.
Theorem 3.1
If the functions p, q, and g are continuous on the open interval a < x < b, then there
exists one and only one function y = φ(x) satisfying the differential Equation 3.6,
y′′ + p( x ) y′ + q( x ) y = g( x )
on the entire interval a < x < b and the given initial conditions,
y( x 0 ) = y0 , y′( x 0 ) = y′0
at a particular point x0 in the interval.
It is important to note that this theorem does not address the issue of existence
and uniqueness of solutions for boundary value problems. Boundary value problems
are discussed in Chapter 4.
The following three elementary examples serve to demonstrate how the earlier
interval can be determined for a unique solution to exist.
Example 3.1
Given: xy′′ + 3 y = x , y( x 0 ) = y0 ; y′( x 0 ) = y0′
rewrite as
y′′ +
3
y =1
x
then the interval consists of all points not including the origin.
39
Linear Second-Order and Systems of First-Order
Example 3.2
Given: y′′ + by′ + 7 y = 2sin x; y( x 0 ) = y0 ; y′( x 0 ) = y0′
Since the differential equation is defined on −∞ < x < + ∞, the whole real line is
the interval.
Example 3.3
Given: x ( x − 1) y′′ + 3 ξx y′ + 4 y = 2, y( x 0 ) = y0 ; y′( x 0 )′ = y0′
rewritten as
3x
4
2
y′′ +
y′ +
y=
x ( x − 1)
x ( x − 1)
x ( x − 1)
This differential equation is defined everywhere except at 0 and 1. Thus, the interval is any interval excluding the points 0 and 1.
Essentially, to determine the interval or domain of definition of the differential
equation, one elementary procedure is to look for points where division by zero will
occur or points where the equation becomes unbounded. These so-called singular
points will be classified later, but for now, these are to be excluded from the interval
over which Theorem 3.1 is applied.
To discuss the methods used to solve linear second-order differential equations, it is
necessary to reintroduce the term homogeneous, or complementary, but with a meaning unrelated to previous usage in this book.
When the forcing function g(x) is set to zero in Equation 3.6, the reduced equation
d2y
dy
+ p( x ) + q( x ) y = 0
dx 2
dx
(3.7)
results. This is the homogeneous form of the second-order linear differential equation.
Any equation of second-order or higher with right-hand side identically zero is termed
homogeneous as opposed to nonhomogeneous.
3.2 FUNDAMENTAL SOLUTIONS OF
HOMOGENEOUS EQUATIONS
Suppose p and q in Equation 3.7 are continuous on a < x < b then for any twicedifferentiable function φ on a < x < b, the linear differential operator L is defined
to mean
L[φ] = φ′′ + pφ′ + qφ
(3.8)
L ≡ D 2 + pD + q
(3.9)
for
where D is the derivative operator.
Then Equation 3.7 becomes
L( y) = y′′ + p( x ) y′ + q( x ) y = 0
(3.10)
40
Applied Mathematical Methods for Chemical Engineers
The use of the operator L reduces the task of integrating the linear second-order
differential equation as given below. However, before the employing the integration
process, a few more definitions are needed.
Theorem 3.2
If y = y1(x) and y = y2(x) are solutions of the differential Equation 3.10,
L[ y] = y′′ + p( x ) y′ + q( x ) y = 0
then the linear combination of y = c1 y1(x) + c2 y2(x), with c1 and c2 being arbitrary
constants is also a solution.
Proof
Since y = y1(x) is a solution set of Equation 3.10, then L[y1] = y1′′+ p( x ) y1′ + q(x)y1
= 0, and since y = y2(x) is also a solution set of Equation 3.10, then L[y2] = y′′2 + y′2
+ q(x)y2 = 0. But
L[c1 y1 + c2 y2 ] = L[c1 y1 ] + L[c2 y2 ]
= c1 L[ y1 ] + c2 L[ y2 ]
=0
Theorem 3.2 is a statement of the superposition principle [1,2,4], which is also applicable to higher-order linear differential equations. The two solutions y1 and y2 form
what is called a fundamental set of solutions for Equation 3.10.
In general, two solutions y1 and y2 of Equation 3.10 are said to form a fundamental
set of solutions if every solution of Equation 3.10 can be expressed as a linear combination of y1 and y2. In particular;
Theorem 3.3
If the functions p and q are continuous on the interval a < x < b and if y1 and y2 are
solutions of the differential Equation 3.10,
L [ y] = y ′′ + p( x ) y ′ + q( x ) y = 0
satisfying the condition
y1 ( x ) y2′ ( x ) − y1′ ( x ) y2 ≠ 0
(3.11)
at every point in a < x < b, then any solution of Equation 3.10 on the interval a < x
< b can be expressed as a linear combination of y1 and y2.
The condition described by Equation 3.11 is called the Wronskian and is commonly written in the determinant form as [1]
W ( y1 , y2 ) =
y1 y2
y1′ y2′
(3.12)
Linear Second-Order and Systems of First-Order
41
The linear combination mentioned in Theorem 3.3 is usually called the general,
complementary, or homogeneous solution of Equation 3.10. The following theorem
should help to clarify when Equation 3.11 or 3.12 is expected to be different from zero.
Theorem 3.4
If the function p and q are continuous on a < x < b and the function y1 and y2 are
linearly independent solutions of the differential Equation 3.10,
L[ y] = y ′′ + p( x ) y ′ + q( x ) y = 0
then the W(y1, y2) is nonzero on a < x < b, and hence any solution of Equation 3.10 can
be expressed as a linear combination of y1 and y2. Linear independence is defined as
two or more functions on the interval a < x < b that are not linearly dependent [1,2,4].
For example, if f and g are two functions on a < x < b, such that
c1 f ( x ) + c2 g( x ) = 0
for all x in a < x < b is a true statement for c1 and c2 not both zero, then f and g are
linearly dependent; otherwise they are linearly independent. In other words, if f and
g are a constant multiple of each other on the interval, then they are linearly dependent; otherwise, they are linearly independent.
Finally, we come to the question “how to” find solution for linear secondorder differential equations. Specifically, the cases where p and q are constants in
Equation 3.10.
3.3 HOMOGENEOUS EQUATIONS WITH
CONSTANT COEFFICIENTS
The most general constant coefficient, linear, second-order, ordinary, homogeneous
differential equation is
ay′′ + by′ + cy = 0
(3.13)
where a, b, and c are real constants and a ≠ 0. Equation 3.13 in operator notation is
L[ y] = ay ′′ + by ′ + cy = (aD 2 + bD + c) y = 0
(3.14)
Now, we are interested in integrating Equation 3.14 and expressing our findings as
y = φ(x) and, in this case, include the two integration constants as implied by the
­presence of the second derivative term.
To solve Equation 3.14, we seek a function φ(x) such that a times its second derivative added to b times its first derivative added to c times the function itself results
in zero. Among all possible candidate functions, the function φ(x) = erx, where r is a
constant, turns out to be the best candidate. Thus
L[erx ] = a(erx )′′ + b(erx )′ + c(erx ) = erx (ar 2 + br + c) = 0
(3.15)
42
Applied Mathematical Methods for Chemical Engineers
Since erx is never zero, then
ar 2 + br + c = 0
(3.16)
Equation 3.16 is called the characteristic or auxiliary equation and the resulting
roots r1 and r2 are called the characteristic roots or the eigenvalues. The roots r1 and
r2 are given by
r1 =
− b + b 2 − 4 ac
− b − b 2 − 4 ac
, r2 =
2a
2a
(3.17)
If the discriminant b2 − 4ac > 0, then r1 and r2 are real and unequal. Then
y1 ( x ) = er1 x ,
y2 ( x ) = er2 x
(3.18)
and Theorem 3.2, the superposition principle, tells us that the linear combination
y = c1er1 x + c2 er2 x
(3.19)
with c1 and c2 being arbitrary (integration) constants is also a solution.
It is easy to check that Theorem 3.3 and Theorem 3.4 both hold; that is, er1x and
er2 x are linearly independent functions and thus form a fundamental set.
If the discriminant b2 − 4ac = 0, then r1 and r2 are identical and there only results
one solution, namely e−(b/2a)x, that is,
y1 = e − ( b / 2 a ) x
(3.20)
To find y2, consider the following procedure.
Let
y = υ ( x )e−( b/ 2 a ) x
(3.21)
then
y′ = υ ′( x )e−( b/ 2 a ) x −
b
υ ( x )e−( b/ 2 a ) x
2a


b
b2
y′′ = υ ′′( x ) − υ′( x ) + 2 υ ( x ) e−( b / 2 a ) x


a
4a
(3.22)
(3.23)
Substitute Equations 3.21 and 3.23 into Equation 3.13 to get

b
b2  
b 
a υ ′′ − υ′ + 2 υ  + b  υ′ − υ  + c υ = 0

a
4a  
2a 
(3.24)
and simplify further to get
υ ′′ = 0
(3.25)
υ ( x ) = (c1 x + c2 )
(3.26)
Integrating Equation 3.25 twice gives
Linear Second-Order and Systems of First-Order
43
Then Equation 3.21 becomes
y = (c1 x + c2 )e − ( b / 2 a ) x
(3.27)
y2 = xe − ( b / 2 a ) x
(3.28)
Therefore,
and Equation 3.27 is the general solution when r1 = r2, that is,
y = c1 xe(r1 x ) + c2 e(r1 x )
(3.29)
If the discriminant b – 4ac < 0 then r1 and r2 are complex numbers. Furthermore,
since a, b, and c are real, then r1 and r2 will be a conjugate pair. That is,
2
r1 = −
b i b 2 − 4 ac
+
= λ + iµ
2a
2a
(3.30)
r2 = −
b i b 2 − 4 ac
−
= λ − iµ
2a
2a
(3.31)
where the real numbers λ and μ are introduced for convenience. Similar to the results
obtained in Equation 3.19, the general solution is
y = k1e( λ+ iµ ) x + k2 e( λ− iµ ) x
(3.32)
where k1 and k2 are arbitrary constants.
Equation 3.32 can be rewritten as
y = [ k1e iµx + k 2 e − iµx ]e λx
= [ k1 (cos µx + i sin µx ) + k2 (cos µx − i sin µx )]e λx
= [( k1 + k2 ) cos µx + i( k1 − k2 ) sin µx ]e λx
(3.33)
= [c1 cos µx + c 2 sin µx ]e λx
where c1 and c2 are arbitrary constants since the sum or difference of two arbitrary
constants is still an arbitrary constant.
In going from Equation 3.32 to Equation 3.33, the following concept was employed
to define eiμx and e−iμx:
The function eμx has a Taylor series expansion of
eµx = 1 + µx +
(µx )2 (µx )3 (µx )4 (µx )5
+
+
+
+
2!
3!
4!
5!
about the origin. Then
(iµx )2 (iµx )3 (iµx )4 (iµx )5
+
+
+
+
2!
3!
4!
5!
(µx )3 (µx )5
 (µx )2 (µx )4
 

= 1 −
+
−  + i  µx −
+
− 


 
2!
4!
3!
5!
e iµx = 1 + iµx +
44
Applied Mathematical Methods for Chemical Engineers
It is also known that the functions cos μx and sin μx each have Taylor series expansion of
cos µx = 1 −
(µx )2 (µx )4
+
−
2!
4!
sin µx = µx −
(µx )3 (µx )4
+
−
3!
5!
and
about the origin. Therefore eiμx is defined as
e iµx = cos µx + i sin µx
(3.34)
e − iµx = cos µx − i sin µx
(3.35)
and
Equations 3.19, 3.29, and 3.33 give the general solutions of the second order, constant
coefficient, homogeneous, and linear differential equation for the respective cases of
real unequal, repeated, and complex characteristic roots. However, the actual steps
that are used in deriving a solution to the homogeneous problem are as follows:
Step 1: Put differential equation into operator form.
Step 2: Identify the characteristic equation and roots.
Step 3: Use Equations 3.19, 3.29, or 3.33 to express the general solution.
The following examples should clarify the three steps given above.
Example 3.4
Given: 2y″ − 3y′ + y = 0
Step 1:
Operator form: (2D2 − 3D + 1)y = 0
Step 2:
Characteristic equation: (2r2 − 3r + 1) = 0
Characteristic roots: r = 1, 1/2
Step 3:
Since the roots are real and distinct, Equation 3.19 gives
y = c1e x + c2 e1/2 x
Example 3.5
Given: y″ + 2y′ + y = 0
Step 1:
Operator form: (D2 + 2D + 1)y = 0
Linear Second-Order and Systems of First-Order
45
Step 2:
Characteristic equation: r2 + 2r + 1 = 0
Characteristic roots: r = −1, −1
Step 3:
Since roots are repeated, Equation 3.29 gives
y = c1 xe − x + c2 e − x
Example 3.6
Given: y″ + 6y′ + 13y = 0
Step 1:
Operator form: (D2 + 6D + 13)y = 0
Step 2:
Characteristic equation: r2 + 6r + 13 = 0
Characteristic roots: r = −3 + 2i, −3 − 2i
Step 3:
Since roots are complex, Equation 3.33 gives
y = [c1 cos 2 x + c2 sin 2 x ]e −3 x
where λ = −3 and μ = 2.
3.4
NONHOMOGENEOUS EQUATIONS
Previously, some brief theory and a few examples were given that demonstrate the
approach necessary to construct solutions to the homogeneous problem. The summarized procedure for the constant coefficient case is very simple, and one would
like to maintain that simplicity for the case of at least the nonhomogeneous constant
coefficient problem.
The nonhomogeneous differential equation can be written as
L[ y] = y ′′ + p( x ) y ′ + q( x ) y = g( x )
(3.36)
where p, q, and g are continuous on the interval of interest.
The following two theorems are needed to establish the procedure for solving
Equation 3.36.
Theorem 3.5
The difference of any two solutions of the differential Equation 3.36
L[ y] = y ′′ + p( x ) y ′ + q( x ) y = g( x )
46
Applied Mathematical Methods for Chemical Engineers
is a solution of the corresponding homogeneous differential equation
L[ y] = y ′′ + p( x ) y ′ + q( x ) y = 0
(3.37)
Proof
Suppose the two functions u1 and u2 are solutions of Equation 3.36; then
L[u1 ] = g
and
L[u2 ] = g
Therefore, L[u1] − L[u2] = 0. But L is a linear operator; thus L[u1] − L[u2] =
L[u1 − u2] = 0.
Theorem 3.6
Given one solution yp of the nonhomogeneous linear differential Equation 3.36
L[ y] = y ′′ + p( x ) y ′ + q( x ) y = g( x )
then any solution y = f(x) of this equation can be expressed as
f ( x ) = y p ( x ) + c1 y1 ( x ) + c2 y2 ( x )
(3.38)
where y1 and y2 are linearly independent solutions of the corresponding homogeneous equation.
The above equation is the general solution of the nonhomogeneous Equation 3.36.
That is, the general solution yg of the nonhomogeneous equation is
yg = yc + yp
(3.39)
where yc is the general solution of the associated homogeneous equation and is
termed the complementary solution. The function yp is the particular solution satisfying the nonhomogeneous differential Equation 3.36.
A relatively simple procedure for finding the most suitable candidate for yp is
demonstrated below for the constant coefficient case.
For example, given
y ′′ − 3 y ′ − 4 y = 2sin x
(3.40)
then the associated homogeneous problem is
y ′′ − 3 y ′ − 4 y = 0
which can be put in the operator form
( D 2 − 3 D − 4) y = 0
In fact, the nonhomogeneous problem can be put in the operator form as well:
( D 2 − 3 D − 4) y = 2sin x
(3.41)
Linear Second-Order and Systems of First-Order
47
Then one can see that if the RHS or nonhomogeneous part is differentiated two
times, the result is −2 sin x.
Further, if the nonhomogeneous part is added to the twice-differentiated result,
one gets a final result of zero. That is,
d2
(2 sin x ) + 2 sin x = 0
dx 2
or
( D 2 + 1)2 sin x = 0
Then, since the RHS of Equation 3.41 is operated on by D2 + 1, the same operation
must be carried out on the LHS, giving
( D 2 + 1)( D 2 − 3 D − 4) y = 0
(3.42)
a homogeneous equation of the fourth order. Following steps 2 and 3 of Section 3.3,
the characteristic equation is
(r 2 + 1) (r 2 − 3r − 4) = 0
with characteristic roots r1 = −1, r2 = 4, r3 = +i, r4 = −i.
Then Equation 3.42 and Equation 3.33 give
yg = c1e − x + c2 e 4 x + c3 cos x + c 4 sin x
(3.43)
where
yc = c1e − x + c2 e 4 x
which comes from the associated homogeneous equation, and therefore
yp = c3 cos x + c 4 sin x
is the best candidate for the particular solution. The constants c3 and c4 are not arbitrary and are determined by substituting yp into Equation 3.40
yp″ − 3 yp′ − 4 yp = 2 sin x
that is,
(c3 cos x + c4 sin x )′′ − 3(c3 cos x + c4 sin x )′
−4(c3 cos x + c4 sin x ) = 2sin xs
which results in an identity
(−c3 cos x − c4 sin x ) − 3(c4 cos x + c3 sin x )′ − 4(c3 cos x + c4 sin x )
= 2sin x
Following simplifications and equating coefficients, one gets
−(5c3 + 3c4 ) cos x = 0
(3c3 − 5c4 )sin x = 2sin x
48
Applied Mathematical Methods for Chemical Engineers
or
−5c3 − 3c4 = 0
and
3c3 − 5c4 = 2
giving c4 = −5/17, c3 = 3/17, such that
yp = 3 / 17 cos x − 5 / 17sin x
Therefore, the problem of finding the general solution to Equation 3.36 is reduced to
find a particular solution to Equation 3.36. It should be noted that the method works
when the nonhomogeneous part can be differentiated to zero or when an appropriate number of differentiations will bring back some constant multiple of the original
function. For example, this method would fail for RHS of the types tan x or xm/n,
where the number m/n is not an integer, and for combinations of these. In other
words, the method works in theory for g(x) of the type
g( x ) = Pn ( x ) = a0 x n + a2 x n−2 + a2 x n−2 +  + an
= e ax Pn ( x )
= e ax Pn ( x )sin βx
= e ax Pn ( x ) cos βx
In general, given a linear ordinary differential equation
P ( D ) y = R( x )
(3.44)
the general solution is
y = yc + yp
where P(D)yc = 0 and P(D)yp = R(x). Suppose there is a differential operator
“Annihilator,” A(D), that is linear with constant coefficients such that
A( D) R( x )0
If we operate on both sides of Equation 3.44 with A(D) we would get
A( D) P( D) y = A( D) R( x ) = 0
Now, consider this new equation
A( D) P( D) y = 0
(3.45)
To find the general solution of Equation 3.44, we need the roots of the polynomial
A(D)P(D) and they are r1, r2,…, rj; q1, q2,…, qk where the r1, r2,…, rj come from P(D)
and q1, q2,…, qk come from A(D).
Linear Second-Order and Systems of First-Order
49
The general solution of Equation 3.45 can be written as
y = yc + yq
But
A( D) P( D)[ yc + yp ] = A( D) R( x ) = 0
thus yc + yp is also a solution of Equation 3.45. Since yc + yq is the general solution of
Equation 3.45, it contains yc + yp. Therefore
yc + yq ⊂ yc + yq or yp ⊂ yq
The function yq can be thought of as the best candidate for the particular solution,
and the method of undetermined coefficients can be used to find yp.
Below are three more elementary examples that demonstrate successful application of the method, and a fourth example in which the method fails.
Example 3.7
Find the general solution of y″ − y′ − 6y = 12xex.
Solution
Operator form: (D2 − D − 6)y = 12xex
Determine the operator that will annihilate the nonhomogeneous part: 12xex
d
(12 xe x ) = 12e x + 12 xe x
dx
Annihiliate RHS:
d2
d
(12 xe x ) = (12e x + 12 xe x ) = 24e x + 12 xe x
dx 2
dx
then the ­combination of d2/dx (12xex), −2 d/dx (12xex), and the function itself adds
to zero.
That is,
( D 2 − 2 D + 1)12 xe x = 0
operates on the LHS of the given equation with the newly found operator to get
( D 2 − 2 D + 1)( D 2 − D − 6) y = 0
Solve using the procedure for the homogeneous problem.
(r − 1)2 (r − 3) (r + 2) = 0 is the characteristic equation;
r = 1, 1, −2, 3 are the characteristic roots.
Therefore,
yg = c1e x + c2 xe x + c4 e −2 x + c5e3 x
yc = c4 e −2 x + c5e3 x
where yc is the solution to the associated homogeneous problem, and the ­candidate
for yp is
yp = c1e x + c2 xe x
50
Applied Mathematical Methods for Chemical Engineers
Determine c1 and c2 by substituting yp into the given differential equation
(c1e x + c2 xe x )′′ − (c1e x + c2 xe x )′ − 6(c1e x + c2 xe x ) = 12 xe x
which results in
c1e x + 2c2 e x + c2 xe x − c1e x − c2 e x − c2 xe x − 6c1e x − 6c2 xe x = 12 xe x
an identity, which simplifies to
c2 − 6c1 = 0
−6c2 = 12
Therefore,
1
yp = − e x − 2 xe x
3
and
1
yg = c4 e −2 x + c5e3 x − e x − 2 xe x
3
where c4 and c5 are the arbitrary constants.
Example 3.8
Find the general solution of y″− 6y′ + 8y = 3ex.
( D 2 − 6 D + 8) = 3e x
becomes
( D − 1)( D 2 − 6 D + 8) y = 0
( D − 1)( D − 4)( D − 2) y = 0
with characteristic roots: 1, 2, 4
yg = c1e 2 x + c2 e 4 x + c3e x = yc + yp
where
yp = c3e x
yp′ = yp′′ = c3e x
That is,
c3e x − 6c3e x + 8c3e x = 3e x
Therefore,
3c3 = 3
giving
c3 = 1
51
Linear Second-Order and Systems of First-Order
and
yp = e x
such that
yg = c1e 2x + c2 e 4x + e x
Example 3.9
Find the general solution of y″ − 2y′ + 10y = 20x2 + 2x − 8.
Solution
( D 2 − 2 D + 10) y = 20 x 2 + 2 x − 8
D 3 ( D 2 − 2 D + 10) y = 0
Characteristic roots:
0,0,0,1 + 3i,1 − 3i
yg = (c1 cos 3 x + c2 sin 3 x )e x + c4 + c5 x + c6 x 2
yc
yp
yp′ = 2c6 x + c5
yp′′ = 2c6
2c6 − 2(2c6 x + c5 ) + 10c4 + 10c5 x + 10c6 x 2 = 20 x 2 + 2 x − 8
Equating coefficients
x 0 : 2c6 − 2c5 + 10c4 = −8
x : − 4c6 + 10c5 = 2
x 2 : 10c6 = 20
from which
c6 = 2, c5 = 1, c4 = −1 and
yp = −1 + x + 2 x 2
yg = [c1 cos (3 x ) + c2 sin (3 x )]e x + 2 x 2 + x − 1
Example 3.10
Find the general solution of
y′′ + y = tan x , 0 < x <
( D 2 + 1) y = tan x =
π
2
sin x
cos x
There is no combination of derivatives that will give the appropriate multiple of sin x
and cos x to drive the RHS to zero. Therefore, a more general method is needed.
52
Applied Mathematical Methods for Chemical Engineers
3.4.1 MEthOD OF VARIAtION OF PARAMEtERs
Given Equation 3.36,
y ′′ + p( x ) y ′ + q( x ) y = g( x )
a general method known as the method of variation of parameters where p, q, and g
are continuous on the interval of interest can be used to find particular solutions of
the nonhomogeneous differential equation.
To use this method, we must know a fundamental set of solutions (for the secondorder case y1 and y2) for the homogeneous equation.
In the homogeneous case, we found that
yH = c1 y1 + c2 y2
where y1 and y2 are the fundamental solutions. Then if we replace c1 and c2 with two
functions, u1 and u2, such that a candidate for the particular solution
yp = u1 ( x ) y1 + u2 ( x ) y2
(3.46)
satisfies the nonhomogeneous Equation 3.36 (two conditions on u1 and u2 are
required), then
yp′ = (u1′ y1 + u2′ y2 ) + (u1 y1′ ) + u2 y2′ )
(3.47)
To simplify the computation, let
u1′ y1 + u2′ y2 = 0
(3.48)
which is one condition on u1 and u2, thus
yp′ = u1 y1′ + u2 y2′
and
yp′′ = u1′ y1′′+ u1 y1′ + u2′ y2′ + u2 y2′′
Substituting into Equation 3.36 gives
u1′y1′ + u1 y1′′+ u2′ y2′ + u2 y2′′+ p(u1 y1′ + u2 y2′ ) + q(u1 y1 + u2 y2 ) = g
u1 ( y1″+ py1′ + qy1 ) + u2 ( y2″ + py2′ + qy2 ) + u1′y1′ + u2′ y2′ = g
but
y1′′+ py1′ + qy1 = 0
y2′′ + py2′ + qy2 = 0
both of which satisfy the homogeneous equation; therefore
u1′ y1′ + u2′ y2′ = g
is the second condition on u1 and u2. That is, for second order the two conditions that
must be met are
u1′ y1 + u2′ y2 = 0
u1′ y1′ + u2′ y2′ = g
Linear Second-Order and Systems of First-Order
For third order, the three conditions are
u1′ y1 + u2′ y2 + u3′ y3 = 0
u1′ y1′ + u2′ y2′ + u3′ y3′ = 0
u1′ y1′′+ u2′ y2′′ + u3′ y3′′ = g
As a demonstration of the procedure, consider the following examples.
Example 3.11
y′′ − 5 y′ + 6 y = 2e x
Consider y″ − 5y′ + 6y = 0
operator form: (D2 − 5D + 6)y = 0
then (r − 3) (r − 2) = 0.
Thus yc = c1e3x + c2e2x
Let
yp = u1e3 x + u2 e 2 x
u1′e3 x + u2′ e 2 x = 0
3u1′e3 x + 2u2′ e 2 x = 2e x
0 e2 x
2e x 2e 2 x
u1′ =
e3 x e 2 x
3e3 x 2e 2 x
=
−2e3 x
2e − 3e5 x
5x
u1′ = 2e −2 x
1
u1 = 2 ∫ e −2 x d x = 2  − e −2 x  = − e −2 x
 2

and
u2′ = −
u1′e3 x
= (−2e −2 x )e3 x e −2 x = −2e − x
e2 x
such that u2 = 2e−x. Therefore
yp = − e −2 x e3 x + 2e − x e 2 x = − e x + 2e x = e x
and
yg = c1e3 x + c2 e 2 x + e x
53
54
Applied Mathematical Methods for Chemical Engineers
Example 3.12
Find a particular solution of y″ + y = tan x.
Solution
( D 2 + 1) y = tan x
yc = c1 cos x + c2 sin x
y1 = cos x , y2 = sin x , y1′ = − sin x , y2′ = cos x
the candidate for yp is
yp = u1 ( x ) y1 + u2 ( x ) y2
then
u1′ cos x + u2′ sin x = 0
− u1′ sin x + u2′ cos x =
u1′ =
0 sin x
sin x
cos x
cos x
cos x sin x
− sin x cos x
=
sin x
cos x
− sin 2 x
cos x
and
u1 ( x ) = − ∫
also
u2′ =
sin 2 x
dx
cos x
− u1′ cos x
= sin x
sin x
such that u2(x) = −cos x
yp = cos x ∫
sin 2 x
d x − sin x cos x
cos x
.
As is evident in Example 3.12, challenging integration problems can arise when the
variation of parameter method is used.
3.5 VARIABLE COEFFICIENT PROBLEMS
Both of the previously discussed methods are applicable to constant coefficient as
well as variable coefficient problems. However, for some variable coefficient problems, substitutions are possible that will reduce variable coefficient problems to constant coefficient ones.
Linear Second-Order and Systems of First-Order
55
One such class of variable coefficient problems is the Euler or Equidimensional
­differential equation
x 2 y′′ + bxy′ + cy = 0
(3.49)
for the second-order case in which b and c are constants. If one lets
x = ez
(3.50)
dy
dy
= e− z
dx
dz
(3.51)
d2 y
 d 2 y dy 
= e −2 z  2 − 
2
 dz
dx
dz 
(3.52)
then
and
where Equation 3.51 and Equation 3.52 are derived by applying the chain rule.
Substituting Equation 3.50 through 3.52 into Equation 3.49 gives
d2 y
dy
+ (b − 1) + cy = 0
2
dz
dz
(3.53)
a constant coefficient equation.
For the case
y ′′ + p( x ) y ′ + q( x ) y = 0
(3.54)
a change of independent variable can sometimes be made that will transform the
above equation into a constant coefficient problem. That is, if
x
z = ∫ [q(t )]1/ 2 dt
(3.55)
then
dy dz dy
=
dx dx dz
and
d 2 y  dz  2 d 2 y d 2 z dy
+
= 
dx 2  dx  dz 2 dx 2 dx
transform Equation 3.54 into
2
dz  dy
 dz  d 2 y  d 2 z
+
+ p( x ) 
+ q( x ) y = 0
 
dx dz 2  dx 2
dx  dz
(3.56)
56
Applied Mathematical Methods for Chemical Engineers
provided that
[q ′( x ) + 2 p( x )q( x )]
= constant
2[q( x )]3/ 2
(3.57)
If the procedure of changing the independent variable is too work intensive, then a
simple substitution can be made for the Euler equation case. That is, if
y = xr
(3.58)
where r is a constant to be determined, then
y′ = rx r −1
and
y′′ = r (r − 1) x r −2
can be substituted into Equation 3.49 to get
[r(r − 1) + br + c]x r = 0
(3.59)
Then for any interval not containing the origin, the following statements hold:
y = c1 | x |r1 +c2 | x |r2
(3.60)
y = (c1 + c2 ln( x )) | x |r1
(3.61)
y =| x |λ [c1 cos(µ ln | x |) + c2 sin(µ ln | x |)]
(3.62)
for real and unequal roots
for real and equal roots
where r1, r2 = λ ± iμ are the complex roots.
For the class of problems for which convenient simplifying substitutions are not
available, infinite series methods may be successfully applied. The following section
discusses such class of variable coefficient problems.
3.5.1
SERIEs SOLUtIONs NEAR A REGULAR SINGULAR POINt
Consider the variable coefficient, linear second-order, and homogeneous differential
equation
P( x ) y ′′ + Q( x ) y ′ + R( x ) y = 0
(3.63)
in the neighborhood of a regular singular point x = x0. By regular singular point (as
opposed to irregular) we mean that both
lim ( x − x 0 )
x → x0
Q( x )
P( x )
(3.64)
57
Linear Second-Order and Systems of First-Order
and
lim ( x − x 0 )2
x → x0
R( x )
P( x )
(3.65)
are finite. Then one can assume a solution to Equation 3.63 of the form
∞
y = ∑ an x n + r
(3.66)
n=0
where the values of r are to be determined and a relation for the an is to be established. The singular points of Equation 3.63 are exactly those for which P(x) = 0, if
P, Q, and R are polynomials without common factors. For a more in-depth discussion
of this theory, standard differential equation text [1,4] should be consulted.
Presented below is an example that illustrates the essential steps needed to successfully solve Equation 3.63 using Equation 3.66.
Consider the differential equation
2 x 2 y ′′ − xy ′ + (1 + x ) y = 0
by comparison with Equation 3.63
P ( x ) = 2 x 2 , Q ( x ) = − x , R( x ) = 1 + x
then
−x
1
lim x  2  = −
x→0  2 x 
2
and
1+ x 1
lim x 2  2  =
 2x  2
x→0
are both finite; therefore, x = 0 is a regular singular point.
Let
∞
y = a0 x r + a1 x1+r + a2 x 2+r +  + an x n+r +  = ∑ an x n+r
n=0
then
∞
y ′ = ∑ (n + r )an x n + r −1
n=0
and
∞
y ′′ = ∑ (n + r )(n + r − 1)an x n + r − 2
n=0
thus, the given differential equation
2 x 2 y ′′ − xy ′ + (1 + x ) y = 0
(3.67)
58
Applied Mathematical Methods for Chemical Engineers
becomes the identity
∞
∞
2 x 2 ∑ (n + r )(n + r − 1)an x n+r − 2 − x ∑ (n + r )an x n+r −1
n= 0
n= 0
∞
+(1 + x )∑ an x n+r = 0
n= 0
and can be recast as
∞
∞
∑ 2(n + r )(n + r − 1)an x n+r − ∑ (n + r )an x n+r
n=0
n=0
∞
∞
n=0
n=0
(3.68)
+ ∑ an x n + r + ∑ an x n + r +1 = 0
but
∞
∞
n=0
n =1
∑ an x n+r +1 = ∑ an−1 x n+r
by shifting the index of summation [4] or replacing n by n − 1 everywhere in the
fourth term of Equation 3.68. Therefore, Equation 3.68 becomes
∞
∞
n=0
n =1
∑ [(n + r )(2n + 2r − 3) + 1]an x n+r + ∑ an−1 x n+r = 0
after factoring. By expanding the summation for n = 0, we get
∞
[(r )(2r − 3) + 1]a0 x r + ∑ {[(n + r )(2n + 2r − 3) + 1]an + an −1}x n + r = 0
n =1
for which a0 is arbitrary and x ≠ 0. Therefore,
r (2r − 3) + 1 = 0
(3.69)
[(n + r )(2n + 2r − 3) + 1]an + an −1 = 0 for n ≥ 1
(3.70)
and
are the so-called indicial equation and recurrence relationship, respectively.
The roots of Equation 3.69 are r1 = 1 and r2 = 1/2.
Then the recurrence relation for r1 is given by
an =
−1
an −1 , n ≥ 1
n(2n + 1)
(3.71)
bn =
−1
bn −1 , n ≥ 1
n(2n − 1)
(3.72)
and for r2, by
where the switch from an to bn is introduced to reduce confusion.
59
Linear Second-Order and Systems of First-Order
A few constants for Equation 3.71 and Equation 3.72 are evaluated as follows:
− a0
−b
; b1 = 0
1(3)
1(1)
− a1
a0
−b
b0
; b2 = 1 =
n = 2, a2 =
=
2(5) 1 ⋅ 2 ⋅ 3 ⋅ 5
2(3) 3 ⋅ 2 ⋅ 1
−b
− b0
− a2
− a0
; b3 = 2 =
n = 3, a3 =
=
2
3(7) 2 ⋅ 3 ⋅ 5 ⋅ 7
3(5) 5 ⋅ 32 ⋅ 2 ⋅ 1
n = 1, a1 =
Both sets of constants exhibit a pattern that can be generalized to
an =
(−1)n
a0 , n ≥ 1
[(2n + 1)(2n − 1)5 ⋅ 3]n!
(3.73)
bn =
(−1)n
b0 , n ≥ 1
[(2n − 1)(2n − 3)3 ⋅ 1]n!
(3.74)
in the case of r1, and
in the case of r2. Therefore, the two linearly independent solutions that are expected are
∞
y = a0 x + a1 x 2 + a2 x 3 +  + an x n +1 +  = ∑ an x n + r
n=0
a x2
a x3
a0 x 4
= a0 x − 0 + 0
−
+
3
5 ⋅ 3 ⋅ 2 7 ⋅ 5 ⋅ 32 ⋅ 2
∞


(−1)n x n
= x 1 + ∑
 a0
 n =1 [(2n + 1)(2n − 1)5 ⋅ 3]n! 
for the r1 case, that is,
∞


(−1)n x n
y1 = x 1 + ∑
 a0

+
−
⋅
[(2
n
1)(2
n
1)
5
3]
n
!
 n =1

(3.75)
and the r2 case gives
y = b0 x r − b0 x1+ r +
b0 x 2+ r b0 x 3+ r
−
+
3 ⋅ 2 ⋅ 1 5 ⋅ 32 ⋅ 2
∞


(−1)n x n
= x1/ 2 1 + ∑
 b0
 n =1 [(2n − 1)(2n − 3)3 ⋅ 1]n! 
such that
∞


(−1)n x n
y2 = x1/ 2 1 + ∑


[(2
n
−
1)(2
n
−
3)
3
⋅
1]
n
!
 n =1

is the second linearly independent solution of the given differential equation.
(3.76)
60
Applied Mathematical Methods for Chemical Engineers
Before the general solution can be stated, it is important to determine if the series
obtained in Equations 3.75 and 3.76 are convergent. One way is to apply a convergence test[14]. For example, the ratio test
lim
n→∞
an +1 x n +1
an x n
gives
lim
n →∞
| x | [(2n + 1)(2n − 1)5 ⋅ 3]n!
|x|
= lim
=0
[2(n + 1) + 1(2(n + 1) − 1)5 ⋅ 3](n + 1)! n→∞ (2n + 3)(n + 1)
Therefore, the series Equation 3.75 converges for all x. It can also be shown that
Equation 3.76 converges for all x. Then the general solution is given by
y = a0 y1 + b0 y2
and the reader should verify that y1 and y2 are, in fact, linearly independent. There
are exceptional cases [4,6] that occur, and the following theorem is useful in dealing
with those cases.
Theorem 3.7
Let r1 and r2 be roots of the indicial equation for x2 y″ + x[xq(x)]y′ + x2g(x)y = 0,
which is assumed to have a regular singular point at the origin. Then
1.
If r1 ≠ r 2 and r1 − r 2 is not an integer, then there are two linearly independent solutions:
∞
y1 = ∑ an x n + r1
and
n=0
∞
y2 = ∑ bn x n + r2 , x > 0
n=0
2.
If r1 − r 2 is a positive integer, then there are linearly independent solutions
of the form
∞
y1 = ∑ a n x n + r1
and
n=0
∞
y2 = Ay1 ln( x ) + ∑ bn x n + r2 , x > 0
n=0
where A is a constant that may turn out to be zero.**
3.
If r1 = r 2 , then there are linearly independent solutions
∞
y1 = ∑ an x n + r1
n=0
and
∞
y2 = y1 ln( x ) + ∑ bn x n + r1 , x > 0
* Sometimes the smaller root will give the general solution or no solution.
n=0
Linear Second-Order and Systems of First-Order
61
3.6 ALTERNATIVE METHODS
So far, the methods discussed can be classified as standard. However, there are other
techniques, some of which may even be applicable to a few nonlinear problems. For
example, the problem
y ′′ + x ( y ′)2 = 0
can be solved by making the change of variable
y′ = v,
y ′′ = v ′
such that the problem is reduced to
v ′ + xv 2 = 0
a separable first-order differential equation. Here one takes advantage of the missing
dependent variable, y, in
y ′′ = f ( x , y ′)
Another example of an otherwise difficult problem is
yy ′′ + ( y ′)2 = 0
Here the independent variable, x, is missing from the equation. By making the substitutions v = y′ and using the chain rule
dv dv dy
dv
=
⋅
=v
dx dy dx
dy
a new independent variable, y, can be defined. The problem is now reduced to
yv
dv
dv
+ v2 = y + v = 0
dy
dy
a linear first-order equation. Hence, taking advantage of the missing independent
variable, x, in
y ′′ = f ( y, y ′)
can reduce the second-order problem to a first-order one that we know how to solve.
In engineering, prototype differential equations often occur as a result of some
peculiarity of the system under investigation. Then the approach is to compare one’s
derived problem with a prototype, and extract and modify the pertinent result. For
example, the problem
1 d  dy 
 x  − (1 − x 2 )λy = 0
x d x  dx 
(3.77)
d2 f
df  1 λ 
+ (1 − y) −  −  f = 0
2
dy
dy  2 4 
(3.78)
can be transformed into
y
62
Applied Mathematical Methods for Chemical Engineers
The above equation is the confluent hypergeometric equation (the prototype) with
linearly independent solutions tabulated in the literature [12] whereas Equation 3.77
resulted from a fluid flow problem with a parabolic velocity profile.
Another example of a prototype equation that should be familiar to most chemical
engineers is Bessel’s differential equation of order n:
x 2 y ′′ + xy ′ + ( x 2 − n 2 ) y = 0
(3.79)
There are tabulated solutions of Bessel’s equation [6,9–11], and the standard
approach is to solve by comparison. Equations 3.77 to 3.79 could be solved by using
the Frobenius series (Equation 3.65), but that approach may be too work intensive.
To solve Bessel’s differential equation by comparison one needs a standard form
of the equation to compare to. For example, the form
a 2 − γ 2c 2 
2a − 1 

y′′ − 
y′ +  b 2c 2 x 2c− 2 +

 y = 0
 x 

x2
(3.80)
has linearly independent solutions
y1 = x a J γ (bx c )
(3.81)
y2 = x a J− γ (bx c )
(3.82)
and
based on the fact that J γ is a solution of Bessel’s equation of order γ. Thus, the problem
y ′′ +
1
4 

y′ +  4 x 2 − 2  y = 0

x
9x 
can be compared to Equation 3.80 to give
2a − 1 = −1 ⇒ a = 0
2c − 2 = 2 ⇒ c = 2
b 2c 2 = 4 ⇒ b = ±1
4
1
⇒γ =±
9
3
y1 = J1/3 ( x 2 ), y2 = J−1/3 ( x 2 )
a 2 − γ 2c 2 = −
yg = c1 J1/3 ( x 2 ) + c2 J−1/3 ( x 2 )
where J γ (•) and J−γ(•) are Bessel functions of the first kind of order γ.
3.6.1
SUMMARY
In this chapter, a few methods were presented for obtaining a solution to the linear
second-order (or higher) ordinary differential equations. To the inexperienced practitioners, these many options could present a dilemma; that is, given a problem, which
method should one use?
63
Linear Second-Order and Systems of First-Order
For example, consider the constant coefficient linear differential equation
y ′′ + y ′ = xe − x sin 3 x
with the intent to determine a general solution. One could attempt to annihilate the
nonhomogeneous portion, but that would require some clever algebra to be successful
without a lot of labor. Therefore, it is not the recommended procedure for this problem.
A second alternative is to let v = y′; then v′ = y″ and we now have
v ′ + v = xe − x sin 3 x
a linear first-order differential equation, which can be solved by the method given in
the previous chapter for such equation. That is,
µ( x ) = e x
( v µ( x ))′ = ( ve x )′ x sin 3 x
such that
v=
dy
1
x
= − e − x cos3 x + e − x sin 3 x + c1e − x
dx
3
9
Therefore
y=
1
1
xe − x cos3 x d x + ∫ e − x sin 3 x d x + c1e − x + c2
3∫
9
where the integration (arbitrary) constant c1 absorbs the change in sign resulting
from an integration of e−x. With the aid of a good set of integral tables [13], the first
term on the right-hand side can be quickly evaluated. After some simplification the
result is
yg =
1
1
(5 x − 9)e− x cos3 x −
(45 x + 14)e− x sin 3 x + c1e− x + c2
150
450
y
c
yp
As a third alternative,
y ′′ + y ′ = xe − x sin 3 x
can be solved using the method of variation of parameters. That is,
yc = c1e − x + c2
where
y1 = e − x
y1′ = − e
−x
and
y2 = 1
and
y2′ = 0
Then a candidate for the particular solution is
yp = u1 ( x ) y1 + u2 ( x ) y2
subject to
64
Applied Mathematical Methods for Chemical Engineers
u1′ y1 + u2′ y2 = 0
u1′ y1′ + u2′ y2′ = xe − x sin 3 x
or
e − x u1′ + u2′ = 0
− e − x u1′ = xe − x sin 3 x
such that
u1 = − ∫ x sin 3 x d x =
x
sin 3 x
cos3 x −
3
9
and
u2 = ∫ xe − x sin 3 x d x = −
e− x
xe − x
(6 cos3 x − 8sin 3 x ) +
(− sin 3 x − 3cos3 x )
100
10
where this integral was evaluated using a set of tables [13]. Therefore
sin 3 x  xe − x
x
(sin 3 x + 3cos3 x )
yp = e − x  cos3 x −
−
3
9  10
e− x
+
(8sin 3 x − 6 cos3 x )
100
which simplifies to
yp −
1
1
(5 x − 9)e − x cos3 x −
(45 x + 14)e − x sin 3 x
150
450
From a cursory glance, it appears that both the second and third alternates are
equivalent in expediency; however, the underlying algebra is more work intensive
for the second alternate. Therefore, one should make a choice based on all the factors, including the amount of time that can be spent on the overall problem. Bear in
mind that the more steps that have to be executed, the greater the chance to introduce
errors in an otherwise complicated analysis.
3.6.2 INItIAL VALUE PROBLEMs
Theorem 3.1 guarantees a unique solution to the initial value problem, and the subsequent methods that are discussed can be used to derive general solutions. Given a
general solution, the integration constants can be evaluated with the use of the given
initial conditions.
Another procedure, which transforms a differential equation into an algebraic
equation, is given below. This is the Laplace transform method. For example, the
problem
y ′′ − y ′ − 2 y = 0 y(0) = 1,
y ′(0) = 0
Linear Second-Order and Systems of First-Order
65
can be solved using Laplace transform as follows:
L{y ′′ − y ′ − 2 y} = L{y ′′} − L{y ′} − 2L{y} = 0
giving
s 2Y (s) − sy(0) − y ′(0) − sY (s) + y(0) − 2Y (s) = 0
where
L{y} = Y (s)
Then, following simplification, we get
using partial fractions.
s −1
(s − 2)(s + 1)
1/ 3 2 / 3
=
+
s − 2 s +1
Y (s ) =
To recover the result in terms of the variables with which we started, an inversion of
Y(s) is needed.
The inverse Laplace transform, L−1{y(s)}, is given as
{ }
1 −1 1
1
L
= e 2t
s−2
3
3
and
{ }
2 −1 1
2
L
= e−t
s +1
3
3
Therefore, the complete solution to the given initial value problem is
1
2
y(t ) = e 2t + e − t = L−1{Y (s)}
3
3
This method is very efficient when it is applicable, and is one of the many integral
transformations that are useful for solving initial value problems. Integral transforms are certain functions that are defined by an integral, such as
F (s ) =
β
∫α K (s, t ) f (t ) dt
(3.83)
where the function f(t) is transformed into F(s), and K(s, t) is called the kernel of the
transform. In this case, the Laplace transform of f(t) is defined to be
∞
L{ f (t )} = F (s) = ∫ e − st f (t ) dt
0
(3.84)
where e−st is the kernel. Laplace transform is most efficient in solving problems with
nonhomogeneous terms that are discontinuous or impulsive. These types of problems would at best be awkward if the previously discussed methods were attempted.
When can this method be expected to work successfully? Below are some definitions
that address this issue.
66
Applied Mathematical Methods for Chemical Engineers
Theorem 3.8
Suppose that f is piecewise continuous on the interval 0 ≤ t ≤ A for any positive A
and |f(t)| ≤ keat when t ≥ M, where k, a, and M are real constants. Then the Laplace
transform L{f(t)} = F(s) exists for s > a.
By piecewise continuous one means, given a function on an interval α ≤ t ≤ β,
where the interval can be subdivided by a finite number of points in the following
way, α = t0 < t1 < ⋯ < tm = β such that f is continuous on each open subinterval
ti−1 < t < ti and f approaches a finite limit as the endpoints of each subinterval are
approached from inside. Essentially, Theorem 3.8 says that if a function is piecewise
continuous and is exponentially bounded, then one can expect it to have a Laplace
transform. The theory of Laplace transform is well documented [1,4,6,15,16] and
should be consulted for a deeper discussion. Also available are convenient tables of
Laplace transforms [13].
Equation 3.84 can be used to determine Laplace transforms of derivatives provided that the derivatives satisfy the appropriate conditions of continuity and boundedness as required by Theorem 3.8. For example,
∞
L{y ′(t )} = ∫ e − st y ′(t ) dt
0
By definition, the improper integral is
B
lim ∫ e − st y ′(t ) dt
B→∞ 0
then applying integration by partslet
u = e − st
then
and dv = y ′(t ) dt
du = − se − st dt
and
v = y(t )
therefore
B
B
B
∫0 e− st y′(t ) dt =  e− st y(t ) + s ∫ e− st y(t ) dt 0 = e− sB y( B) − y(0) + s ∫0 e− st y(t ) dt
then
B
{
B
lim ∫ e − st y ′(t ) dt = lim e − sB y( B) − y(0) + s ∫ e − st y(t ) dt
n→∞ 0
B→∞
0
}
∞
= − y(0) + s ∫ e − st y(t ) dt
(3.85)
0
= − y(0) + sY (s)
where Equation 3.84 was used in Equation 3.85. This integration procedure can be
extended to finding the Laplace transform of an nth-order derivative of a given function. That is,
L{ f ( n ) (t )} = s n L { f (t ) − s n −1 f (0) − L − sf ( n − 2) (0) − f ( n −1) (0)
(3.86)
67
Linear Second-Order and Systems of First-Order
and for n = 2,
 d2 f 
L  2  = s 2 F (s) − sf (0) − f ′(0)
 dt 
(3.87)
which is the Laplace transform of the second derivative that was used in the above
example. As mentioned previously, Equation 3.86 can be found in tables of Laplace
transform in most mathematical handbooks [13].
Equation 3.84 can also be used to derive the Laplace transforms of most elementary functions, such as
L{1} =
1
s
1
1
= 1+1
2
s
s
2
2
2
L{t } = 3 = 2
s
s +1
n!
L{t n } = n +1 ; n = 1,2,
s
L{t} =
Now suppose n is not a positive integer; for example, what is L{t−1/2}?
Since for any n,
∞
L{t n } = ∫ t n e − st dt , s > 0
0
letting u = st; du = s dt
∞
∞
n
gives
n −u
 u  e − u du = ∞ u e du = 1
s ∫0 s n + 1
s n +1
∫0 t n e− st dt = ∫0  s 
∞
∫0 e − u u n d u
∞
If we denote ∫ e − u u n du by Γ (n + 1), that is,
0
∞
∫0 e− u un du = Γ(n + 1)
(3.88)
Γ (n + 1)
then L{tn} becomes
where Γ (n + 1) is the so-called gamma function or factorial
s n +1 ∞ − u n
function. Also, the quantity ∫ e u du can be evaluated using integration by parts to give
0
∞
∞
∞
∫0 e− uu n du = −u n e− u 0 + n ∫0 e− uu n−1 du = nΓ( n)
Therefore
Γ (n + 1) = nΓ (n); n ≠ 0
However, for n = 0, Equation 3.88 gives
∞
Γ (1) = ∫ e − u du = − e − u
0
∞
0
=1
(3.89)
68
Applied Mathematical Methods for Chemical Engineers
Hence, 0! = 1.
The gamma function, or factorial function, can now be evaluated for other values
of n using Equation 3.89. For example,
n = 1: Γ (2) = 1Γ (1) = 1
n = 2 : Γ (3) = 2Γ (2) = 2 ⋅ 1
n = 3 : Γ (4) = 3Γ (3) = 3 ⋅ 2Γ (2) = 3 ⋅ 2 ⋅ 1
and in general
Γ (n + 1) = n!
Now then, for n = −1/2,
∞
∫0 e − uu −1/2 du = I
Γ ( −1/2 + 1) = Γ (1/2) =
Thus, by substituting u = x2, du = 2x dx, I becomes
I = Γ (1/2) =
∞
∞
1 − x2
2
e 2x d x = 2∫ e− x d x
0
x
∞
∫0 e − uu −1/2 du = ∫0
To evaluate I, the following device is employed:
(
∞
)(
∞
)
I2 = 2 ∫ e− x d x 2 ∫ e− y d y = 4 ∫
0
2
2
0
∞
0
∞
∫0 e − ( x + y ) d x d y
∂x
∂( x , y )
∂r
dr dθ =
But x = r cos θ, y = r sin θ dx dy =
∂x
∂(r , θ)
∂θ
I2 = 4 ∫
π/2
0
(∫
∞
0
2
∂y
∂r
dr dθ = r dr dθ
∂y
∂θ
)
e − r r dr dθ = π
2
such that
I = Γ (1/2) = π
and
L{t −1/ 2} =
3.6.3
π
s
1/ 2
=
π
s
SOME UsEFUL PROPERtIEs OF LAPLAcE TRANsFORMs
1.If the Laplace transform of f(t) is F(s), then
L{e − at f (t )} = F (s + a)
where a is a constant. For example,
L{e − at cos bt} = ?
2
69
Linear Second-Order and Systems of First-Order
from a table of Laplace transforms
L{cos bt} =
therefore
L(e − at cos bt ) =
s
(s + b 2 )
2
s+a
[(s + a)2 + b 2 ]
2.The transform of an integral is given by
L
{∫ f (t) dt} = 1s F (s)
t
0
3.The derivative of a transform is given by
d n F (s )
= L{(−t )n f (t )}
ds n
4.Transform of a step function: if U(t) is a unit step function
U (t ) = 0
=1
t<0
t>0
(3.90)
and if U(t − τ) is a unit step function starting at t = τ
U (t − τ) = 0
=1
t<τ
t>τ
(3.91)
then
L{U (t )} =
1
s
and
e sτ
s
f (t − τ) = 0 for
L{U (t − τ)} =
L{ f (t − τ)} = e −τs F (s); if
0<t <τ
and
L{ f (t − τ)U (t )} = e − sτ F (s)
5.Transform of an impulse function: the Dirac delta or unit impulse function
is given as
 0 if t < t0 − ε

 1
δ ε (t − t0 ) = 
if t0 − ε ≤ t0 + ε
 2ε
 0 if t ≥ t0 + ε

where ε > 0 is a small number and t0 > 0.
70
Applied Mathematical Methods for Chemical Engineers
1
2e
de(t – t0)
0
t0 – e
t0 + e
Sketch of the Delta Function
As can be seen from the sketch, as ε → 0, the rectangular pulse δ ε(t − t0) gets taller
and thinner, but the limit does not exist. Even though the limit does not exist in the
usual sense, one can still derive useful properties of the impulse function. For example,
∞
1.
∫ δ ε (t − t0 ) dt =
−∞
t0 +ε
1
∫t −ε 2ε dt = 1
0
since δ ε (t − t0) = 0 for all t outside of the interval t0 − ε ≤ t ≤ t0 + ε. That is,
if δ ε(t − t0) is considered as a force, then property (1) says the total impulse
is unity.
∞
t0 +ε 1
1 t0 +ε
2.
∫−∞ δ ε (t − t0 ) f (t ) dt = ∫t0 −ε 2ε f (t ) dt = 2ε ∫t0 −ε f (t ) dt = f (τε )
for some τ ε in t0 − ε ≤ t ≤ t0 + ε and any continuous function f(t) defined on
the interval −∞ < t < ∞. Further, if ε → 0, then
∞
∫−∞ δ(t − t0 ) dt = 1
∞
∫−∞ δ(t − t0 ) f (t ) dt = f (t0 )
∞
∫−∞ δ n (t − t0 ) f (t ) dt = (−1)n f (n) (t0 )
3.The Laplace transform of the impulse function is given by
L{δ ε (t − t0 )} = e − st0
for t0 > 0
and
L{δ(t )} = 1 if
t0 → 0
3.6.4 INVERtING thE LAPLAcE TRANsFORM
In order for this operational method to be useful to chemical engineers, there must be
convenient ways to invert the transform. That is, it is necessary to be able to perform
the operation
Linear Second-Order and Systems of First-Order
71
L−1{F (s)} = f (t )
(3.92)
to complete a problem. There are three standard ways to invert the Laplace transform
and each is outlined below. The Laplace transform of a function can be arranged to
be of the form
F (s ) =
P (s )
Q(s )
(3.93)
where P and Q are polynomials in s and Q(s) is of higher degree than P(s). The function F(s) can then be expanded into its partial fractions [14] such that the form
n
Ai
(
−
s
r )i
i =1
F (s ) = ∑
(3.94)
is obtained, where the quantity (s − r) is a linear factor of Q(s) and the Ai are determined constants. Once the form Equation 3.94 is obtained, then Equation 3.92 can
be applied to each term with the aid of a table of transforms [13].
The second standard method of inverting the Laplace transform is by convolution.
This method is most effective when F(s) is the product of two other transforms, H(s)
and G(s), where transforms H(s) and G(s) are respectively transforms of the functions
h(t) and g(t). The following theorem defines what is meant by convolution [1, 17].
Theorem 3.9
If H(s) = L{h(t)} and G(s) = L{g(t)} both exist for s > a ≥ 0, then
F (s) = H (s)G (s) = L{ f (t )}s > a
(3.95)
∫ 0 h(t − τ)g( τ) d τ = ∫ 0 h( τ)g(t − τ) d τ
(3.96)
where
f (t ) =
t
t
The function f is called the convolution of h and g and the integrals (Equation 3.96)
are called convolution integrals.
The convolution obeys the following rules:
Commutative law: h * g = g * h
Distributive law: h * ( g1 + g2 ) = h * g1 + h * g2
Associative law: h * ( g * h) = (h * g) * h
h*0 = 0*h = 0
However,
h *1 = h
is not generally a true statement. That is, if h(t) = sin t, then
t
h * 1 = ∫ sin(t − τ)d τ = cos(t − τ) 0 = 1 − cos t ≠ sin t
0
t
72
Applied Mathematical Methods for Chemical Engineers
Also h*h is not necessarily nonnegative, that is,
t
t
h * h = ∫ sin(t − τ)sin τ d τ = ∫ (sin t cos τ − cos t sin τ)sin τ d τ
0
0
t
t
0
0
= sin t ∫ sin τ cos τ d τ − cos t ∫ sin 2 τ d τ
1
= (sin t − t cos t )
2
Essentially, the convolution integrals do not have all the properties of ordinary
multiplication.
This example illustrates inversion using the convolution integral. Consider
F (s ) =
s
 1  s 
=

2

(s + 1)(s + 4)
s + 1  s 2 + 4 
From a set of tables of Laplace transforms [13] one can find
L−1 =
and
L−1 =
{ }
1
= e−t
s +1
{ }
s
= cos 2t
s +4
2
then
t
e − t * cos 2t = ∫ e − (t −τ ) cos 2τ d τ
0
t
= e − t ∫ e τ cos 2τ d τ
0
t
 e τ (cos 2τ + 2sin 2τ) 
= e−t 

5

0
1
= (cos 2t + 2sin 2t − e − t )
5
Therefore
s

 1
L−1 
 = (cos 2t + 2sin 2t − e − t )
2
 (s + 1)(s + 4)  5
The third standard method of inverting a Laplace transform is by making use of the
Residue theorem [6,15,16,18,22,30]. The transform function F(s) is analytic, except
for singularities. In this discussion, when F(s) is analytic, the inverse transform of
F(s) is given by
∞
f (t ) = L−1{F (s)} = ∑ ρn (t )
(3.97)
1
where ρ n(t) is termed the residue of F(s) at the singularities (poles) Sn. The residues
of F(s) may be determined by employing the form given in Equation 3.93, that is,
Linear Second-Order and Systems of First-Order
F (s ) =
73
P (s )
Q(s )
If Sn is a simple pole of F(s), then ρ n(t) is given by
ρn (t ) =
P ( S n ) Sn t
e
Q ′ ( Sn )
(3.98)
where Q′(Sn) is the value of dQ/ds evaluated at the singular point of interest.
Recall that
P (s)
P ( sn )
P (s )
= lim
= lim(s − sn )
s
s
s
s
→
→
n  Q(s ) − Q(s ) 
n
Q(s)
Q ′ ( sn )
n


−
s
s
n


The form
lim(s − sn )
s → sn
P (s)
Q(s)
is convenient for applications, especially when sn = 0.
When Sn is a multiple pole of order m of F(s), then
t2
t m −1 Am 

ρn (t ) = e Snt  A1 + tA2 + A3 +  +
2!
(m − 1)! 

m
t i −1
= e Snt ∑ Ai
(i − 1)!
i =1
(3.99)
where
1
dm−i
[(s − sn )m F (s)]
s → sn (m − i )! ds m − i
Ai = lim
The following example illustrates the use of the residue theorem and should serve to
clarify certain new terminology:
Consider
1
P (s)
F (s ) =
=
2
s (s − a)
Q(s)
then the polynomial Q(s) has singularities at s = 0 and s = a. These singularities are
termed poles [16,18] and in particular, s = 0 is termed a simple pole whereas s = a is
a double pole (pole of order two). For the simple pole, Equation 3.98 gives
ρ 0 (t ) =
1
1
1
e0t =
= 2
Q ′(0)
Q ′(0) a
since Q′(s) = (s − a)2 + 2s(s − a). Alternatively, we could first determine the quantity
P(0)/Q′(0) by taking the limit
lim(s − 0)
s→ 0
1
1
=
s (s − a) 2 a 2
74
Applied Mathematical Methods for Chemical Engineers
Then, multiply the result by e0t to get the residue at s = 0.
The residue at the double pole, s = a, is given by
ρa (t ) = e at ( A1 + tA2 ) since m = 2
where
A1 =
=
1
d 2 −1 
1

(s − a) 2
(2 − 1)! ds 2−1 
s(s − a)2  s = a
d 1 
1
=− 2


ds  s  s = a
a
and
A2 =
1
d 2− 2
(2 − 2)! ds 2− 2
1


2
 (s − a) s (s − a) 2 

a
1
1
=   =
 s s = a a
then
t 1
ρa (t ) = e at  − 2 
a a 
and
f (t ) = L−1{F (s)} =
1
t 1
+ e at  − 2 
a a 
a2
The previous example is very straightforward and could easily be inverted by use of
partial fractions and a table of Laplace transforms. This next example may be tabulated. However, it is used here to demonstrate more clearly how the residue theorem
may be useful for similar or more complicated inversions. Consider
F (s ) =
sinh x s
sinh a s
Then
Q(s) = sinh a s
If we let a s = iλ such that s = −λ 2/a2 then F(s) transforms to sin (x λ /a)/sin λ such
that
dQ dQ dλ
cos λ
=
= − a 2i
ds dλ ds
2λ
where Q(λ) is given by isinλ. Then application of Equations 3.97 and 3.98 result in
∞
∑−
n= 0
2λ n sin( xλ n / a) −( λ 2n / a2 )t
e
a 2 cos λ n
Linear Second-Order and Systems of First-Order
75
But the poles of sinh a s are the zeros of sin λ and these occur at λ = n π,
n = 0, 1, 2, ….
Therefore replacing λ n by the quantity n π and observing that cos(nπ) = (−1)n, we
get the result
2π ∞
2 2
2
(−1)n+1 n sin( xnπ/a)e − ( n π t / a )
2 ∑
a n=1
More detailed usage of the residue theorem to invert Laplace transforms is discussed
in Chapter 6 and in the literature [16, 30].
3.6.5
TAYLOR SERIEs SOLUtION OF INItIAL VALUE PROBLEMs
In Section 3.5.1, the Frobenius series method was discussed with regard to differential equations with regular singular points. In this section, a method is given that
effectively deals with differential equations with ordinary points. To illustrate the
importance of this method consider the relatively harmless-looking first-order initial
value problem
y′ + e x y = x 2 ;
y(0) = 4
(3.100)
This problem has a unique solution (Theorem 2.1) for all x and is given by
y( x ) =
−x
1  x 2 eξ

ξ
e
d
ξ
+
4e
x
∫

e e  0
(3.101)
However, Equation 3.101 is not in closed form. By closed form we mean
y ′ + 2 y = 1;
y(0) = 3
has
1
y( x ) = (1 + 5e −2 x ); − ∞ < x < ∞
2
as its solution in closed form. Equation 3.101 is difficult to graph or to use in forecasting results, and these are important aspects of engineering practice.
Reconsider Equation 3.100, but this time, let
y( x ) = y(0) + y′(0) x +
1
1
y′′(0) x 2 +  + y( n ) (0) x n + 
2!
n!
∞
(3.102)
1 (n)
y (0) x n
!
n
n=0
=∑
then each derivative can be evaluated at x = 0 from
y ′(0) + e 0 y(0) = 0
or
y′(0) = −4
76
Applied Mathematical Methods for Chemical Engineers
to obtain the value of the second derivative at x = 0, one differentiates Equation
3.100 thus
y ′′ + e x y ′ + e x y = 2 x
(3.103)
then at x = 0, Equation 3.103 gives
y ′′(0) + y ′(0) + y(0) = 0 or
y ′′(0) = 0
Differentiate Equation 3.103 to get
y(3) + e x y ′′ + 2e x y ′ + e x y = 2
(3.104)
then
y(3) (0) + y ′′(0) + 2 y ′(0) + y(0) = 2 or
y(3) (0) = 6
Therefore, the solution of Equation 3.100 using Equation 3.102 is
y( x ) = 4 − 4 x + x 3 + 
(3.105)
Notice that one can take this process up to any desired amount of terms. Equation
3.105 is more manageable than Equation 3.101.
An appropriate question is when is this approach mathematically legal? The
answer is whenever the initial value problem has analytic coefficients and forcing
functions. The term analytic can be defined as any function having a Taylor series
representation in some open interval about a given point.
Theorem 3.10
If p, q, and g are analytic at x0, then the initial value problem
y′′ + p( x ) y′ + q( x ) y = g( x );
y( x 0 ) = A, y′( x 0 ) = B
(3.106)
has a unique solution, which is also analytic at x0.
If the initial value is not given at the origin, a shift to the origin can be made as
given in the example that follows.
Given
y′′ + xy = 4; y(1) = 2, y′(1) = 0
let
t = x − 1 and Y (t ) = y(1 + t )
then
Y ′(t ) =
dy dx
dx dt
but
dx
=1
dt
dy
Y ′(t ) =
dx
x = 1 + t,
Linear Second-Order and Systems of First-Order
77
similarly
Y ′′(t ) = y′′( x )
then Equation 3.106 becomes
Y ′′(t ) + (1 + t )Y (t ) = 4; Y (0) = 2, Y ′(0) = 0
(3.107)
Equation 3.107 can now be treated similar to the previous example to get
1
1
1
1
Y (t ) = 2 + t 2 − t 3 − t 4 − t 5 + t 6 + 
3
12
30
72
such that
1
1
1
y( x ) = 2 + ( x − 1)2 − ( x − 1)3 − ( x − 1)4 − ( x − 1)5
3
12
30
1
+ ( x − 1)6 + 
72
Even though the above discussion is focused on linear problems, the Taylor series
approach may be applied to some nonlinear problems.
3.7 APPLICATIONS OF SECOND-ORDER
DIFFERENTIAL EQUATIONS
In this section, a few applications of the theory and methods that were previously
outlined will be illustrated. However, it should be noted that a substantial percentage
of the application of second- (and higher) order ordinary differential equations is in
association with solving partial differential equations, a topic discussed in Chapter 6.
As in Section 2.4, some problem setup as well as solution techniques will be
demonstrated. For example, consider the following problem in heat transfer through
a cylindrical conductor [15].
3.7.1 PROBLEM StAtEMENt
Two concentric cylindrical metallic shells are separated by a solid material. If the
two metal surfaces are maintained at different constant temperatures, what is the
steady-state temperature distribution within the separating material?
In this problem, temperature, T, and the heat flow per unit area, Q, depend on the
radius, r. Then if we consider the condition of the system about an element of thickness, ∆r and with the aid of Figure 3.1, the important quantities can be organized
according to the procedure of Section 2.4.
Therefore,
dQ 

2πrQ − 2π(r + ∆r )  Q +
∆r  = 0

dr 
or
78
Applied Mathematical Methods for Chemical Engineers
r + Δr
r
a
R
FIGURE 3.1 Radial heat flow through cylindrical conductor.
r
System property
T
Temperature
Heat transfer area per unit length
2πr
Q
Radial heat flux density
2πrQ
Total radial heat flow
Heat input to inner surface = 2πr.Q
(
Heat output from outer surface = 2π(r + ∆r ) Q +
Accumulation of heat = 0
−r
dQ
dr
∆r
r + Δr
T+
dT
∆r
dr
2π (r + ∆r)
dQ
Q+
∆r
dr

dQ 
2 π(r + ∆r ) Q +
∆r 

dr 
)
dQ
dQ
−Q−
∆r = 0
dr
dr
Then, limit as ∆r → 0
r
dQ
+Q = 0
dr
(3.108)
But Q is related to T by
Q = −k
dT
dr
(3.109)
where k is the thermal conductivity. Substituting Equation 3.109 into 3.108 gives
r
for a constant thermal conductivity.
d 2 T dT
+
=0
dr 2 dr
(3.110)
Linear Second-Order and Systems of First-Order
79
Since the two metal surfaces are maintained at different constant temperatures,
say
T = T0
at r = a
(3.111)
T = T1
at r = R
(3.112)
and
one can solve the second-order, linear, variable coefficient, and homogeneous differential equation subject to Equations 3.111 and 3.112. That is,
d  dT 
r
 =0
dr  dr 
gives
r
dT
= c1
dr
and
T (r ) = c1 ln r + c2
then
T (a) = T0 = c1 ln a + c2
T ( R) = T1 = c1 ln R + c2
therefore
R
T1 − T0 = c1 ln  
 a
such that
c1 =
T1 − T0
ln( R/a)
and
c2 =
T0 ln R − T1 ln a
ln( R/a)
Finally
T (r ) − T0 ln(r /a)
=
T1 − T0
ln( R/a)
As can be expected, there are other ways to set up physical problems that
may be of interest. One approach that is very prominent in chemical engineering is to use the equations of change [19, 20]. That is, to set up constant density,
80
Applied Mathematical Methods for Chemical Engineers
constant viscosity flow problems, one needs the equation of continuity and the
equation of motion.
Example 3.13
Consider the axial flow of an incompressible fluid in a circular tube of radius R. By
considering a long tube and assuming that the θ-component and the r-component of
velocities are negligible, one can reduce the z-component of motion for constant ρ and
μ [19] to
ρvz
∂ vz
∂P
 1 ∂  ∂ vz  ∂ 2 vz 
=−
+µ
r
+ 2 
∂z
∂z
 r ∂r  ∂r  ∂ z 
(3.113)
Also, the equation of continuity [19] reduces to
∂ vz
=0
∂z
(3.114)
which further reduces Equation 3.113 to
0=−
dP 1 1 d  dvz 
+
r

dz µ r dr  dr 
(3.115)
subject to
vz is finite at r = 0
(3.116)
vz = 0 at r = R
(3.117)
and at the wall of the cylinder
Equation 3.115 through 3.117 integrate to
υz =
( P0 − PL ) R 2   r  2 
1 −   
4µL
R 

where P0 and PL are the pressures at the entrance and exit of the cylinder, respectively.
Example 3.14
Derive the temperature profile T(r) in a solid cylinder with heat generation if the
g­ overning differential equation is
1 ∂  ∂ T  1 ∂  ∂ T  ∂  ∂T 
∂T
+ k
k
 + q = ρCp
 kr
 + 2



r ∂r
∂z
∂t
∂r
r ∂φ  ∂φ  ∂ z
(3.118)
81
Linear Second-Order and Systems of First-Order
where the coordinate system indicates the independent variables: ρ is mass density and
Cp is specific heat. For a long solid cylinder as shown in Figure 3.2, with uniform heat
generation q and at steady-state conditions, the rate at which heat is generated within
the cylinder will be equal to the rate at which heat is convected from the surface of
the cylinder to a moving fluid. This condition allows the surface temperature (Ts) to be
maintained at a fixed value. Then, for constant thermal conductivity k, Equation 3.118
reduces to
1 d  dT  q
r
+ =0
r dr  dr  k
or
q
 dT 
dr
= − rdr
 dr 
k
(3.119)
such that
T (r ) =
− q 2
r + C1 ln r + C2
4k
(3.120)
Along the centerline of the solid cylinder (r = 0) the temperature distribution is
symmetric and the temperature gradient (dT/dr) must be zero there. That is,
at r = 0,
dT
=0
dr
therefore,
C1 = 0
at
r = r0 , T = TS
Z
T (r, f, z)
r
x
f
y
Cold fluid
T∞
r
qr
h
q
L
FIGURE 3.2
Solid cylinder with heat generation.
82
Applied Mathematical Methods for Chemical Engineers
and
C2 = TS +
T (r ) − TS =
q 2
r0
4k
q 2 2
(r0 − r )
4k
(3.121)
From an overall energy balance
q ( πr02 L ) = h(2πr0 L )(TS − T∞ )
which simplifies to
TS = T∞ +
0
qr
2h
(3.122)
Example 3.15
Consider a long solid tube, insulated at the outer radius r0 and cooled at the inner radius
.
ri with uniform heat generation q within the solid (as shown in Figure 3.3) [21].
1. Determine the general solution for the temperature profile in the tube.
2. Suppose the maximum permissible temperature at the insulated surface r0 is
T0. Identify appropriate boundary conditions that could be used to determine
the arbitrary constants appearing in the general solution and find the temperature distribution.
ri
FIGURE 3.3
r0
Solid tube with heat generation.
83
Linear Second-Order and Systems of First-Order
3. What is the heat removal rate per unit length of tube?
4. If the coolant is available at a temperature T∞, obtain an expression for the
convection coefficient that would have to be maintained at the inner surface
.
to allow for operation at the prescribed values of T0 and q.
Solution
Assumptions:
1. Steady-state conditions prevail.
2. One-dimensional radial conduction is reasonable.
3. Physical properties are constant.
4. Volumetric heat generation is uniform.
5. Outer surface is adiabatic.
a. Equation 3.118 in Example 3.14 is the governing differential equation
and it is reducible to Equation 3.119 by using the reasoning per Example
3.14. Therefore, the general solution is given in Equation 3.120:
T (r ) =
− q 2
r + C1 ln r + C2
4k
b. Two boundary conditions are needed to determine C1 and C2. In this
problem
T (r0 ) = T0
(3.123)
and Fourier’s law
Qr = − kA
dT
dT
= − k (2πrL )
dr
dr
expresses the rate at which heat is conducted across any cylindrical surface in the solid. In particular, at the adiabatic outer surface
dT
=0
dr
Qr = 0 ⇒ at r = r0 ,
(3.124)
Therefore,
C1 =
q 2
r0
2k
and C2 = T0 +
q 2 q 2
r0 −
r0 ln r0
4k
2k
Finally, the temperature distribution is
T (r ) = T0 +
q 2 2
q
r
(r0 − r ) − r02 ln  0 
4k
2k
r
(3.125)
84
Applied Mathematical Methods for Chemical Engineers
c. The heat removal rate may be determined by obtaining the conduction
rate at r i or by evaluating the total generation rate for the tube.
Since
Qr = −2πkr
dT
dr
represents the rate of conduction, then from Equation 3.125
dT
q  r02

=
 − r 
dr 2 k  r
and at r = r i

dT
q  r02
=
− ri 
dr 2 k  ri

Therefore,
Qr (ri ) = −2πkri

q  r02
− ri 
2 k  ri

= −πq ( r02 − ri2 )
(3.126)
is the heat removal rate.
d. Application of the energy conservation principle to the inner surface
results in
Qr,cond = Qr,conv
or πq ( r02 − ri2 ) = h 2πri (Ti − T∞)
(3.127)
where −Qr(r i) accounts for heat flowing out of the wall, and Qr,conv is
expressed as (Ti − T8) rather than (T8 − Ti). Therefore
h=
q ( r02 − ri2 )
, where Ti = T (ri )
2ri (Ti − T∞)
Example 3.16
This example covers simultaneous diffusion and chemical reaction in a tubular
reactor [15].
A tubular reactor of length L and cross-sectional area 1.0 m2 is used to carry out a
first-order chemical reaction of the type
A→B
The rate coefficient is k (sec−1). In a given feed rate of u m3/sec, the initial feed concentration of component A is C0 and the diffusivity of A is D m2/sec. What is the concentration of A as a function of the reactor length? It may be assumed that during the
85
Linear Second-Order and Systems of First-Order
reaction the volume remains constant and that steady-state conditions are established.
Also there is no concentration variation in the section following the reactor.
Solution
Let x represent the distance of any point from the beginning of the reaction section
(0 < x < L), C represent the concentration profile of species A in the entry section
(x < 0), and y be the concentration profile of species A in the reaction section as
shown in Figure 3.4.
Consider a material balance over the element of length ∆x at a distance x from the
inlet. Then the bulk flow of A at x is (uy) and at x + ∆x is
 uy + u dy ∆x 


dx 
Also, the diffusion of A at x is
 − D dy 


dx 
and at x + ∆x is
dy d 
dy  

 − D +  − D  ∆x 
dx dx
dx
The accumulation rate is zero (assumed steady-state conditions given in problem
statement). The rate of removal of component A by chemical reaction is given by ky∆x
(cross-sectional area).
Therefore,
uy − D
dy 
dy
dy d
dy


−  uy + u ∆x  −  − D +  − D  ∆x  = ky∆x
dx 
dx  
dx dx 
dx  
Entry section
u, C0
L
u, y
x
FIGURE 3.4 Tabular reactor.
Δx
(3.128)
86
Applied Mathematical Methods for Chemical Engineers
Following simplification and division by ∆x we get
D
d2 y
dy
− u − ky = 0
dx 2
dx
(3.129)
Similarly, the material balance in the entry section gives
D
d 2C
dC
−u
=0
2
dx
dx
(3.130)
The characteristic equation for Equation 3.129 is
Dr 2 − ur − k = 0
such that
r1 = u(1 + m) / 2 D
and
4 kD
r2 = u(1 − m) / 2 D, where m = 1 +  2 
 u 
Therefore,
ux
ux
y = h1 exp 
(1 + m)  + h2 exp 
(1 − m) 
 2D


 2D
and the general solution for Equation 3.130 is
ux
C = h3 + h4 exp  
 D
The appropriate boundary conditions for Equation 3.129 are, at x = 0 C = y (contidC dy
=
also at x = L, dy/dx = 0 (no concentration variation
dx dx
following the reaction section). Appropriate boundary conditions for Equation 3.130
are, at x = −∞, C = C0 and the condition at x = 0 can be reused (i.e., C = y). Following
application of these boundary conditions we get
nuity of composition) or
2
y
ux 
um
um

= exp   (m + 1) exp 
( L − x )  + (m − 1) exp  −
( L − x )  
 D
C0 K
 2D

 2D

where K is given by
uLm 
− uLm 
K = (m + 1)2 exp 
− (m − 1)2 exp 
 2D 
 2D 
Linear Second-Order and Systems of First-Order
Example 3.17
This example covers the continuous hydrolysis of fat compound in a spray column
[15].
A fat compound mixed with high-pressure hot water is fed to the bottom of a spray
column. Water at the column operating conditions is sprayed into the top and descends
in droplets through the rising fat phase. The hydrolysis reaction generates glycerine
that is extracted by the descending water phase. Further, the hydrolysis reaction is first
order with a specific rate constant of 0.17 sec−1.
Estimate the concentration of glycerine in each phase as a function of column
height. Also determine what fraction of the tower height H is required for the chemical
reaction.
Data:
Rate of fat compound input = 8070 lb/h
Rate of high-pressure hot water = 2270 lb/h
Rate of water spray = 4120 lb/h
Column operating conditions: 450ºF and 600 psia
Height = 72 ft, Diameter = 2 ft 2 in
Rate of final extract = 5560 lb/h containing 12.16% glycerine
Rate of fatty acid raffinate = 8900 lb/h containing 0.24% raffinate
Glycerine distribution ratio between the water and the fat phase is 10.32 at the given
column temperature and pressure.
Solution
As shown in Figure 3.5, L represents the mass flow of raffinate and G the mass
flow of extract. In addition, the following symbols are used to designate the other
quantities:
x = mass fraction of glycerine in raffinate
y = mass fraction of glycerine in extract
y* = equilibrium mass fraction of glycerine in extract
z = mass fraction of hydrolyzable fat in raffinate
S = cross-sectional area of tower
a = interfacial area per unit volume of tower
K = overall mass transfer coefficient expressed in terms of extract compositions
m = distribution ratio
k = reaction rate coefficient
ρ = mass of fat per unit volume
h = distance coordinate from base of column
w = mass of fat per unit mass of glycerine
H = effective height of column
Then the changes occurring in the element of column of height ∆h are
• Glycerine transferred from fat to water phase: KaS(y* − y)∆h.
• Rate of destruction of fat by hydrolysis: kρSz∆h, thus giving the rate of
­production of glycerine as kρSz∆h/w.
87
88
Applied Mathematical Methods for Chemical Engineers
L lb/h G lb/h
xH
yH
zH
x + Δx
z + Δz
y + Δy
Δh
x, z
H
y
h
x0, z0
FIGURE 3.5
y0
Continuously operating fat-hydrolyzing column under steady state.
A glycerine balance over the element ∆h (Figure 3.5) is
Lx +
( kρSz∆h)
dx 
dy 
− L  x +
∆h  = Gy − G  y +
∆h  = KaS ( y* − y) ∆h


w
dh 
dh 
(3.131)
y* = mx
(3.132)
where
Also a glycerine balance between the element and the base of the tower is
Lz 0
Lz
+ Gy = Lx +
+ Gy0 (3.133)
w
w
Using Equation 3.132 and the last two parts of Equation 3.131 give
KaSmx = KaSy − G
dy
dh
(3.134)
Substitution of Equation 3.133 into the first two parts of Equation 3.131 gives
z
G ( y − y0 )
dx
dy
kρS  0 +
− x  ∆h − L ∆h = − G ∆h
L
dh
dh
w

(3.135)
89
Linear Second-Order and Systems of First-Order
Multiplication of Equation 3.135 by (KaSm/LG) and substituting for x from
Equation 3.134 gives
kρS 2 Ka  mz 0 mG
dy
kρS  KaS
+
( y − y0 )  −
y − 
LG  w
L
dh 
L  G

 KaS dy d 2 y  KaSm dy
+
=0
−
−
L dh
 G dh dh 2 
and, using the following parameters
r=
mG
;
L
p=
kρS
KaS
; q=
(r − 1)
L
G
reduce the above equation to
d2 y
dy
pq 
mz
+ ( p + q) + pqy =
ry0 − 0 
dh 2
dh
r − 1 
w 
(3.136)
subject to the boundary conditionsat h = 0, x = 0 and at h = H, y = 0.
Equation 3.136 is a linear constant coefficient equation and can be solved in the
following way:
pq 
mz
Put in operator form: ( D 2 + [ p + q]D + pq) y =
ry0 − 0 
r − 1 
w 
Annihilate in right-hand side: D(D2 + [p + q] D + pq)y = 0
Write down the characteristic equation: t(t2 + [p + q]t + pq) = 0.
Such that t1 = 0, t2 = −p, and t3 = −q are the characteristic roots. Then the general
solution is
y = c1 + c2 e − ph + c3e − qh
where c2 and c3 are arbitrary and c1 is a particular constant to be determined through
substitution into Equation 3.136. That is, yp is given as
yp = c1 , yp′ = yp′′ = 0
Then
pqc1 =
pq 
mz
ry0 − 0 
r − 1 
w 
or
c1 =
1 
mz
ry0 − 0 
r − 1 
w 
Finally, the general solution becomes
yg =
1 
mz
ry0 − 0  + c2 e − ph + c3e − qh
r − 1 
w 
90
Applied Mathematical Methods for Chemical Engineers
and substitution of the boundary conditions into the general solution gives
y=
mz 0  − ph  e − pH − v  − qh  ve − qH − re − pH  
e +
e +
 
 r − e − qH 

w(r − v ) 
r − e qH

(3.137)
where
v = 1+
y0 =
kρG q + rp − p
=
KaL
q
mz 0
  r − 1  − pH  v − 1  − qH 
+
1− 
e 
e
 r − v 
w(r − e − qH )   r − v 

(3.138)
The condition y = y0 at h = 0 was used to derive Equation 3.138. Equation 3.137 gives
the weight fraction of glycerine in the extract phase as a function of column height h.
Taking the solubility of water in tallow into consideration and using mean flow
rates together with the given data result in
L = 8540
G = 3760
y0 = 0.188
r = 4.544
p = 0.198
q = 0.00348Ka
v = 1 + 201.6/(Ka)
Solving Equation 3.137 with H = 72 ft, gives Ka = 14.2 lb/(h ft3). With Ka known, the
values of y, y*, and z can be determined as functions of column height using Equations
3.137, 3.134, 3.132, and 3.133, and the fraction of tower height principally required for
chemical reaction can be determined.
Example 3.18
This example covers heat loss through pipe flanges [15].
Two thin-wall metal pipes of 1-in. outside diameter are connected by ½-in. thick
and 4-in. diameter flanges that are carrying steam at 250ºF. Determine the rate of heat
loss from the pipe and the proportion that leaves the rim of the flange.
Thermal conductivity of the flange metal is k = 220 Btu/h ft2 ºF ft−1.
The exposed surfaces of the flanges lose heat to the surroundings at T1 = 60ºF
according to a heat transfer coefficient h = 2 Btu/h ft2 ºF.
Solution
Consider one flange with one exposed circular face and an exposed rim with radial
coordinate r measured in inches from the axis of the pipe. Then the heat balance over
an element of width ∆r, as shown in Figure 3.6, gives
k dT
Input = −2π (1/2)r 12 dr
91
Linear Second-Order and Systems of First-Order
r + Δr
r
2 in.
FIGURE 3.6
1/2 in.
Pipe flange.
Output =
−
πkr dT d  πkr dT 
2πrh∆r
+ −
 ∆r + 144 (T − T1 )
dr
r
12 dr 12
d
 flange surface
heat lost to surroundings
Accumulation = 0
Simplification of the heat balance leads to
r
d 2T dT h
+
− r (T − T1 ) = 0
dr 2 dr 6 k
which can be reduced to
x2
d2 y
dy
+ x − x2y = 0
2
dx
dx
(3.139)
for y = T − T1, and x = r h/6 k .
Equation 3.139 is a modified Bessel equation of zero order. By comparison with
Equation 3.80, we get
y1 = J 0 (ix )
and
y2 = Y0 (ix )
but J0(ix) is usually denoted as I0(x) and Y0(ix) as K0(x), where
I0 (x) = 1 +
x2
x4
x6
+ 2 2 + 2 2 2 +L
2
2
24
246
and
1 2
x + L are real forms. The number γ is Euler’s
4
constant. Therefore, the general solution of Equation 3.139 is
K 0 ( x ) = [ln 2 − γ ]I 0 ( x ) − I 0 ( x ) ln( x ) +
yg = c1I 0 ( x ) + c2 K 0 ( x )
92
Applied Mathematical Methods for Chemical Engineers
Application of the boundary conditions
at r = 1 / 2, T = 250 ⇒ x = 0.0195, y = 190
and at r = 2, −
h
k dT
dy
=
(T − T1 ) ⇒ x = 0.078, = −0.0195 y
12 dr 144
dx
gives
T = 60 + 186.5I 0 (0.039r ) + 0.8636 K 0 (0.039r )
where the values of the pertinent Bessel function are taken from standard math tables
[13]. The heat conducted from the pipe by the flange is given by
Q1 = −
πk  dT 
= 47.81 Btu/h
 
24  dr  r =1/2
and the heat lost through the rim is given by
Q2 = −
πk  dT 
  = 16.62 Btu/h
6  dr  r = 2
Therefore, the pipe loses 47.8 Btu/h through each flange, of which 35% is lost through
the rim.
Example 3.19
This example covers a tubular gas preheater [15].
1000 ft3/h of 70ºF air is drawn through a 4-ft long and 4-in. diameter heated cylindrical pipe. The wall temperature, Tw, of the pipe is maintained at 600ºF for the total
length, and the overall heat transfer coefficient, h, as a function of x (distance measured
from pipe inlet) is
h = 5 x −1/2 Btu/h ft 2 °F
The air properties are as follows:
Specific heat (Cp) = 0.24 Btu/lbºF
Thermal conductivity (k) = 0.020 Btu/h ft2 ºF ft−1
Density (ρ) = 0.050 lb/ft3
Assumptions:
Heat transfer occurs by conduction within the gas in an axial direction.
Mass flow of the gas is in an axial direction.
Solution
With the aid of Figure 3.7, the following heat balance can be established.
Input
dT
dx
Conduction
− kA
Mass flow
uρCpT
Wall heat transfer
πDh(Tw – T)∆x
Output
− kA
dT d 
dT
+  − kA  ∆x
dx dx 
dx 
 dT ∆ 
uρC p  T
x
 dx 
93
Linear Second-Order and Systems of First-Order
4 ft
70°F, u, Cp
x
FIGURE 3.7
Tw
h
Δx
Gas preheater.
where A is the pipe cross-sectional area and D is its diameter. Then
dT
+ uρC pT + πDh(Tw − T ) ∆x
dx
dT d 
dT
dT 
= − kA
+  − kA  ∆x + uρC p  T +
∆x 

dx dx 
dx 
dx 
− kA
simplifies to
πDh(Tw − T ) = − kA
d 2T
dT
+ uρC p  
 dx 
dx 2
and rearranging gives
d 2T uρC p dT πDh
(Tw − T ) = 0
−
+
dx 2
kA dx
kA
(3.140)
Inserting the numerical values and substituting x = z2, and t = Tw − T, results in
z
dt
d 2t
− (1 + 13760 z 2 ) − 12000 z 2t = 0
dz
dz 2
Attempting to solve this differential equation by the method of Frobenius gives c = 0
and c = 2 as roots of the indicial equation. Then, for c = 2 we get
a1 = 0
a3 = 800 a0
a2 = 3440 a0 a4 = 7.9 × 10 6 a0
The coefficients are increasing, even though a convergence test would suggest that this
series is convergent. This is a case where a convergent series is not useful, since more
than 100 terms would be required to determine the first solution. This dilemma occurs
due to the much larger coefficients of dt/dz and t in comparison to that of d2t/dz2. By
neglecting the gas conduction term, we get
94
Applied Mathematical Methods for Chemical Engineers
dt
+ 0.436 x −1/2t = 0
dx
which can be solved to give
t = α exp(−0.872 x 1/2 )
Then at x = 0, t = 530, such that
t = 530 exp(−0.872 x 1/2 )
(3.141)
or
T = 600 − 530 exp(−0.872 x 1/2 )
resulting in an exit gas temperature of 507ºF.
A check on the accuracy of this approximation shows an error of 7.5% for an
x = 10 −3. That is, Equation 3.141 can be differentiated twice to show that
d 2t
dx 2
1
1
 688 dt  =
+


dx  13760 x 15780 x 1/2
which is small, except when x is small.
Example 3.20
A control valve of the type shown in Figure 3.8 is actuated by air pressure ranging from
3 to 15 psig operating on a 16-in. diameter diaphragm whose effective area is equivalent to 100 in.2. The effective dead weight of the moving parts of the valve, allowing
for the friction in the gland, etc., is estimated to be 300 lbf, the stiffness of the spring
is 600 lbf/in., and the damping constant is estimated to be 17 lbf-s/in. If the total lift
Air
Spring
x
Diaphragm
Backing plate
Valve stem
FIGURE 3.8 Control valve.
95
Linear Second-Order and Systems of First-Order
of the valve is 2.0 in., predict the response of the valve if the controlling air pressure
suddenly changes from 6 to 12 psig.
Solution
A force balance on the valve is input force = ∆PAU(t), U(t) is the unit step function.
Output force consists of
• Force to overcome inertia of movable parts = m
• Force to overcome resistance of the spring = kx
dx
• Force to overcome damping resistance = c
dt
d2 x
dt 2
Therefore, at equilibrium
m
d2 x
dx
+ c + kx = ∆PAU (t )
dt 2
dt
By letting α = c/2mω where ω = k /m, simplify the differential equation to
d2 x
dx
∆P
+ 2αω + ω 2 x =
U (t )
dt 2
dt
m
(3.142)
Laplace transform of Equation 3.142 gives
( S 2 + 2αωS + ω 2 ) x =
∆PA
+ Sx (0) + 2αωx (0) + x ′(0)
mS
where
x = L{x (t )}
Then, assuming that the origin of the displacement of the moving parts of the valve
corresponds to an air pressure of 6 psig gives
x (0) = x ′(0) = 0
and x becomes
x=
∆PA
mS ( S 2 + 2αωS + ω 2 )
(3.143)
By the method of partial fractions we get
∆PAS /mω 2
2α∆PA/mω
∆PA
∆PA
=
− 2
−
2
2
mS ( S + 2αωS + ω ) mω S S + 2αωS + ω 2 S 2 + 2αωS + ω 2
2
Then, inverting each term on the right-hand side and simplifying the algebra results in
L−1{x (s)} = x (t )
=

∆PA  
α

sin ω 1 − α 2 t  e −αωt 
1 − cos ω 1 − α 2 t +

k  
1 − α2

96
Applied Mathematical Methods for Chemical Engineers
Alternatively, the inversion can be carried out in the following way:
consider
∆PA
P (s )
=
mS ( S 2 + 2αωS + ω 2 ) Q(s)
where the polynomial Q(s) has singularities at S0 = 0, S1 = −αω + iω 1 − α 2 , and
S2 = −αω − iω 1 − α 2 , then
ρ 0 (t ) =
∆PA 0 t ∆PA
e =
Q′(0)
mω 2
∆PA S1t
∆PAe −αωt e − iω 1−α t
e =
Q′( S1 )
2mω 2 (α 2 − 1 − iα 1 − α 2 }
2
ρS1 (t ) =
∆PA S2t
∆PAe −αωt e − iω 1−α t
e =
e − iω
Q ′( S2 )
2mω α 2 − 1 + iα 1 − α 2
2
ρS2 (t ) =
(
)
1−α 2 t
Then application of Equation 3.97 gives
 −αωt
e


∆PA  
α

sin ω 1 − α 2 t  e −αωt 
=
1 − cos ω 1 − α 2 t +
2

k  
1− α

x (t ) =
∆PA ∆PA
+
mω 2 2mω 2
2
2
e − iω 1−α t
e − iω 1−α t

+ 2
 2
2
α − 1 − iα 1 − α 2
 α − 1 − iα 1 − α
where the Euler formulas
{e iθ = cos θ + i sin θ}
{e − iθ = cos θ − i sin θ}
have been used. Therefore,
x (t ) = 1 − (cos 25.5t + 0.427sin 25.5t )e −10.9t
Example 3.21
This example covers an application to process control.
Consider the differential equation
ay′′ + by′ + cy = u(t ); y(0) = y0
and
y′(0) = y0′
(3.144)
where a, b, and c are constants and u(t) is a function that has a Laplace transform. Then
in terms of process control nomenclature, u(t) is the input, while the solution y(t) is the
output or response function. Further,
y(t ) = yc (t ) + yp (t )
97
Linear Second-Order and Systems of First-Order
where yc(t) is the solution to the associated homogeneous equation
ay′′ + by′ + cy = 0
and yp is chosen such that yp(0) = yp′(0) = 0, whereas yc(0) = y0 and yc′(0) = y0′. Then
L{ay′′ + by′ + cy = 0} = 0
gives
Yc (s) =
1
[a(sy0 + y0′ ) + by0 ]
as 2 + bs + c
Also
L{ayp′ + byp′ + cyp = u(t )} with
yp (0) = yp′ (0) = 0
gives
Yp (s) =
1
U (s), U (s) = L{u(t )}
as 2 + bs + c
The factor 1/(as2 + bs + c) is denoted as H(s) and is called the transfer function of
Equation 3.144. Notice here that H(s) and the initial conditions y(0) = y0 and y′(0) = y0′
together produce the complementary solution
yc (t ) = L−1{Yc (s)}
while the transfer function and the input function u(t) produce the particular solution
yp (t ) = L−1{Yp (s)}
Therefore, u(t) is said to control the response yp(t); that is, u(t) is the control function.
From Figure 3.9, if H is considered fixed, then u(t) controls the output yp(t). Further,
since H(s) = L{h(t)}, where h(t) is some function, then the transfer function is the
Laplace transform of the impulse response. That is,
ay′′ + by′ + cy = δ(t ), y(0) = y′(0) = 0
y0 , y09
u
H
yp
+
yc
FIGURE 3.9 A control system with transfer function H(s).
y
98
Applied Mathematical Methods for Chemical Engineers
transforms to
as 2Y (s) + bsY (s) + cY (s) = 1
or
Y (s ) =
1
as 2 + bs + c
If we recall the following three cases for positive coefficients of Equation 3.144,
that is, a, b, and c are all-positive, then
Case I:
for b2 − 4ac > 0
m1 =
− b + b 2 − 4 ac
2a
and m2 =
− b − b 2 − 4 ac
2a
such that
yc = c1e m1t + c2 e m2t
Case II:
for b2 − 4ac = 0
m1 = m2 =
−b
2a
and
yc = c1e m1t + c2te m1t
and Case III:
for b2 − 4ac < 0
m1 = α + iβ and m2 = α − iβ
and
yc = eαt (c1 cos βt + c2 sin βt )
In each of the above three cases, the solution yc(t) → 0 as t → ∞. Therefore, yc(t) and
the initial conditions y0 and y0′ become less important to the response function (y =
yc + yp) as t gets larger and larger. That is, y → yp as t → ∞, thus yp is the steady-state
solution. Also,
yp = L−1{H (s)U (s)} = h(t ) * u(t )
That is, for positive coefficients, the response tends to the steady state given by the
convolution of the impulse response with the control function.
Example 3.22
Consider the steady flow between parallel planes [24]. Two planes are a distance 2b
apart in the y direction and extend to infinity in the z direction. Assume that the fluid
flow between them is steady. Derive the average velocity, ū, in terms of the impressed
Linear Second-Order and Systems of First-Order
pressure gradient, the distance between the plates, and the fluid viscosity. Also write
down the ratio of the velocity to that of the average.
Solution
Starting with the general equation in Cartesian coordinates for incompressible fluid
with viscosity independent of position [19], ∂u/∂z = 0, ∂2u/∂z2 = 0, and the pressure
gradient can be taken as constant, that is,
dp
=A
dx
Then
d2 y A
=
dy 2 µ
which integrates to
u=
Ay 2
+ c1 y + c2
2µ
Applying the conditions u = 0 when y = ±b results in
u=
1 dP 2
( y − b2 )
2µ dx
(What is the sign of the pressure gradient when flow is to the right?) The average velocity is determined by integrating over the cross-section:
u=
1 b
2 Ab 2
u dy = −
∫
2b − b
3µ
and
u 3   y 2 
= 1 −   
u 2   b 
Example 3.23
This example considers the dynamic behavior of the liquid level in a given cylindrical
tank is described by
A
dh
= Fi − k h 2/3
dt
where A (m2) is the uniform cross-sectional area, Fi is the inlet flow rate (m3/min), h (m)
is the liquid level, and k is a given constant.
a.Linearize this process model around a steady-state level hSS and obtain
an appropriate transfer function model relating the deviation variables
h (s) and Fi (s). Explicitly specify what the steady-state gain and time constant of the approximate transfer function are.
b.Suppose the given tank area is A = 0.25 m 2 and the height of the tank is
1m with a steady-state liquid level of 0.512 m while operating at an initial
99
100
Applied Mathematical Methods for Chemical Engineers
steady-state flow rate of 0.32 m 3 min. If the flow rate were to be increased
suddenly from 0.32 m 3 min to a new value of 0.52 m 3 min and remained
there, the approximate linear model would (misleadingly) predict that the
liquid level would arrive at a new steady-state level within the limits of the
total tank height and would not result in an overflow; however, the nonlinear
model would predict that this change in flow rate will in fact cause the tank
to overflow. Confirm or refute this prediction.
Solution
2/3
=0
SS-balance: Fi 0 − k hSS
dh
2/3
US-balance: Fi − k h = A
dt
Purturbation: US-SS:
2/3
Fi − Fi ,SS − k h 2/3 − k hSS
=A
dh
d ( h − hSS )
2/3
≡ F i − k h 2/3 − k hSS
=A
dt
dt
Let f (h) = h 2/3
Then
f (h) = f (0) +
df
2
( h − hSS ) = hSS2/3 + hSS−1/3h
dh SS
3
Therefore
dh
dh
2 −1/3
2 −1/3
Fi − k hSS
h=A
or Fi = k hSS
h+A
dt
dt
3
3
Resulting in
dh
1
A
F =h+
−1/3 i
−1/3
2 / 3k hSS
2 / 3k hSS
dt
τ
K
Taking Laplace transform results in
K Fi ( s ) = h ( s ) + τ s h ( s ) = h ( s ) ( τ s + 1)
such that
h (s) =
K Fi ( s )
( τ s + 1)
Using the given values result in
Fi = 0.20 m 3 min; Fi ( s ) =
τ=
F ,SS
0.2
1
; k = i2/3
= 0.5m 7/3 ; K =
= 2.4
−1/3
s
hSS
2 3 k hSS
A
A
B
2.4  0.2 
0.8
= 0.6; h ( s ) =
= +

 ⇒ h ( s ) =
−1/3
2 3 k hSS
( 0.6s + 1) s
( s + 5/3) s s s + 5/3
101
Linear Second-Order and Systems of First-Order
Following inversion, we get
h ( t ) = 0.48 − 0.48e −5t 3
Applying the final value theorem+
h ( ∞ ) = lim 0.48 (1 − e −5 t /3 ) = 0.48 ⇒ h ( ∞ ) + hSS = 0.992 < 1m
t →∞
However, the given nonlinear system at a new steady state is given by
F 
2/3
Fi ,SS = k hSS
⇒ hSS =  i ,SS 
 k 
3/2
0.52 
= 
 0.5 
3/2
= 1.06m > 1m
which confirms that the system would overflow.
+ Terminal Value Theorem (AKA final value theorem) is one of two asymptotic
values that are commonly employed in the solution of Process Control problems [30–
33]. The essential feature of the “final value theorem” rests on the following notion:
Suppose that a function f (t ) is continuous on the open interval ( 0, ∞ ) and is of expodf
nential order β and
is piecewise continuous on ( 0, ∞ ); then
dt
L
{ }
df
= sL { f (t ) − f (0 + )} , Re s > β
dt
Furthermore if lim f (t ) exists, then lim f (t ) = lim s F (s) for real s.
t →∞
s→ 0
t →∞
Example 3.24
This example covers an application of the Routh stability criterion [32].
Given the series reaction
k3
k1
k2
A 
→ B 
→ C 
→D
and the corresponding model equations:
dC A
= − k1C A
dt
(3.145)
dC B
= k1C A − k 2C B
dt
(3.146)
dCc
= k 2C B − k3Cc
dt
(3.147)
102
Applied Mathematical Methods for Chemical Engineers
a. Show that the third order ordinary differential equation describing the concentration of component C is
d 3Cc
d 2C
dC
+  k1 + k2 + k3  2 c +  k1k2 + k1k3 + k2 k3  c + k1k2 k3Cc = 0 (3.148)
3
dt
dt
dt
b. Assuming that all the kinetic parameters are positive, show that the s­ ystem
is stable.
Solution
Solving for species A concentration in Equation 3.146
CA =
1 dC B k 2
+ CB
k1 dt
k1
(3.149)
Followed by differentiation with respect to time results in
dC A 1 d 2C B k2 dC B
=
+
dt
k1 dt 2
k1 dt
Substituting C A ,
(3.150)
dC A
into Equation 3.145 results in
dt
 1 dC B k 2

1 d 2C B k2 dC B
= − k1 
+
+ CB 
k1 dt 2
k1 dt
k1 
 k1 dt
(3.151)
Similarly from Equation 3.147 we can solve for C B to get
CB =
1 dCc k3
+ C
k2 dt k2 c
(3.152)
Then
dC B 1 d 2Cc k3 dCc
=
+
dt
k2 dt 2 k2 dt
(3.153)
d 2C B 1 d 3Cc k3 d 2Cc
=
+
dt 2
k 2 dt 3
k 2 dt 2
(3.154)
and
Upon substitution of Equations 3.152, 3.153, and 3.154 into Equation 3.151 result in
1  1 d 3Cc k3 d 2Cc  k2 + k1  1 d 2Cc k3 dCc 
+
+
+
k1  k2 dt 3 k2 dt 2 
k1  k2 dt 2 k2 dt 
 1 dCc k3

+ k2 
+ Cc  = 0
k
dt
k
 2

2
(3.155)
103
Linear Second-Order and Systems of First-Order
Further simplification results in Equation 3.148.
According to the Routh Stability Criterion, the characteristic polynomial is
λ 3 +  k1 + k2 + k3  λ 2 +  k1k2 + k1k3 + k2 k3  λ + k1k2 k3 = 0
In this case
a0 = 1, a1 = k1 + k2 + k3 , a2 = k1k2 + k1k3 + k2 k3 and a3 = k1k2 k3
a a −a a
k1k2 k3
b1 = 1 2 0 3 = k1k2 + k1k3 + k2 k3 −
> 0, b2 = 0
a1
k1 + k2 + k3
ba −a b
c1 = 1 3 1 2 = k1k2 k3 , c2 = 0
b1
Such that
Row
1
2
1
k1 + k2 + k3
3 k1k2 + k1k3 + k2 k3 −
4
k1k2 + k1k3 + k2 k3
k1k2 k3
k1k2 k3
k1 + k2 + k3
0
0
k1k2 k3
3.8 SYSTEMS OF FIRST-ORDER ORDINARY
DIFFERENTIAL EQUATIONS
There is an important connection between systems of first-order equations and single
equations of higher orders. Indeed, an nth-order equation
y( n ) = F (t , y, y′,, y( n−1) )
(3.156)
can always be reduced to a system of n first-order equations. We can do this by introducing the variables x1, x2, x3, …, xn defined by
x1 = y, x 2 = y′, x3 = y′′,, x n = y( n−1)
Then
(3.157)
x1′ = x 2
x 2′ = x3
x3′ = x 4

x n′ −1 = x n
(3.158)
104
Applied Mathematical Methods for Chemical Engineers
For example, given the linear second-order equation
x ′′ + 4 x = 0
if we let
x ′ = y, then
y ′ = −4 x
such that our system of 2-first-order equations becomes
x′ = y
y ′ = −4 x
Another example consists of the linear second-order nonhomogeneous equation
y ′′ + 3 y ′ + 3 y = sin t
The system becomes
y′ = x
x ′ = −3 x − 3 y + sin t
upon substitution of
x = y′
As a third illustration, consider
y ′′′ + y = 0
Letting y′ = x; x′ = z results in the system
y′ = x
x′ = z
z′ = − y
As illustrated in these three examples, using the notion given by Equation 3.157,
Equation 3.156 can be restated as
x n′ = F (t , x1 , x 2 ,, x n )
(3.159)
It is also important to note that Equation 3.158 and 3.159 represent a special case of
the more general system:
x1′ = F1 (t , x1 , x 2 ,…, x n )
x 2′ = F2 (t , x1 , x 2 ,…, x n )
x3′ = F3 (t , x1 , x 2 ,…, x n )
x n′ −1 = Fn (t , x1 , x 2 ,…, x n )
(3.160)
Linear Second-Order and Systems of First-Order
105
The form given in Equation 3.160 is most suitable to begin our examples of how to
solve systems of first-order differential equations.
Example 3.25
Consider the given system of two equations. This is an example of a homogeneous
system.
x1′ = x1 + x 2
(3.161)
x 2′ = 4 x1 − 2 x 2
(3.162)
One approach to solving this system is to rearrange Equation 3.161 in terms of x2, that
is,
x 2 = x1′ − x1
and differentiate the rearranged equation to get
x 2′ = x1′′− x1′
Then substitute both the differentiated and the rearranged equations into Equation
3.162 to get
x1′′− x1′ = 4 x1 − 2( x1′ − x1 )
= 6 x1 − 2 x1′
or
x1′′+ x1′ − 6 x1 = 0
This is now a linear, second-order, constant coefficient homogeneous equation (Section
3.3) whose general solution is
x1 (t ) = c1e 2t + c2 e −3t
Substitution into Equation 3.161 followed by simplification, we get
x 2 (t ) = c1e 2t − 4c2 e −3t
To define the arbitrary constants, c1 and c2, we would need conditions at some value
of t.
Example 3.26
In this next example, we will solve a nonhomogeneous system of two equations.
Consider
x1′ = 2 x1 − 5 x 2 − sin 2t; x1 (0) = 0
(3.163)
x 2′ = x1 − 2 x 2 + t; x 2 (0) = 1
(3.164)
106
Applied Mathematical Methods for Chemical Engineers
Using the same approach as in the previous example we start out by rearranging
Equation 3.164:
x 2′ + 2 x 2 − t = x1
Differentiate the rearranged equation:
x 2′′ + 2 x 2′ − 1 = x1′
Then substitute both the rearranged and differentiated equations into Equation 3.163
and simplify to get
x 2′′ + x 2 = 1 − 2t − sin 2t
which is a linear, second-order, and nonhomogeneous differential equation. Applying
the appropriate method from Section 3.4 leads to the general solution
x 2 (t ) = c1 cos t + c2 sin t + 1 − 2t + 1 / 3sin 2t
Substituting this result into Equation 3.164 and carrying out the necessary simplification results in
2
x1 (t ) = (2c1 + c2 ) cos t + (2c2 − c1 )sin t − 5t + (sin 2t + cos 2t )
3
Following substitution of the initial conditions we arrive at the final result
2
4
2
x1 (t ) = − cos t − sin t − 5t + (sin 2t + cos 2t )
3
3
3
2
2
x 2 (t ) = − sin t + 1 − 2t + sin 2t
3
3
The procedure that was used to arrive at the solutions in Examples 3.25 and 3.26 is
called the Method of Elimination.
Alternatively, one could have used Laplace transform methods to solve Example
3.26. To demonstrate the use of Laplace transform, we will examine a less cumbersome example; that is, consider
x1′ = x1 − 5 x 2 , x1 (0) = 1
(3.165)
x 2′ = 2 x1 − 5 x 2 , x 2 (0) = 0
(3.166)
Then letting L{x1(t)} = X1(s) and L{x2 (t)} = X2(s)
we transform Equation 3.165 into
sX1 (s) − x1 (0) = X1 (s) − 5 X 2 (s)
(3.167)
107
Linear Second-Order and Systems of First-Order
and Equation 3.166 into
sX 2 (s) − x 2 (0) = 2 X1 (s) − 5 X 2 (s)
(3.168)
We now have two simultaneous algebraic equations in the unknowns X1(s) and X2(s).
Following insertion of the given initial values and simplifying, the transformed system
becomes
(s − 1) X1 + 5 X 2 = 1
−2 X1 + (s + 5) X 2 = 0
If we multiply the second equation by 12 (s − 1) and add the result to the first equation,
we get an equivalent system
[5 + 1 / 2(s − 1)(s + 5)]X 2 = 1
−2 X1 + (s + 5) X 2 = 0
Now the first equation when solved for X2(s) gives
X 2 (s ) =
2
s 2 + 4s + 5
X1 ( s ) =
s+5
s 2 + 4s + 5
whereas
We now invert both X1(s) and X2(s) to recover the sought-after solution for the given
system, that is,
x1 (t ) = L−1{X1 (s)} = L−1
{
s+5
s + 4s + 5
2
}
 (s + 2) + 3 
= L−1 

2
 (s + 2) + 1 
3
 −2t
 (s + 2)  −1 
= L−1 
+ L 
 = e cos t + 3e −2t sin t
2
2
 (s + 2) + 1 
 (s + 2) + 1 
Similarly
2


x 2 (t ) = L−1 
 = 2e −2t sin t
2
 (s + 2) + 1 
Formally, we say that the system of differential equations (Equation 3.160) is linear
if all of the Fis are linear functions in the xis; otherwise, the system is nonlinear. A
linear system is called homogeneous if all the Fis are independent of t and nonhomogeneous when at least one Fi depends explicitly on t.
A compact way of writing the system given by Equation 3.160 is to introduce the
vectors F = ⟨ F1, F2, …, Fn ⟩ and x = ⟨ x1, x2, …, xn⟩ such that
108
Applied Mathematical Methods for Chemical Engineers
x1′ = F1 (t , x1 , x 2 ,…, x n )
x 2′ = F2 (t , x1 , x 2 ,…, x n )
x3′ = F3 (t , x1 , x 2 ,…, x n ) ⇔ x′ = F(t , x)
(3.169)
x n′ −1 = Fn (t , x1 , x 2 ,…, x n )}
This compact notation reminds us of some of the notions about first-order linear differential equations that we have used. For example, the notion of existence and uniqueness still applies.
Theorem 3.11 Existence and Uniqueness [25]
Consider the initial value problem given by
x′ = F(t , x), x(t0 ) = x 0
(3.170)
Suppose there is a neighborhood of t0 and x0 in which F is continuous in t and continuously differentiable in x at x0. Then there is a δ > 0 for which there is a unique
solution to
x′ = F(t, x) , x(t0 ) = x 0
with t ε (t0 − δ, t0 + δ).
The proof of this theorem is dealt with in the given reference.
The form given by Equation 3.169 is often expressed more explicitly as
x′ = Ax + f (t )
(3.171)
where A is an n × n matrix (see Section A.2 in Appendix A) and f(t) is an n × 1
vector-valued function. For example, the initial value problem
x1′ = 2 x1 − 3 x 2 , x 2′ = 3 x1 + 2 x 2 , x1 (0) = 1, x 2 (0) = −1
can be restated as
 x1′   2 −3   x1   0 
 1 
 =
  x  +  0  , x 0 =  −1 
3
2
 x 2′  


  2   
Here
0
f (t ) =  
0
which means that we are working with the homogeneous form
x′ = Ax
(3.172)
Linear Second-Order and Systems of First-Order
109
In practice, this form is most conducive to the applications of matrix theory
[28,29].
To construct a solution to the homogeneous case, we begin with an approach
similar to that used in the discussion of linear second-order constant coefficient differential equations. We seek solutions to Equation 3.172 of the form
x = pe λ t
(3.173)
where λ and the constant vector p are to be determined. Substituting Equation 3.173
into Equation 3.172 results in
λpe λt = Ape λt
which reduces to
λp = Ap or [ A − λI]p = 0
(3.174)
where I is the n × n identity matrix. Now, to solve the system Equation 3.172, we
must solve the system of algebraic equations 3.174. It is important to note that solving the system given by Equations 3.174 is exactly solving for the eigenvalues and
eigenvectors of the matrix A. Therefore the vector x is a solution of Equation 3.172 if
λ is an eigenvalue and p is an associated eigenvector of the coefficient matrix A. For
example, let us reconsider Example 3.25:
x1′ = x1 + x 2
x 2′ = 4 x1 − 2 x 2
Step 1: Rewrite the given system as
 x1′   1 1 
 x1 
x′ =   = 
x; x =  

 x 2′   4 −2 
 x 2 
Step 2: Assume x = peλt and substitute for x in the given problem. This leads
to the system of algebraic equations (Equation 3.174)
 1− λ 1

 4 −2 − λ
  p1   0 
= 

  p2   0 
(3.175)
which will have a nontrivial solution if and only if the determinant (Appendix A)
of coefficients vanishes. That is,
1− λ 1
= (1 − λ )(−2 − λ ) − 4 = 0
4 −2 − λ
110
Applied Mathematical Methods for Chemical Engineers
Step 3: Solve the characteristic equation for the eigenvalues and determine the
associated eigenvectors, that is, λ = 2, −3.
For λ = 2, we solve the system given in Equation 3.175 to get
− p1 + p2 = 0 ⇒ p2 = p1
Therefore, the eigenvector corresponding to λ = 2 can be taken as
1
p(1) =  
1
For λ = −3, substitution into Equation 3.175 produces
4 p1 + p2 = 0 ⇒ p2 = −4 p1
This produces the corresponding eigenvector
 1 
p(2) = 

 −4 
Finally, we can state the solution in the form
1
 1 
x (1) (t ) =   e 2t ; x (2) (t ) =   e−3t
1
 −4 
Step 4: Determine if the solutions form a fundamental set by examining the
Wronskian (Section 3.2) of these solutions:
W [ x (1) , x (2) ](t ) =
e 2t e −3t
= −5e − t ≠ 0
e 2t −4e −3t
Because the Wronskian is different from zero for all finite values of t, the
solutions x(1) and x(2) form a fundamental set and the general solution of the
given system, Equation 3.175 is
x = c1x (1) (t ) + c2 x (2) (t )
 1
1
= c1   e 2t + c2 
1
 −4
 −3t
e

which is the identical result obtained previously.
This later method, although straightforward, can become complicated for larger
systems. There is a good number of computer algebraic software [29] available and
Linear Second-Order and Systems of First-Order
111
it is recommended that the reader explore the use of those tools when faced with a
system of three or more equations.
Similar to linear second-order problems, there are cases of complex eigenvalues
and repeated eigenvalues. First, we will explore an example having complex eigenvalues and illustrate how to obtain real (as opposed to imaginary) solutions. Then
we will solve an example that has repeated eigenvalues and illustrate how to obtain
linearly independent solutions.
Example 3.27
This example demonstrates the complex eigenvalue case [1].
Consider the linear system given by
 0 1
x′ = 
x
 −1 0 
Determine the two real linearly independent solutions.
Solution
Step 1: Construct the characteristic polynomial of A by taking the determinant of
 −λ 1 

 , that is,
 −1 −λ 
−λ 1
= λ2 + 1 = 0
−1 −λ
The roots of this polynomial are λ 1 = i and λ 2 = −i.
Step 2: Determine the associated eigenvectors by solving the system of algebraic
equations
 −λ 1   p1   0 
 =   for each λ


 −1 −λ   p2   0 
This reduces to the equation
p2 = ip1 for λ1 = i
If p2 = 1, then p1 = 1/i = −i such that
 −i 
p(1) =  
 1 
is the associated eigenvector for the eigenvalue λ 1 = i.
Similarly, the eigenvalue λ 2 = −i when substituted into
 −λ 1   p1   0 
= 


 −1 −λ   p2   0 
112
Applied Mathematical Methods for Chemical Engineers
produces
i
p(2) =  
1
This would mean that the general solution for the given system is
 −i 
i
x(t ) = c1   e it + c2   e − it
1
 
1
Step 3: Expand the general solution and rename the constants
x1 (t ) = − ic1e it + ic2 e − it = − ic1 (cos t + i sin t ) + ic2 (cos t − i sin t )
= − i(c1 − c2 ) cos t + (c1 + c2 )sin t
and
x 2 (t ) = c1e it + c2 e − it = c1 (cos t + i sin t ) + c2 (cos t − i sin t )
= i(c1 − c2 )sin t + (c1 + c2 ) cos t
If we make the substitutions
k1 = (c1 + c2 ) and k 2 = − i(c1 − c2 )
we now have
x1 (t ) = − i(c1 − c2 ) cos t + (c1 + c2 )sin t
= k1 sin t + k 2 cos t
and
x 2 (t ) = i(c1 − c2 )sin t + (c1 + c2 ) cos t
= k1 cos t − k 2 sin t
Therefore, the general solution can be restated in the form
 sin t
x(t ) = k1 
 cos t

 cos t 
 + k 2  − sin t 



In general, if the n × n matrix A is real, then the coefficients in the polynomial
det( A − λI) = | A − λI | = 0,
for λ is real and any complex eigenvalues must occur in conjugate pairs. Further, the
corresponding eigenvectors are also complex conjugates.
The following example illustrates the key steps to developing a solution when
the eigenvalues repeat and it is possible to find linearly independent eigenvectors.
113
Linear Second-Order and Systems of First-Order
Example 3.28
This example demonstrates the repeated eigenvalues case [1].
Consider the system
11
x′ = 
x
01
(3.176)
Then the characteristic equation is
(1 − λ )2 = 0
which results in λ = 1,1. For λ 1 = 1, the associated eigenvector turns out
1
to be   .
0
Therefore one solution is
1
x (1) (t ) =   et
0
To determine a second linearly independent solution we will assume that
 u1
1
x (2) (t ) =   tet + 
 u2
0

 et

(3.177)
 u1 
 
Notice that the 2 × 1 vector  u2  is unknown, but we will determine the components
of this vector knowing that x(2)(t) must satisfy Equation 3.176. Substitution of Equation
3.177 into 3.176 gives
dx (2)  1  t  1  t  u1
=   e +   te + 
dt
 u2
0
0

 et

which must be equated to
 1 1   1  t  1 1   u1
 1 1  (2)
 0 1  x (t ) =  0 1   0  te +  0 1   u



 

  2

 et

That is,
 1  t  1  t  u1
 0  e +  0  te +  u
 2
 
 

 1 1   1  t  1 1   u1
 et = 
   te +  0 1   u

 0 1  0 

  2
Because
 1 1  1   1 
 0 1  0  =  0 

   

 et

114
Applied Mathematical Methods for Chemical Engineers
the terms containing tet cancel out and we have
 1  t  u1
 0 e +  u
 2
 

 1 1   u1
 et = 


 0 1   u2

 et

which can be restated in the form
 u1   1 
[ A − I]   =  
 u2   0 
that is,
  1 1   1 0   u1
  0 1  −  0 1   u

 
  2


01


 0 0 
 1
= 
  0 
 0 1   u1   1 
 0 0   u  =  0  ⇒ u2 = 1

  2   
and the unknown vector is
0
1
 
Therefore, the second solution is
1
0
x (2) (t ) =   tet +   et
0
 
1
We now need to check to see if the two solutions x(1)(t) and x(2)(t) are linearly independent by calculating the Wronskian.
 et tet  2t
W [ x (1) , x (2) ](t ) = 
=e ≠0
t 
0 e 
Therefore, the two linearly independent solutions can be combined as
x = c1x (1) (t ) + c2 x (2) (t )
to give the general solution. Notice that x(1)(t) and x(2)(t) form a fundamental set or
fundamental solutions.
115
Linear Second-Order and Systems of First-Order
3.8.1 NONhOMOGENEOUs LINEAR SYstEMs
In Section 3.4, we employed the undetermined coefficients (equivalent—­annihilation)
or variation of parameters methods to solve the nonhomogeneous problem. In this
section we will suggest the use of the same two methods to determine particular
solutions of the nonhomogeneous system of first-order differential equations. An
example will be provided to illustrate the necessary steps to follow when constructing the general solution to Equation 3.171,
x ′ = Ax + f (t )
using the method of undetermined coefficients. Although the necessary theory to
generalize the method of variation of parameters is beyond the scope of this book,
we will provide an example outlining the method.
Example 3.29
This is an example using the undetermined coefficient method [1].
Consider the system
 −4e −3t 
 0 1
x′ = 
x +  −2t 

 −1 0 
 e

Step 1: Determine the complementary solution.
In solving Example 3.27, we, in fact, derived the solution to the homogeneous part
of this new problem. This means that we have the complementary solution, that is,
 sin t 
 cos t 
x c (t ) = k1 
 + k 2  − sin t 
cos
t




Step 2: Select the candidate particular solution.
Recall that we selected candidate particular solution based on the complementary
solutions being linearly independent of the nonhomogeneous part of the given differential equation. In this example, the complementary solution is a linear combination of sin t and cos t. Therefore, the candidate particular solution is a combination
of the exponential functions appearing in the nonhomogeneous part of the given
system
x p = αe −3t + βe −2t
(3.178)
The unknown n × 1 vectors α and β are to be determined by substituting into the
given system.
Step 3: Determine the unknown vectors.
Upon substitution into the given system we get
1
0
−3αe −3t − 2βe −2t = Aαe −3t + Aβe −2t − 4   e −3t +   e −2t
0
 
1
116
Applied Mathematical Methods for Chemical Engineers
or
1
0
− (3I + A)αe −3t − (2I + A)βe −2t = −4   e −3t +   e −2t
0
1
Then, equating coefficients of the exponential functions results in
 α1
e −3t : (3I + A) 
 α 2
 β1
e −2t : (2I + A) 
 β 2
 4
= 
  0 

0
 = − 

1
Solving these two systems results in
6/5 
 1/ 5 
α=
 and β =  −2 / 5 
2
/
5




Therefore the particular solution is
 6 / 5  −3t  1 / 5  −2t
xp = 
 e +  −2 / 5  e
 2/5


and the general solution is
xg = xc + xp
The method of undetermined coefficients is effective when the matrix, A in
Equation 3.171 is constant and the vector f has a special form (exponentials,
polynomials, sines, and cosines). However, as we know from our experience
with second-order equations, the method of variation of parameters is more general. This method is expected to work even when A depends on t and f belongs
to a much larger class of vector-valued functions.
Recall that the method of variation of parameters requires that we already
have a set of linearly independent complementary solutions. Following that, we
choose the candidate for the particular solution by allowing the arbitrary constants in the complementary solution to be functions of t.
For example, consider the linear system given by
 e −2t 
13
x′ = 
x+


31
 0 
The first step is to solve the associated homogeneous problem using the
approach already illustrated in the previous examples. That is, to determine the
characteristic equation
1− λ 3
= (1 − λ)2 − 9 = 0
3 1− λ
117
Linear Second-Order and Systems of First-Order
This leads to the eigenvalues λ 1 = − 2 and λ 2 = 4. Using each of these eigenvalues in turn, find the associated eigenvectors, that is,
 3 3   p1   0 
 3 3   p  =  0  ⇒ p2 = − p1

  2   
or
 1 
p(1) = 
 for λ1 = −2
 −1 
Similarly,
 −3 3   p1   0 
 3 −3   p  =  0  ⇒ p2 = p1

  2   
or
1
p(2) =   for λ 2 = 4
1
Therefore the complementary solution is
 1  −2t
 1  4t
x c = c1 
 e + c2  1  e
 −1 
 
From this complementary solution one can form the matrix
 e −2t e 4 t 
X(t ) =  −2t 4 t 
 −e e 
which is known as a fundamental matrix, consisting of the fundamental solutions. The candidate for the particular solution is now given as
t
x p (t ) = X(t ) ∫ X −1 (s) f (s) d s
(3.179)
where X−1 is the inverse of the fundamental matrix.
To determine X−1, follow the procedure given in Section A.2 of Appendix A, using
elementary operations:
1. Form the augmented matrix.
 e −2t e 4 t 1 0 
 −2t 4 t

 −e e 0 1 
118
Applied Mathematical Methods for Chemical Engineers
2. Add row 1 to row 2 followed by adding − 12 row 2 to row 1 to get
 e −2t 0  1/2 −1/2 


 0 2e 4 t  1 1 
1 −4t
3. Multiply row 1 by e2t and then multiply row 2 by 2 e to get
 1 0  1/2e 2t −1/2e 2t

 0 1  1/2e −4 t 1 /2e −4 t





Therefore,
 1/2e 2t −1/2e 2t
X −1 (t ) = 
 1/2e −4 t 1/2e −4 t





Now
∫
t
2s
−1/2e 2 s
t  1/2e
X −1 (s) f (s) d s = ∫ 
−4 s
 1/2e 1/2e −4 s

1/2
t
=∫ 
 1/2e −6 s


 ds


 1/2t
=
 −1/12e −6t





  −2 s
 e
 0


 ds

such that
t
x p (t ) = X(t ) ∫ X −1 (s) f (s) d s
 e −2t e 4 t   1/2t
=  −2t 4 t  
−6 t
 − e e   −1/12e
  1 /2t
=
  −1/2t

 1/12 

 e −2t
 e −2t − 
 1/12 

Notice that the last column is a multiple of c1 in the complementary solution and can
be dropped from the particular solution, that is,
 1  −2t
 1  4t
x(t ) = c1 
 e + c2  1  e + x p
−
1


 
 1 / 2t  −2t
 1  −2t
1
= c1 
e + c2   e 4 t + 
e

 −1 
1
 −1 / 2t 
Linear Second-Order and Systems of First-Order
119
As usual, to determine the arbitrary constants, initial conditions are needed.
In summary, the following theorem provides us with the formula to solve the nonhomogeneous initial value problem.
Theorem 3.12
The unique solution to the initial value problem
x ′ = A(t ) x + f (t ), x(0) = x 0
(3.180)
is given by
t
x(t ) = X(t ) X −1 (0) x 0 + X(t ) ∫ X −1 (s) f (s) d s
0
(3.181)
where X(t) is a fundamental matrix solution of the homogeneous system.
3.9 PROBLEMS
1. Two thin-wall pipes of 1-in. outside diameter have flanges 1/2-in. thick and
4-in. diameter on the ends joining them together. If the conductivity of the
flange metal is k Btu/h ft2 ºF ft−1, and the exposed surfaces of the flange
lose heat to the surroundings, which are at T1ºF by means of a heat transfer
coefficient, h Btu/h ft2 ºF, show that the equation giving the temperature
distribution in the flange is
 d 2 T dT 
6k  r 2 +
 = hr (T − T1 )
 dr
dr 
where r is the radial distance coordinate in inches.
If the circular faces of the flanges are thermally insulated and the flanges
lose heat only through the rim where h = 20 Btu/h ft2 ºF, solve the differential equation and determine the temperature of the rim for a pipe temperature of 200ºF, T1 = 60ºF, and k = 200 Btu/h ft2 ºF ft−1.
2.Mass transfer: As liquid flows across any plate of a distillation column its
composition, x, changes from the entry concentration, x0, to the exit concentration, x1[15]. The composition at any point on the plate is influenced
by the passage of the stripping gas at a rate G, the bulk flow at a rate L, and
the mixing on the plate by the eddy diffusivity, DE. If a constant Murphree
point efficiency
* =
Emv
y − y1
y* − y1
120
Applied Mathematical Methods for Chemical Engineers
can be assumed and a straight line equilibrium curve given by
y* = mx + b
show that the liquid composition satisfies the equation
DE
d2 x
dx mGC *
−V
−
Emv ( x − x * ) = 0
dz 2
dz
Lz1
where z is the distance measured along the plate from the inlet weir, z1 is
the distance between the weirs, V is the linear velocity of the liquid, and
x * is the liquid composition in equilibrium with the entering gas, which is
constant across the plate.
3.Consider the problem of heat loss from the surface of an oven wall due
to “through metal,” which conducts heat from the inside. The heat is dissipated to the air from the sheet-metal protective covering of the insulated
housing. The metal covering consists of 0.005-ft-thick steel having thermal
conductivity of 25 Btu/h ft2 ºFft−1. The surface coefficient of heat transfer
is 2.5 Btu/h.ft2 ºF and the head of the bolt is 5/8-in. diameter. The temperature of the room is 70ºF and the bolt head temperature is constant at 150ºF.
Neglecting heat loss, except by conduction along the bolt, determine temperatures of the outer metal wall at several points up to 1 ft from the bolt.
(Hint: Since the temperature is symmetrical about the bolt, then T can be
assumed to be a function of r only.)
4.A copper fin L-ft long is triangular in cross-section [6]. It is w-ft thick at
the base and tapers off to a line (see Figure 3.10). The base of this wedgeshaped piece of metal is maintained at a constant temperature TA, and the
fin loses heat by convection to the surrounding air, which is at a temperature
TB. The surface coefficient of heat transfer is h Btu/h ft2 ºF. Derive the relationship between the temperature, T, of the metal fin and the distance from
the base, L − x. (Hint: Assume T is a function of x only.)
Answer :
d  w dT 
k x
 = h 2sec θ(T − TA )
dx  L dx 
L
Base at TB
Air at TA
x
dx
FIGURE 3.10 Wedge-shaped fin.
121
Linear Second-Order and Systems of First-Order
y = +h, u = U, T = T1
Moving
r = const.
y
y = –h, u = 0, T = T0
FIGURE 3.11
z
Couette flow between parallel plates.
5. Steady flow between a fixed and a moving plate [26]: Assume that (1) two infinite plates are 2h apart, and the upper plate moves at speed U relative to the
lower; (2) the pressure p is constant; and (3) the upper plate is held at temperature T1 and the lower plate at T0 (see Figure 3.11). Derive the velocity and temperature profiles assuming that u = u(y) and T = T(y). Also, find the shear stress.
µU
2h
∂u
=0
Continuity :
∂x
d2u
Momentum : µ 2 = 0
dy
Answer :
2
Energy : k
 du 
d2T
+ µ  = 0
 dy 
dy 2
6.Diffusion with chemical reaction: A gas is absorbed by a solution with
which it reacts chemically [6]. The rate of diffusion in the liquid can be
assumed proportional to the concentration gradient, and the diffusing gas is
eliminated as it diffuses by a first-order chemical reaction. The reaction rate
is proportional to the concentration of the solute gas in the liquid. Obtain an
expression for the concentration in the liquid as a function of the distance
from the gas–liquid interface (see Figure 3.12).
Answer :
d  dc 
 D  = kc
dx  dx 
Interface
dx
x
FIGURE 3.12 Diffusion with chemical reaction.
122
Applied Mathematical Methods for Chemical Engineers
7.Consider the set of reversible reactions [6].
1
A k
→B
2
→A
B k
3
→C
B k
4
→B
C k
Suppose the initial amount of A is 1 mol and NA, NB, and NC denote the
moles of A, B, and C, respectively, at any time t. Derive a second-order
constant coefficient linear differential equation relating NA, t, and the rate
constants.
8.Oxygen dissolves into and reacts irreversibly with aqueous sodium sul*
fite solutions [23]. If the gas solubility is denoted as CA at the liquid–gas
­interface, develop a differential equation that describes the steady-state
composition profiles of O2 in the liquid phase when kCAn is the O2 reaction
rate, and
J A = − DA
dCA
dz
describes the local O2 diffusion flux.
Answer : DA
d 2C A
= kCAn
dz 2
9.If one of the planes of Example 3.22 is moving with speed V, what are the
boundary conditions? Derive the velocity profile for this case.
V y  A
Answer : u =  + 1 + ( y 2 − b 2 )
2  b  2µ
10.Consider the steady flow of a fluid through a circular pipe of radius R.
Suppose the fluid flows with a velocity uz = U in the z direction, starting
with the continuity equation in polar coordinates, and the Navier–Stokes
equations [19] show that
0=−
A µ  1 d  duz  
+
r

ρ ρ  r dr  dr  
where A is the pressure gradient, which is taken as constant. Why is the
quantity
Linear Second-Order and Systems of First-Order
123
∂ 2 uz
= 0?
∂θ2
Also, show that
dP = −
8µuz
µu
dz = −32 2z dz
R2
D
11. Reduction of linear boundary value problems to initial value problems [27]:
Consider the problem given by the differential equation
d2 y
dy
+ f1 ( x ) + f2 ( x ) y = r ( x )
dx 2
dx
(3.182)
and the boundary conditions
y(a) = ya
and
y(b) = yb
(3.183)
This problem can be transformed into a set of two initial value problems.
Transform Equation 3.182 into a set of two differential equations by
­assuming that
y( x ) = y1 ( x ) + µy2 ( x )
(3.184)
is a linear combination of solutions to the desired differential equations,
where the quantity μ is a constant. Use the boundary conditions given by
Equation 3.183 to derive the initial conditions
y1 (a) = ya
and
y2 (a) = 0
(3.185)
dy2 (a)
=1
dx
(3.186)
and set
dy1 (a)
= 0 and
dx
to identify the missing slope. Transform the boundary condition at the
­second point to define μ.
124
Applied Mathematical Methods for Chemical Engineers
Answer:
Initial value problem-1:
d 2 y1
dy
+ f1 ( x ) 1 + f2 ( x ) y1 = r ( x )
2
dx
dx
dy1 (a)
y1 (a) = ya ,
=0
dx
Initial value problem-2:
d 2 y2
dy
+ f1 ( x ) 2 + f2 ( x ) y2 = 0
dx 2
dx
dy2 (a)
y2 (a) = 0,
=1
dx
µ = [ yb − y1 (b)] / y2 (b)
12.Find a fundamental set of solutions of
 1 −1 
x ′ = Ax; A = 

1 3 
13. Use the method of undetermined coefficients to find a particular solution of
 2e − t 
 −2 1 
x′ = 
x+


 1 −2 
 3t 
14.Show that Equation 3.179 is a valid candidate particular solution when the
method of variation of parameters is used.
15.Use the method of variation of parameters to find the general solution to
 2e − t 
 −2 1 
x′ = 
x+


 1 −2 
 3t 
16.Use the method of Laplace transforms to solve the system
 2e − t
 −2 1 
x′ = 
x+

 1 −2 
 3t

0
 ; x0 =  0 
 

17.Given the system of first-order ordinary differential equations below
dx1
= −4 x1 + x 2 ; x1 ( 0 ) = 100
dt
dx 2
= 4 x1 − 4 x 2 ; x 2 ( 0 ) = 0
dt
Linear Second-Order and Systems of First-Order
125
a. Use the method of Laplace transform to solve the system.
b. Solve the system by first identifying the eigenvalues followed by inverting the coefficient matrix.
18. Given a batch reactor with a series reaction in which species A reacts reversibly to form the desired specie B. In this reaction, it is observed that specie
B react to form an undesired specie C
kif
k2
B 
A
→C
k (3.187)
1r
where k1 f and k1rrepresent the rate constants for the forward and reverse
reactions for the conversion of species A and B, while k2 is the rate constant
for the conversion of species B to species C.
If it is assumed that each of the reactions is of first-order then the modeling equations are given by
dC A
= − k1 f C A + k1r C B
dt
dC B
= k1 f C A − k1r C B − k2C B
dt
dCC
= k 2C B
dt
(3.188)
(3.189)
(3.190)
where C A , C B and CC are the concentrations (mol/volume) of components A,
B, and C.
a. Given the following dimensionless quantities:
The dimensionless time: τ = k1t
Conversion of species A: x1 = (C A0 − C A ) C A0
Dimensionless concentration of species B: x2 = C B C A 0
Ratio of rate coefficients: α = k2 k1 f
Ratio of forward and reverse rate coefficients: β = k1r k1 f
Show that the equation for the dimensionless concentration of species
B is
d 2 x2
dx
+ (α + β + 1) 2 + αx 2 = 0
2
dτ
dτ
and that the roots of the characteristic equation can never be complex or
unstable for positive rate coefficients.
b.Determine x 2 ( α , β, τ ) .
c.Given k1f = 2, k1r = 1, and k2 = 1.25 hr −1 use a computer algebraic
system (e.g., Mathematica®) to determine the maximum conversion of species A to species B and the reaction time required for this
conversion.
d. Suppose the real value of k2 is 1.5hr −1 instead of the previous
(1.25 hr –1) and if the reaction is run for the time found in part c), what
will be the actual conversion of A to B?
126
Applied Mathematical Methods for Chemical Engineers
REFERENCES
1.Boyce, W.E. and DiPrima, R.C. Elementary Differential Equations and Boundary
Value Problems, 8th ed., John Wiley & Sons, New York, 2005.
2. Giordano, F.R. and Weir, M.D. Differential Equations, a Modeling Approach, AddisonWesley, Reading, MA, 1988.
3.Greenberg, M.D. Advanced Engineering Mathematics, Prentice Hall, Englewood
Cliffs, NJ, 1988.
4. O’Neil, P.V. Advanced Engineering Mathematics, 4th ed., PWS-Kent, Boston, 1995.
5.Hildebrand, F.B. Advanced Calculus for Applications, 2nd ed., Prentice Hall,
Englewood Cliffs, NJ, 1976.
6.Mickley, H.S., Sherwood, T.K., and Reid, C.E. Applied Mathematics in Chemical
Engineering, McGraw-Hill, New York, 1957.
7. Loney, N.W. Analytical solution to mass transfer in laminar flow in hollow fiber with
heterogeneous chemical reaction, Chem. Eng. Sci., 51, 3995, 1995.
8. Huang, C.R. Heat transfer to a laminar flow fluid in a circular tube, AIChE J., 30, 833,
1984.
9.Watson, G.N. A Treatise on the Theory of Bessel Functions, 2nd ed., Cambridge
University Press, London, 1966.
10. Gray, A. and Matthews, G.B. A Treatise on Bessel Functions and Their Applications to
Physics, 2nd ed., Dover, New York, 1966.
11.Tranter, C.J. Bessel Functions with Some Physical Applications, English University
Press, London, 1968.
12.Slater, L.C.J. Confluent Hypergeometric Functions, Cambridge University Press,
London, 1960.
13. Spiegel, M.R. Mathematical Handbook, McGraw-Hill, New York, 1968.
14.Thomas, G.B. and Finney, R.L. Calculus and Analytic Geometry, 6th ed., AddisonWesley, Reading, MA, 1984.
15.Jenson, V.G. and Jeffreys, G.V. Mathematical Methods in Chemical Engineering,
Academic Press, London, 1963.
16. Churchill, R.V. and Brown, J.W. Complex Variables and Applications, 4th ed., McGrawHill, New York, 1984.
17.Kreyszig, E. Advanced Engineering Mathematics, 7th ed., John Wiley & Sons, New
York, 1993.
18.Saff, E.B. and Snider, A.D. Fundamentals of Complex Analysis for Mathematics,
Science and Engineering, Prentice Hall, Englewood Cliffs, NJ, 1976.
19.Bird, R.B., Stewart, W.E., and Lightfoot, E.N. Transport Phenomena, 2nd ed., John
Wiley & Sons, New York, 2002.
20. Schlichting, H. Boundary-Layer Theory, 7th ed., McGraw-Hill, New York, 1979.
21.Incropera, F.P. and DeWitt, D.P. Fundamentals of Heat and Mass Transfer, 2nd ed.,
John Wiley & Sons, New York, 1985.
22. Dettman, J.W. Applied Complex Variables, Dover, New York, 1984.
23. Rice, R.G. and Do, D.D. Applied Mathematics and Modeling for Chemical Engineers,
John Wiley & Sons, New York, 1995.
24.Walas, S.M. Modeling with Differential Equations in Chemical Engineering,
Butterworth-Heinemann, Boston, 1991.
25. Hale, J.K. Ordinary Differential Equations, John Wiley & Sons, New York, 1974.
26. White, F.M. Viscous Fluid Flow, McGraw-Hill, New York, 1991.
27. Na, T.Y. Computational Methods in Engineering Boundary Value Problems, Academic
Press, New York, 1979.
28. Strang, G. Linear Algebra and Its Applications, 2nd ed., Academic Press, New York,
1980.
Linear Second-Order and Systems of First-Order
127
29.Sewell, G. Computational Methods of Linear Algebra, 2nd ed., John Wiley & Sons,
New Jersey, 2005.
30. Schiff, J. L. The Laplace Transform: Theory and Applications, Springer Science, 1999.
31. Brosilow, C. and Joseph, B. Techniques of Model-Based Control, Prentice Hall, 2002.
32. Bequette, B.W. Process Dynamics: Modelling, Analysis and Simulation, Prentice Hall,
1998.
33.Stephanopoulos, G. Chemical Process Control: An Introduction to Theory and
Practice, 1984.
This page intentionally left blank
4
Sturm–Liouville Problems
4.1 INTRODUCTION
In the previous chapters, the discussion was primarily about the initial value problems, for which one seeks a solution to a differential equation subject to conditions
on the dependent variable and its derivatives specified at only one value of the independent variable.
In this chapter, the discussion will be about the class of problems, for which one
seeks a solution to a differential equation subject to conditions on the dependent variable specified at two or more values of the independent variable, namely boundary
value problems.
Among the many problems encountered in chemical engineering science, those
that appear very frequently involve the Sturm–Liouville boundary value problems.
Following is an illustration of what is meant by a Sturm–Liouville problem.
Consider the problem
y ′′ +
2
y ′ + ( x 2 − λx ) y = 0
x
(4.1)
then an integrating factor for the Equation 4.1 is
µ( x ) = e ∫ x
2
dx
= x2
If Equation 4.1 is multiplied by x2, we get
x 2 y ′′ + 2 xy ′ + ( x 4 − λx 3 ) y = 0
or
( x 2 y ′) ′ + ( x 4 − λx 3 ) y = 0
(4.2)
Equation 4.2 is considered to be in the Sturm–Liouville form. That is,
( p( x ) y ′) ′ + [q( x ) + λr ( x )] y = 0
(4.3)
is the Sturm–Liouville differential equation.
It is also helpful to distinguish between two types of linear boundary value
­problems, homogeneous and nonhomogeneous. The equation
p( x ) y ′′ + Q( x ) y ′ + R( x ) y = G ( x )
(4.4)
is a general, linear, second-order, and nonhomogeneous differential equation and
was discussed in Chapter 3. The condition
a1 y( x 0 ) + a2 y ′( x 0 ) = c
(4.5)
129
130
Applied Mathematical Methods for Chemical Engineers
is a general, linear, and nonhomogeneous boundary condition. Both Equations 4.4 and
4.5 are considered homogeneous if their right-hand sides are identically zero. Therefore,
we are using the same definition of “homogeneous” as introduced in the discussion on
second-order differential equations. However, it is very important to note what is meant
by a homogeneous boundary value problem as opposed to a differential equation.
A boundary value problem is homogeneous when both the differential equation and all boundary conditions are homogeneous [1–4] and nonhomogeneous
otherwise.
For example, the problem
P ( x ) y ′′ + Q( x ) y ′ + R( x ) y = 0,0 < x < 1
a1 y(0) + a2 y ′(0) = 0
b1 y(1) + b2 y ′(1) = 0
is a second-order linear homogeneous boundary value problem.
Sturm–Liouville problems are categorized according to the type of boundary
conditions that the differential equation must satisfy.
4.2 CLASSIFICATION OF STURM–LIOUVILLE PROBLEMS
A general homogeneous second-order differential equation of the form
a1 ( x ) y ′′ + a2 ( x ) y ′ + [a3 ( x ) + λ] y = 0
(4.6)
can be recast in the Sturm–Liouville form
d 
dy 
 p( x )  + [q( x ) + λr ( x )] y = 0
dx
dx
(4.7)
with the aid of the following device
 x a (t ) 
p( x ) = exp  ∫ 2 dt 
 a1 (t ) 
q( x ) =
a3 ( x )
p( x )
a1 ( x )
r (x) =
p( x )
a1 ( x )
(4.8)
(4.9)
and
(4.10)
where p, q, and r are real-valued functions of x, and λ is a parameter. Further, to
ensure the existence of solutions on a closed finite interval [a, b], q and r are to be
continuous on [a, b], whereas p is to be continuously differentiable on [a, b] [2, 4].
131
Sturm–Liouville Problems
Generally, there are three classes of Sturm–Liouville problems:
1.Regular
2.Periodic
3.Singular
Each class is discussed later with an illustrative problem. Again the boundary conditions are very influential as to what class of boundary value problem one has to solve.
Class 1: The Regular Sturm–Liouville Problem on [a, b]
If p(x) > 0 and r(x) > 0 on a ≤ x ≤ b, one seeks numbers λ and nontrivial solutions of
( p( x ) y ′) ′ + [q( x ) + λr ( x )] y = 0
(4.11)
A1 y(a) + A2 y ′(a) = 0
(4.12)
B1 y(b) + B2 y ′(b) = 0
(4.13)
subject to
in which A1 and A2 are given and are not both zero, and B1 and B2 are given and
are not both zero. Equation 4.11 through Equation 4.13 constitute a regular Sturm–
Liouville boundary value problem.
Example 4.1
This example demonstrates the procedure to determine the eigenvalues and eigenfunctions of a Regular Sturm-Liouville problem.
π
y′′ + λy = 0; 0 ≤ x ≤
2
y(0) = 0
y
 π = 0
 2
where p(x) = 1, r(x) = 1, and q(x) = 0 is a regular Sturm–Liouville problem with
A1 = B1 = 1 and A2 = B2 = 0.
There are three cases to consider, depending on the parameter λ, that is, λ = 0, λ > 0,
and λ < 0.
Case I
Suppose λ = 0, then y″ = 0 and
yg ( x ) = k1 x + k 2
yg (0) = 0 = k 2
π
π
y   = 0 = k1 , k1 = 0
 2
2
giving the trivial solution. Therefore, λ ≠ 0.
132
Applied Mathematical Methods for Chemical Engineers
Case II
Suppose λ > 0, say λ = β2 (for convenience), then
y′′ + β 2 y = 0
y(0) = 0,
y(π /2) = 0
has general solution
y( x ) = k1 cos βx + k 2 sin βx
and
y(0) = 0 = k1
π
π
y   = 0 = k 2 sin β
 2
2
therefore, either k2 = 0 or
sin β
π
=0
2
If k2 = 0, then we get a trivial solution. Then, for nontrivial solution to exist
sin β
π
π
= 0 ⇒ β = nπ
2
2
or
β = 2n, n = 1,2,3,
Therefore, λn = 4n2 defines the so-called eigenvalues of this problem. Corresponding
to each eigenvalue is an eigenfunction
φn ( x ) = k 2 n sin(2nx )
with k2n an arbitrary constant.
Case III
Suppose λ < 0, say λ = −α2, α > 0, then
y′′ − α 2 y = 0
π
y(0) = y   = 0
 2
Therefore, yg(x) = c1eαx + c2e−αx and
133
Sturm–Liouville Problems
y(0) = 0 = c1 + c2 ⇔ c2 = − c1
π
y   = 0 = c1eα ( π / 2) + c2 e −α ( π / 2) ⇒ c1 (eα ( π / 2) − e −α ( π / 2) ) = 0
 2
from which one can conclude that c1 = 0 = c2, and there are no negative eigenvalues.
In summary, the regular Sturm–Liouville problem
y′′ − λy = 0,
π
y(0) = y   = 0
 2
has eigenvalues
λ n = 4 n 2 , n = 1,2,3,
and corresponding eigenfunctions
φn ( x ) = k 2 n sin(2nx )
with k2n nonzero but otherwise arbitrary.
It is important to note that although constant coefficient differential equations are
used to demonstrate how to identify the eigenvalues and eigenfunctions of a regular
Sturm–Liouville problem, there are also variable coefficient problems as well.
Example 4.2
The example demonstrates two approaches to identify the eigenvalues and eigenfunctions of A Variable Coefficient Sturm–Liouville Problem.
Given
x 2 y′′ + xy′ + λy = 0
(4.14)
Subject to:
y′ ( e −1 ) = 0; y (1) = 0
Determine the eigenvalues and corresponding eigenfunctions.
Method I – Convert to constant coefficient
Let
x = et ⇔ t = ln x
Then
dt 1
dy dy dt 1 dy
= and
=
=
dx x
dx dt dx x dt
(4.15 and 4.16)
134
Applied Mathematical Methods for Chemical Engineers
Similarly
d 2 y d  dy  d  1 dy 
=
 =


dx 2 dx  dx  dx  x dt 
−1 dy 1 d 2 y dt
= 2
+
x dt x dt 2 dx
1  d 2 y dy 
= 2 2 − 
x  dt
dt 
Substituting into Equation 4.14 earlier results in
d2y
+ λy = 0
dt 2
now subject to
y ( 0 ) = 0, y′ (1) = 0
One can now apply the procedure illustrated in Class 1 under “The Regular Sturm–
Liouville Problem on [a, b]” to arrive at the case:
λ > 0, say λ = β 2
Then
y ( t ) = b1 sin αt + b2 cos αt and
y′ ( t ) = b1 α cos αt − b2 α sin αt
Applying the boundary conditions leads to the conclusions:
b2 = 0 and b1 α cos α = 0
However, for nontrivial solution to exist
b1 α cos α = 0 ⇒ b1 ≠ 0 and cos α = 0
such that
π
α = ( 2n − 1) , n = 1,2,3,
2
Therefore, the eigenvalues are given by
λ n = ( 2n − 1)2
π2
, n = 1,2,3,
4
and the corresponding eigenfunctions are
yn = sin ( 2n − 1) π 2 t  ≡ sin ( 2n − 1) π 2 ln x 
135
Sturm–Liouville Problems
Method II
Alternatively, one could have made the substitution
y = xm
into Equation 4.14, resulting in Linear Independent solutions
y1 = x i
λ
and y2 = x − i
λ
See Problem 11.
Class 2: The Periodic Sturm–Liouville Problem on [a, b]
If p(x) > 0 and r(x) > 0 on a ≤ x ≤ b, one seeks numbers λ and nontrivial solution of
( p( x ) y′)′ + [q( x ) + λr ( x )] y = 0
(4.17)
y( a ) = y( b )
(4.18)
y′(a) = y′(b)
(4.19)
subject to
Example 4.3
This example demonstrates the procedure to determine the eigenvalues and eigenfunctions of a Periodic Sturm-Liouville problem,
y′′ + λy = 0 on [−π , π ]
y(−π ) = y(π )
y′(−π ) = y′(π )
is a periodic Sturm–Liouville problem. Again, there are three cases to consider.
Case I
Suppose λ = 0, then
yg ( x ) = k1 x + k 2
and
y(−π) = − k1π + k 2 = y(π) = k1π + k 2
which results in
y = k2
Thus, λ = 0 is an eigenvalue for this problem with the corresponding eigenfunction
y = k2, which is an arbitrary constant.
Case II
Suppose λ > 0, say λ = β2, then
yg = c1 cos βx + c2 sin βx
136
Applied Mathematical Methods for Chemical Engineers
and
y(−π ) = c1 cos βπ − c2 sin βπ = y(π) = c1 cos βπ + c2 sin βπ
and
y′(−π) = c1 β sin βπ + c2 β × = − c1 β × + c2 cos βπ = y′(π )
Therefore,
2c2 sin βπ = 0
and
2c1 sin βπ = 0 ⇒ sin βπ = 0 ⇒ βπ = nπ , n = 1,2,3,
for nontrivial solution. Therefore, λ = n2 is an eigenvalue with corresponding
eigenfunctions:
φn ( x ) = c1n cos( nx ) + c2 n sin(nx )
in which c1n and c2n are arbitrary constants, which cannot both be zero but are ­otherwise
arbitrary.
For the case with λ < 0, it can be shown that only trivial solutions result. Therefore,
the periodic Sturm–Liouville problem
y′′ + λy = 0, y(−π) = y(π ) and
y′(−π) = y′(π )
has eigenvalues
λ = n 2 , n = 0,1,2,
and eigenfunction
φn ( x ) = c1n cos( nx ) + c2 n sin(nx )
with not both c1n and c2n zero.
Class 3: The Singular Sturm–Liouville Problem on [a, b]
If p(x) > 0 and r(x) > 0 on a ≤ x ≤ b, one seeks number λ and nontrivial solution of
( p( x ) y′)′ + [q( x ) + λr ( x )] y = 0
(4.20)
satisfying one of the following three types of boundary conditions:
1.If p(a) = 0, then
B1 y(b) + B2 y′(b) = 0
with B1 and B2 given and are nonzero, and also the solutions must be
bounded at a.
(4.21)
137
Sturm–Liouville Problems
2.If p(b) = 0, then
A1 y(a) + A2 y′(a) = 0
(4.22)
with A1 and A2 given and are nonzero, also solutions must be bounded at b.
3.If p(a) = p(b) = 0, we have no boundary conditions specified at either a or b
but require that solutions be bounded on [a, b].
Example 4.4
This example demonstrates the procedure to determine the eigenvalues and eigenfunctions of a Singular Sturm–Liouville problem, such as Legendre’s equation [2]
(1 − x 2 ) y′′ − 2 xy′ + ( + 1) y = 0
recasted as
[(1 − x 2 ) y′]′ + λy = 0 − 1 ≤ x ≤ 1
with
λ = ( + 1), p( x ) = 1 − x 2 such that p(−1) = p(1) = 0
This results in the class of singular Sturm–Liouville problems having type 3 boundary
condition. Further, since
(1 − x 2 ) y′′ − 2 xy′ + ( + 1) y = 0
can be rewritten as
y′′ −
2x
( + 1)
y′ +
y=0
1− x2
1− x2
with singular points at x = ±1, but both −2x/(1 − x2) and ℓ(ℓ+1)/(1 − x2) have Taylor
Series expansion about the origin in −1 < x < 1 (x = 0 is an ordinary point), then
∞
y = ∑ an x n
n=0
can be assumed as a solution of the given differential equation. Proceeding formally,
as in the Frobenius series method, results in
2a2 + ( + 1)a0 + [3 ⋅ 2a3 + ( + 1)a1 − 2a1 ]x
∞
+ ∑ {(n + 2)(n + 1)an + 2 + [( + 1) − n(n − 1) − 2n]an }x n = 0
n=2
138
Applied Mathematical Methods for Chemical Engineers
from which
( + 1)
a0
2
( + 2)( + 1)
a3 = −
a1
3⋅2
(n +  + 1)( − n)
=−
an , n ≥ 2
(n + 2)(n + 1)
a2 = −
an + 2
where the latter equation is the recurrence relation.
Following the determination of a few more constants, one can observe the patterns:
a2 n =
(−1)n ( + 2n − 1)( + 2n − 3)… ( + 1)( − 2)… ( − 2n + 4)( − 2n + 2)
a0
(2n)!
for even indexed coefficients and
a2 n +1 =
(−1)n ( + 2n)… ( + 4)( + 2)( − 1)( − 3)… ( − 2n + 1)
a1
(2n + 1)!
for odd indexed coefficients.
Therefore, one can obtain two linearly independent solutions of Legendre’s equation.
Say for a0 = 1 and a1 = 0
∞
y1 = ∑ (−1)n
n=0
( + 2n − 1)( + 2n − 3)… ( + 1)( − 2)… ( − 2n + 4)( − 2n + 2) 2 n
x
(2n)!
and for a 0 = 0 and a1 = 1
∞
y2 = ∑ (−1)n
n=0
( + 2n)… ( + 4)( + 2)( − 1)( − 3)… ( − 2n + 1) 2 n +1
x
(2n + 1)!
By making appropriate choices of ℓ, the linearly independent solutions can be reduced
to polynomials (Legendre’s polynomials).
A frequently occurring example of a Variable Coefficient Sturm–Liouville
Problem of the singular type is given below.
Example 4.5
This example demonstrates the procedure to determine the eigenvalues and eigenfunctions of a Singular Sturm–Liouville problem
Given the singular boundary value problem described by
1
R′′ + R′ − λR = 0
r
139
Sturm–Liouville Problems
and subject to R(r ) being bounded at the origin (r = 0), and R(d) = 0; determine the
eigenfunction and the equation that defines the eigenvalues.
Solution
By comparing the R-equation with the prototype Bessel Equation (Equation 3.80),
y′′ −
( 2a − 1)
x
a 2 − γ 2c 2 

y′ +  b 2c 2 x 2 c − 2 +
 y = 0

x2
whose linearly independent solutions are
y1 = x a J γ (bx c ), y2 = x a J−γ (bx c )
where the J γ and J−γ are Bessel functions of order γ as described in Section 3.6;
we find that
2a − 1 = −1⇒ a = 0; 2c − 2 = 0 ⇒ c = 1; b 2c 2 = −λ ⇒ b = ± i λ ; and γ = 0
Therefore
R(r ) = c1J0 (i λ r ) + c2 J−0 (i λ r )
= c1J0 (i λ r ) + c2Y0 (i λ r )
where
J0 ( x ) = 1 −
x2
x4
x6
+
−
+
2
2
2
2
2
2 i4
2 i 4 2 i 62
is the zero order Bessel function of the first kind and
2  x 2
x4  1 
x6
2
 1 + 1 + 1  − 
1+  +
Y0 ( x ) =
ln ( x 2 ) + γ J0 ( x ) +  −
 ;


π
π  22 22 i 4 2  2  22 i 4 2 i 62  2 3 

{
}
γ = 0.5772156… is Euler ' s const .
is the zero order Bessel function of the second kind.
Applying the boundary condition; R(r ) is bounded at r = 0, then c2 must be chosen
as zero because
Y0 (βr ) → ∞ as r → 0 where β = i λ or λ = −β 2
r = d ⇒ R(d) = 0 = c1J0 (d β)
140
Applied Mathematical Methods for Chemical Engineers
However, for a nontrivial solution to exist, c1 ≠ 0 such that
0 = J0 (d β)
which defines the Eigenvalues. That is,
J0 (d β n ) = 0, n = 1,2,3,
and the eigenfunction is given by
Rn (r ) = J0 (i λ n r ) ≡ J0 (β nr )
A Procedure to determine β n values:
Given the eigenvalues, β n defined by the Bessel function:
J0 (2β n ) = 0, n = 1,2,3,
1. Locate a table of values for the zeros of Bessel Functions.
2. Identify the case n = 1 (in this case) and locate the listed zero noting the order
in which they are listed (most tables list smallest root first); in this specific
case 2β1 = 2.4048, 2β 2 = 5.5201,
2.4048
= 1.2024.
3. Solve for β1 from step 2, that is, β1 =
2
4. Repeat steps 2 and 3 as needed.
Remark: Knowledge of the properties of the eigenvalues and eigenfunctions can
dramatically reduce the labor typically required to solve a Sturm–Liouville problem.
These properties also provide a check on whether or not one’s solution is reasonable.
4.2.1 PROPERtIEs OF thE EIGENVALUEs AND EIGENFUNctIONs
OF A StURM –LIOUVILLE PROBLEM
The following theorem summarizes the important properties of the Sturm–Liouville
problem and its eigenvalues [1, 2].
Theorem 4.1
1.
For the regular and periodic Sturm–Liouville problems, there exist an
­infinite number of eigenvalues. Further, these eigenvalues can be labeled
λ1, λ2, … so that λn < λm if n < m and nlim
λ = ∞.
→∞ n
2.
If λn and λm are distinct eigenvalues of any of the three types of Sturm–
Liouville problems, with corresponding eigenfunctions ɸ n and ɸ m, then ɸ n
and ɸ m are orthogonal on [a, b] with weight function r(x). That is,
b
∫ r ( x )φn ( x )φm ( x ) d x = 0
a
if n ≠ m.
141
Sturm–Liouville Problems
3.
For all three classes of Sturm–Liouville problems, all eigenvalues are real.
4.
For a regular Sturm–Liouville problem, any two eigenfunctions corresponding to a given eigenvalue are linearly dependent.
5.
The Laplace transform, F(s), of a solution to a Sturm–Liouville problem is
analytic for all finite s except for poles, which correspond to the eigenvalues of the system.
Sometimes it is helpful to approximate the value of the smallest eigenvalue when one
is faced with a computationally difficult engineering problem. An iterative procedure known as the method of Stodola and Vianello [5] is outlined as follows.
Consider the regular Sturm–Liouville problem
d2 y
+ λy = 0
dx 2
subject to
y(0) = 0,
y( L ) = 0
(4.23)
(4.24)
This problem can be easily shown to have eigenvalues
n2 π2
, n = 1,2,
L2
λn =
(4.25)
with corresponding eigenfunctions
φn ( x ) = sin
nπx
L
(4.26)
However, the method can be illustrated using this familiar problem:
1.Rewrite Equation 4.23 as
d2 y
= −λy
dx 2
(4.27)
2.Replace the unknown function y on the right-hand side of the above equation by a conveniently chosen first approximation y1(x) giving
d2 y
= −λy1 ( x )
dx 2
(4.28)
3.Solve Equation 4.28 and Equation 4.24 formally to get
y = λf1 ( x )
If y1(x) were actually an eigenfunction of the problem, then
y = y1
and λ would be the eigenvalue given by the constant ratio
(4.29)
142
Applied Mathematical Methods for Chemical Engineers
y1 ( x )
f1 ( x )
λ=
However, y1(x) is generally not an eigenfunction and therefore y1(x) and f1(x) generally will not be in a constant ratio. To illustrate further, suppose y1(x) is chosen to be
y1 ( x ) = x ( L − x )
then
d2 y
= −λx ( L − x ) = λ( x 2 − Lx )
dx 2
whose solution satisfying Equation 4.24 is
y=
λ 4
( x − 2 Lx 3 + L3 x ) ≡ λf1 ( x )
12
Observe that y ≠ y1, but a first approximation of the smallest eigenvalue, λ 1, can be
obtained from
L
L
0
0
∫ y1 ( x ) d x = λ ∫ f1 ( x ) d x
That is,
L
∫ ( Lx − x 2 ) d x =
0
L
λ
( x 4 − 2 Lx 3 + L3 x ) d x
12 ∫0
or
L
λ
=
12
∫ ( Lx − x 2 ) d x
0
L
∫ ( x 4 − 2 Lx 3 + L3 x ) d x
0
such that
λ1(1) =
10
L2
is the first approximation to the smallest eigenvalue. By taking
y2 ( x ) = x 4 − 2 Lx 3 + L3 x
as the next approximation, and formally solving
d2 y
= −λy2 ( x )
dx 2
subject to Equation 4.24 gives
(4.30)
143
Sturm–Liouville Problems
y = λ f2 ( x ) = −
λ 6
( x − 3 Lx 5 + 5 L3 x 3 − 3 L5 x )
30
then Equation 4.30 becomes
L
L
0
0
∫ y2 ( x ) d x = λ ∫ f2 ( x ) d x
such that the second approximation to λ 1 is
λ1(2) =
168 9.882
= 2
17 L2
L
In general, successive estimates of the eigenvalues λ 1 may be obtained after each
iteration by requiring that the functions yn(x) and y = λ f n(x) agree as well as possible
over the interval (0, L). In particular, the nth approximation to be the smallest value
of λ is given by
L
λ
(n)
1
=
∫ yn ( x ) d x
0
L
(4.31)
∫ fn ( x ) d x
0
and the corresponding eigenfunctions is yn(x). An improved version of the above
equation is given by
b
λ
(n)
1
=
∫ r ( x ) fn ( x ) yn ( x ) d x
a
b
∫ r ( x )[ fn ( x )]
2
(4.32)
dx
a
The above equation is a consequence of point 2 of Theorem 4.1.
The next section briefly introduces an application of property 2 given in the theorem. This is a very important property that will be used repeatedly in solving application problems in both Chapter 6 and Chapter 7.
4.3 EIGENFUNCTION EXPANSION
Consider a Sturm–Liouville problem on [a, b], that is,
( p( x ) y ′) ′ + [q( x ) + λr ( x )] y = 0
(4.33)
A1 y(a) + A2 y ′(a) = 0
(4.34)
B1 y(b) + B2 y ′(b) = 0
(4.35)
subject to
144
Applied Mathematical Methods for Chemical Engineers
Then, if the eigenvalues λ 1, λ 2, …, and corresponding eigenfunctions φ 1(x), φ 2(x), …
have been found, one can sometimes expand a given function f(x) in a series of these
eigenfunctions. That is,
∞
f ( x ) = ∑ cn φn ( x ), a ≤ x ≤ b
(4.36)
n =1
The series in the above equation is called an eigenfunction expansion of f(x)
on [a, b]. To determine the cn′s, property 2 of Theorem 4.1 will be used in the
­following way:
Multiply Equation 4.36 by r(x)φ k(x) and integrate the result from a to b.
b
∞
b
a
n =1
a
∫ r ( x ) f ( x )φk ( x ) d x = ∑ cn ∫ r ( x )φn ( x )φk ( x ) d x
(4.37)
assuming that term-by-term integration of the series is permissible. Then property 2
of Theorem 4.1 gives
b
∫ r ( x )φn ( x )φk ( x ) d x = 0
if n ≠ k
a
Therefore, Equation 4.37 reduces to
b
b
a
a
∫ r ( x ) f ( x )φk ( x ) d x = ck ∫ r ( x )[φk ( x )]2 d x
for n = k
Finally,
b
ck =
∫ r ( x ) f ( x )φk ( x ) d x
a
b
(4.38)
∫ r ( x )[φk ( x )]2 d x
a
These ck are the so-called Fourier coefficients of f(x) with respect to the eigenfunctions of the given Sturm–Liouville problem. A more comprehensive discussion
on Fourier coefficients will be given in the next chapter. Also, the conditions that a
function must satisfy to have a series expansion, as given in Equation 4.36, will be
discussed in Chapter 5.
Following is an example demonstrating the computation of Fourier coefficients.
Example 4.6
This example demonstrates the procedure to expand a given function into a series of
eigenfunctions.
Consider y ″ + λy = 0 subject to y(0) = y(π/2) = 0, a regular Sturm–Liouville problem
on [0, π/2] with eigenvalues λ n = 4n2, n ≥ 1 and corresponding eigenfunctions φn(x) =
sin 2nx.
145
Sturm–Liouville Problems
Then, if f(x) = x2 on [0, π/2] satisfies all the required conditions to be given in
Chapter 5, one can proceed to find the cn’s as follows:
π /2
π /2
∫ r ( x ) f ( x )φn( x ) dx = ∫ x 2 sin 2nx dx
0
0
−π2
1
=
[cos nπ − 1]
cos nπ +
8n
4n3
and
π /2
π /2
0
0
∫ r (x )[φn(x )]2 d x = ∫ sin 2 2nx d x = π/4
such that
cn =
=

4  −π2
1
cos nπ +
(cos nπ − 1) 

π  8n
4n3

−π
1
cos nπ +
(cos nπ − 1)
2n
πn3
Finally,
∞ 1
π


x2 = ∑ 
(cos nπ − 1) − cos nπ  sin2nx
3
n
2

n =1  πn
Again, eigenfunction expansion will be useful in solving certain types of boundary
value problems to be discussed in Chapter 6.
4.4 PROBLEMS
1.Find all the values of λ, satisfying the boundary value problem
X ′′
=λ
X
X (0) = 0, X (1) = 0
2.Find all the values of λ, satisfying the boundary value problem
X ′′
=λ
X
X (0) = 0, X ′( L ) = 0
146
Applied Mathematical Methods for Chemical Engineers
3.Find all the values of λ, satisfying the boundary value problem
X ′′
=λ
X
X ( − L ) = X ( L ), X ′( − L ) = X ′( L )
4.Find all the values of λ, satisfying the boundary value problem
X ′′
=λ
X
X ′(0) = 0, X ′( L ) = 0
5.Use property 2 of Theorem 4.1 to determine Bn in the series
∞
∑ Bn sin
n =1
nπx
= f (x)
L
 1, 0 < x < 0.5
f (x) = 
 0, 0.5 < x < L
6.Use property 2 of Theorem 4.1 to determine An in the series
∞
∑ An cos
n= 0
nπx
= f (x)
L
 1, 0 < x < 0.5
f (x) = 
 0, 0.5 < x < L
7.Use property 2 of Theorem 4.1 to determine An and Bn in the series
∞
∑  An cos
n= 0
nπx
nπx 
+ Bn sin
= f (x)
2
2 
 − x , −2 < x < 0
f (x) = 
 2, 0 < x < 2
8.Derive the equation that is required to yield the values of λ in the singular
Sturm–Liouville problem
ρR ′′(ρ) + R ′(ρ) + λ 2 ρR(ρ) = 0
subject to
R(c) = 0
Hint: Apply a boundednes condition after using Equation 3.80 to reduce labor.
147
Sturm–Liouville Problems
9.Find all the values of λ, satisfying the boundary value problem
y ′′ + λy = 0;
y(0) = 0, y( L ) = 0
10.Find all the values of λ, satisfying the boundary value problem
y ′′ + λy = 0;
y ′(0) = 0, y ′( L ) = 0
11.Complete the Variable Coefficient Sturm–Liouville Problem using the
suggested Method II given in the solved Example 4.2 in Section 4.2.
12.Find all the values of λ, satisfying the boundary value problem
( xy′)′ + λx −1 y = 0
y(1) = 0, y(e) = 0
m
a. Use the substitution y = x
b. Use the substitution x = et
13.Find all the values of (or the equation defining) λ, satisfying the boundary
value problem
y′′ + λy = 0
y(0) − y′(0) = 0
y(0) + y′(1) = 0
14
a.Given the linear variable coefficient differential equation, determine its
two linearly independent solutions
x 2 y ′′ + xy ′ + ( x 2 − 1 4 ) y = 0
Hint: Consider comparing the given differential equation to
a2 − γ 2c2 

 2a − 1 
y ′′ − 
y ′ +  b 2 c 2 x 2c − 2 +

 y = 0
 x 

x2
(Recall Equation 3.80)
y1 ( x ) = x J γ ( bx ) , y2 ( x ) = x J− γ ( bx
a
c
a
c
)
b.Express the two linearly independent solutions in terms of sin x and
cos x by employing the formulae
J1/ 2 ( x ) =
2
sin x; J −1/ 2 ( x ) =
πx
2
cos x
πx
15.Given
x 2 y ′′ + xy ′ + λy = 0; y (1) = 0, y ( e π ) = 0
148
Applied Mathematical Methods for Chemical Engineers
Determine the eigenvalues and define the eigenfunctions.
16.Given the singular differential equation, along with appropriate boundary
condition, derive the equation that defines the eigenvalues.
1
R ′′ + R ′ + λ 2 R = 0
r
subject to
R(0) < ∞ and R(r0 , t ) = 0
17.Given
y ′′ + � y = 0;
y(0) = 0, y(1) + y ′ (1) = 0
a. Determine the equation that defines the eigenvalues.
b. Sketch the graph of the equation derived in part a identifying the first
four eigenvalues.
REFERENCES
1.Boyce, W.E. and DiPrima, R.C. Elementary Differential Equations and Boundary
Value Problems, 8th ed., John Wiley & Sons, Inc., New York, 2005.
2. O’Neil, P.V. Advanced Engineering Mathematics, 4th ed., PWS, Boston, 1995.
3.Humi, M. and Miller, W.B. Boundary Value Problems and Partial Differential
Equations, PWS, Boston, 1988.
4.Myint-U, T. and Debnath, L. Partial Differential Equations for Scientists and
Engineers, 3rd ed., Prentice Hall, Englewood Cliffs, NJ, 1987.
5.Hildebrand, F.B. Advanced Calculus for Applications, 2nd ed., Prentice Hall,
Englewood Cliffs, NJ, 1976.
5
Fourier Series
and Integrals
5.1 INTRODUCTION
One of the most common solution techniques applicable to linear homogeneous partial differential equation problems involves the use of Fourier series. A discussion
of the methods of solution of linear partial differential equations will be the topic of
the next chapter. In this chapter, a brief outline of Fourier series is given. The primary concerns in this chapter are to determine when a function has a Fourier series
expansion and then, does the series converge to the function for which the expansion
was assumed? Also, the topic of Fourier transforms will be briefly introduced, as it
can also provide an alternative approach to solve certain types of linear partial differential equations.
To establish the conditions for a function to have a Fourier series expansion, the
following definitions are necessary.
A function is said to be piecewise continuous in an interval a ≤ x ≤ b if there exist
finitely many points a = x1 < x2 < ⋯ < xn = b, such that f(x) is continuous in xj < x < xj+1
and the one-sided limits f ( x +j ) and f ( x −j +1 ) exist for all j = 1, 2, 3, …, n−1 [1–4]. Note that
a function is piecewise continuous on the closed interval a ≤ x ≤ b; however, continuity
on the open interval a < x < b does not imply piecewise continuity there. For example,
f (x) =
1
x
is continuous on 0 < x < 1, but it is not piecewise continuous as f(0+) fails to exist.
When a function f(x) is piecewise continuous on an interval a < x < b, the integral
of f(x) from x = a to x = b always exists. That integral is the sum of the integrals of
f(x) over the open subintervals on which f is continuous, that is,
b
∫a
x1
x2
a
x1
f (x) d x = ∫ f (x) d x + ∫
f (x) d x +  + ∫
b
x n −1
f (x) d x
(5.1)
For example,
f (x) = x, 0 ≤ x < 1
= −1, 1 < x < 2
= 1,
3
1
2<x <3
2
3
1
∫0 f ( x ) d x = ∫0 x d x + ∫1 − d x + ∫2 d x = 2
149
150
Applied Mathematical Methods for Chemical Engineers
If two functions f1 and f 2 are piecewise continuous on an internal a < x < b, then
there is a finite subdivision of the interval such that both functions are continuous on
each closed subinterval whenever the functions are given their limiting values from
the interior at the endpoints. This means that a linear combination c1f1 + c2f 2 or the
product f1f 2 has the continuity on each subinterval and is, itself, piecewise continuous
on a < x < b. As a consequence
∫ [c1 f1 + c2 f2 ] d x , ∫ f1 f2 d x ,
∫ [ f1 ( x )]2 d x
and
all exist on that interval [1].
If f(x) is piecewise continuous on a ≤ x ≤ b and if the first derivative f′(x) is continuous on each of the subintervals xj < x < xj+1 and the limits f ( x +j ) and f ( x −j ) exist,
then f is said to be piecewise smooth.
The functions of a sequence {φn(x)} are said to be orthogonal with respect to the
weight function r(x) on a ≤ x ≤ b if
b
∫a r ( x )φn ( x )φm ( x ) d x = 0,
m≠n
(5.2)
and if m = n, then
 b φ2 r ( x ) d x  =  φ 
n
 ∫a n

(5.3)
which is called the norm of the orthogonal system {φn}.
For example, the sequence of function
1, cos x, sin x, …, cos nx, sin nx forms an orthogonal system on −π < x < π since
π
∫− π sin mx sin nx d x = 0
π
∫− π sin mx sin nx d x = π
π
∫− π sin mx cos nx d x = 0
π
∫− π cos mx cos nx d x = 0
π
∫− π cos mx cos nx d x = π
m≠n
m=n
for all
m, n
(5.4)
m≠n
m=n
for positive integers m and n. Note that an orthonormal system, one that is both
orthogonal and normalized, for the given sequence is
1 cos x sin x
cos nx sin nx
,
,
, ,
,
π
π
π
π
2π
where each element of the sequence is divided by its norm.
It is also important to note that the elements of the sequence 1, cos x, sin x, …, cos nx,
sin nx are periodic. In general, a piecewise continuous function f(x) in an interval a ≤ x
≤ b is said to be periodic if there exists a real positive number p such that
151
Fourier Series and Integrals
f ( x + np) = f ( x )
(5.5)
for any integer n. Further if f1, f 2, …, f k have the period p, then the linear combination
f = c1 f1 + c2 f2 +  + ck fk
(5.6)
has the period p. Also, a constant function is a periodic function with an arbitrary
period p.
5.2 FOURIER COEFFICIENTS
Since the linear independent functions 1, cos x, sin x, cos 2x, sin 2x, … are mutually
orthogonal to each other −π < x < π, one can form the series
f (x) ~
A0 ∞
+ ∑ ( An cos nx + Bn sin nx )
2 n =1
(5.7)
where the symbol ~ indicates an association of A0, An, and Bn to f(x) in some unique
manner. The series may or may not be convergent.
Suppose f(x) is a Riemann integrable function that is defined on −π ≤ x ≤ π. Then
one can define the kth partial sum
Sk ( x ) =
k
A0
+ ∑ ( An cos nx + Bn sin nx )
2 n =1
(5.8)
to represent f(x) on −π ≤ x ≤ π. We now seek the numbers A0, An, and Bn such that
Sk(x) is the best approximation to f(x) in the sense of least squares; that is, we need
to minimize the integral
π
I ( A0 , An , Bn ) = ∫ [ f ( x ) − Sk ( x )]2 d x
−π
(5.9)
The necessary condition for I(A0, An, Bn) to be a minimum is
∂I
∂I
∂I
=0=
=
∂ A0
∂ An ∂ Bn
(5.10)
k

π 
∂I
A
= − ∫  f ( x ) − 0 − ∑ ( A j cos jx + B j sin jx )  d x
π
−
∂ A0
2 j =1


(5.11)
k

π 
∂I
A
= −2 ∫  f ( x ) − 0 − ∑ ( A j cos jx + B j sin jx )  cos nx d x
−π
∂ An
2 j =1


(5.12)
Thus
152
Applied Mathematical Methods for Chemical Engineers
k

π 
∂I
A
= −2 ∫  f ( x ) − 0 − ∑ ( A j cos jx + B j sin jx )  sin nx d x
−π
∂ Bn
2 j =1


(5.13)
From the orthogonality of the trigonometric function (Equation 5.4) and noting
that
π
π
∫− π cos mx d x = ∫− π sin mx d x = 0,
m an integer
Equations 5.11 through 5.13 become
π
∂I
= πA0 − ∫ f ( x ) d x
−
π
∂ A0
(5.14)
π
∂I
= 2πAn − 2 ∫ f ( x ) cos nx d x
−
π
∂ An
(5.15)
π
∂I
= 2πBn − 2 ∫ f ( x )sin nx d x
−π
∂ Bn
(5.16)
Based on Equation 5.10, there results
1 π
f (x) d x
π ∫− π
(5.17)
An =
1 π
f ( x ) cos nx d x
π ∫− π
(5.18)
Bn =
1 π
f ( x )sin nx d x
π ∫− π
(5.19)
A0 =
Further,
∂2 I
=π
∂ A02
∂2 I ∂2 I
=
= 2π
∂ An2 ∂ Bn2
and
∂( m ) I ∂( m ) I
∂2 I
∂2 I
=
=
=
= 0, m ≥ 3, n = 1,2,
∂ A0 An ∂ A0 Bn ∂ An( m ) ∂ Bn( m )
By expanding I(A0, An, Bn) in a Taylor series about (A0, A1, …, An, B1, B2, …, Bn)
one gets
Fourier Series and Integrals
I ( A0 + ∆A0 ,, Bn + ∆Bn ) = I ( A0 ,, Bn ) + ∆I
153
(5.20)
where ∆I represents the remaining terms. But ∆I can be written as
∆I =
k

1  ∂2 I
∂2 I
∂2 I
2
2
2
∆
A
+
 2 0 ∑ 2 ∆An + 2 ∆Bn 
2!  ∂ A0
∂ Bn
n =1 ∂ An

(5.21)
since the first derivative, all mixed second derivatives, and all remaining higher
order derivatives are zero. Then
∆I =
k

1
2
2
2
 π∆A0 + ∑ ( 2π∆An + 2π∆Bn )  > 0
2! 
n =1

Therefore, in order for I to have a minimum value, the coefficients A0, An, and Bn
must be given by Equations 5.17 through 5.19, respectively. These coefficients are
called the Fourier Coefficients of f(x), and the series given by Equation 5.7 represent
the Fourier series.
According to Equation 5.6, the Fourier series Equation 5.7, is periodic with period
2π, if it converges.
The following are a few examples on calculating Fourier series of a given function.
Example 5.1
Find the Fourier series expansion for the function f(x) = x + x2 on −π < x < π.
Solution
1 π
1 π
2π 2
f (x) d x = ∫ (x + x 2 ) d x =
∫
π
π
−
−
π
π
3
1 π
4
2
f ( x ) cos nx d x = ∫ ( x + x ) cos nx d x = 2 cos nπ
n
π −π
4
= 2 (−1)n , n ≥ 1
n
A0 =
An =
1 π
π ∫− π
Bn =
1 π
1 π
2
f ( x )sin nx d x = ∫ ( x + x 2 )sin nx d x = cos nπ
∫
−
π
−
π
n
π
π
2
n
= (−1) , n ≥ 1
n
Therefore, the Fourier series expansion for f is
f (x) =
π2 ∞  4
2
+∑
(−1)n cos nx − (−1)n sin nx 
n
3 n =1  n 2

154
Applied Mathematical Methods for Chemical Engineers
Example 5.2
Find the Fourier series expansion of the function f(x) = x in the interval −π < x < π.
Solution
A0 =
1 π
1 π
f (x) d x = ∫ x d x = 0
∫
π
−
π
π −π
Also, for n ≥ 1
An =
Bn =
1 π
1 π
f ( x ) cos nx d x = ∫ x cos nx d x = 0
π ∫− π
π −π
1 π
1 π
2
f ( x )sin nx d x = ∫ x sin nx d x = (−1)n +1
∫
−
π
n
π
π −π
Therefore,
∞
(−1)n +1
sin nx
n
n =1
f ( x ) = 2∑
Example 5.3
Find the Fourier series of the periodic function shown in Figure 5.1.
f ( x ) = − π, − π < x < 0
= x, 0 < x < π
Solution
A0 =
π
1 π
1 0
−π
f ( x ) d x =  ∫ − π d x + ∫ x d x  =
0
 2
π ∫− π
π  −π
π
1 π
1 0
f ( x ) cos nx d x =  ∫ − π cos nx d x + ∫ x cos nx d x 
0

π ∫− π
π  −π
1
= 2 [(−1)n − 1], n ≥ 1
πn
An =
f (x)
–2π
–π
FIGURE 5.1 Periodic Function.
0
π
2π
155
Fourier Series and Integrals
1 π
f ( x )sin nx d x
π ∫− π
π
1 0
1
=  ∫ − π sin nx d x + ∫ x sin nx d x  = [1 − 2(−1)n ]
π
0
−
 n
π
Bn =
Therefore, the Fourier series is
f (x) = −
5.3
{
π ∞ 1
1
+ ∑ 2 [(−1)n − 1]cos nx + [1 − 2(−1)n ]sin nx
n
4 n =1 n π
}
ARBITRARY INTERVAL
In the previous two sections, the discussion was primarily based on the interval
[−π, π]. However, in many applications, as will be observed in the next chapter, this
interval is restrictive.
Suppose the interval of interest is [a, b]. Then the interval a ≤ x ≤ b can be transformed to −π < x < π by using
1
b−a
x = (b + a) +
t
2π
2
(5.22)
Therefore, the function
(b + a) b − a 
f 
+
t = F (t )
2π 
 2
has period 2π. When F(t) is expanded in a Fourier series, one obtains
F (t ) =
A0 ∞
+ ∑ ( An cos nt + Bn sin nt )
2 n =1
(5.23)
where for n ≥ 0
An =
1 π
F (t ) cos nt dt
π ∫− π
Bn =
1 π
F (t )sin nt dt
π ∫− π
and
Upon resubstituting x, the expansion for f(x) in a ≤ x ≤ b is
f (x) =
A0 ∞ 
 2x − b − a 
 2x − b − a  
+ Bn sin nπ 
+ ∑ An cos nπ 
 b − a 
 b − a  
2 n =1 
(5.24)
where
b
An =
2
 2x − b − a 
f ( x ) cos nπ 
d x, n ≥ 0
∫
 b − a 
b−a a
(5.25)
156
Applied Mathematical Methods for Chemical Engineers
Bn
b
2
 2x − b − a 
f ( x )sin nπ 
d x, n ≥ 1
∫
 b − a 
b−a a
(5.26)
To illustrate the change of interval, consider the function f(x) = x, −2 < x < 2, then
A0 =
1 2
x dx = 0
2 ∫−2
also for n ≥ 1, An = 0 and
Bn =
1 2
nπx
−4
x sin
dx =
( −1)n , n ≥ 1
nπ
2 ∫−2
2
Therefore, the Fourier series for f(x) is
∞
nπx
4
( −1)n +1 sin
2
n =1 nπ
f (x) = ∑
a sine series.
An alternate representation of Equations 5.25 and 5.26 can be achieved if the
convenient interval [−L, L] is used [5, 6]. That is, let a = −L, and b = L, then
f (x) =
nπx 
A0 ∞ 
nπx
+ ∑ An cos
+ Bn sin
L
L 
2 n =1 
(5.27)
where
5.4
An =
1 L
nπx
f ( x ) cos
d x, n ≥ 0
∫
−
L
L
L
(5.28)
Bn =
1 L
nπx
f ( x )sin
d x, n ≥ 1
∫
−
L
L
L
(5.29)
COSINE AND SINE SERIES
Suppose f(x) is an even function defined on the interval [−π, π]; then since cos nx is
an even function and sin nx is an odd function, the product f(x)cos nx and f(x) sin
nx are even and odd functions, respectively. Then the Fourier coefficients of f(x) are
An =
1 π
2 π
f ( x ) cos nx d x = ∫ f ( x ) cos nx d x , n ≥ 0
∫
−
π
π
π 0
(5.30)
1 π
f ( x )sin nx d x = 0, n ≥ 1
π ∫− π
(5.31)
and
Bn =
Therefore, the Fourier series representation of f(x) is
157
Fourier Series and Integrals
f (x) ~
A0 ∞
+ ∑ An cos nx
2 n =1
(5.32)
On the other hand, if f(x) is an odd function defined on [−π, π], then f(x) cos nx and
f(x) sin nx are odd and even functions, respectively. Then
1 π
f ( x ) cos nx d x = 0, n ≥ 0
π ∫− π
(5.33)
1 π
2 π
f ( x )sin nx d x = ∫ f ( x )sin nx d x
π ∫− π
π 0
(5.34)
An =
and
Bn =
Therefore, the Fourier series representation of f(x) becomes
∞
f ( x ) ~ ∑ Bn sin nx
(5.35)
n =1
In practice, one frequently encounters problems in which a function is defined on the
interval [−π, π]. In these cases, a periodic extension as shown in Figure 5.2 can be
made, and those functions can be represented by the Fourier series expansion even
though one is interested only in the expansion on [−π, π].
However, if a function f(x) is defined only on [0, π], then f(x) may be extended in
either an even extension or an odd extension.
By even extension of f(x), one means
Fe ( x ) = f ( x ), 0 < x < π
f (− x ), − π < x < 0
as shown in Figure 5.3.
f (x)
x
–π
0
π
FIGURE 5.2 Periodic extension.
f (x)
–π
FIGURE 5.3 Even extension.
0
π
x
158
Applied Mathematical Methods for Chemical Engineers
f (x)
–π
0
π
x
FIGURE 5.4 Odd extension.
By odd extension of f(x), one means
F0 ( x ) = f ( x ), 0 < x < π
f (− x ), − π < x < 0
as shown in Figure 5.4.
These functions Fe(x) and F0(x) with period 2π, both have Fourier series expansions given by
∞
A
Fe ( x ) ~ 0 + ∑ An cos nx
2 n =1
(5.36)
∞
F0 ( x ) ~ ∑ Bn sin nx
n =1
(5.37)
with the Fourier coefficients as given by Equation 5.30 and 5.34.
Following are the four examples of the expediency that is achievable when the
concept of odd or even function is used in the context of Fourier series.
Example 5.4
Show that an even function can have no sine terms in its Fourier expansion.
Solution
No sine terms if Bn = 0, n ≥ 1.
Consider f(x) on [−L, L], then
1 L
nπx
f ( x )sin
dx
L ∫− L
L
1 0
1 L
nπx
nπx
d x + ∫ f ( x )sin
dx
= ∫ f ( x )sin
L −L
L
L 0
L
Bn =
But if f(x) is even, then f(x) = f(−x). Specifically, let x = −y, dx = −dy
then
1 0
nπx
1 0
nπy
d x = ∫ f (− y)sin
dy
f ( x )sin
L ∫− L
L
L L
L
0
1
nπy
= − ∫ f (− y)sin
dy
LL
L
159
Fourier Series and Integrals
Therefore,
Bn = −
1 0
nπy
1 L
nπx
dx = 0
f (− y)sin
d y + ∫ f ( x )sin
∫
L
L
L 0
L
L
in which case the knowledge that the function is even would eliminate the need to
calculate Bn.
Example 5.5
Expand f(x) = sin x, 0 < x < π in a Fourier cosine series.
Solution
Bn = 0, n ≥1
Since a Fourier series consisting of cosine terms alone is obtained only for an even
function, then f(x) is redefined as an even extension. A sketch of the even extension of
sin x is shown in Figure 5.5.
An =
2 π
sin x cos nx d x , n ≥ 0
π ∫0
for n = 0
A0 =
4
2 π
sin x d x =
π
π ∫0
for n = 1, A1 = 0 (why?)
for n > 1
An = −
2(1 + cos nπ)
π(n 2 − 1)
Therefore,
sin x =
2 2 ∞ (1 + cos nπ)
− ∑
cos nx
π π n=2 n2 − 1
Example 5.6
Expand f(x) = x, 0 < x < 2 in a sine series.
Solution
We need the odd periodic extension of f(x) shown in Figure 5.6, which follows.
f (x)
1–
x
FIGURE 5.5 Even extension of sin x.
160
Applied Mathematical Methods for Chemical Engineers
f (x)
FIGURE 5.6 Odd extension of f(x) = x.
An = 0
nπx
2 2
x sin
dx
∫
0
2
2
−4
=
(−1)n , n ≥ 1
nπ
Bn =
Therefore,
∞
f (x) = ∑
n =1
nπx
4
(−1)n +1 sin
nπ
2
Example 5.7
Given
 1, 0 < x < 1 / 2 
f (x) = 

 0, 1 / 2 < x < 1 
what is the cosine series expansion of f(x)?
Solution
An even extension of f(x) is needed for a period 2l = 2. For an even extension
Bn = 0, n ≥ 1
1/2
2 L
A0 = ∫ f ( x ) d x = 2 ∫ d x = 1
0
L 0
also
An =
1/2
nπ
2 L
nπx
2
f ( x ) cos
d x = ∫ cos nπx dx =
sin
0
L ∫0
nπ
L
2
161
Fourier Series and Integrals
Therefore,
f (x) =
1 ∞
2
+∑
(−1)n −1 cos(2n − 1)πx
2 n =1 (2n − 1)π
5.5 CONVERGENCE OF FOURIER SERIES
If f(x) is piecewise continuous and periodic with period 2π, then
π
∫− π [ f ( x ) − Sk ( x )]2 d x ≥ 0
(5.38)
where
k
A0
+ ∑ ( An cos nx + Bn sin nx )
2 n =1
Sk ( x ) =
Upon expansion of Equation 5.38, one obtains
π
π
π
π
∫− π [ f ( x ) − Sk ( x )2 ] d x = ∫− π [ f ( x )]2 d x − 2 ∫− π f ( x )Sk ( x ) d x + ∫− π [Sk ( x )]2 d x
which reduces to
π
∫− π
f ( x ) Sk ( x ) d x = ∫
π
−π
k

A
f ( x )  0 + ∑ ( An cos nx + Bn sin nx )  dx

 2 n =1
k
πA2
= 0 + π∑ ( An2 + Bn2 )
2
n =1
(5.39)
also
2
k
π A

0
( An cos nx + Bn sin nx )  d x
∫− π [Sk ( x )]2 d x = ∫− π  2 + ∑
n =1

k
πA02
=
+ π∑ ( An2 + Bn2 )
2
n =1
π
(5.40)
Therefore,
k
π
 πA02

2
2
[
f
(
x
)
−
S
(
x
)]
d
x
=
[
f
(
x
)]
d
x
−
+
π
( An2 + Bn2 )  ≥ 0
∑
k

∫− π
∫− π
n =1
 2

π
(5.41)
from which it follows that
k
π
A02
+ ∑ ( An2 + Bn2 ) ≤ ∫ [ f ( x )]2 d x
−π
2 n =1
(5.42)
162
Applied Mathematical Methods for Chemical Engineers
for all k. Further, as
1 π
[ f ( x )]2 d x
π ∫− π
is independent of k, then
1 π
A02 ∞
+ ∑ ( An2 + Bn2 ) ≤ ∫ [ f ( x )]2 d x
2 n =1
π −π
(5.43)
which is Bessel’s inequality. Therefore, the series
A02 ∞
+ ∑ ( An2 + Bn2 )
2 n =1
(5.44)
converges, since it is nondecreasing and is bounded from above. That is,
lim An = 0 = lim Bn
n →∞
(5.45)
n →∞
is the necessary condition for convergence of the series (Equation 5.7).
Finally, the Fourier series is said to converge in the mean to f(x) when
2
k
π 
A

lim ∫  f ( x ) −  0 + ∑ ( An cos nx + Bn sin nx )  dx = 0
k →∞ − π
 2 n =1


(5.46)
If the above equation holds, then one gets
1 π
A02 ∞
+ ∑ ( An2 + Bn2 ) = ∫ [ f ( x )2 ] d x
2 n =1
π −π
(5.47)
which is known as Parseval’s relation, and the set of functions 1, cos x, sin x, cos 2x,
sin 2x, … is said to be complete.
The following theorem can be used to establish point convergence of a given
Fourier series [1, 4].
Theorem 5.1
If f(x) is piecewise smooth and periodic with period 2π in −π < x < π, then for any x
1
A0 ∞
+ ∑ ( An cos nx + Bn sin nx ) = [ f ( x + ) + f ( x − )]
2 n =1
2
where
An =
1 π
f ( x ) cos nx d x , n ≥ 0
π ∫− π
(5.48)
163
Fourier Series and Integrals
and
Bn =
1 π
f ( x )sin nx d x , n ≥ 1
π ∫− π
Proof of Theorem 5.1 can be found elsewhere [1], however, an example of its usage
is given below.
Previously (see Example 5.1), the Fourier series of x + x2 on (−π, π) was found to be
π2 ∞  4
2
+∑
(−1)n cos nx − (−1)n sin nx 
3 n =1  n 2
n

as f(x) is piecewise smooth, the series converges and
x + x2 =
π2 ∞  4
2
+ ∑  2 (−1)n cos nx − (−1)n sin nx 
3 n =1  n
n

at points of continuity. However, at points of discontinuity, such as x = π, Theorem 5.1
gives
1
π2 ∞ 4
[(π + π 2 ) + (− π + π 2 )] =
+ ∑ (−1)n cos nx
2
3 n =1 n 2
where
f (π − ) = π + π 2 : approaching from the left
and
f (π + ) = f (− π + ) = − π + π 2 : approaching from the right
Therefore, the series converges to
∞
π2
1
=∑ 2
6 n =1 n
(5.49)
at the points of discontinuity.
Another useful result regarding convergence is given below. This result is known
as the Riemann–Lebesgue lemma.
Lemma 5.1
If g(x) is piecewise continuous on a ≤ x ≤ b, then
b
lim ∫ g( x )sin λx d x = 0
λ→∞ a
(5.50)
Proof
Consider
b
I (λ) = ∫ g( x )sin λx d x
a
(5.51)
164
Applied Mathematical Methods for Chemical Engineers
then, if
π
λ
π
sin λx = sin λ  t +  = − sin λt
 λ
x=t+
and I(λ) becomes
I (λ ) = − ∫
b − (π / λ )
a − (π / λ )
π
g  t +  sin λt dt
 λ
(5.52)
But t is a dummy variable in the above equation; therefore, I(λ) can be rewritten as
I (λ ) = − ∫
b − (π / λ )
a − (π / λ )
π
g  x +  sin λx d x

λ
(5.53)
Then adding Equation 5.51 and 5.53 gives
b
b − (π / λ )
a
a − (π / λ )
2 I (λ) = ∫ g( x )sin λx d x − ∫
=∫
π
g  x +  sin λx d x

λ
b
π
g  x +  sin λx d x + ∫
g( x )sin λx d x
a − (π / λ ) 
b − (π / λ )
λ
a
+∫
b − (π / λ )
a
π


 g( x ) − g  x + λ   sin λx d x
If g(x) is continuous in a ≤ x ≤ b, then g(x) is necessarily bounded; that is, there exists
a number M such that |g(x)| ≤ M. Therefore
a

π
a − (π / λ )
∫a−(π / λ ) g  x + λ  sin λx d x = ∫a
g( x )sin λx d x ≤
πM
λ
and
b
∫b−(π / λ ) g( x )sin λx d x ≤
πM
λ
giving
| I (λ ) | ≤
b − (π / λ )
Mπ
π
+∫
g( x ) − g  x +  d x
a

λ
λ
(5.54)
as a consequence. Further, since g(x) is a continuous function on a closed interval
a ≤ x ≤ b, it is uniformly continuous on a ≤ x ≤ b such that
π
ε
g( x ) − g  x +  <


λ
b−a
165
Fourier Series and Integrals
for all λ > Λ and all x in a ≤ x ≤ b. Choosing λ such that πM/λ < ε/2 whenever λ >
Λ gives
| I (λ ) | <
ε ε
+ =ε
2 2
The second result makes use of the Dirichlet kernel, Dn(x), and is given here without
proof.
Lemma 5.2
If a given function g(x) is piecewise continuous on the interval 0 < x < π and the
­right-hand derivative g’R (0) exists, then
π
lim ∫ g( x ) Dn ( x ) d x =
n→∞ 0
π
g(0 + )
2
where Dn(x) is given as
Dn ( x ) +
1 N
+ ∑ cos nx
2 n =1
or
Dn ( x ) =
sin[2n + 1]x /2
x
2sin
2
Example 5.8
This example considers the least-square properties of Fourier series.
Quite often one is interested in approximating a periodic function, f, over a period.
Therefore, the trigonometric partial sum SK , which best approximates such a p­ eriodic
function over one full period, p, is the one for which the total squared error
p
E = ∫ [ f ( x ) − SK ( x )]2 d x
0
(5.55)
is a minimum. This example shows that among all trigonometric sums
SK ( x ) =
A0 K 
nπx
nπx 
+ ∑ An cos
+ Bn sin
2 n =1 
p
p 
SK ( x ) =
A0 K 
nπx
nπx 
+ ∑ An cos
+ Bn sin
2 n =1 
p
p 
the Kth partial sum
of the Fourier series of a periodic function is for every value K the best least-square
approximation to f over one period (and can be extended to any number of periods).
166
Applied Mathematical Methods for Chemical Engineers
Solution
Let
p
E = ∫ [ f ( x ) − SK ( x )]2 d x
0
be the error
_ associated with the particular partial sum Sk(x). Then it is important to
compare E with E. Expansion of Equation 5.55 gives
p
E = ∫ [ f 2 x − 2 f ( x ) SK ( x ) + SK2 ( x )] d x
0
K
p
p
A

nπx
nπx  
= ∫ f 2 ( x ) d x − 2 ∫ f ( x )  0 + ∑  An cos
+ Bn sin
 dx
0
0
p
p  
 2 n =1 
2
K
p A

nπx
nπx  
+ ∫  0 + ∑  An cos
+ Bn sin
 dx
0

2
p
p  
n =1

The integral in the second term simplifies to
K
A A

−2 p  0 0 + ∑ ( An An + Bn Bn ) 
2
n =1


The third term reduces to
 A2 K

p  0 + ∑ An2 + Bn2 
2
n =1


(
)
such that
K
p
A A

E = ∫ f 2 ( x ) d x − 2 p  0 0 + ∑ ( An An + Bn Bn ) 
0
n =1
 2

2
 A2 K

+ p  0 + ∑ An2 + Bn2  dx
2
n =1


(
)
By making the following substitutions
A0 = A0 , An = An , and Bn = Bn
the quantity E becomes
p
 A2 K

E = ∫ f 2 ( x ) d x − p  0 + ∑ ( An2 + Bn2 ) 
0
 2 n =1

_
Subtracting E from E results in
 A − A0  2 K

E − E = p  0
+ ∑ ( An − An )2 + ( Bn − Bn )2  

2 
n =1


_
From
this result, one can conclude that for every possible set of coefficients ­(A n), ( Bn ),
_
E ≥_ E. Further,
_ equality holds only if each squared difference is zero, that is, if and only
if A0 = A0, A n = An, and Bn = Bn, which means that SK ( x ) = Sk(x).
167
Fourier Series and Integrals
5.6 FOURIER INTEGRALS
In the previous sections, some theory and a few applications involving the expansion
of a function f(x) into a Fourier series were discussed. The function f(x) had period 2 L,
with L assumed finite. An important question is what happens when L approaches infinity? Below, this question is explored.
Suppose f(x) satisfies the following conditions:
f(x) and f ′(x) are piecewise continuous in every finite interval (I).
∞
Then
∫−∞ | f ( x ) | d x converges, that is, is absolutely integrable in (−∞, ∞) (II).
∞
f ( x ) = ∫ [ A(ω ) cos ωx + B(ω )sin ωx ]dω
(5.56)
1 ∞
f ( x ) cos ωx d x
π ∫−∞
1 ∞
B(ω ) = ∫ f ( x )sin ωx d x
π −∞
(5.57)
0
where
A(ω ) =
The condition (I) is true if x is a point of continuity of f(x), and f(x) must be replaced
by [f(x+) + f(x−)]/2 if x is a point of discontinuity.
Equation 5.56 is referred to as a Fourier integral expansion of f(x).
Example 5.9
Find the Fourier integral expansion of
 0, x < 0
f ( x ) =  − ax
, a>0
 e , x > 0
Solution
Use Equation 5.52 with
1 ∞
f ( x ) cos ωx d x
π ∫−∞
∞
1
= ∫ e − ax cos ωx d x
π −∞
A(ω ) =
=
and
1 a 
π  a 2 + ω 2 
1 ∞ − ax
e sin ωx d x
π ∫−∞
1
ω 
=  2
π  a + ω 2 
B(ω ) =
168
Applied Mathematical Methods for Chemical Engineers
Therefore, the given function becomes
∞
f ( x ) = ∫ [ A(ω ) cos ωx + B(ω )sin ωx ] dω
0
∞
=∫
0
1 a
ω
cos ωx + 2
sin ωx  dω
π  a 2 + ω 2
a + ω2

Some other useful forms of Fourier’s integral are
f (x) =
and
1 ∞ ∞
f (u) cos ω ( x − u) du dω
π ∫0 ∫−∞
(5.58)
1 ∞ ∞
f (u)e iω ( x − u ) du dω
π ∫0 ∫−∞
(5.59)
f (x) =
Example 5.10
Use Equation 5.59 to find the Fourier representation of
 0, x < 0
f ( x ) =  − ax
 e , x > 0,
a>0
Solution
1 ∞ ∞
f (u)e iω ( x − u ) du dω
2π ∫−∞ ∫−∞
1 ∞ ∞ − ax − iωx iωx
e e e d x dω
=
2π ∫−∞ ∫−∞
f (x) =
where the substitution
f (u)e − iωu du ≡ e − ax e − iωx dx
has been made. However,
∞
∞
1
∫−∞ e− (a+ iω ) x d x = ∫0 e− (a+ iω ) x d x = a + iω
Therefore,
f (x) =
1 ∞ 1
e iωt dω
2π ∫−∞ a + iω
If f(x) is either an odd or an even function, the Fourier integral can be reduced to a sine
or cosine representation. That is, for f(x) odd
f (x) =
∞
2 ∞
sin ωx dω ∫ f (u)sin ωu du
∫
0
0
π
(5.60)
169
Fourier Series and Integrals
and for f(x) even
f (x) =
∞
2 ∞
cos ωx dω ∫ f (u) cos ωu du
∫
0
0
π
(5.61)
Equations 5.60 and 5.61 are the Fourier sine and cosine integral representations of f(x),
respectively.
Example 5.11
Find the Fourier cosine and sine representation of f(t) = e−at, 0 < t < ∞, a > 0.
Solution
Equation 5.61 suggests that
∞
∫0
∞
f (u) cos ωu du ≡ ∫ e − at cos ωt dt
0
=
a
a2 + ω 2
Therefore, the cosine representation of the given function is
f (t ) =
2 ∞ a
cos ωt dω
π ∫0 a 2 + ω 2
Similarly, the sine representation of e−at is
f (t ) =
∞
2
ω
sin ω t dω
π ∫0 a 2 + ω 2
Example 5.12
Find the Fourier cosine integral representation of the function
 1, 0 < x < 1
f (x) = 
 0, x ≥ 1
Solution
From Equation 5.61,
f (x) =
∞
2 ∞
cos ωx dω ∫ f (u) cos ωu du
0
π ∫0
Therefore,
1
2 ∞
cos ωx dω ∫ cos ωu du
∫
0
0
π
2 ∞ sin ω
cos ωx dω
= ∫
π 0 ω
1 = f (x) =
170
Applied Mathematical Methods for Chemical Engineers
The form given by Equation 5.59 is particularly useful, in that if
F (ω ) = ∫
∞
−∞
then
f (x) =
f (u)e − iωu du
1 ∞
F (ω )e iωx dω
2π ∫−∞
(5.62)
(5.63)
Equations 5.62 and 5.63 are the Fourier transform pair, where F(ω) is the Fourier
transform of f(x) and Equation 5.63 is the inverse transform. The customary notation
for the Fourier transform is F{f(x)} and its inverse is denoted by F−1{F(ω)}. These notations will be used in this book.
Again, if f(x) is an odd function, then Equation 5.60 can be reinterpreted as
∞
Fs (ω ) = ∫ f (u)sin ωu du
0
(5.64)
with inverse
f (x) =
2 ∞
Fs (ω )sin ωx dω
π ∫0
(5.65)
Here, Fs(ω) is the Fourier sine transform of f(x). If f(x) is an even function, Equation
5.60 can be reinterpreted as
∞
Fc (ω ) = ∫ f (u) cos ωu du
0
(5.66)
with inverse transform given by
f (x) =
2 ∞
Fc (ω ) cos ωx dω
π ∫0
(5.67)
where Fc(ω) is the Fourier cosine transform of f(x).
Similar to Laplace transforms, there is a convolution theorem for Fourier transforms
[2],[4],[7–9], which states that the Fourier transform of the convolution of two functions
f(x) and g(x) is equal to the product of their Fourier transforms. That is,
F{ f * g} = F{ f ( x )}F{g( x )}
(5.68)
and the convolution obeys the commutative, associative, and distributive laws of algebra. The convolution of the functions f(x) and g(x) is defined to be
f *g = ∫
∞
−∞
f (u) g( x − u) du
Example 5.13
Solve for f(x) in the integral equation given by
∞
∫0
 1 − α , 0 ≤ α ≤ 1
f ( x )sin αx d x = 
α >1
 0,
(5.69)
171
Fourier Series and Integrals
Solution
According to Equation 5.64,
 1 − α , 0 ≤ α ≤ 1
∞
Fs (α ) = ∫ f ( x )sin αx d x = 
0
α >1
 0,
is the Fourier sine transform of f(x). Then, by Equation 5.65,
f (x) =
2 ∞
2 1
Fs (α )sin αx dα = ∫ (1 − α )sin αx dα
π ∫0
π 0
2( x − sin x )
=
πx 2
Example 5.14
If the Fourier transforms of the functions f1(x) and f 2(x) exist, what is the Fourier transform of a1f1 + a2f 2 for a1, a2 constants?
Solution
∞
F{a1 f1 + a2 f2} = ∫ [a1 f1 (u) + a2 f2 (u)]e − iωu du
−∞
= a1 ∫
∞
f1 (u)e − iωu du + a2 ∫
−∞
∞
−∞
f2 (u)e − iωu du
(5.70)
a1F{ f1} + a2 F{ f2}
The linearity property displayed by Example 5.14 is generally true for Fourier transforms and their inverses.
Example 5.15
If f(x) is continuous and f′(x) is at least piecewise continuous on (−∞, ∞), and if
∞
∫−∞ | f ( x ) | d x
and
∞
∫−∞ | f ′( x ) | d x
exist, then show that F{f′(x)} = iωF{f(x)}.
Solution
F{ f ′(u)} = ∫
∞
−∞
f ′(u)e − iωu du = F (ω )
then using integration by parts with
p = e − iωu
and dq = f ′(u) du
172
Applied Mathematical Methods for Chemical Engineers
results in
F{ f ′(u)} = lim [e iωu f (u)]−HH + iω ∫
∞
−∞
H →∞
f (u)e − iωu du
However, f(x) is given as absolutely integrable; therefore, it must vanish at both −∞ and
∞, such that, the final result is
F{ f ′(u)} = iω ∫
∞
−∞
f (u)e − iωu du
= iωF (ω )
(5.71)
The result of this latter example can be extended to the general result
F{ f ( n ) ( x )} = (iω )n F (ω )
(5.72)
as long as successive derivatives of f(x) are continuous and absolutely integrable on
(−∞, ∞).
Additional properties of Fourier transforms can be found in most advanced engineering texts [2],[7],[8].
Example 5.16
Obtain the solution of the initial-value problem of heat conduction in an infinite rod
as described by
∂T
∂2 T
= k 2 , −∞ < x < ∞, t > 0
∂t
∂x
subject to
T ( x ,0) = f ( x )
where T is the temperature distribution and is bounded, and k is a constant representing
diffusivity.
Solution
∞
Let U (ω , t ) = F{T ( x , t )} = ∫ T ( x , t )e − iωx d x
−∞
then the inverse transform is
T (x, t) =
1 ∞
U (ω , t )e − iωx dω
2π ∫−∞
Therefore, the differential equation becomes
dU (ω , t )
+ kω 2U = 0
dt
and the given initial condition becomes
U (ω , 0) = F (ω )
173
Fourier Series and Integrals
This is now a first-order linear ordinary differential equation with
U (ω , t ) = Ce − kω t
2
as its general solution while treating ω as a parameter. The particular solution is
U (ω , t ) = F (ω )e − kω t
2
Using Equation 5.63, the inverse transform is
1 ∞
U (ω , t )e iωx dω
2π ∫−∞
1 ∞
2
=
F (ω )e − kω t e iωx dω
2π ∫−∞
T (x, t) =
This is now in the appropriate form for which the convolution theorem for Fourier
transform is useful to carry out the inversion. That is,
f *g = ∫
∞
−∞
f (u) g( x − u) du
By comparison, g(x) is the inverse of G (ω ) = e − kω t, which has the form
2
1 ∞
G (ω )e iωx dω
2π ∫−∞
1  ∞ − kω 2t iωx
=
e
e dω 

2π  ∫−∞
g( x ) =
=
1  π − x 2 /4 kt 
e

2π  kt

=
1
2
e − x /4 kt
4πkt
Consequently, the final solution is
T (x, t) =
1 ∞
1
 ( x − u) 2 
f (u)
exp  −
 du
∫
−∞

2π
4 πkt
4 kt 
5.7 PROBLEMS
1.Assuming that f(t), f ′(t), f ″(t), and f ‴(t) are continuous and absolutely integrable on (−∞, ∞), show that
a.
F {f ′′ (t)} = iωF {f ′(t)} = (iω)2F(ω)
b.
F {f ‴(t)} = iωF {f ″(t)} = (iω)3F(ω)
174
Applied Mathematical Methods for Chemical Engineers
2.If F(ω) is the Fourier transform of f(t), show that F″(ω) = F{−f(t)}. Hint:
Assume that f(t) is absolutely integrable on (−∞, ∞).
3. What error is made in approximating f(t) = e−t on 0 < t < 1 by the sum of the
first three nonzero terms of its Fourier series?
4.Determine the values of a and b, which make the line y = a + bx the best
least-square approximation to ex on 0 < x < 1, using the least-square crite1
rion given in Example 5.8 E (a, b) = ∫ [e x − (a + bx )]2 d x as the quantity to
0
be minimized. Recall that for E to be a minimum, the quantities ∂E/∂a and
∂E/∂b must both be zero.
REFERENCES
1. Churchill, R.V. and Brown, J.W. Fourier Series and Boundary Value Problems, 4th ed.,
McGraw-Hill, New York, 1987.
2. O’Neil, P.V. Advanced Engineering Mathematics, 4th ed., PWS-Kent, Boston, 1995.
3.Spiegel, M.R. Fourier Analysis with Applications to Boundary Value Problems,
McGraw-Hill, New York, 1974.
4. Myint-U.T. and Debnath, L. Partial Differential Equations for Scientists and Engineers,
3rd ed., Prentice Hall, Englewood Cliffs, NJ, 1987.
5. Giordano, F.R. and Weir, M.D. Differential Equations, a Modeling Approach, AddisonWesley, Reading, MA, 1991.
6.Boyce, W.E. and DiPrima, R.C. Elementary Differential Equations and Boundary
Value Problems, 3rd ed., John Wiley, New York, 1977.
7. Wylie, C.R. and Barrett, L.C. Advanced Engineering Mathematics, 6th ed., McGrawHill, New York, 1995.
8.Greenberg, M.D. Advanced Engineering Mathematics, Prentice Hall, Englewood
Cliffs, NJ, 1988.
9. Zauderer, E. Partial Differential Equations of Applied Mathematics, John Wiley, New
York, 1983.
6
Partial Differential
Equations
6.1 INTRODUCTION
In the previous five chapters, the essential tools necessary to tackle this chapter have
been outlined. Herein, we will follow the “standard mathematician’s MO,” that is, I
will attempt to reduce these new problems (solution of partial differential equations)
to those we already know how to solve (ordinary differential equations).
In the practice of chemical engineering science, there are many problems that
must be described by two or more independent variables. For example, the equations
of change for isothermal systems [1] are
 ∂

∂ρ
∂
∂
= −  ρv x + ρv y + ρvz 
 ∂x

∂t
∂y
∂z


 
Dv

ρ
= −∇p − [∇ ⋅ τ] + ρg
Dt


Dv
 
ρ
= −∇p + µ∇ 2 v + g
Dt
(6.1)
(6.2)
(6.3)
Equation 6.1 is the equation of continuity, and it describes the rate of change of

density at a fixed point resulting from the changes in the mass velocity vector ρv .
Equation 6.2 is the equation of motion, which states that a small volume element
moving with the fluid is accelerated due to the forces acting on it. Equation 6.3 is the
Navier–Stokes equation. These equations together with appropriate boundary and
initial conditions make up a large portion of the research problems that are encountered in chemical engineering.
Equation 6.1 through Equation 6.3 are partial differential equations (PDEs),
as opposed to ordinary differential equations, but the definitions of linearity and
homogeneity remain the same as those given for second-order ordinary differential
equations.
As a reminder, a linear operator L [2–5] must satisfy
L (c1u1 + c2 u2 ) = c1 L (u1 ) + c2 L (u2 )
(6.4)
for any two functions u1 and u2 where c1 and c2 are arbitrary constants. For example,
∂/∂t and ∂2/∂x2 are linear operators since they satisfy
∂
∂u
∂u
(c1u1 + c2 u2 ) = c1 1 + c2 2
∂t
∂t
∂t
175
176
Applied Mathematical Methods for Chemical Engineers
and
∂2
∂2 u1
∂2 u2
(
c
u
+
c
u
)
=
c
+
c
2
1
1
2
2
1
∂x 2
∂x 2
∂x2
The general linear second-order PDE in one dependent variable u and independent variables x and y is
Auxx + Buxy + Cu yy + Dux + Eu y + Fu = G
(6.5)
where the coefficients are functions of x and y and do not vanish simultaneously.
Also, in Equation 6.5 it is assumed that u and the coefficients are twice continuously differentiable in some domain R. If G = 0 in Equation 6.5, then the equation
is homogeneous.
A fundamental property of linear operators (Equation 6.4) allows solutions of
linear equations to be added together. This property is the principle of superposition
and can be stated as follows: Given that u1, u2, …, uk satisfy a linear homogeneous
equation, then an arbitrary linear combination of these, c1u1 + c2u2 + ⋯ + ckuk also
satisfies the same linear homogeneous equation.
The concepts of linearity and homogeneity also apply to boundary conditions (see
definitions in Chapter 4).
In the sections that follow, solution techniques for linear boundary value problems are developed. Specifically, the method of separation of variables in Section 6.2
is illustrated. In Section 6.3, the method of eigenfunction expansion is outlined. In
Section 6.4, the method of Laplace transform is illustrated. The method of combination of variables is outlined in Section 6.5. In Section 6.6, Fourier integrals are
introduced.
Each method is accompanied by at least two worked-out examples demonstrating
the important steps in the construction of a solution to a given problem. Also, the
method of regular perturbation, a technique that can be very helpful in estimating a
solution to some nonlinear problems, is briefly introduced in this chapter.
6.2 SEPARATION OF VARIABLES
Separation of variables is one of the most widely used solution techniques for a
system consisting of a second-order PDE with boundary and/or initial conditions.
This solution technique requires that the PDE be reduced to a system of ordinary
differential equations. The spatial part of the PDE forms the ordinary differential
equation in the resulting boundary value problem. Typically, these boundary value
problems are precisely those Sturm–Liouville problems discussed in Chapter 4. As a
reminder, a boundary value problem consists of a differential equation together with
appropriate boundary conditions. In separating the variables, a substitution is made
that transforms the PDE to an ordinary differential equation. This same substitution
is used to transform the boundary conditions accompanying the PDE into appropriate boundary conditions for the ordinary differential equation.
The time or time-like part of the PDE usually results in an initial value type
problem. The general solution of this initial value problem is then combined with the
177
Partial Differential Equations
eigenfunctions resulting from solving the boundary value problem. Application of
the initial condition usually results in a Fourier series.
In order for this technique to be successfully applied, both the PDE and accompanying boundary conditions must be linear and homogeneous. To demonstrate the
technique, we will consider the following model:
1.One-dimensional rod of length, L, which is laterally insulated.
2.Heat is not internally generated.
3.Rod is uniform with constant density throughout its length.
4.Material of construction has constant specific heat and constant thermal
conductivity.
5.Ends of the rod are kept at a fixed temperature, 0ºK in this case.
6.Rod has an initial temperature distribution that is a function of its length.
This model can be mathematically described for the temperature distribution, u,
by conducting an energy balance over a finite segment of a one-dimensional rod:
 heat energy 
Let ϕ( x , t ) = heat flux 

 surface area ⋅ time 
 heat energy 
Q( x , t ) = heat source 
 volume ⋅ time 
f (b, t)
f (a, t)
x=a
L
x=b
x
u(x, t) = temperature
mass 
ρ( x ) = mass density 
 volume 
 heat energy 
c( x ) = specific heat 
 mass ⋅ degree 
A = cross-sectional area
b
Then the total heat energy is ∫ c ρ u A d x.
a
178
Applied Mathematical Methods for Chemical Engineers
Since

change in
 flow through side


= 
total
heat
energy
edges
at
x
=
a
and
x
=
b


 
heat
generated


+

inside
the
region


(6.6)
d
dt
(6.7)
then we have
∫ a c ρ u A d x = φ(a, t ) A − φ(b, t ) A + ∫ a AQ d x
b
b
b
An ordinary derivative, d/dt is used in Equation 6.7 because ∫ c ρ u A d x depends on
a
t only. Also notice that A is constant and can be divided out.
From calculus, the quantity
b
d b
∂u
c ρ u A d x ≡ ∫ cρ A d x
∫
a
a
dt
∂t
(6.8)
as long as u is continuous and a and b are constants. Also Equation 6.8 holds because
the derivative is taken with x held constant, which means the ordinary derivative is
to be replaced by a partial derivative.
Furthermore, we can observe that
φ(a, t ) − φ(b, t ) = − ∫
b
a
∂φ
dx
∂x
since φ (x, t) is being taken as continuously differentiable. Therefore, Equation 6.7
can be restated as
b

∂u
∂φ

∫a  cρ ∂t + ∂ x − Q d x = 0
(6.9)
From which one can conclude that
cρ
∂u
∂φ
= − + Q( x , t )
∂t
∂x
(6.10)
But
ϕ( x , t ) = −κ
∂u
(Fourier’s law)
∂x
Therefore, upon substitution, we get
∂u κ ∂2 u
∂2 u
Q
x
t
k
=
+
(
,
)
=
+ Q( x , t );
∂t cρ ∂ x 2
∂x 2
κ
=k
cρ
(6.11)
In the present model, we are assuming that heat is not generated, therefore, the term
Q(x, t) = 0, such that the model becomes
l ∂u ∂2 u
=
, 0 < x < L, t > 0
k ∂t ∂ x 2
(6.12)
179
Partial Differential Equations
u(0, t ) = 0
for t > 0
BC :
(6.13)
u( L , t ) = 0,
IC : u( x , 0) = f ( x ), 0 < x < L
(6.14)
where k is thermal diffusivity (L2/time), and these boundary conditions are described
as fixed homogeneous.
Solution
Assume that
u( x , t ) = X ( x )T (t )
(6.15)
where X(x) represents a function of x only and T(t) represents a function of t only.
Then Equation 6.15 can be substituted into Equation 6.12 such that
∂u
dT
= X (x)
= X ( x )T ′(t )
∂t
dt
∂u dX
=
T (t ) = X ′( x )T (t )
∂ x dx
∂2 u d 2 X
=
T (t ) = X ′′( x )T (t )
∂ x 2 dx 2
giving
1
X ( x )T ′(t ) = X ′′( x )T (t ),
k
which can be rewritten as
1 T ′ X ′′
=
k T
X
(6.16)
Now, observe that the left-hand side of Equation 6.16 is a function of t only,
whereas the right-hand side is a function of x only. This can be a true statement only
if Equation 6.16 is equal to a constant. That is,
1 T ′ X ′′
=
=λ
k T
X
(6.17)
where the number λ is called the separation constant. Equation 6.17 can now be
recasted as a system of two ordinary differential equations
1 T′
=λ
k T
(6.18)
X ′′
=λ
X
(6.19)
and
180
Applied Mathematical Methods for Chemical Engineers
To further define λ, we sequentially substitute the BC, Equation 6.13, into 6.15,
thus
u(0, t ) = X (0)T (t ) ⇒
X (0) = 0
where the argument that T(t) is an arbitrary function independent of x has been
applied to conclude that X(0) = 0. The result,
u( L , t ) = X ( L )T (t ) ⇒
X (L) = 0
is arrived at using the same reasoning. Therefore, Equation 6.19 is to be subjected to
the boundary conditions
X(0) = 0
(6.20)
X (L) = 0
(6.21)
and
Equation 6.19 together with Equations 6.20 and 6.21 constitute a homogeneous
boundary value problem as defined in Chapter 4. Furthermore, Equation 6.19,
together with Equations 6.20 and 6.21, is an example of a regular Sturm–Liouville
problem, where p(x) = 1, r(x) = 1, and q(x) = 0. Also, A1 = B1 = 1 and A2 = B2 = 0
for the boundary conditions (Chapter 4). The three cases of λ are examined in the
way of Chapter 4, that is, λ = 0 and λ > 0 both produce the trivial solution. The third
case, λ < 0, say λ = −β 2 gives
X ′′ + β 2 X = 0
X (0) = 0
X (L) = 0
which solves to
λn = −
n2π 2
, n = 1, 2,
L2
and
X n ( x ) = A1,n sin
nπx
L
The numbers defined by λ n are the eigenvalues and the functions Xn(x) are the
corresponding eigenfunctions as discussed in Chapter 4.
Now, attention is given to Equation 6.18, which solves to
Tn (t ) = ce λ n kt
where c is an arbitrary constant.
Therefore, Equations 6.12 through 6.15 result in
nπx  λ n kt

un ( x , t ) =  A1,n sin
 ce

L 
181
Partial Differential Equations
for each n. However, by the principle of superposition the solution of Equations 6.12
and 6.13, using Equation 6.15, can be represented as
∞
u( x , t ) = ∑ Bn sin
n =1
nπx
 n2π 2 
exp  − 2 kt 

 L
L
(6.22)
We now use the given initial condition, Equation 6.14, to define Bn in the following way:
∞
u( x ,0) = ∑ Bn sin
n =1
nπx
= f (x)
L
(6.23)
Equation 6.23 can be recognized as the Fourier sine series representation of f(x).
That is,
Bn =
nπx
2 L
f ( x )sin
d x for n ≥ 1
∫
0
L
L
(6.24)
Therefore, the described model has Equations 6.22 and 6.24 as its solution.
6.2.1 BOUNDARY CONDItIONs
In this section, we will use examples to demonstrate the four standard types (classes)
of boundary conditions that usually accompany a PDE.
Class 1: Bar with zero temperature at both ends
∂u ∂2 u
=
,0 < x < 1, t > 0
∂t ∂ x 2
(6.25)
BC : u(0, t ) = u(1, t ) = 0
(6.26)
 1, 0 < x < 0.5
IC : u( x , 0) = 
 0, 0.5 < x < 1
(6.27)
Solution
Step 1: Substitute u = XT into Equation 6.25 to obtain
and
X ′′
= constant
X
(6.28)
T′
= same constant
T
(6.29)
Interpret the boundary conditions, Equation 6.26, in terms of the substitution u = XT:
u(0, t ) = X (0)T (t ) = 0 and u(1, t ) = X (1)T (t ) = 0
182
Applied Mathematical Methods for Chemical Engineers
Then, for nontrivial solution to exist, we get
X (0) = 0 and X (1) = 0
(6.30)
Step 2: Usually there are three cases of the constant to consider in solving
Equation 6.28. However, in the general model considered in Equation 6.12 through
Equation 6.14, we found out that only the trivial solution resulted if the constant
was zero or positive. Nontrivial solution resulted only for a negative constant, say
−λ2, that is, designating the constant to be −λ 2, Equation 6.28 has general solution
X ( x ) = c1 cos λx + c2 sin λx
Then applying the conditions given by Equation 6.30, we get
λ = nπ, n = 1, 2, 3,
and
X n ( x ) = c2 sin nπx
Step 3: Solve Equation 6.29,
T′
= −λ 2 = − n 2 π 2
T
to get
Tn (t ) = c3 exp(− n 2 π 2t )
Therefore, for each n we have the product solution
un ( x , t ) = X n Tn = Bn sin nπx exp(−n 2 π 2t )
Step 4: By the superposition principle we get
∞
u( x , t ) = ∑ Bn e− n π t sin nπx
2 2
n=1
as the solution to Equation 6.25 and Equation 6.26, with Bn to be determined.
Step 5: Here we determine the constants Bn with the aid of Equation 6.27. That is,
∞
 1, 0 < x < 0.5 
∑ Bn sin nπx =  0, 0.5 < x < 1 
n=1


183
Partial Differential Equations
Then, following the discussion on Fourier series in Chapter 5, we get
2 0.5
1 ⋅ sin nπx d x
1 ∫0
nπ
2 
=
1 − cos 

nπ
2
Bn =
Finally, the solution to the model described by Equations 6.25 through 6.27 is
∞
2 
nπ  2 2
1 − cos  e− n π t sin nπx

2
n=1 nπ
u( x , t ) = ∑
It is important to note that the above models include the fixed homogeneous type
boundary conditions and they both result in a Fourier sine series.
Class 2: Bar with insulated boundaries
As a second model, consider the previous model with one modification. Suppose
we have the situation in which the ends of the rod are insulated instead of being at a
fixed temperature of 0º. Then in this scenario, no heat flows out of, or into, either end.
This is the so-called insulated boundary condition. This new model can be described
using Equation 6.12 as
l ∂u ∂2 u
=
, 0 < x < L, t > 0
k ∂t ∂ x 2
subject to Equations 6.31 and 6.14:
∂u(0, t )
=0
∂x
BC :
for t > 0
(6.31)
∂u( L , t )
=0
∂x
IC : u( x , 0) = f ( x ), 0 < x < L
To solve this new model by the separation of variables technique, the same procedure used above will be followed.
Step 1: Substitute Equation 6.15 into 6.12 to get
X ′′
= constant
X
(6.32)
184
Applied Mathematical Methods for Chemical Engineers
and
T′
= same constant
kT
(6.33)
Also
∂( XT )
= X ′T
∂x
Therefore, the interpretation of the boundary conditions given by Equation 6.31
results in
ux (0, t ) = X ′(0)T (t ) = 0 and ux ( L , t ) = X ′( L )T (t ) = 0
such that
X ′(0) = 0 and
X ′( L ) = 0
(6.34)
for nontrivial solutions.
Step 2: In finding the solution to Equation 6.32, there will be three cases of the
constant to consider.
Case I: Suppose the constant is zero. Then Equation 6.32 becomes
X ′′ = 0
with the general solution
X ( x ) = c1 x + c2
The conditions given by Equation 6.34 when applied to this general solution
result in
X ( x ) = c2 ,
(6.35)
a constant. This implies that the separation constant, or eigenvalue, can be zero.
Case II: Suppose the constant is positive, say λ 2. Then Equation 6.32 becomes
X ′′ − λ 2 X = 0
with general solution
X ( x ) = c3 e λx + c3 e −λx
Applying Equation 6.34 to this general solution results in
185
Partial Differential Equations
c3 = c4 = 0
for λ 2 ≠ 0, and this case yields only the trivial solution. Therefore, the separation
constant, λ, is not positive.
Case III: Here we suppose the constant is negative, say −λ 2. Then Equation 6.32
results in
X ′′ + λ 2 X = 0
with general solution
X ( x ) = c5 cos λx + c6 sin λx
Apply of Equation 6.34 to evaluate c5 and c6, results in c6 = 0 and c5 ≠ 0, and to
obtain a nontrivial solution. That is,
X ′( L ) = 0 = −c5 λ sin λL + c6 λ cos λL
results in
sin λL = 0 ⇒ λL = nπ
nπ
or λ =
, n = 1, 2, 3,
L
and
X n ( x ) = c5 cos
nπx
L
(6.36)
Step 3: Solve Equation 6.33 to get
T (t ) = c7
for the case of the separation constant being zero (Step 2, Case I). Therefore, u(x, t) = XT
produces a constant in the case of a zero separation constant, that is,
u( x , t ) = XT = c2c7 = constant =
A0
2
where A0/2 is used to reemphasize the relationship to a Fourier cosine series as discussed in Chapter 5. In the case of a negative separation constant, Equation 6.33
solves to
Tn (t ) = c8 e − kλ nt
2
186
Applied Mathematical Methods for Chemical Engineers
Then for each n,
un ( x , t ) = X n Tn = An e− k ( nπ/L ) t cos
2
nπx
L
Step 4: By applying the superposition principle, we get the result
nπx
A0 ∞
2
+ ∑ An e− k ( nπ/ L ) t cos
,
2 n=1
L
u( x , t ) =
which is the solution to Equations 6.12 and 6.31. In this case we note that a Fourier
cosine series results when the boundary conditions are of the insulated type.
Step 5: Here we determine the constants An (n ≥ 0) with the aid of the given IC,
in this case Equation 6.14. Thus,
u( x , 0) = f ( x ) =
nπx
A0 ∞
+ ∑ An cos
2 n=1
L
where the constants A0 and An are the coefficients of the Fourier cosine series for f(x)
= u(x, 0). For example, suppose f(x) is given as
 1, 0 < x < 0.5 
f ( x ) = u( x , 0) = 

 0, 0.5 < x < 1 
Then
A0 =
2 0.5
dx = 1
1 ∫0
and for n ≥ 1
An =
0.5
∫0
1 ⋅ cos nπx d x =
2
nπ
sin
nπ
2
Therefore,
1 ∞ 2
nπ
2
u( x , t ) = + ∑ sin e− k ( nπ ) t cos nπx
2 n=1 n
2
Class 3: Bar with periodic boundary conditions
A third model can be created from the first one by considering the mixed or periodic
boundary conditions instead of the fixed temperature at the ends. Here the previously
considered straight rod is formed into a circular ring with perfectly joined ends such
that the temperature is continuous across the joint. That is,
u(− L , t ) = u( L , t )
187
Partial Differential Equations
Also, the derivative of the temperature function, u, with respect to length can be
assumed continuous:
ux (− L , t ) = ux ( L , t )
This new model can be described as
1 ∂u ∂2 u
=
, − L < x < L, t > 0
k ∂t ∂ x 2
(6.37)
u(− L , t ) = u( L , t )
for t > 0
BC:
(6.38)
u x (− L , t ) = u x ( L , t )
IC : u( x , 0) = f ( x ), − L < x < L
(6.39)
Again, the solution procedure is the same as above.
Step 1: Substitute u = XT into Equation 6.37 to get Equations 6.32 and 6.33
below:
X ′′
= constant
X
T′
= same constant
kT
The boundary conditions in Equation 6.38 are interpreted in terms of u = XT to be
X (− L ) = X ( L )
(6.40)
X ′(− L ) = X ′( L )
(6.41)
It should be observed here that Equations 6.32, 6.40, and 6.41 together form a periodic Sturm–Liouville problem on [−L, L] as discussed in Chapter 4.
Step 2: Again there are three cases of the separation constant to consider.
Case I: Separation constant is zero. This gives the solution to Equation 6.32 as
X ( x ) = c1 x + c2
which is subject to the boundary conditions, Equations 6.40 and 6.41. That is, at −L
X (− L ) = −c1 L + c2
188
Applied Mathematical Methods for Chemical Engineers
and at L
X ( L ) = c1 L + c2
such that
X (− L ) = −c1 L + c2 = X ( L ) = c1 L + c2 ⇒ −c1 = c1
Therefore, c1 = 0. Further, since X′ = c1, no new information is obtained except
that
X ( x ) = c2 , a constant
This constant will be conveniently denoted as A0/2 to correspond with the notation for the Fourier series coefficient discussed in Chapter 5. That is,
X (x) =
A0
2
This is taken to mean that zero is an eigenvalue with the corresponding eigenfunction a constant.
Case II: Separation constant is positive, say λ 2. Then, Equation 6.32 gives the
general solution
X ( x ) = c3 e λx + c4 e −λx
Application of Equation 6.40 results in
X (− L ) = c3 e −λL + c4 e λL = c3 e λL + c4 e −λL = X ( L )
or
(c3 − c4 )[e λL − e −λL ] = 0 ⇒ c3 = c4
since eλL ≠ e−λL .
Substitution of Equation 6.41 into the general solution yields
X ′(− L ) = λc3 e −λL − λc4 e λL = λc3 e λL − λc4 e −λL = X ′( L )
(6.42)
But since c3 = c4, Equation 6.42 can be rearranged to give
c3 (e −λL − e λL ) = −c3 (e −λL − e λL ) ⇒ c3 = −c3
Therefore, c3 = 0 = c4. From this, we can conclude that only the trivial solution is
obtained for a positive separation constant.
189
Partial Differential Equations
Case III: Separation constant is negative, say −λ 2. Equation 6.32 then solves to
X ( x ) = c5 cos λx + c0 sin λx
Then, applying Equation 6.40 to Equation 6.43 results in
X (− L ) = c5 cos λL − c6 sin λL = c5 cos λL + c6 sin λL = X ( L )
or
c6 sin λL = 0
and applying Equation 6.41 to 6.43 results in
X ′(− L ) = λc5 sin λL + λc6 cos λL = −c5 λ sin λL + c6 λ cos λL = X ′( L )
which reduces to
c5 sin λL = 0
Therefore, for nontrivial solution to exist
sin λL = 0 ⇒ λL = nπ, n = 1,2,3,
giving the eigenvalues,
λ=
nπ
L
and
X ( x ) = c5 cos
nπx
nπx
+ c6 sin
L
L
are the corresponding eigenfunctions.
Step 3: As before, Equation 6.33 solves to
T (t ) = c7
in the case of the zero eigenvalue and
T (t ) = c8 e −λ kt = c8 e − k ( nπ /L )
2
2t
(6.43)
190
Applied Mathematical Methods for Chemical Engineers
in the case of the negative eigenvalues −λ 2n. In terms of the assumption u(x, t) = XT
we get
nπx
nπx  − k ( nπ /L )2 t

un ( x , t ) =  An cos
+ sin
e
L
L 

for each n.
Step 4: By the principle of superposition, the temperature profile u(x, t) is
given by
u( x , t ) =
A0 ∞ 
nπx
nπx  − k ( nπ/ L )2 t
+ ∑  An cos
+ Bn sin
e
2 n=1 
L
L 
which is the solution to Equations 6.37 and 6.38 with the as-yet-undefined Fourier
coefficients.
Step 5: Application of Equation 6.39 defines the constants A0, An, and Bn. That is,
u( x ,0) = f ( x ) =
A0 ∞ 
nπx
nπx 
+ ∑  An cos
+ Bn sin
2 n=1 
L
L 
where
nπx
1 L
f ( x ) cos
d x, n ≥ 0
∫
−
L
L
L
nπx
1 L
Bn = ∫ f ( x )sin
d x, n ≥ 1
L −L
L
An =
Class 4: Bar with fixed nonhomogeneous time-independent boundaries
So far we have dealt with models that are strictly homogeneous. However, there
are cases of nonhomogeneous problems that can be adjusted in such a way that the
method of separation of variables can still be applied. One such case is that in which
the boundary conditions are nonzero constants (fixed nonhomogeneous). It is important to also note that the initial condition is still being described by Equation 6.14.
This case is illustrated below.
A model can be constructed by maintaining the ends of the rod at fixed nonzero
temperatures, that is, at x = 0, u = T1, and at x = L, u = T2. This model is the so-called
fixed nonhomogeneous, time-independent boundary conditions case. However, the
technique of separation of variables requires the boundary conditions and the differential equation to be homogeneous. Therefore, the model given by Equation 6.12,
l ∂u ∂2 u
=
, 0 < x < L, t > 0
k ∂t ∂ x 2
191
Partial Differential Equations
u(0, t ) = T1
(6.44)
BC :
u( L , t ) = T2 , t > 0
IC : u( x , 0) = f ( x ), 0 < x < L
is a nonhomogeneous problem that must be reduced to a homogeneous one. The
substitution of
u( x , t ) = w( x , t ) + v ( x )
(6.45)
where v(x) and w(x, t) represent the steady state and transient solution, respectively,
reduces Equations 6.12 and 6.44 to
l ∂ w ∂2 w
=
, 0 < x < L, t > 0
k ∂t ∂ x 2
(6.46)
and
w(0, t ) = 0
w( L , t ) = 0, t > 0
(6.47)
with v(x) defined by
v ′′( x ) = 0
v (0) = T1
v ( L ) = T2
(6.48)
(6.49)
Equations 6.46 and 6.47 now form a homogeneous boundary value problem, with
the initial condition given by
w( x ,0) = f ( x ) − v ( x ), 0 < x < L
(6.50)
These models (Equations 6.46 and 6.47) were solved previously with the fixed
homogeneous boundary conditions.
Equation 6.48 together with the boundary conditions given by Equation 6.49 form
the steady-state model, and its solution is given as
v ( x ) = T1 + 

T2 − T1 
x
L 
(6.51)
The final solution of this nonhomogeneous model is given in Table 6.1. Also, the
other discussed models are summarized in the table, according to boundary condition type. Examples demonstrating the use of this table are also given.
192
Applied Mathematical Methods for Chemical Engineers
TABLE 6.1
Typical Boundary Conditions Associated with the Heat Equation
Boundary Conditions
Fixed, homogeneous:
u(0, t) = 0
u(L, t) = 0
Insulated:
ux(0, t) = 0
ux(L, t) = 0
Periodic:
u(−L, t) = u(L, t)
Eigenvalues
λn =
nπ
L
n = 1, 2, 3, …
λn =
nπ
L
n = 0, 1, 2, …
λn =
nπ
L
ux(−L, t) = ux(L, t)
n = 0, 1, 2, …
Fixed, nonhomogeneous:
u(0, t) = T1
λn =
u(L, t) = T2
n = 1, 2, 3, …
nπ
L
Series Solution
∞
u( x , t ) = ∑ Bn e− kλn t sin λ n x
2
n=1
where Bn are the Fourier sine series coefficients
of f(x)
u( x , t ) =
A0 ∞
2
+ ∑ An e− kλn t cos λ n x
2 n=1
where A0 and An are the Fourier cosine series
coefficients of f(x)
u( x , t ) =
A0 ∞
2
+ ∑[ An cos λ n x + Bn sin λ n x ]e− kλn t
2 n=1
where A0, An, and Bn are the Fourier coefficients
of f(x)
u(x, t) = w(x, t) + v(x)
T −T
v ( x ) = T1 +  2 1  x
 L 
∞
w( x , t ) = ∑ Bn e− kλ n t sin λ n x
2
n=1
where Bn are the Fourier sine series coefficients of
f(x) − v(x)
Other models may be developed from different combinations of the boundary
conditions. In those cases, the five steps outlined above should yield the appropriate
solutions, provided the conditions of linearity and homogeneity are satisfied.
There are plenty of examples in this section to illustrate the method of separation
of variables. It is hoped that the reader will explore the references for deeper discussions involving these methods.
Example 6.1
Consider the conduction of heat in a copper rod 100 cm in length whose ends are maintained at 0ºC for all t > 0. Derive an expression for the temperature u(x, t) if the initial
temperature distribution in the rod is
u( x , 0) = 50, 0 ≤ x ≤ 100
and the thermal diffusivity of copper is 1.14 cm2/s.
193
Partial Differential Equations
Solution
This is a case of the model described by Equations 6.12 through 6.14. From Table 6.1,
the fixed homogeneous boundary conditions correspond to eigenvalues
λ=
nπ n π
=
L 100
and series solution
∞
u( x , t ) = ∑ Bn e − k ( nπ /100) t sin
2
n =1
nπx
100
Then, the initial value
∞
u( x , 0) = 50 = ∑ Bn sin
n =1
nπx
100
defines Bn, that is, for n ≥ 1
100
nπx
d x 1 100
nπx
100
∫ 50 sin 100
Bn = 0 100
=
50 sin
dx =
(1 − cos nπ )
π
n
x
2
nπ
50 ∫0
100
sin
100dx
∫0
=
200
(2n − 1)π
Therefore
∞
200
(2n − 1)πx
( 2 n −1)2 π 2 /10 4 t
e −1.14
sin
n
−
π
(2
1)
100
n =1
u( x , t ) = ∑
Example 6.2
Consider an aluminum rod (k = 0.86 cm2/s) of length l, to be previously at the uniform temperature of 25ºC. Suppose that at time t = 0, the end x = 0 is cooled to 0ºC
while the end x = l, is heated to 60ºC, and both thereafter are maintained at those
temperatures.
1. Find the temperature distribution in the rod at any time t.
2.For, l = 20 cm, use the first term in the series for the temperature distribution to find the approximate temperature at x = 5 cm when t = 30 s; when
t = 60 s.
3. Use the first two terms in the series for the temperature distribution to find an
approximate value of u(5, 30). What is the percentage difference between the
194
Applied Mathematical Methods for Chemical Engineers
one- and two-term approximations? Does the third term in the series have
any appreciable effect for this value of t?
4. Use the first term in the series for the temperature distribution to estimate
the time interval that must elapse before the temperature at x = 5 cm comes
within 1% of its steady-state value.
Solution
The model for this phenomenon is
1 ∂u ∂ 2 u
=
, 0 < x < l, t > 0
k ∂t ∂ x 2
subject to
u(0, t ) = 0
BC:
u(l , t ) = 60
IC : ( x , 0) = 25
This is a problem with fixed nonhomogeneous boundary conditions and the eigenvalues and series solution are given in Table 6.1. That is,
u( x , t ) = w( x , t ) + v ( x )
where
T −T
60 x
v ( x ) = T1 +  2 1  X =
 l 
l
and
∞
w( x , t ) = ∑ Bn e − kλ t sin λx
2
n =1
λ=
where
nπ
l
1. To define Bn, the initial condition is applied:
w( x , 0) = u( x , 0) − v ( x ) = 25 −
60 x ∞
nπx
= ∑ Bn sin
l
l
n =1
Therefore, for n ≥ 1
Bn =
nπx
2 l
60 x 
10
dx =
(7 cos nπ + 5)
 25 −
 sin
l ∫0 
l 
l
nπ
and the temperature distribution in the rod at any time t is
u( x , t ) =
60 x ∞ 10
nπx
2
+ ∑ (7 cos nπ + 5)e −0.86( nπ / l ) t sin
π
l
n
l
n =1
195
Partial Differential Equations
2.For, l = 20 cm, x = 5 cm, and t = 30 s, the first term of the series gives
u(5, 30) ≅ 15 +
10
π
(−2)(0.53)sin = 12.6°C
π
4
When t = 60 s,
u(5, 60) = 15 +
10
(−2)(0.28)(0.707) = 13.7°C
π
3. Using the first two terms of the series, we get
u2 (5, 30) = 15 +
10
10
(−2)(0.530)(0.707) +
(12)(0.078) = 14.1°C
π
2π
Then the percentage difference between the one- and two-term approximations is
 u2 (5,30) − u(5,30) 

 × 100 = 11%
u2 (5,30)


For t = 30 s, the third term of the series is −4.876 × 10 −3, which does not have
any appreciable effect on either of the two approximations.
4. Time interval that must elapse before the temperature at x = 5 cm comes
within 1% of its steady-state value with the first term of the series can be
estimated as follows:
u(5, τ) = 15 +
10
(−2)(0.707)e −0.0212 τ
π
where τ indicates the time interval. Then
0.15
= e −0.0212 τ ⇒ τ = 160 s
−4.5
Therefore, a time interval of 160 s would have to elapse before the temperature
at x = 5 cm comes within 1% of the steady-state value.
Example 6.3
Consider a uniform rod of length, l, having an initial temperature distribution given
by f(x), 0 < x < l.
Assume that the temperature at the end x = 0 is held at 0ºC, while the end x = l is
insulated, so that no heat passes through it.
1. Show that the fundamental solutions of the PDE and boundary conditions
are
un ( x , t ) = e − (2 n −1)
2 π 2 kt /4 l 2
sin
(2n − 1)πx
, n = 1,2,3,
2l
196
Applied Mathematical Methods for Chemical Engineers
2. Find a formal series expansion for the temperature u(x, t),
∞
un ( x , t ) = ∑ cnun ( x , t ),
n =1
that also satisfies the initial condition u(x, 0) = f(x).
Solution
The model for this problem is
1 ∂u ∂ 2 u
=
, 0 < x < l,t > 0
k ∂t ∂ x 2
u(0, t ) = 0
t>0
ux (l , t ) = 0
u( x , 0) = f ( x ), 0 ≤ x ≤ l
From Table 6.1, there is no model with this combination of boundary conditions.
Therefore, the method must be directly applied; that is, let
u( x , t ) = X ( x )T (t )
Then, after substitution into the differential equation, one gets
1 T ′(t ) X ′′( x )
=
=λ
k T (t )
X (x)
or the boundary value problem
X ′′ − λX = 0
X (0) = 0
X ′(l ) = 0
and
T′
= λk ⇒ T (t ) = c1e λkt
T
We now consider the three cases of λ that must satisfy the above boundary value
problem.
That is, for λ = 0 we get the general solution
X ( x ) = c2 x + c3
X (0) = 0 = c3
X ′(l ) = 0 = c2 , λ ≠ 0
197
Partial Differential Equations
Suppose λ > 0, say λ = β 2, then
X ( x ) = c4 eβx + c5e −βx
and
X (0) = c4 + c5 = 0 ⇒ c5 = − c4
Therefore
X ( x ) = c4 (eβx − e −βx ) = 2c4 sinh βx
then
X ′(l ) = 2βc4 cosh βl = 0 ⇒ c4 = 0 and c5 = 0
since
cosh βl ≠ 0
Therefore, λ > 0 yields the trivial solution.
As the third case, suppose λ < 0, λ = −α2, then the general solution
X ( x ) = c6 cos αx + c7 sin αx
results;
X (0) = 0 = c6
X ′(l ) = αc7 cos αl = 0
then for nontrivial solution to exist, c7 ≠ 0 and
π
cos αl = 0 ⇒ αl = (2n − 1) , n = 1,2,
2
(2n − 1)π
α=
2l
are the eigenvalues and
X ( x ) = c7 sin
(2n − 1)πx
2l
are the eigenfunctions. Then, for each n
un ( x , t ) = Tn (t ) X n ( x ) = cn e − (2 n −1)
2 π 2 kt /4 l 2
sin
(2n − 1)πx
2l
By the superposition principle,
∞
∞
u( x , t ) = ∑ cnun ( x , t ) = ∑ cn e − (2 n −1)
n =1
n =1
2 π 2 kt /4 l 2
sin
(2n − 1)πx
2l
198
Applied Mathematical Methods for Chemical Engineers
where
∞
f ( x ) = u( x ,0) = ∑ cn sin
n =1
(2n − 1)πx
2l
That is, for n ≥ 1
l
∫0 f ( x )sin
l
(2n − 1)πx
(2n − 1)πx
d x = cn ∫ sin 2
dx
0
2l
2l
or
cn =
2 l
(2n − 1)πx
f ( x )sin
dx
l ∫0
2l
Example 6.4
Consider the model described by
1
ut = uxx , 0 < x < l , t > 0
k
u(0, t ) = 0, ux (l , t ) + γu(l , t ) = 0, t > 0
u( x , 0) = f ( x ) 0 ≤ x ≤ l
(6.52)
where γ is a positive constant.
1.Let u(x, t) = X(x)T(t) and show that
X ′′ − σX = 0, X (0) = 0, X ′(l ) + γX (l ) = 0 (6.53)
and
T ′ − σkT = 0
where σ is the separation constant.
2. Assume that σ is real, and show that Equation 6.53 has only trivial ­solutions
if σ ≥ 0.
3.If σ < 0, let σ = −λ 2, λ > 0. Show that Equation 6.53 has nontrivial solutions
only if λ is a solution of the equation
λ cos λl + γ sin λl = 0 Solution
1. For u(x, t) = X(x)T(t), substitution into the PDE results in
1 T ′ X ′′
=
=σ
k T
X
(6.54)
199
Partial Differential Equations
and
u(0, t ) = X (0)T (t ) ⇒ X (0) = 0
Also
ux ( x , t ) = X ′( x )T (t )
such that
ux (l , t ) = X ′(l )T (t )
But
ux (l , t ) + γu(l , t ) = 0 = X ′(l )T (t ) + γX (l )T (t )
= X ′(l ) + γX (l )
since T(t) is arbitrary. Therefore, we have
X ′′ − σX = 0
subject to
X (0) = 0, X ′(l ) + γX (l ) = 0
and
T ′ − σkT = 0
2. Given that
X ′′ − σX = 0
and
X (0) = 0
X ′(l ) + γX (l ) = 0
then the general solution for the case σ = 0 is
X ( x ) = c1 x + c2
and
X ( x ) = c3e
σx
+ c4 e −
σx
if σ > 0
200
Applied Mathematical Methods for Chemical Engineers
But
X (0) = 0 = c2
and
X ′(l ) + γX (l ) = 0 = c1 + c2 γl ⇒ c1 = 0
Therefore, the case σ = 0 gives only the trivial solution.
Also, for σ > 0, say σ = β 2, β > 0,
X (0) = 0 = c3 + c4
⇒ c4 = − c3
and
X ′(l ) + γX (l ) = c3β(eβl − e −βl ) + γc3 (eβl + e −βl ) = 0
or
c3{2β sinh βl + 2 γ cosh βl} = 0.
Thus, either
β
tanh βl = −1 ⇒ βl < 0 or c3 = 0 but βl > 0, c3 = 0
λ
Therefore, the case σ > 0, also results in the trivial solution.
3. For σ < 0, say σ = −λ 2, λ > 0 then
X ′′ + λ 2 X = 0
X (0) = 0
X ′(l ) + γX (l ) = 0
give
X ( x ) = c5 cos λx + c6 sin λx
X ′( x ) = λc5 sin λx + λc6 cos λx
then
X (0) = 0 = c5 and
X ′(l ) + γX (l ) = 0 = λc6 cos λl + γc6 sin λl
Therefore, for nontrivial solution to exist we must choose c6 ≠ 0 and
λ cos λl + γ sin λl = 0
Example 6.5
In this fifth example for this section, we will consider the temperature distribution in a
circular cylinder of finite length with insulated ends. Also, the lateral surface ρ = c is
kept at a temperature of 0ºK and the initial temperature distribution is a given function
of ρ-only.
201
Partial Differential Equations
z
r
r=c
y
f
u=0
x
For the cylinder shown, the model under consideration for a homogeneous material is
 ∂ 2 u 1 ∂u 
∂u
= k 2 +
∂t
 ∂ρ ρ ∂ρ 
(0 < ρ < c, t > 0)
(6.55)
u(c, t ) = 0 (t > 0)
(6.56)
u(ρ,0) = f (ρ) (0 < ρ < c)
(6.57)
Observe that there is an unstated boundary condition at ρ = 0. However, one can
argue that the temperature must be finite along the axis of the cylinder and so the temperature distribution must be bounded there. Alternatively, the boundary value problem that will result from reducing the PDE is a singular Sturm–Liouville type. That is,
the resulting second-order ordinary differential equation, when put in Sturm–Liouville
form, will satisfy the requirement of ρ(0) = 0. One boundary condition is given by
Equation 6.56 while the other requirement is the solution must be bounded at ρ = 0.
This type was discussed as Class 3, type 1 in Chapter 4.
Solution
Assume a solution of the form
u(ρ, t ) = R(ρ)T (t )
(6.58)
202
Applied Mathematical Methods for Chemical Engineers
then follow the five steps previously given.
Equation 6.55 gives
1 
T′ 1 
=
R′′ + R′  = −λ 2
ρ 
kT R 
That is,
ρR′′(ρ) + R′(ρ) + λ 2ρR(ρ) = 0
(6.59)
subject to
R(c) = 0
and
T ′(t ) + λ 2 kT = 0
(6.60)
Equation 6.59 is Bessel’s equation. Comparing Equation 6.59 with Equation 3.80,
2a − 1 
a 2 − γ 2c 2 

y′′ − 
y′ +  b 2c 2 x 2 c − 2 +
 y = 0
 x 

x2
gives
2a − 1 = −1 ⇒ a = 0, 2c − 2 = 0 ⇒ c = 1
b 2c 2 = λ 2 ⇒ b = λ , a 2 − γ 2c 2 = 0 ⇒ γ = 0
Also, Equation 3.80 has fundamental solutions
y1 = x a J γ (bx c )
and
y2 = x a J − γ (bx c )
where J γ (•) and J_γ (•) are Bessel Functions of the first kind of order γ as ­discussed in
Chapter 3. Since γ = 0 in this case, then we have the zero-order Bessel Functions; that
is, the general solution of Equation 6.59 is
R(ρ) = c1 J 0 (λρ) + c2Y0 (λρ)
where
2
Y0 (λρ) = {ln(λρ/2) + γ}J 0 (λρ)
π
2  λ 2ρ2 λ 4ρ4
λ 6ρ6
1
1 1

+  2 − 2 2  1 +  + 2 2 2  1 + +  − 


π 2
2 ⋅4
2
2 ⋅4 ⋅6 
2 3

(6.61)
203
Partial Differential Equations
and
J 0 (λρ) = 1 −
λ 2ρ2 λ 4ρ4
λ 6ρ6
+ 2 2 − 2 2 2 +
2
2
2 ⋅4
2 ⋅4 ⋅6
It is clear that the function Y0(λρ) is unbounded at ρ = 0. Therefore, to have a
bounded solution, c2 must be chosen as zero. Application of the other boundary condition gives
R(c) = 0 = c1 J 0 (λc) ⇒ J 0 (λc) = 0
for a nontrivial solution to exist. This means that the eigenvalues λ i are defined by
J 0 (λ i c) = 0 for i = 1,2,
(6.62)
and
Rk (ρ) = J 0 (λ i ρ)
are the corresponding eigenfunctions. Furthermore, Equation 6.60 solves to
T (t ) = c3e − λi kt
2
Therefore for each i,
ui (ρ, t ) = Ai J 0 (λ i ρ)e − λi kt
2
and by the principle of superposition
∞
u(ρ, t ) = ∑ Ai J 0 (λ i ρ)e − λi kt
2
i =1
(6.63)
satisfies the given differential equation and boundary conditions. The initial condition
is incorporated as follows:
∞
f (ρ) = ∑ Ai J 0 (λ i ρ) (0 < ρ < c)
i =1
Then, for i ≥ 1,
c
c
∫0 ρf (ρ) J0 (λ iρ) dρ = Ai ∫0 ρ[ J0 (λ iρ)]2 dρ
That is,
c
Ai =
2 ∫ ρf (ρ) J 0 (λ i ρ) dρ
0
c 2 [ J1 (λ i c)]2
(6.64)
Therefore, Equations 6.62 through 6.64 define the solution to the model given by
Equations 6.55 through 6.57.
204
Applied Mathematical Methods for Chemical Engineers
Example 6.6 Nonhomogenous Case
Consider a circular plate that is composed of two different materials in the form of
concentric circles. If the temperature in the plate is described by
∂ 2 u 1 ∂u ∂u
+
=
, 0 < r < 2, t > 0
∂r 2 r ∂r ∂t
(6.65)
u(2, t ) = 100, t > 0
(6.66)
200, 0 < r < 1
u(r , 0) = 
100, 1 < r < 2
(6.67)
Determine the temperature profile u ( r , t ) by making the substitution
u(r , t ) = w(r , t ) + V (r )
(6.68)
The substitution given in Equation 6.68 leads to
∂2 w 1 ∂ w ∂ w
+
=
∂r 2 r ∂r
∂t
(6.69)
d 2V 1 dV
+
=0
dr 2 r dr
(6.70)
u(2, t ) = w(2, t ) + V (2) = 100
(6.71)
and
with
becoming
w(2, t ) = 0,
V (2) = 100
(6.72 and 6.73)
Also, the initial condition becomes
w(r , 0) = u(r , 0) − V (r ) ≡ f (r )
(6.74)
Using separation of variables,
w(r , t ) = R(r )T (t )
(6.75)
Equation 6.69 becomes

1
 R′′ + R′ − λR = 0
r


T ′
 =λ
T
(6.76 and 6.77)
205
Partial Differential Equations
Upon comparing the R-equation with Equation 3.80,
( 2a − 1)
a 2 − γ 2c 2 

y′ +  b 2c 2 x 2 c − 2 +
y=0


x
x2
having linearly independentsolutions
y′′ −
y1 = x a J γ (bx c ), y2 = x a J − γ (bx c )
we arrive at
R(r ) = c1 J 0 (i λ r ) + c2 J −0 (i λ r )
(6.78)
= c1 J 0 (i λ r ) + c2Y0 (i λ r )
Applying the boundary conditions:
R(r ) is bounded at r = 0, then c2 must be chosen as zero because
Y0 (βr ) → ∞ as r → 0 where β = i λ or λ = −β 2
(6.79)
Recalling the discussion on singular Sturm-Liouville problems from Chapter 4, in
this case r = 2 → R(2) = 0 = c1 J 0 (2β).
However, for a nontrivial solution to exist,
0 = J 0 (2β)
which defines the Eigenvalues. That is,
J 0 (2β n ) = 0, n = 1,2,3,
(6.80)
One procedure to determine β n values:
1. Locate a table of values for the zeros of Bessel Functions.
2.Identify the case n = 1 (in this case) and locate the listed zero noting the
order in which they are listed (most tables list smallest first); in this specific
case 2β1 = 2.4048, 2β 2 = 5.5201,
2.4048
= 1.2024.
3.Calculate β1 from step 2 above .i.e. β1 =
2
Finally,
Rn (r ) = c1n J 0 (β nr )
Is the eigenfunction and
wn (r , t ) = Rn (r )Tn (t ) = c1n J 0 (β nr )c2 ne −βnt
2
Then applying the principle of superposition results in
∞
w(r , t ) = ∑ Cn J 0 (β nr )e −βn
n =1
2
206
Applied Mathematical Methods for Chemical Engineers
Also we need to solve (Steady State case) for V (r ) :
d 2V 1 dV
+
=0
dr 2 r dr
Subject to the conditions
V (2) = 100 and V (0) is bounded.
Solution for this part:
V ′′
1
a
= − ⇒ ln(V ′) = − ln r + a1 ⇒ V ′ = e − ln r + a1 ≡ 2
V′
r
r
or V (r ) = a2 ln r + a3
Applying the boundednes condition requires that a2 be chosen as zero, since
ln r → ∞, as r → 0.
Applying the second boundary condition results in
V (r ) = 100
where the initial condition for the unsteady problem can be described by Equation 6.74
w(r , 0) = u(r , 0) − V (r ) ≡ f (r )
Then we can find the Fourier Coefficients by employing Theorem 4.1 property 2,
specifically:
b
∫ r ( x )Φn ( x ) Φm ( x )dx = 0 if
n ≠ m; where r ( x ) is the weighting function.
a
To identify the weighting function for the current problem, we need to rewrite
Equation 6.76 in the Sturm-Liouville form:
1
d
dR
R′′ + R′ − λR ≡  r  − λrR = 0 and compare with
r
dr  dr 
( p( x ) y′ )′ + [ q( x ) + λr ( x )] y = 0
noting that our weighting function is the lambda multiplier r. Therefore in our case,
property 2 becomes
2
∫ rJ0 (βn r )J0 (βm r )dr = 0
0
if n ≠ m; r is the weighting function.
207
Partial Differential Equations
Returning to identify the Fourier Coefficients:
2
2
0
0
∫ u(r , 0) − 100  r J0 (βm r )dr = Cn ∫ r J0 (βm r )J0 (βn r )dr , m ≥ 1
or
2
Cn =
2
∫ u(r , 0) − 100  r J0 (βm r )d ∫ u(r , 0) − 100  r J0 (βm r )d
0
=
2
∫ r J0 (βm r )J0 (βn r )dr
0
2
∫ r J02 (βm r )dr
0
0
From the math tables (e.g., Schaums),
x
x 
n 
2
2
∫ xJn2 (αx )dx = 2 { Jn′ (αx )} + 2  1 − α 2 x 2  { Jn (αx )}
2
2
2
In our case, n = 0, therefore
r2
∫ r J02 (βm r )dr = 2 { J0′ (βm r )}
2
+
2
r2
(1) { J0 (β m r )}
2
But
J 0′ (β m r ) ≡
d
d
 J 0 (β m r )  = β m J 0 () = −β m J1 (β m r )
dr
dr
Since
J 0 (β m r )
is a composite function and
J 0′ ( x ) = − J1 ( x )
Finally,
2
{
}
r2
∫ r J02 (βm r )dr =  2 −βm J1 (βm r )
0
2
+
{
= 2β 2m J12 ( 2β m ) + 2 J 02 ( 2β m )
= 2β 2m J12 ( 2β m )
Therefore the Fourier Coefficients are given by
2
Cm =
∫ [u(r ,0) − 100 ]r J0 (βm r ) dr
0
2 β 2m J12 (2β m )
}
2
2
r2
J 0 (β m r ) 
2
0
m ≥1
, m ≥1
208
Applied Mathematical Methods for Chemical Engineers
however,
∫ x J0 ( x ) d x = xJ1 ( x )
such that
2
Cm =
1
∫ [u(r ,0) − 100 ]r J0 (βm r ) dr ∫ [200 − 100 ]r J0 (βm r ) dr
0
2 β m2 J12 (2β m )
=
0
2 β 2m J12 (2β m )
1
=
=
50 ∫ r J 0 (β m r ) dr
0
β 2m J12 (2β m )
= 50
r J1 (β m r )
1
0
β3m J12 (2β m )
50 J1 (β m )
m ≥1
β3m J12 (2β m )
Summary
∞
u ( r , t ) = w ( r , t ) + V (r ) = 100 + ∑ Cm J 0 (β m r )e −βm
2
m =1
50 J (β m )
where the Cm = 3 21
m ≥ 1.
β m J1 (2β m )
Until now, it has been presumed that the approach that was previously used to
develop Fourier series is valid for use when Bessel Functions are involved. Although
not a formal proof, in the subsequent development the Fourier Series–related approach
will be justified as follows:
Consider the problem given by
∂u
 ∂ 2 u 1 ∂u 
= k 2 +
 , u (1, 0 ) = 0, u ( r , 0 ) = f ( r ) and u ( r , t ) is bounded
 ∂r
∂t
r ∂r 
Then assuming
u (r , t ) = R (r ) T (t )
is a solution leads to
T ′ + kλ 2T = 0, rR′′ + R′ + λ 2rR = 0
Then by comparison to Equation 3.80,

a 2 − γ 2c 2 
 2a − 1 
y′ +  b 2c 2 x 2 c − 2 +
y=0

 x 
x 2 

y′′ − 
we get
a = 0, c = 1, ν = 0 and b = λ
209
Partial Differential Equations
such that
R(r ) = m1J0 ( λr ) + m2Y0 ( λr )
However, Y0 ( λr ) is unbounded at r = 0 and m2 must be chosen as zero.
Therefore a possible solution is
un (r , t ) = m3ne − k λ t m1n J0 ( λ nr ) = Ane − k λn t J0 ( λ nr )
2
2
with
J 0 ( λ n ) = 0, n = 1,2, 3,
defining the eigenvalues by satisfying the condition
u (1, 0 ) = 0.
Applying the superposition principle results in
∞
u (r , t ) = ∑ An e − k n t J0 ( λ nr )
2
n =1
(6.81)
Then applying the given initial condition leads to
∞
f ( r ) = ∑ An J 0 ( λ nr ).
(6.82)
n =1
To determine the values of An, we can consider
Rm = J 0 ( λ m r ) and Rn = J 0 ( λ nr )
as respective solutions of
rRm′′ + Rm′ + λ 2m rRm = 0 and rRn′′ + Rn′ + λ 2nrRn = 0
Multiplying the first equation by Rn , the second by Rm and subtracting
d
( Rm′ Rn − Rn′ Rm ) + ( Rm′ Rn − Rn′ Rm ) = ( λ 2n − λ 2m ) r Rm Rn
dr
or
r
d
{r ( Rm′ Rn − Rn′ Rm )} = ( λ n2 − λ m2 ) r Rm Rn .
dr
Integrating
results in
using
Rm = J 0 ( λ m r ) , Rn = J 0 ( λ nr ) , Rm′ = λ m J 0′ ( λ m r ) , Rn′ = λ n J 0′ ( λ nr )
( λ 2n − λ 2m ) ∫ rJ0 ( λ mr ) J0 ( λ nr ) dr = r ( λ m J0′ ( λ mr ) J0 ( λ nr ) − λ n J0′ ( λ nr ) J0 ( λ mr ))
(6.83)
210
Applied Mathematical Methods for Chemical Engineers
Specifically, if we integrate between 0 and 1, we find that for
λ m ≠ λ n , J 0 ( λ m ) = 0, J 0 ( λ n ) = 0 then
1
(6.84)
∫0 r J0 ( λ mr ) J0 ( λ nr ) dr = 0, m ≠ n.
Therefore multiplying (I) by rJ 0 ( λ m r ) and integrating from 0 to 1 using (IV) results in
1
∞
1
1
0
n =1
0
0
∫ rf (r ) J0 ( λ mr ) dr = ∑ An ∫ rJ0 ( λ mr ) J0 ( λ nr ) dr = Am ∫ rJ02 ( λ mr ) dr.
Now, one can use the eigenvalues to calculate the Fourier Coefficients as needed to
evaluate the solution for any or as many terms as needed.
Example 6.7
In this example a model with a nonzero sink term is examined. That is, consider the
problem described by
∂u 4 ∂ 2 u
=
− Au (0 < x < 9), t > 0
∂t
∂x 2
(6.85)
u(0, t ) = u(9, t ) = 0, t > 0
(6.86)
u( x , 0) = 3 x (0 < x < 9)
(6.87)
where A is a positive constant. Then except for the term −Au, this would be similar to previous problems. One is therefore motivated to find a substitution that will
recast the problem into a familiar homogeneous one. To accomplish this, consider the
substitution
u( x , t ) = w( x , t )e − At
(6.88)
Then Equations 6.85 through 6.87 become
∂ w 4 ∂2 w
=
∂t
∂x2
(0 < x < 9), t > 0
(6.89)
w(0, t ) = w(9, t ) = 0, t > 0
(6.90)
w( x , 0) = 3 x (0 < x < 9)
(6.91)
a problem that can be solved using Table 6.1. From Table 6.1, the case of fixed, homogeneous boundary condition gives
∞
w( x , t ) = ∑ Bn e −4 λ nt sin λ n x
n =1
2
211
Partial Differential Equations
where λ n is defined by
λn =
nπ
, n = 1,2,3,
9
and the Bn are the Fourier sine series coefficients of f(x) = 3x. That is, for n ≥ 1
Bn =
2 9
nπx
2 9
nπx
3 x sin
d x = ∫ x sin
dx
∫
0
9
9
3 0
9
9
=
2
54
nπx  9 
nπx 
2  9x
+   sin
 − cos
 = − cos nπ


9 0
9
nπ
nπ
3  nπ
=
54
(−1)n +1
nπ
Therefore, the solution to Equation 6.85 to 6.87 is
∞
54
nπx
2
(−1)n +1 e −( 4 λ n + A)t sin
n
9
n =1 π
u( x , t ) = ∑
6.3 NONHOMOGENEOUS PROBLEM AND
EIGENFUNCTION EXPANSION
In the previous section, the method of separation of variables was applied to some
problems with special nonhomogeneous terms that could be recasted as homogeneous by using a suitable substitution. In this section, a method will be outlined that
is applicable to those nonhomogeneous problems for which no simple substitution
can be made to remove the nonhomogeneity. This method is called eigenfunction
expansion [3, 4, 6].
Consider the flow of heat in a rod of length L that is uniformly constructed
(Equation 6.11, Section 6.2). Further, the rod has temperature-independent heat
sources distributed in some prescribed way throughout and is time-dependent. In
addition, the temperature at the ends is allowed to be time-dependent. Then, for a
prescribed initial temperature distribution, the following model is appropriate:
∂u
∂2 u
= k 2 + Q( x , t )
∂t
∂x
(6.92)
BC : u(0, t ) = A(t )
(6.93)
u( L , t ) = B(t )
(6.94)
IC : u( x , 0) = f ( x )
(6.95)
Equations 6.92 through 6.94 describe a nonhomogeneous PDE with nonhomogeneous boundary conditions.
212
Applied Mathematical Methods for Chemical Engineers
The associated homogeneous model is given by
∂v
∂2 v
= k 2 + Q( x , t )
∂t
∂x
(6.96)
v (0, t ) = 0
(6.97)
v( L , t ) = 0
(6.98)
v ( x , o) = f ( x )
(6.99)
and was solved in the previous section. Also recall from the previous section that
the associated homogeneous model produced the regular Sturm–Liouville boundary
value problem:
d 2 φn
+ λ n φn = 0
dx 2
(6.100)
φn (0) = 0
(6.101)
φn ( L ) = 0
(6.102)
where λ n = (nπ/L)2 with corresponding eigenfunctions ɸ n(x) = sin(nπx/L). Any piecewise smooth function can be expanded in terms of these eigenfunctions. Again, as in
Chapter 5, by piecewise smooth we mean a function, f(x) say, that is continuous on
the closed interval [a, b] and whose first derivative, f′(x), is continuous on each of the
subintervals xj < x < xj+1 and the limits f ( x +j ) and f ( x −j ) exist. Therefore, even though
u(x, t) satisfies nonhomogeneous boundary conditions, it is valid that
∞
u( x , t ) = ∑ bn (t )φn ( x )
(6.103)
n =1
except at x = 0 and x = L. This means that term-by-term differentiations with respect
to x are not justified because u(x, t) and ɸ n(x) do not satisfy the same homogeneous
boundary conditions. That is,
∂2 u ∞
d 2 φn
≠
b
(
t
)
∑
n
∂ x 2 n =1
dx 2
However, term-by-term time derivatives are valid, such that
∂u ∞ dbn
=∑
φn ( x )
∂t n =1 dt
(6.104)
213
Partial Differential Equations
Therefore, Equation 6.92 becomes
∞
∂2 u
dbn
+
(
,
)
=
φn ( x )
Q
x
t
∑
∂x 2
n =1 dt
k
(6.105)
a generalized Fourier series from which
L
dbn
=
dt
 ∂2 u

∫0  k ∂ x 2 + Q( x , t )  φn ( x ) d x
L
∫0 φn2 ( x ) d x
, n ≥1
and can be rearranged to give
∂2 u
L
dbn
=
dt
∫0 k ∂ x 2 φn ( x ) d x ∫0 Q( x , t )φn ( x ) d x
+
L
L
∫0 φn2 ( x ) d x
∫0 φn2 ( x ) d x
L
(6.106)
The quantity
L
∫0 Q( x , t )φn ( x ) d x
L
∫0 φ2n ( x ) d x
can be evaluated from known information; that is, we know the eigenfunctions ɸ n(x)
from solving Equations 6.96 to 6.98 and Q(x, t) is given in Equation 6.92. The resulting quantity is expected to be a function of t only and is denoted as qn(t). That is,
L
∫ Q( x , t )φn ( x ) d x
qn (t ) = 0 L
∫0 φ2n ( x ) d x
(6.107)
Equation 6.106 may now be simplified to
L
dbn
= qn (t ) +
dt
∫0
∂2 u
φn ( x ) d x
∂x 2
L
∫ φn2 ( x ) d x
k
0
To evaluate the quantity
L
∫0
k
∂2 u
φn ( x ) d x
∂x2
the Sturm–Liouville operator
L≡
d  d
p  +q
dx  dx 
(6.108)
214
Applied Mathematical Methods for Chemical Engineers
is reintroduced. In this problem,
p = 1, q = 0
and
L=
∂2
∂x 2
Further, recall that ∂ = d with t held constant. Then the formula
∂ x dx
b
du 
 dv
∫a [uL(v) − vL(u)]d x = p u dx − v dx a
b
(6.109)
known as Green’s formula, or the integral form of Lagrange’s identity can be used
instead of integration by parts. Therefore, for this problem, we have
L
∫0
L
∂2 u 
∂u 
 ∂2 v
 ∂v
−v 
 u 2 − v 2  d x = u
∂x
∂x
∂
∂
x
x 0

(6.110)
The right-hand side of Equation 6.110 can be evaluated as
 ∂v 
 ∂u 
 ∂v 
 ∂u 
u( L , t )   − v ( L , t )   − u(0, t )   + v(0, t )  
 ∂x x=L
 ∂x x=L
 ∂ x  x =0
 ∂ x  x =0
nπ
nπ nπ
= B(t ) cos nπ − A(t )
= [ B(t )(−1)n − A(t )]
L
L
L
for
v = φn ( x ) = sin
nπx
L
dv ∂ v nπ
nπx
=
=
cos
dx ∂ x L
L
v(0, t ) = φn (0) = 0
v ( L , t ) = φn ( L ) = 0
Therefore, Equation 6.110 becomes
L
∂2 u 
nπ
 d 2 φn ( x )
− φn ( x ) 2  d x = [ B(t )(−1)n − A(t )]
2
dx
L
∂x 
∫0  u
(6.111)
215
Partial Differential Equations
But Equation 6.100 can be rearranged to give
d 2 φn
= −λ n φn
dx 2
such that Equation 6.111 becomes
∂2 u
L
L
∫0 φn ( x ) ∂ x 2 d x = −λ n ∫0 uφn ( x ) d x −
nπ
[ B(t )(−1)n − A(t )]
L
(6.112)
Then, substituting Equation 6.112 into 6.108 gives
∂2 u
L
∫0 k ∂ x 2 φ n ( x ) d x
dbn
= qn (t ) +
L
dt
∫0 φn2 ( x ) d x
nπk
[ A(t ) − (−1)n B(t )]
λ n k ∫ uφn ( x ) d x
0
L
= qn (t ) −
+
L
L
∫ φn2 ( x ) d x
∫ φn2 ( x ) d x
L
0
(6.113)
0
However, Equation 6.103 is also a generalized Fourier series, which means that
for n ≥ 1,
L
∫ u( x , t )φn ( x ) d x
bn (t ) = 0 L
∫0 φ2n ( x ) d x
(6.114)
Therefore, Equation 6.114 can be used to simplify Equation 6.113 to
nπk
[ A(t ) − (−1)n B(t )]
dbn
L
+ kλ n bn = qn (t ) +
L
dt
φ2 ( x ) d x
∫0
(6.115)
n
a linear first-order ordinary differential equation. The required initial condition for
bn(t) comes from Equation 6.95. That is,
∞
u( x ,0) = ∑ bn (0)φn ( x ) = f ( x )
n =1
such that for n ≥ 1
L
∫
b (0) = 0
n
f ( x )φn ( x ) d x
L
∫0 φ2n ( x ) d x
As an illustration on the use of this method, an elementary example follows.
(6.116)
216
Applied Mathematical Methods for Chemical Engineers
Example 6.8
Given the model
∂u ∂ 2 u
+ sin(5 x )e −2t , 0 < x < π, t > 0
=
∂t ∂ x 2
u(0, t ) = 1, t > 0
u(π, t ) = 0
u( x , 0) = 0, 0 ≤ x ≤ π
find the temperature distribution u(x, t).
Solution
The associated homogeneous model is given by Equations 6.96 through 6.98 and the
boundary value problem satisfying the same homogeneous boundary conditions is
given by Equations 6.100 through 6.102.
Then
nπ 2
λn =   = n2
 L
since L = π and the corresponding eigenfunctions are
φn ( x ) = sin (nx )
Also, from the given differential equation
Q( x , t ) = sin (5 x )e −2t
Then the quantity
π
L
π
∫0 φ2n ( x ) d x = ∫0 sin 2 nx d x = 2
and
L
∫ Q( x , t )φn ( x ) d x = 2 e−2t π sin 5x sin nx d x = 0,
qn (t ) = 0 L
∫0
π
∫0 φn2 ( x ) d x
=
2 −2t π 2
e ∫ sin 5 x d x = e −2t
0
π
if n = 5
Further, the other needed quantities are
u(0, t ) = 1, u(π, t ) = 0, v (0, t ) = φn (0) = 0
v (π, t ) = φn (π) = 0
since
if n ≠ 5 (why?)
217
Partial Differential Equations
φn = sin(nx ) = v
dv
= n cos (nx )
dx
Therefore, the RHS of Equation 6.110 evaluates to −n, and Equation 6.115 becomes
dbn
2n
+ n 2 bn = e −2t −
dt
π
subject to
bn (0) = 0
since f(x) = 0. The first-order linear differential equation solves to
b5 (t ) = −
5π + 46 −25t 1 −2t 2
e + e − ,
115π
23
5π
using the integrating factor method described in Chapter 2. Finally, the temperature
distribution is given by Equation 6.103 as
∞
5π + 46 −25t 1 −2t 2 
u( x , t ) = ∑ bn (t )φn ( x ) =  −
e + e −  sin 5 x
23
5π 
 115π
n =1
This method is suitable for nonhomogeneous problems when the nonhomogeneity occurs as a time-dependent source term or as time-dependent boundary
conditions.
If either the differential equation or the boundary conditions is nonhomogeneous,
then direct substitution into Equation 6.103 may be applicable. For example, consider
a plane wall of thickness L that is initially at a uniform temperature Ti. The ambient
temperature on one side of the wall is suddenly changed to a new value of T∞ while
the temperature on the other side of the wall is held at Ti. This can be mathematically
modeled as
∂ 2 u 1 ∂u
=
, 0 < x < L, t > 0
∂ x 2 α ∂t
(6.117)
u(0, t ) = Ti
(6.118)
 ∂u 
−  k  = h[u( L , t ) − T∞ ]
 ∂x x=L
(6.119)
u( x , 0) = Ti
(6.120)
218
Applied Mathematical Methods for Chemical Engineers
The associated homogeneous problem was previously discussed as Example 6.4.
Then since both u(x, t) and ɸ n(x) satisfy the same homogeneous boundary conditions,
∂2 u ∞
d 2φ n ( x )
= ∑ bn (t )
2
dx 2
∂x
n =1
(6.121)
is justifiable, and direct substitution can reduce the computational effort. Also,
∂u ∞ dbn
=∑
φn ( x )
∂t n =1 dt
(6.122)
Then from Example 6.4,
h
φn ( x ) = sin λ n x , λ n = − tan λ n L
k
d 2φ n
= −λ 2nφn
dx 2
Substitution of these quantities, along with Equations 6.121 and 6.122, into
Equation 6.117 gives
∞
∑ 
n =1
dbn
+ αλ n2 bn  φn ( x ) = 0

dt
(6.123)
where Equation 6.103 has been used. Also, the required initial condition on the firstorder linear differential equation given by Equation 6.123 is
∞
u( x , 0) = Ti = ∑ bn (0)φn ( x )
n =1
which is a generalized Fourier series. Then,
L
∫ Ti x1φn ( x ) d x for n ≥ 1
bn (0) = 0 L
∫0 φn2 ( x ) d x
In this case,
L
L
1
L
∫0 φ2n ( x ) d x = ∫0 sin 2 λ n x d x = 2 − 4λ n sin 2λ n L
and
L
L
 1
1

∫0 Tiφn ( x ) d x = ∫0 Ti sin λ n x d x = Ti  λ n − λ n cos λ n L 
Therefore, for n ≥ 1
bn (0) =
2Ti (1 − cos λ n L )

sin 2λ n L 
λn  L −
2λ n 

219
Partial Differential Equations
and
dbn
+ αλ n2 bn = 0
dt
which solves to
bn (t ) =
2Ti (1 − cos λ n L ) −αλ 2nt
e

sin 2λ n L 
λn  L −
2λ n 

Therefore,
∞
2Ti (1 − cos λ n L ) −αλ 2nt
e
sin λ n x

sin 2λ n L 
n =1
λn  L −
2λ n 

u( x , t ) = ∑
So far, the methods that have been outlined are primarily applicable to problems
involving finite space dimensions. In the next section, problems with semi-infinite
domains will be discussed.
6.4 LAPLACE TRANSFORM METHODS
In this section, the method of Laplace transform will be used. The properties of
Laplace transforms, and especially Theorem 3.7 (Section 3.6.1), will be applicable.
The Laplace transform was introduced earlier for use in solving ordinary differential
equations. Now we will emphasize its use in solving PDEs.
Assuming that the Laplace transform of the dependent variable exists, the usual
procedure to solve a PDE is
1.Transform the PDE to an ordinary differential equation.
2. Transform the accompanying boundary conditions to those suitable for use
with the ordinary differential equation.
3.Solve the resulting problem using the techniques discussed (Chapters 1–3).
4.Invert the results to recover the solution to the PDE.
The inversion step can be relatively easy if the terms of step 3 can be located in
a table of Laplace transforms. Without such a convenient table a more difficult technique involving the residue theorem has to be employed (see Example 6.11).
Here, a semi-infinite rod with one end at x = 0 and extending to infinity along the
positive x-axis will be a typical physical model. For example, consider the following
model.
Example 6.9
∂u
∂2 u
= α2 2
∂t
∂x
( x > 0, t > 0) (6.124)
220
Applied Mathematical Methods for Chemical Engineers
u( x , 0) = A
(6.125)
 B, 0 < t < t0
u(0, t ) = 
0, t > t0




(6.126)
Then applying the Laplace transform to Equation 6.124 means
 ∂2 u 
 ∂u 
L   = α 2L  2 
 ∂t 
 ∂x 
giving
 ∂u 
L   = sv ( x , s) − u( x , 0)
 ∂t 
where
∞
v ( x , s) = L{u( x , t )} = ∫ e − st u( x , t ) dt
0
and
 ∂2 u  ∂2
L 2 = 2
 ∂x  ∂x
∂2
∞
∫0 e− st u( x , t ) dt = ∂ x 2 [L{u( x , t )}]
where differentiation is done treating s as a parameter, such that Equation 6.124
becomes
sv ( x , s) − u( x , 0) = α 2
d 2 v( x , s)
dx 2
or
d2v s
A
−
v=− 2
dx 2 α 2
α
(6.127)
using Equation 6.125. It should also be noted that the Laplace transform is carried out
on the variable t while x is treated as a parameter. The general solution of Equation
6.127 is
A
v ( x , s) = c1 (s)e sx / α + c2 (s)e − sx/α +
(6.128)
s
where the arbitrary constants c1(s) and c2(s) may depend on s. For a bounded solution,
the constant c1(s) must be chosen as zero. Also, to determine c2(s), it is necessary to
take the Laplace transform of the given boundary condition, Equation 6.126. That is,
in terms of the unit step function
u(0, t ) = B[1 − U (t − t0 )]
221
Partial Differential Equations
where
 0 if t < t0
U (t − t0 ) = 
1 if t ≥ t0




is the unit step function. Then
L{u(0, t )} = BL{[1 − U (t − t0 )]} =
B B − st0
− e = v (0, s)
s s
Therefore
v (0, s) = c2 (s) +
A B B − st0
= − e
s s s
or
c2 (s) =
B − A B − st0
− e
s
s
such that Equation 6.128 becomes
B − A B − st0  −
v ( x , s) = 
− e e
s
 s

s
x
α
+
A
s
Then taking the inverse transform of Equation 6.129 results in


x
 x 
u( x , t ) = L−1{v ( x , s)} = ( B − A) erfc 
− B erf 
+A
 2α t 
2
α
−
t
t

0 
where the quantities
erfc( x ) = 1 − erf( x ) =
2
π
∞
∫x e − ξ
2
dξ
and
erf( x ) =
2
π
x
∫0 e− ξ
2
dξ
are the complementary error function and error function, respectively.
As a second example illustrating the method, consider the following:
Example 6.10
∂u
∂2 u
= α2 2
∂t
∂x
( x > 0, t > 0)
(6.129)
222
Applied Mathematical Methods for Chemical Engineers
subject to
u(0, t ) = 1 (t > 0)
u( x ,0) = 0 ( x > 0)
Then, as a procedure, the first step is to transform the PDE. Thus
∂2 v
 ∂2 u 
 ∂u 
L   = sv ( x , s) − u( x ,0) = α 2 L  2  = α 2 2
∂x
 ∂t 
 ∂x 
resulting in an ordinary differential equation
α2
d2v
= sv ( x , s)
dx 2
since, in this case, the initial value is zero. The second step is to find the general solution of the ordinary differential equation, resulting in
v ( x , s) = c1 (s)e − (
s /α) x
+ c2 e(
s /α) x
and observe that a bounded solution is expected, in which case the arbitrary constant,
c2(s) in this case, must be chosen as zero. The remaining constant in the equation can
be determined by taking the Laplace transform of the left boundary condition and
comparing that result to
v (0, s) = c1 (s)
That is,
L{u(0, t )} = L{1} =
1
s
so that
v (0, s) = c1 (s) =
1
s
Therefore
1 − sx
v ( x , s) = e α
s
The third step is to invert the Laplace transform or find the inverse transform of v(x,
s) with the aid of a table [7] to get
 1 − s x 
 x 
u( x , t ) = L−1  e α  = erfc 
 2α t 
 s

where erfc(•) was defined in the previous example.
223
Partial Differential Equations
This third example demonstrates the flexibility of the Laplace transform method
over the separation of variables method to efficiently solve some PDE problems when
the domain is finite.
Example 6.11
Consider
∂u ∂ 2 u
=
, 0 < x < 1, t > 0
∂t ∂ x 2
subject to
u(0, t ) = 1, t > 0
u(1, t ) = 0, t > 0
u( x ,0) = 0, 0 < x < 1
First, take Laplace transform of the given differential equation to get
d 2 v( x , s)
= sv ( x , s) − u( x ,0)
dx 2
which reduces to
d 2 v( x , s)
= sv ( x , s)
dx 2
(6.130)
where use of the initial condition is made and
∞
v ( x , s) = L[{u( x , t )}] = ∫ e − st u( x , t ) dt
0
To find the constants of integration for the general solution to Equation 6.130, the
Laplace transform of the boundary conditions are needed. That is,
1
s
L{u(1, t )} = v (1, s) = 0
L{u(0, t )} = v (0, s) =
Then, the general solution of Equation 6.130 can be represented as
v ( x , s) = c1 (s)sinh x s + c2 (s) cosh x s
Employing the transformed boundary conditions gives
v (1, s) = 0 = c1 (s)sinh s + c2 (s) cosh s
224
Applied Mathematical Methods for Chemical Engineers
which can be rearranged to give
c1 (s) = −
c2 (s) cosh s
sinh s
Then, use of the second boundary condition gives
v (0, s) =
1
= c1 (s)sinh(0) + c2 (s) cosh(0)
s
which results in
c2 (s) =
1
s
Therefore
c1 (s) = −
1 cosh s
s sinh s
The solution may now be represented as
v ( x , s) = −
1 cosh s
1
sinh x s + cosh x s
s sinh s
s
=
1 sinh s cosh x s − cosh s sinh x s
s
sinh s
=
1 sinh[(1 − x ) s ]
s
sinh s
Then
 sinh[(1 − x ) s ] 
u( x , t ) = L−1{v ( x , s)} = L−1 

 s sinh s 
2 ∞ (−1)n − n2 π 2t
e
sin nπ(1 − x )
= 1− x + ∑
π n =1 n
As a note, the quantity 1 – x can be represented in its Fourier sine series form to be
1− x =
Another example follows.
2 ∞ 1
∑ sin nπx
π n =1 n
225
Partial Differential Equations
Example 6.12
Solve: uxx = uy in y > 0, 0 < x < a,
subject to: u(x, 0) = 1, u(0, y) = u(a, y) = 0
Solution
Consider the Laplace transform of u with respect to y, that is,
∞
u ( x , s) = ∫ e − syu( x , y) d y
0
Then the differential equation and time-like condition transforms to
uxx = su − 1 ⇔
d 2u
= su − 1
dx 2
The general solution to the transformed ordinary differential equation is
u ( x , s) = c1e
sx
+ c2 e −
sx
+ c3
⇔ k1 cosh sx + k 2 sinh sx + c3
The particular constant c 3 can be evaluated by the method of undetermined
coefficient, while the arbitrary constants k1 and k 2 must be evaluated from the transformed boundary conditions on x. Following this procedure, u(x, s) is given by
1 cosh s ( x − a2 )
u ( x , s) = −
sa
s
s cosh
2
The first term can be located in a table of Laplace transforms. The second term
requires a little more effort, say, the residue theorem. That is, let
a
sa
P ( x , s) = − cosh s  x −  , Q(s) = s cosh

2
2
Then the residue at s = 0 is lim sP ( x , s)/Q(s) = −1. For s ≠ 0, the residue is given by
s→ 0
ρn ( y) =
P ( x , s n ) sn y
e
Q ′ ( sn )
Q′(s) = cosh
sa a s
sa
sinh
+
2
4
2
To determine the sn, Q(s) is set equal to zero, that is,
cosh
sa e
=
2
sa /2
+ e−
2
sa /2
=0
226
Applied Mathematical Methods for Chemical Engineers
simplifies to
e
sa
= −1
But the natural logarithm of a negative real number represents a multiple-­valued
function [8–10]. That is, if z = ew, w = ln z = ln r + i(θ + 2nπ), n = 0, ± 1, ± 2, … where
z = reiθ = rei(θ + 2nπ). However, in our case, θ = π, r = 1 and
sa = i(π + 2nπ), n = 0, 1, 2,
Therefore
sn = −(1 + 2n)2 π 2 /a 2
Finally,
4 sin[(1 + 2n)πx / a] [ − (1+ 2 n )2 yπ 2 / a2 ]
e
(1 + 2n)π
ρn ( y) =
Therefore, the final result is
4 sin[(1 + 2n)πx /a]exp[− (1 + 2n)2 yπ 2 /a 2 ]
(1 + 2n)π
n=0
∞
u ( x , y) = ∑
Additional examples involving the use of the residue theorem are discussed in
Chapter 7.
Example 6.13
Consider the problem given by
∂u ∂ 2 u
=
, 0 < x < 1, t > 0
∂t ∂ x 2
Subject to the boundary conditions
u ( 0, t ) = 0; u (1, t ) = 0
and the initial condition
u ( x ,0 ) = 100.
Then if we choose to use the methods of Laplace Transform to determine the profile, u ( x , t ) , we start with the definition
{
}
∞
L u ( x , t ) = Y ( x , s ) ≡ ∫ e − s t u ( x , t ) dt
0
227
Partial Differential Equations
such that
 ∂2 u 
 ∂u 
L = L 2 
 ∂t 
 ∂x 
Then the left-hand side is
 ∂u 
L   = sY ( x , s ) − 100
 ∂t 
while the right-hand side is
∞
d 2Y ( x , s )
 ∂2 u  ∂2
L  2  = 2 ∫ e − s t u ( x , t ) dt =
dt 2
 ∂x  ∂x 0
Therefore we get the transformed partial differential equation to become
d 2Y
− sY = −100,
dx 2
which is now an ordinary differential equation. To complete the process of transforming the problem we need to transform the boundary conditions as well. Therefore
L {u ( 0, t )} = Y ( 0, s ) = 0
and
L {u (1, t )} = Y (1, s ) = 0
Finally the Laplace transformed partial differential equation and boundary conditions result in
d 2Y
− sY = −100,
dx 2
Y ( 0, s ) = 0 and Y (1, s ) = 0
Using methods of solution of linear second order ordinary differential equations
that were discussed in Chapter 3:
Yg ( x , s ) = YP ( x , s ) + k 2 cosh sx + k3sinh sx
In this case the particular solution is a constant and is determined as discussed in
Chapter 3.
YP ( x , s ) = k1
228
Applied Mathematical Methods for Chemical Engineers
must satisfy
d 2YP
− sYP = −100,
dx 2
resulting in
k1 =
Yg ( x , s ) =
100
s
100
+ k 2 cosh sx + k3sinh sx
s
Applying the boundary conditions results in
k2 = −
(
)
(
)
100 cosh s − 1
100
and k3 =
s
s sinh s
Finally the solution in the Laplace domain is
Y ( x, s) =
100 cosh s − 1
100 100
−
cosh sx +
sinh sx
s
s
s sinh s
To determine the solution in the time domain we need to invert the Laplace Transform.
{ }
(
)
100

100 cosh s − 1
100
− L−1 
cosh sx +
sinh sx 
s
s sinh s

 s
100 sinh( x − 1) s 100sinh sx 
= 100 + L−1 
−

s sinh s
s sinh s 

Y ( x , s ) = L−1
Make use of the residue theorem.
Example 6.14
This example demonstrates one approach to inverting the Laplace transform when
Bessel Functions are involved.
∂Ψ 0 ∂ 2 Ψ 0 1 ∂Ψ 0
=
+
∂τ
∂ξ 2
ξ ∂ξ
Ψ 0 = 1 at τ = 0
Ψ 0 is finite at ξ = 0; and −
∂Ψ 0
= w at ξ = 1
∂ξ
229
Partial Differential Equations
Let
L {Ψ 0 ( ξ, τ )} = u ( ξ, s )
(6.131)
Then the partial differential equation is transformed to the ordinary differential
equation
su ( ξ, s ) − 1 =
d 2u 1 du
+
dξ 2 ξ dξ
(6.132)
subject to the transformed boundary conditions
u ( ξ, s ) is finite at ξ = 0
−
du w
at ξ = 1.
=
dξ s
(6.133)
(6.134)
This results in a general solution:
1
u ( ξ, s ) = a1 J 0 i s ξ + a2Y0 i s ξ + ; a1 and a2 are arbitraryconst . (6.135)
s
(
)
(
)
It helps to recall that
Y0 ( x ) =

2
2  x2
x4  1 
x6  1 1 
ln ( x 2) + γ} J 0 ( x ) +  2 − 2 2 1 + + 2 2 2 1 + +  −  ,
{





2 3
2 246
π
π 2 2 4
γ = 0.5772156… is Euler ’s const
where
J0 ( x ) = 1 −
x2
x4
x6
+ 2 2 − 2 2 2 +
2
2 2 i4 2 i4 i6
(
)
Then if we notice Y0 i s ξ is unbounded as ξ → 0 , hence a2 must be chosen as
zero, in order for the solution to be bounded. This reduces Equation 6.135 to
(
)
u ( ξ, s ) = a1 J 0 i s ξ +
1
s
(6.136)
Applying the boundary condition Equation 6.134,
−
du w
w
= ⇒ a1 =
dξ s
s i sJ1 i s
( )
(6.137)
such that Equation 6.136 becomes
u ( ξ, s ) =
(
) +1
( ) s
w J0 i s ξ
s i sJ1 i s
(6.138)
230
Applied Mathematical Methods for Chemical Engineers
Inverting Equation 6.138,
(
)
( )
 w J 0 i s ξ 
Ψ 0 ( ξ, τ ) = 1 + L−1 

 s i sJ1 i s 
(6.139)
To complete the inversion, we first simplify the ratio and then apply the Residue
theorem.
Rewriting the Bessel Functions in series format, the fraction in Equation 6.139
results in
s 3ξ 6
s 3ξ 6
 sξ 2 s 2 ξ 4
 sξ 2 s 2 ξ 4


w 1 + 2 + 2 2 + 2 2 2 + ...  w 1 + 2 + 2 2 + 2 2 2 + ... 
wJ 0 (i sξ )
2
24 246
2
24 246




=
=
(6.140)
2
s3
s
s
1
si sJ1 (i s)


 s s2

− s  + 2 + 2 2 + ... 
− s 2  + 2 + 2 2 + ... 
2 2 4 2 4 6

2 2 4 2 4 6

Equation 6.140 without the quantity w can be further expressed as
s 3ξ 6
 sξ 2 s 2 ξ 4

1 + 22 + 22 4 2 + 22 4 262 + ... 
= A0 + A1s + A2 s 2 + ...
s2
1 s

−  + 2 + 2 2 + ... 
2 2 4 2 4 6

(6.141)
or as
s 3ξ 6
s2
 sξ 2 s 2 ξ 4
  1 s

2
1 + 22 + 22 4 2 + 22 4 262 + ...  =  − 2 − 22 4 − 22 4 26 − ...  ( A0 + A1s + A2 s + ...) =


 
s2
s2
 1 s

 1 s

A 0  − − 2 − 2 2 − ...  + A1s  − − 2 − 2 2 − ... 
(6.142)
 2 24 246

 2 24 246

s2
 1 s

+ A2 s 2  − − 2 − 2 2 − ...  + ...
 2 24 246

Equating the coefficients of both sides of Equation 6.142 results in the following:
A0
= 1,
2
A0 = −2
(6.143)
A0
A ξ2
− 1= ,
2 •4 2 2
1 1
A1 = ( − ξ 2 )
2 2
(6.144)
−
−
2
A0
A
A
ξ4
− 2 1 − 2 = 2 2,
2
2
2 •4 •6 2 •4 2 2 •4
1 2


 1 ( 2 − ξ ) ξ4 
A2 =  2 −
−
224
22 4 
4 6


(6.145)
231
Partial Differential Equations
Therefore, the ratio can now be explicitly expressed in a form that exposes the
singularities (Poles):
s 1
1 1
ξ4 


 1
w  −2 +  − ξ 2  + s 2  2 − 2  − ξ 2  − 2 2  + 






2
2
4
6
2
4
2
2
4
wJ 0 (i s ξ) P (s)

=
= 
−s2
si sJ1 (i s ) Q(s)
The Residue theorem can now be applied to find the inverse Laplace transform.
Recalling that the Inverse Laplace transform of a function F(s) can be written as
Equation 3.97,
∞
f ( t ) = L−1 [ F ( s )] = ∑ ρn ( t )
1
where Equation 3.98 defines the residues
ρn ( t ) =
P ( s n ) sn t
e
Q ' ( sn )
and Q ' ( sn ) is the value of dQ evaluated at the singular point of interest. Recall that
ds
P ( sn )
P (s)
P (s)
= lim ( s − sn )
= lim
Q ' ( s n ) s → sn  Q ( s ) − Q ( s n )  s → sn
Q (s)


s − sn


When sn is a multiple pole of order m of F(s), then

t2
β t m −1 
ρn ( t ) = e snt β1 + β 2t + β3 + ... + m
2!
( m − 1)! 

(3.99)
where
1
d m −i
( s − s n ) m F ( s ) 

s→ sn ( m − i )! ds m − i 
βi = lim
Applying Equation 3.99 at the singularities (m = 2) , when s = 0 ,
ρ0 (t) = e 0 t  β1 + t β2 
β1 = lim
s −> 0
d  s 2 wJ 0 (i s ξ) 
=
ds  si sJ1 (i s ) 

1  1 2  ξ4 
s  1 2 2  1


 w  −2 +  − ξ  + s  2 − 2  − ξ  − 2 2  + ...  
2 2
46 24 2
24
d  2 
  = w  1 − ξ2 
lim


s

2
s −> 0 ds
22
s




232
Applied Mathematical Methods for Chemical Engineers
and
 s 2 wJ 0 (i s ξ) 
β 2 = lim 
=
s −> 0 si sJ (i s )
1



s1
1  1 2  ξ4 


2
2 1
 w  −2 +  − ξ  + s  2 − 2  − ξ  − 2 2  + ...  
2
2
4
6
2
4
2
2
4

  = − 2w
lim s 2 

s −> 0
s2




Such that the Laplace inverse at s = 0 is
ρ0 ( τ ) = e 0 τ (β1 + τβ 2 ) =
w  1 2
 − ξ  − 2 wτ
22
For the case s ≠ 0,
(
) = P ( ξ, s )
( ) Q (s)
w J0 i s ξ
s i sJ1 i s
with
( )
Q ( s ) = s i sJ1 i s = 0
resulting in
( )
J1 i s = 0.
If we let
i s = λ ⇒ s = −λ 2
then,
J1 ( λ n ) = 0, n = 1,2,3,
defines the eigenvalues. Also,
d
 s i sJ1 i s 

ds 
3
1
d
= i sJ1 i s + is 3/2 s −1/2  J1 i s  2
2
ds
And using a set of tables [7], the derivative of the Bessel function J1 ( x ) can be
simplified:
( )
Q ( s ) = s i sJ1 i s ⇒ Q′ ( s ) =
( )
( )
J1′( x ) =
1
[ J0 ( x ) − J2 ( x )]
2
( )
233
Partial Differential Equations
J2 ( x ) =
2
J1 ( x ) − J 0 ( x ) ; such that J1′( x ) = J 0 ( x ) − 1 J1 ( x )
x
x
Therefore, the inverse
(
)
( )
(
)
( )
∞ wJ λ ξ
 w J0 i s ξ  w  1

n


0
2
e −λn τ
L−1 
 =  − ξ 2  − 2 wτ +
2
λ


2
2
si
sJ
i
s
n
n =1
1

J0 λ n

∑
2
and the final solution is given in Example 6.15.
Example 6.15
This example is another demonstration of inverting the Laplace Transform when
Bessel Functions are involved.
Given
(

(
s2
)
 P ( x, s)

≡
J0 i a s  Q ( s )
 J0 i x s

L−1 
(
)
(
)
where P ( x , s ) = J 0 i x s and Q ( s ) = s 2 J 0 i a s
(
)
Q′ = 2 s J0 i a s + s 2
)

a 
d
 J0 i a s  = 2 s J0 i a s + s 2  −i
 J0 i a s

ds 
 2 s
(
)
(
)
(
(
)
a
J0 i a s
2 s
= 2 s J 0 i a s − s 2i
(
Setting Q ( s ) = 0 in order to determine the poles
(
)
(
)
0 = s 2 J 0 i a s ⇒ s = 0,0 or J 0 i a s = 0
For the case s = 0 the residues can be determined by Equation 3.99:
m

t m −1 Am 
t i −1 Ai
t2
S t
ρn ( t ) = e Sn t  A1 + tA2 + A3 +  +
 = e n ∑ Ai
2!
( m − 1)! 
( i − 1)!
i =1

where
1
d m −i
[(s − sn )m F (s)]
s→ sn (m − i )! ds m − i
Ai = lim
)
)
234
Applied Mathematical Methods for Chemical Engineers
In the present case, m = 2:
1
d 2−1
[(s − sn )2 F (s)]
s→ s 0 (2 − 1)! ds 2−1
A1 = lim
J0 (i x s ) 
1
d 2−1 

(s − 0)2 2
2
−
1
s→ s 0 (2 − 1)! ds

s J0 (i a s ) 

= lim
To further evaluate this limit, it helps to know that
J0 ( x ) = 1−
x2
x4
x6
+
−
+
22 22 i 4 2 22 i 4 2 i 62
J1 ( x ) =
x5
x7
x
x3
− 2 + 2 2 − 2 2 2 +
2 2 i4 2 i4 i6 2 i4 i6 i 8
J0′ ( x ) ≡
d
 J ( x ) = − J1 ( x )
dx  0 
Therefore


d  2 J0 ( i x s ) 
(s ) 2
s→s 0 ds 
s J0 ( i a s ) 
A1 = lim



−J i a s i x
 0
2 s

= lim 
s→s 0




(
)
( )
3


i x s3 2
i x s −
 + J i x s ia
+
0
 2

22 i 4
2 s


2
 J0 i a s 


(
(
)
)
3


i a s3 2
i a s −

+
 2

22 i 4







( )
2
2

 ix
 ia 
 −1 ⋅   + 1 ⋅   
 2
 2   x 2 a2

= ⋅
2
= 4 − 4
(1)






and

J0 (i x s ) 
1 d1−1
 =1
[(s − 0)2 F (s)] = lim (s − 0)2 2
1
1
−
s→ 0 (1 − 1)! ds
s→ 0 
s J0 (i a s ) 
A2 = lim

Therefore
ρ0 (t ) =
x 2 − a2
+t
4

235
Partial Differential Equations
−λ 2n
, n = 1,2,3,
a2
Remark: J0 ( x ) = 0 means that each value of x is a zero (or root) of the Bessel function.
For the case s ≠ 0,
J0 (i a s ) = 0, letting λ n = i a sn ⇒ sn =
Then
Q ′ = − s 2i
(
)
 J0 i x s
 2
s J0 i a s


L−1
(
)
a
2 s
J1 (i a s ) =
−λ n  −λ n2 
J (λ )
2  a 2  1 n
xλ  2

∞
∞ J0
 a n  − λa2n t
 P ( x, s) 
1 2
−1
2
2
e
≡ L 
 = ρ0 + ∑ ρn ( t ) = ( x − a ) + t + 2a ∑ 3
4
 Q (s) 
n =1 λ n J1 ( λ n )
n =1

Example 6.16
In this example on the use of Laplace transforms to solve the heat equation, we will use
tabulated inversions as well as the residue theorem to invert the transforms. Consider
the problem given by
∂2 y ∂ y
= , 0 < x < 1, t > 0
∂ x 2 ∂t
y ( o, t ) = o, y (1, t ) = u0 , t > 0
y ( x , 0 ) = 0, 0 < x < 1
Applying the Laplace Transform results in
d 2U
− sU = 0
dx 2
(6.146)
subject to the transformed boundary conditions
U ( 0, s ) = 0 and U (1, s ) =
u0
; where L { y ( x , t )} = U ( x , s )
s
The general solution to Equation 6.146 can be represented as
U ( x , s ) = m1 cosh
(
)
sx + m2 sinh
(
sx
)
Then following application of the boundary conditions leads to
U ( x , s ) = u0
)
s sinh ( s )
sinh
(
sx
(6.147)
236
Applied Mathematical Methods for Chemical Engineers
Equation 6.147 can then be restated as
u0
) =u
s sinh ( s )
sinh
(
sx
0
 e sx − e − sx 
 e( x −1) s − e −( x +1)

 = u0 
s
− s
−2 s
)
 s ( e − e ) 
 s (1 − e
s



However,
1
1 − e −2
s
=
∞
∑ e−2n s
n=0
such that
sinh ( sx ) ∞  e −(2 n+1− x )
=

s sinh s n∑
s
=0 

s
−
e −(2 n+1+ x ) s 

s

Therefore, one can locate the error functions in a table for each term:
(
)
( )
∞
 sinh sx 
  e −( 2 n +1− x ) s  −1  e −( 2 n +1+ x ) s  
y ( x , t ) = u0 L−1 
 = u0 ∑  L−1 
− L 

s
s




n=0 
 s sinh s 
(6.148)
∞

 2n + 1 − x 
 2n + 1 + x  
= u0 ∑ erfc 
− erfc 
 2 t 
 2 t  
n=0 
Alternatively, we could start with Equation 6.147 and apply the residue theorem:
P ( x , s ) = sinh sx , Q ( s ) = s sinh s ; Q′ ( s ) = sinh s +
s
cosh s
2
Then the poles of Q ( s ) are located at
s = 0 or sinh s = 0
The residues at those poles are
 s −1/2



 x 2 cosh sx 
sinh sx
ρ0 = lim (s − 0)
 = 1lim 
=x
s→ 0 
s sinh s  s→0  s −1/2 cosh s 

2


and for
s ≠ 0, sinh s = 0 ⇒ s = i λ
sin λ = 0 ⇒ λ = nπ , n = 1, 2, 
Therefore,
237
Partial Differential Equations
 sinh

y ( x ,t ) = u0 L−1 
(
 s sinh
sx ) 
∞
∑
 = xu0 + 2u0
s 
n =1
( )
sin ( nπx ) e − n2π2t
n
(6.149)
It now remains to show that Equations 6.148 and 6.149 are equal, an exercise that is
left to the reader.
Example 6.17
This is a Bessel-related example in which the boundary conditions are somewhat more
complicated.
Given that a uniform solid sphere of radius 1 at an initial constant temperature u0
throughout is dropped into a large container of fluid that is kept at a constant temperature u1 ( u1 > u0 ) for all time. Since there will be heat transfer across the boundary r =1,
the temperature profile u ( r , t ) in the sphere can be described by the model
∂ u ∂ 2 u 2 ∂u
=
+
,
∂ t ∂ r 2 r ∂r
0 < r < 1, t > 0
(6.150)
∂u
= − h u(1, t ) − u1  ,0 < h < 1
∂r r =1
(6.151)
where u1 is a constant fluid temperature
u(r , 0) = u0
u(r , t )
0 < r <1
is bounded as r → 0
(6.152)
(6.153)
Using Laplace Transform Methods,
∞
y (r , s) = L {u(r , t )} = ∫ e − st u(r , t )dt
0
The partial differential equation transforms to
d 2 y 2 dy
+
dr 2 r dr
(6.154)
dy
u
= − h  y(1, s) − 1 
dr
s

(6.155)
s y − u0 =
subject to
at r = 1:
and
y(r , s) is bounded as r → 0
(6.156)
Then Equation 6.154 can be restated as
d 2 y 2 dy
+
− sy = −u0
dr 2 r dr
(6.157)
238
Applied Mathematical Methods for Chemical Engineers
The associated homogeneous differential equation can be solved by comparing with
Equation 3.80:
d 2 y 2 dy
+
− sy = 0
dr 2 r dr
2a − 1 = −2 ⇒ a = − 1 2
2c − 2 = 0 ⇒ c = 1
a 2 − γ 2c 2 = 0 ⇒ γ 2 = 1 4 , γ = ± 1 2
b 2c 2 = − s ∴ b = ± i s
1
1
∴ yc (r , s) = m, r − 2 J 1 (i s r ) + m2 r − 2 J 1 (i s r )
2
2
k
k
= 1 cosh s r + 2 sinh s r
r
r
assuming y p = k3 , y′p = y′′p = 0 .
Substitution into Equation 6.154 gives
uc
= k3
s
k
u
k
∴ y(r , s) = 1 cosh s r + 2 sinh s r + c
r
r
s
− sy p = − u0 ⇒ y p =
(6.158)
Using Equation 6.157, y(r , s) is bounded as r → 0, which implies that k1 must be
­chosen as zero, since cosh s r → ∞ as r → 0, such that
u
k2
sinh s r + 0
r
s
 s cosh( sr ) 1

y′ = k 2 
− 2 sinh( sr ) 
r
r


y(r , s) =
at r = 1,
u
dy
= − h  y(1, s) − 1 
s
dr

u u
k2  s cosh s − sinh s  = − h  k2 sinh s + 0 − 1 
s s

h
= − h k2 sinh s − (u0 − u)1
s
or
h
k2 { s cosh s − sinh s + h sinh s } = − (u0 − u1 )
s
or
h
− (u0 − u1 )
s
k2 =
s cosh s + (h − 1)sinh s
h
− (u0 − u1 )sinh( s r ) 1 u
s
∴ y(r , s) =
⋅ + 0
s cosh s + (h − 1)sinh s r s
239
Partial Differential Equations
Then
u(r , t ) = L−1 { y(r , s)} = L−1
= u0 +
{ }
(u1 − u0 ) h sinh( s r )
u0
1 

+ L−1 

s
r  s( s cosh s + (h − 1)sinh s ) 
∞

sinh s r
h(u1 − u0 ) −1 
P ( s n , r ) sn t
L 
e
⇔∑
r
 s( s cosh s + (h − 1)sinh s )  n = 0 Q′(sn )
Letting P (sn , r ) = sinh s r
and
Q(s) = s( s cosh s + (h − 1)sinh s )
s( s cosh s + (h − 1)sinh s = 0 ⇒ s = 0 or
s cosh s + (h − 1)sinh s = 0 for s ≠ 0 ⇒ s + (h − 1) tanh s = 0
s
− s
,h > 1
=
h −1 1− h
i sin λ
= iλ; s = −λ 2n , n = 1,2,....
s = iλ, then tanh(iλ) = iλ or
cos λ
tanh s =
If
−λ n
h −1
in the case s = 0,
tan λ n =
s sinh s r
0
=
s(cosh s + (h − 1)sinh s ) 0
r 12
s cosh s r
r
r
2
= lim
=
=
1
1
1
1
1
1
s→ 0
s 2 cosh s + s ⋅ s 2 sinh s + (h − 1) s 2 cosh s 1 + h − 1 h
2
2
2
ρ0 = lim
s→ 0
for s ≠ 0,
1 1
Q′(s) = s cosh s + (h − 1)sinh s + s  s 2 cosh s
2
1 −1
1 −1
1
+ s 2 ⋅ s 2 sinh s + (h − 1) s 2 cosh s 
2
2

s
s
1
=
cosh s + sinh s + (h − 1) s cosh s
2
2
2
1
=  h s cosh s + s sinh s 
2
i
1
=  h iλ n cos λ n − λ 2ni sin λ n  = (h λ n cos λ n − λ 2n sin λ n )
2
2
240
Applied Mathematical Methods for Chemical Engineers
Now

 h
sinh s r
 r ∞ P ( s n , r ) e sn t 
h
(u1 − u0 ) L−1 
 = (u1 − u0 )  + ∑

r
 h n = 1 Q ′ ( sn ) 
 s  s cosh s + (h − 1)sinh s   r


2
i sin (λ n r ) e − λ n t
h
r ∞

= (u1 − u0 )  + ∑

i
r
h
2
=
n
1
(hλ n cos λ n − λ n sin λ n ) 



2
However,
iλ n cos λ n + i(h − 1)sin λ n = 0 ⇒ λ n cos λ n = (1 − h)sin λ n
= − (h − 1)sin λ n
∴ hλ n cos λ n = − h(h − 1)sin λ n
resulting in
∞
r

e − λ n t sin (λ n r )
h
(u1 − u0 )  + 2∑

2
r
n =1 [ − h(h − 1) − λ n ] sin λ n 
h
2
∞
r

sin (λ n r )e − λ n t
h
(u1 − u0 )  + 2∑

2
(1
)
sin
−
−
λ
λ
r
h
h
h
n]
n
n =1 [

2
Finally,
2
∞
r

h
sin(λ nr )e − λ n t
u(r , t ) = u0 + (u1 − u0 )  + 2∑

2
r
n [ h(1 − h) − λ n ] sin λ n 
h
∞
sin(λ nr )e − λ n t
h
= u0 + u1 − u0 + 2 (u1 − u0 )∑
2
r
n [ h(1 − h) − λ n ] sin λ n
2
∞
sin(λ nr )e − λ n t
h
= u1 + 2 (u1 − u0 )∑
2
r
n [ h(1 − h) − λ n ] sin λ n
2
6.5 COMBINATION OF VARIABLES
Another technique that is sometimes employed to reduce partial differential equations to ordinary differential equations is combination of variables or a similarity
transformation.
The process of normalization can be used to establish the applicability of combining the independent variables of the given PDE.
Example 6.18
This example considers the flow of a fluid near a wall suddenly set in motion.
Following [1], the problem statement is as follows:
A semi-infinite body of liquid with constant density (ρ) and viscosity (μ) is bounded
on one side by a flat surface (the xz-plane). Initially, the fluid and the solid surface are at
241
Partial Differential Equations
rest, but at time t = 0, the solid surface is set in motion in the positive x-direction with
a velocity V (shown below).
y
t < 0, fluid at rest
V
t = 0, wall, set in motion
Vx( y, t)t > 0, fluid in
unsteady flow
One would like to know the velocity profile as a function of y and t. If there is no
pressure gradient or gravity force in the x-direction and the flow is laminar, then this
simplified problem can be solved in the following way.
Solution
In rectangular coordinates (x, y, z)
∂ρ ∂
∂
∂
+
(ρv x ) + (ρv y ) + (ρvz ) = 0
∂t ∂ x
∂y
∂z
(6.159)
is the equation of continuity [1]. The x-component equation of motion in terms of
velocity gradients for a Newtonian fluid with constant ρ and μ is [1]
 ∂v
 ∂2 v
∂v
∂v
∂v 
∂P
∂2 vx ∂2 vx 
+ ρgx
ρ  x + v x x + v y x + vz x  = −
+ µ  2x +
+
 ∂t
 ∂x
∂x
∂y
∂z 
∂x
∂ y2
∂ z 2 
However,
v y = vz = 0 and v x = v x ( y, t )
such that Equation 6.159 reduces to
∂vx
=0
∂x
(6.160)
242
Applied Mathematical Methods for Chemical Engineers
and Equation 6.160 reduces to
∂vx
∂2 vx
=γ
∂t
∂ y2
(6.161)
where γ = μ/ρ. The initial and boundary conditions are
at t ≤ 0, v x = 0 for all y
(6.162)
at y = 0, v x = V
for all t > 0
(6.163)
at y = ∞, v x = 0 for all t > 0
(6.164)
vx
= φ( η)
V
(6.165)
y
4 γt
(6.166)
Now suppose
where
η=
such that
∂( v x / V )
1η
=−
φ′;
2t
∂t
∂ 2 ( v x / V ) η2
= 2 φ′′
∂ y2
y
then Equation 6.161 becomes
ϕ′′ + 2 ηφ′ = 0
(6.167)
φ = 1 at η = 0
(6.168)
φ = 0 at η = ∞
(6.169)
subject to
Note that the initial and boundary conditions are combined to form Equation 6.169.
Equation 6.167 solves to give the general solution
η
φ( η) = c1 ∫ e − η d η + c2
2
0
where the lower limit of the integral is a convenient selection. However, notice
that an alternate choice of lower limit would only affect c 2, but c 2 is an arbitrary
constant.
243
Partial Differential Equations
With the aid of Equations 6.168 and 6.169, the solution to Equation 6.167 is
φ( η) = 1 −
2
π
η
∫0 e− η
2
 y 
d η = 1 − erf 
 4 γt 
(6.170)
where the error function
erf( x ) =
2
π
x
∫0 e− ξ
2
dξ
was defined in the previous section.
The combination of variables or similarity transformation approach can be a very
useful technique when one is confronted with transport problems where one is interested in what happens at relatively short times or the system is very large and one
boundary either does not exist or is indistinct. Further discussion of these and other
types of problems that employs this technique can be found in [17].
Example 6.19
This example considers a semi-infinite solid, which is subjected to a step change in its
surface temperature T [11].
Suppose the model can be described by
1 ∂T ∂ 2 T
=
α ∂t ∂ x 2
(6.171)
T (0, t ) = Tc
(6.172)
lim T ( x , t ) = Ti
(6.173)
with
and
x →∞
as boundary conditions, and the initial condition given by
T ( x ,0) = Ti
(6.174)
Further, suppose that the normalized variables are
T=
T − Ti
x
, x=
T0
x0
and
t =
t
t0
(6.175)
Substitution into Equation 6.171 gives
x 02 ∂T ∂ 2 T
=
αt0 ∂ t ∂ x 2
(6.176)
244
Applied Mathematical Methods for Chemical Engineers
Equation 6.172 can be restated as
T (0, t ) =
Tc − Ti
T0
then the choice of T0 = Tc − Ti gives
T (0, t ) = 1
(6.177)
Equation 6.173 and Equation 6.174 become
lim T ( x , t ) = 0
(6.178)
T ( x ,0) = 0,
(6.179)
x →∞
and
respectively.
Equation 6.176 can be further simplified if the quantity
x 02
αt0
is taken as 1, since neither x0 nor t0 has been assigned any physical significance (see
Chapter 8 on scaling). That is, if
x 02
=1
αt0
then Equation 6.176 becomes
∂T ∂ 2 T
=
∂t ∂x 2
(6.180)
and a possible choice of a combined variable is
ξ=
x 2 ( x / x 0 )2 x 2  t0  x 2
=
=  2 =
t
t / t0
t  x 0  αt
(6.181)
Using Equation 6.181, the conditions described by Equation 6.178 and 6.179 can
now be collapsed into one condition similar to Equation 6.169, namely,
T ( ∞) = 0
(6.182)
since ξ → ∞ as x → ∞ or t → 0.
Therefore, Equation 6.171 or 6.180 can be reduced to a second-order ordinary differential equation following substitution of Equation 6.181.
Given that a combined variable is available, its substitution into the PDE can be a
delicate process and is demonstrated below.
245
Partial Differential Equations
Example 6.20
This example considers the model described by Equation 6.171, subject to
T = T0
at t = 0 for all x
(6.183)
T = Ts
at
x = 0 for all t
(6.184)
T → Ts , t → ∞, x > 0
(6.185)
T → T0 , x → ∞, t > 0
(6.186)
and further suppose that the combined variable is
η=
x
4αt
(6.187)
Then
T ( x , t ) = f ( η)
(6.188)
dT ( x , t ) = df ( η)
(6.189)
which implies that
The chain rule applied to Equation 6.187 gives
∂T
∂T
df
dx +
dt =
dη
∂x
∂t
dη
(6.190)
also, the total derivative of η(x, t) gives
dη =
∂η
∂η
dx +
dt
∂x
∂t
(6.191)
such that Equation 6.190 becomes
∂T
∂T
∂η 
 ∂η
dx +
dt = f ′( η)  dx +
dt
∂x
∂t
x
∂
∂t 

Then equating like coefficients of both sides gives
dx :
∂T
∂η
= f ′( η)
∂x
∂x
(6.192)
dt :
∂T
∂η
= f ′( η)
∂t
∂t
(6.193)
246
Applied Mathematical Methods for Chemical Engineers
To find the second derivative, the following device is useful:
let
H (x,t) =
∂T
∂x
and φ( η, t ) = f ′( η)
(6.194)
∂η
∂x
(6.195)
then
dH ( x , t ) = dφ(ρ, t )
(6.196)
such that
∂H
∂H
∂φ
∂φ
dη + dt
dx +
dt =
∂x
∂t
∂η
∂t
that is,
∂H
∂H
∂φ  ∂η
∂η  ∂φ
dx +
dt =
dx +
dt + dt

∂x
∂t
∂η  ∂ x
∂t  ∂t
and equating like coefficients of both sides results in
dx :
∂ H ∂φ ∂η
=
∂ x ∂η ∂ x
and
dt :
∂ H ∂φ ∂η ∂φ
=
+
∂t ∂η ∂t ∂t
Therefore
∂ 2 T ∂φ ∂η
 ∂η 
=
= f ′′( η)  
 ∂x 
∂ x 2 ∂η ∂ x
2
since ∂η is independent of x. Finally, Equation 6.171 becomes
∂x
f ′( η)
∂η
 ∂η 
= αf ′′( η)  
 ∂x 
∂t
2
or
f ′′( η) + 2 ηf ′( η) = 0
using Equation 6.187.
(6.197)
247
Partial Differential Equations
6.6 FOURIER INTEGRAL METHODS
In chemical engineering, the use of Fourier integrals to solve problems is not as popular as separation of variables or Laplace transform. This is due to the fact that the
incorporation of the boundary conditions associated with a particular application can
usually be very challenging. For instance, consider a slab of finite thickness undergoing some heat transfer phenomena. Suppose the phenomena can be described by
V
∂T ∂2 T ∂2 T
=
+
∂ x ∂ x 2 ∂ y2
∂T
| y = ±1 = ± qe x / δ , x < 0
∂x
∂T
| y = ±1 = ± qe − x / ∆
∂y
(6.198)
(6.199)
T (−∞, y) = 0
(6.200)
T (0, ± 1) = 1
(6.201)
and
Then, using Fourier transforms, Equation 6.198 becomes
∂2 θ
− ω 2 θ − iωVθ = 0
∂ y2
(6.202)
where
∞
θ(ω , y) = ∫ T ( x , y)e − iωx d x
−∞
is defined by Equation 5.62. The general solution of Equation 6.202 includes two
arbitrary constants, one of which can be eliminated based on the fact that the temperature field is symmetric. That is, the solution to Equation 6.202 reduces to
θ(ω , y) = c1 cosh (ω 2 + iωV ) y
Transforming the conditions given by Equation 6.199 results in
0
∞
∂θ
x
| y =1 = ∫ q exp  − iωx  d x + ∫ q exp(−( x / ∆) − iωx ) d x ,
−∞
0
δ

∂y
which integrates to
∂θ
1
1


| y =1 = q 
+

∂y
 (1 / δ) − iω iω + (1 / ∆) 
(6.203)
248
Applied Mathematical Methods for Chemical Engineers
Therefore, Equation 6.203 becomes
1
1
1

 

θ(ω , y) = q 
+
  (ω 2 + iωV ) sinh (ω 2 + iωV ) 
1
/
δ
−
i
ω
i
ω
+
(1
/
∆
)

 

× cosh (ω 2 + iωV ) y
Application of Equation 5.63 gives the inverse transform
T ( x , y) =

cosh (ω 2 + iωV ) y exp(iωx ) dω
q ∞


∫
2π −∞  [(1 / δ) − iω ] (ω 2 + iωV ) sinh (ω 2 + iωV ) 
+
cosh (ω 2 + iωV ) y exp(iωx )dω
q ∞
2π ∫−∞ [iω + (1 / ∆)] (ω 2 + iωV ) sinh (ω 2 + iωV )
(6.204)
There are some cases of practical value for which Fourier integrals can be helpful.
Example 6.21
This example considers a semi-infinite thin slab whose surface is insulated.
Suppose that the surface temperature of the bar is initially f(x), and a temperature of
zero degrees is suddenly applied to the end x = 0 and is maintained.
1. Show that the solution to this boundary value problem can be represented as
u( x , t )
∞ ∞
1
2
=
f ( v )e − kλ t sin λv sin λx d λ d v
π ∫0 ∫0
2.If f(x) is a constant, say u 0, show that
x
u( x , t ) = u0 erf 
kt 
2

Solution
The boundary value problem can be described by
∂u
∂2 u
= k 2 x > 0, t > 0
∂t
∂x
u( x ,0) = f ( x ), u(0, t ) = 0, | u( x , t ) | < M (due to physical reasons)
By separation of variables, the differential equation has a solution of the form
u( x , t ) = e − kλ t ( A cos λx + B sin λx )
2
249
Partial Differential Equations
Using the condition at x = 0 reduces the solution to
u( x , t ) = e − kλ t ( B sin λx )
2
Since there are no restrictions on λ, B can be replaced by a function B(λ). Further,
integration over λ from 0 to ∞ can be carried out analogous to the superposition principle that was applied to discrete values of λ. Therefore, a possible solution is
∞
u( x , t ) = ∫ B(λ )e − kλ t sin λx d λ
2
0
Application of the condition at t = 0 results in
∞
u( x ,0) = f ( x ) = ∫ B(λ )sin λx d λ
0
which is an integral equation for the determination of B(λ). This integral equation can
be interpreted with the aid of Equation 5.64, suggesting that f(x) is an odd function. In
which case,
B( λ ) =
2 ∞
2 ∞
f ( x ) sin λx d x = ∫ f ( v ) sin λv d v
π ∫0
π 0
Therefore
∞
u( x , t ) = ∫ B(λ )e − kλ t sin λx d λ =
2
0
2 ∞ ∞
2
f ( v )e − kλ t sin λv sin λx d λ d v
π ∫0 ∫0
Since
1
sin λv sin λx = [cos λ ( v − x ) − cos λ ( v + x )]
2
then
1 ∞ ∞
2
f ( v )e − kλ t [cos λ( v − x ) − cos λ( v + x )] d λ d v
π ∫0 ∫0
∞
∞
1 ∞
2
2
= ∫ f ( v )  ∫ e − kλ t cos λ ( v − x ) d λ − ∫ e − kλ t cos λ ( v + x ) d λ  dv
0

 0
π 0
u( x , t ) =
But
∞
∫0 e−αλ
2
cos βλ d λ =
1 π −β2 /4 α
e
2 α
Therefore
u( x , t ) =
∞
1  ∞
2/4
2/4
f ( v )e − ( v − x ) kt d v − ∫ f ( v )e − ( v + x ) kt 
0

2 πkt  ∫0
250
Applied Mathematical Methods for Chemical Engineers
Letting ( v − x )/2 k t = p in the first integral and ( v + x )/2 k t = p in the second
integral, u(x, t) reduces to
u( x , t ) =
1  ∞
π  ∫− x /2
f (2 p k t + x )e − p d p − ∫
2
kt
∞
− x /2 kt
2
f (2 p k t − x )e − p d p 

but f(x) is a constant and can be taken outside of the integrals, thus giving
∞
u0  ∞
2
2
e− p d p − ∫
e − p d p 
∫

−
x
kt
x
/2
/2 kt

π
u0 x /2 kt − p2
2u0 x /2 kt − p2
=
e dp =
e d p = u0 erf( x / 2 kt )
π ∫− x /2 kt
π ∫0
u( x , t ) =
From the very brief introduction of Fourier integrals in Chapter 5 together with the
above examples, the engineer should get the sense that these integrals are more useful
for general problems than specific practical problems. When the various transforms
are to be employed, one has to be careful in making sure that the boundary conditions
can be utilized a priori.
6.7 REGULAR PERTURBATION APPROACHES
Sometimes a problem is encountered in which the governing equation is almost identical to a simpler problem that one already knows how to solve. Hopefully, some
modification of the new problem can resolve the difference and lead to useful results.
Example 6.22
This example considers a model for a species A in a reacting system [12]:
1 ∂  r ∂CA  ∂  ∂CA 

+ 
 =0
r ∂r  ∂r  ∂ z  ∂ z 
(6.205)
where r and z are the radial and axial coordinates, respectively, as shown in Figure 6.1.
Suppose Equation 6.205 is subject to the following boundary conditions:
∂CA
= 0 at z = 0
∂z
(6.206)
∂CA
= 0 at r = 0
∂r
(6.207)
CA ( RW, z ) = CABi ; 0 < z < δ
(6.208)
− DAB
∂
kC C
CA = 1 A tot
∂z
K + K ′CA
at z = δ
(6.209)
251
Partial Differential Equations
2d
r
Gas
z
L
FIGURE 6.1
CVD Reactor.
Then, except for Equation 6.209, the method of separation of variables is applicable.
Observe that the terms of the denominator of the right-hand side of Equation 6.209
are all positive physical quantities. That is, the right-hand side of Equation 6.209 is
expected to have a power series expansion. First, the variables are redefined in terms
of dimensionless quantities by
CA (r , z )
= F ( ξ , ζ)
CABi
where
ξ=
r
z
δ
; ζ= ; a=
Rw
δ
Rw
Then Equations 6.205 through 6.209 become
−1 ∂ 2 F ∂ 2 F 1 ∂ F
=
+
a 2 ∂ζ 2 ∂ξ 2 ξ ∂ξ
(6.210)
∂ F (ξ,0)
=0
∂ζ
(6.211)
∂ F (0, ζ)
=0
∂ξ
(6.212)
F (1, ζ) = 1
(6.213)
− DABCABi ∂ F (ξ,1)
= Reaction rate (heterogeneous)
δ
∂ζ
(6.214)
Consider the heterogeneous reaction rate expression to be
rate = k 0CABi (1 − εF + ε 2 F 2 − ε 3 F 3 + )
(6.215)
F = F0 + εF1 + ε 2 F 2 + 
(6.216)
where
and
ε=
K ′CA0
<1
K
(6.217)
252
Applied Mathematical Methods for Chemical Engineers
The otherwise nonlinear problem can be reduced to a set of linear problems by
substituting Equations 6.215 and 6.216 into Equations 6.210 through 6.214 to get
 ∂ 2 F0 ε ∂ 2 F1
−1  ∂ 2 F0
∂2 F
∂ 2 F2
∂ 2 F2
+ ε 21 + ε 2
+  =
+
+ ε2
2 
2
2
2
2
a  ∂ζ
∂ζ
∂ζ
∂ξ
∂ξ 2
 ∂ξ

∂F
∂F
1  ∂F
+  +  0 + ε 1 + ε 2 2 + 
ξ  ∂ξ
∂ξ
∂ξ

(6.218)
∂ F0
∂F
∂F
+ ε 1 + ε 2 2 +  = 0 at ζ = 0
∂ζ
∂ζ
∂ζ
(6.219)
∂ F0 ε ∂ F1
∂F
+
+ ε 2 2 +  = 0 at ξ = 0
∂ξ
∂ξ
∂ξ
(6.220)
F0 + εF1 + ε 2 F2 +  = 1 at ξ = 1
(6.221)
−

DABCABi  ∂ F0
∂ F1
∂ F2
2
 ∂ζ + ε ∂ζ + ε ∂ζ + 
δ
= k 0CABi [1 − ε( F0 + εF1 + ε 2 F2 + )
+ ε 2 ( F0 + εF1 + ε 2 F2 + )2 + O(ε 3 ) ]
(6.222)
Then equate like powers of ε in both the differential equation and the given conditions as follows:
ε0 : −
1 ∂ 2 F0 ∂ 2 F0 1 ∂ F0
=
+
a 2 ∂ζ 2
∂ξ 2 ξ ∂ξ
∂ F0 (ξ,0)
=0
∂ζ
∂ F0 (0, ζ)
=0
∂ξ
F0 (1, ζ) = 1
−
ε: −
DABCABi ∂ F0 (ξ,1)
= k 0CABi
δ
∂ζ
1 ∂ 2 F1 ∂ 2 F1 1 ∂ F1
=
+
a 2 ∂ζ 2
∂ξ 2 ξ ∂ξ
∂ F1 (ξ,0)
=0
∂ζ
∂ F1 (0, ζ)
=0
∂ξ
F1 (1, ζ) = 0
−
DABCABi ∂ F1 (ξ,1)
= k 0CABi F0
δ
∂ζ
253
Partial Differential Equations
ε2 : −
1 ∂ 2 F2 ∂ 2 F2 1 ∂ F2
=
+
a 2 ∂ζ 2
∂ξ 2 ξ ∂ξ
∂ F2 (ξ,0)
=0
∂ζ
∂ F2 (0, ζ)
=0
∂ξ
F2 (1, ζ) = 0
−
DABCABi ∂ F2 (ξ,1)
= k 0CABi ( F02 + F1 )
δ
∂ζ
Each set of linear problems (respective coefficient of ε) can now be solved by the
method of separation of variables, and the above process can be continued up to any
desired power of ε.
Example 6.23
This example considers the cooling of a given system [13] in which the specific heat is
not a constant. Further, suppose that the system has volume V, surface area A, density
ρ, initial temperature Ti, and specific heat C. At an initial time, the system is exposed
to a convective environment with heat transfer coefficient h and a temperature Ta. If the
specific heat C is given by
C = Ca [1 + β(T − Ta )]
(6.223)
where Ca is the specific heat at T = Ta and β is a given constant, what is the temperature
profile for this cooling system?
Solution
The energy balance for this system results in
pVC
dT
+ hA(T − Ta ) = 0
dt
(6.224)
t = 0, T = T1
(6.225)
subject to
Then, for
θ=
T − T1
t
, τ=
, ε = β(T1 − Ta )
T1 − Ta
ρVCa / (hA)
Equations 6.224 and 6.225 become
(1 + εθ)
dθ
+θ= 0
dτ
(6.226)
254
Applied Mathematical Methods for Chemical Engineers
τ = 0, θ = 1
(6.227)
If ε is much smaller than 1, then the following infinite series solution can be adopted:
∞
θ = θ0 + εθ1 + ε 2θ2 +  = ∑ ε nθn
(6.228)
n=0
Substitution into Equations 6.226 and 6.227 results in
[1 + ε(θ0 + εθ1 + ε 2θ2 + )]
dθ 0
dθ
dθ

+ ε 1 + ε 2 2 + 

dτ
dτ
dτ
+ θ0 + εθ1 + ε 2θ2 +  = 0
or
dθ0
dθ
dθ
dθ
dθ
dθ
+ θ0 + ε  1 + θ1 + θ0 0  + ε 2  2 + θ2 + θ0 1 + θ1 0  +  = 0



dτ
dτ
dτ
dτ
dτ
dτ 
and
θ0 + εθ1 + ε 2θ2 +  = 1 at τ = 0
Then equating coefficients of like powers of ε gives
dθ0
+ θ0 = 0
dτ
θ0 = 1 at τ = 0
ε0 :
ε:
dθ1
dθ
+ θ1 + θ0 0 = 0
dτ
dτ
θ1 = 0 at τ = 0
and41
dθ2
dθ
dθ
+ θ2 + θ0 1 + θ1 0 = 0
dτ
dτ
dτ
θ2 = 0 at τ = 0
ε2 :
for coefficients of ε up to the second power. The resulting solutions for the respective
set of new problems are
3
θ0 = e − τ ; θ1 = e − τ − e −2 τ ; θ2 = e − τ − 2e −2 τ + e −3τ
2
such that a three-term solution is
3
θ0 = e − τ + ε(e − τ − e −2 τ ) + ε 2  e − τ − 2e −2 τ + e −3τ 


2
(6.229)
255
Partial Differential Equations
Notice that the direct solution of Equations 6.226 and 6.227 results in ln θ + ε (θ −
1) = −τ, which compares well with the three-term result [13] for ε = 0, 0.2, and −0.2.
Example 6.24
This example considers plane Couette flow with variable viscosity [13, 14].
Consider the steady flow of an incompressible Newtonian fluid between two infinite
parallel plates separated by a distance, a, as shown in Figure 6.2. Each plate is maintained at a temperature T0. The upper plate is allowed to move with a uniform velocity
V. The thermal conductivity, k, of the fluid is constant while its viscosity, μ, is allowed
to vary according to
µ = µ 0 e −α (T − T0 )
(6.230)
where μ0 is the viscosity at T0 and α is a given constant.
The respective momentum and energy equations [1] are
d  du 
µ
=0
dy  dy 
(6.231)
and
2
d 2 T µ  du 
+
=0
dy 2 k  dy 
(6.232)
The boundary conditions are
y = 0, u = 0, T = T0
y = a, u = V , T = T0
where u is axial velocity and T is the fluid temperature. Introducing the dimensionless
quantities
θ=
T − T0
µ V2
y
u
, Y = , U = , β = αT0 , and ε = 0
T0
a
V
kT0
Equations 6.231 and 6.232 together with their boundary conditions become
T0
y
T0
V
Moving plate
Stationary plate
FIGURE 6.2 Plane Couette flow.
a
256
Applied Mathematical Methods for Chemical Engineers
d  −βθ dU 
e
 =0
dY 
dY 
(6.233)
2
d 2θ
dU 
+ εe −βθ 
=0
 dY 
dY 2
Y = 0, U = 0, θ = 0
(6.234)
Y = 1, U = 1, θ = 0
Notice that ε is the Brinkman number, which is the ratio of viscous to conduction
heating. For small ε or negligible viscous heating effects, one may assume that
U = U 0 + εU1 + ε 2U 2 + 
(6.235)
θ = θ0 + εθ1 + ε 2θ2 + 
(6.236)
Upon substituting Equations 6.235 and 6.236 into Equations 6.233 and 6.234, the
term exp[−β(θ 0 + εθ 1 + ε 2θ 2 + …)] arises and needs to be expanded. That is, if we take
three terms of the series given by Equation 6.236, then
exp[−β(θ0 + εθ1 + ε 2θ2 + )]
= exp(−βθ0 ) exp(−εβθ1 ) exp(−ε 2βθ2 )
(βθ1 )2 

= e −βθ0 1 − ε(βθ1 ) + ε 2
(1 − ε 2βθ2 )
2 


 (βθ )2

= e −βθ0 1 − ε(βθ1 ) + ε 2  1 − βθ2  
 2


2
(
)
βθ


= e −βθ0 − εe −βθ0 βθ1 + ε 2 e −βθ0  1 − βθ2 
 2

where only terms up to ε 2 have been retained.
Similarly, the term (dU/dY)2 is expanded as
2
 dU  =  dU 0 + ε dU1 + ε 2 dU 2 




dY 
dY
dY
dY 
2
2
 dU dU1  dU1  2 
dU
dU dU1 
=  0  + ε  2 0
+ ε2 2 0
+

 
 dY 
 dY dY 
 dY dY  dY  
where only the first three terms of Equation 6.235 are retained. Employing these
expansions together with Equations 6.233 and 6.234 and equating coefficients of like
powers of ε result in the sets
257
Partial Differential Equations
d  −βθ0 dU 0 
e
 =0
dY 
dY 
d 2θ 0
=0
dY 2
Y = 0, U 0 = 0, θ0 = 0
ε0 :
Y = 1, U 0 = 1, θ0 = 0
d
dY
ε:
dU 0  
 −βθ0  dU1
− βθ1

 =0
 e
dY
dY  
2
d 2θ1
dU
+ e −βθ0  0  = 0
 dY 
dY 2
Y = 0, U1 = 0, θ1 = 0
Y = 1, U1 = 0, θ1 = 0
ε2 :
d  −βθ0  dU 2
dU  (βθ )2
 dU 
− βθ1 1 +  1 − βθ2  0  = 0
e


dY 
dY  2
 dY 
 dY
2
 dU 0 dU1

dU
− βθ1  0   = 0
2


Y
Y
Y
d
d
d


Y = 0, U 2 = 0, θ2 = 0
d 2θ 2
+ e −βθ0
dY 2
Y = 1, U 2 = 0, θ2 = 0
for terms up to ε 2. The solution sequence should be θ 0, U0, θ 1, U1, θ 2, and U2 to get the
following:
θ0 = 0
U0 = Y
1
θ1 = Y (1 − Y )
2
1
U1 = − β(Y − 3Y 2 + 2Y 3 )
12
1
θ2 = − β(Y − 2Y 2 + 2Y 3 − Y 4 )
24
1 2
U2 =
β (Y − 5Y 2 + 10Y 3 − 10Y 4 + 4Y 5 )
120
These results for three terms may be substituted into Equations 6.235 and 6.236 for
comparison to the exact solution given by [14]
258
Applied Mathematical Methods for Chemical Engineers
1/2

εβ 

 εβ  
eβθ =  1 +  sech 2 (2Y − 1) sinh −1   

 8 
8

U=
1 
8
 1+ 
2 
εβ 
1/2
1/2

 εβ   
tanh (2Y − 1) sinh −1    + 1
 8  


The above are three examples of regular perturbation. The method is applicable to
both partial and ordinary differential equations.
Example 6.25
This example emphasizes the meaning of the term regular.
Consider now the first-order problem
y′ + εy = 0; y(0) = 1, ε < 1
Then, as discussed in Chapter 2, the solution is
y = e − εx
which can be expanded in a Taylor series about ε = 0, to be
y = 1 − εx +
ε 2 x ε3 x 3
−
+
2!
3!
Suppose we did not know the analytical solution, but suspected that we could try
an approximation of the form
∞
y = y0 ( x ) + εy1 ( x ) + ε 2 y2 ( x ) +  ∑ ε n yn ( x )
n=0
Then substitution into the differential equation results in
y0′ ( x ) + εy1′ ( x ) + ε 2 y2′ ( x ) +  + ε [ y0 ( x ) + εy1 ( x ) + ε 2 y2 ( x ) + ] = 0
By equating coefficients of like powers of ε, the following differential equations
result:
ε 0 : y0′ ( x ) = 0
ε : y1′ ( x ) + y0 ( x ) = 0
ε 2 : y2′ ( x ) + y1 ( x ) = 0

Also, the condition y(0) = 1, becomes
y(0) = 1 = y0 (0) + εy1 (0) + ε 2 y2 (0) + ,
259
Partial Differential Equations
which, on equating coefficients of like powers of ε, gives
ε 0 : y0 (0) = 1
ε : y1 (0) = 0
ε 2 : y2 (0) = 0

such that
y0 ( x ) = 1
y1 ( x ) = x
y2 ( x ) =
x2
2
Therefore
y = 1 + εx + ε 2 x 2 /2 + 
One can observe that this final solution is identical to the Taylor series expansion of
the analytical solution. Therefore, whenever the perturbed solution has a Taylor series
expansion such as demonstrated, the perturbation is considered as regular.
In general, given a linear or nonlinear differential equation
L (u, ε) = 0
that depends on the small positive parameter ε and with appropriate boundary or initial
conditions (data) that may also depend on ε, we say that such a problem is a regular
perturbation problem if the reduced problem consists of
L ( v , 0) = 0
and the reduced data has a unique solution [15].
Example 6.26
This example is a further demonstration of the regular perturbation method.
Consider the two-dimensional Helmholtz equation
L (u, ε) = uxx + u yy + ε 2u = 0
in the unit disk x2 + y2 < 1 subject to the boundary condition
u( x , y) = 1; x 2 + y 2 = 1
Assume that
∞
u ( x , y ) = ∑ un ( x , y ) ε 2 n
n=0
260
Applied Mathematical Methods for Chemical Engineers
is a solution. Then, by definition of a solution to a differential equation,
∞
 ∞
uxx u yy + ε 2u = ∇ 2u + ε 2u = ∇ 2  ∑ un ε 2 n  + ∑ un ε 2 n + 2
 n=0
 n=0
∞
= ∇ 2u0 + ∑ [∇ 2un + un −1 ]ε 2 n = 0
n =1
where summation and differentiation are assumed interchangeable. The boundary condition becomes
∞
u( x , y) = u0 ( x , y) + ∑ un ( x , y)ε 2 n = 1; x 2 + y 2 = 0
n =1
Therefore, equating like powers of ε gives
ε 0 : ∇ 2u = 0
u0 ( x , y) = 1
ε 2 n : ∇ 2un = − un −1; n ≥ 1
un ( x , y) = 0; x 2 + y 2 = 1; x ≥ 1
Notice that the perturbation method has replaced the Helmholtz equation with a
system of Laplace and Poisson equations. By observing that polar coordinates can be
used and that there is no θ dependence, that is, u = u(r), we get
∇ 2u0 = 0 =
∂ 2 u0 1 ∂ u0
+
= 0; u0 (1) = 1
∂r 2 r ∂r
whose bounded solution is u 0 = 1. Also, the equation for u1 is
∂ 2 u1 1 ∂u1
+
= − u0 ; u1 (1) = 0
∂r 2 r ∂r
and results in
u1 (r ) =
1− r2
4
Therefore, to leading orders the reduced problem solution is
u = 1 + ε2
(1 − r 2 )
+ O(ε 4 )
4
where the symbol O(ε 4) means terms of order ε 4.
It can be shown (see problem 9) that the polar coordinate form of the Helmholtz
equation
∂ 2 u 1 ∂u
+
+ ε 2u = 0; u0 (1) = 1,
∂r 2 r ∂r
261
Partial Differential Equations
which is bounded at the origin, solves to
u=
J 0 (εr )
J 0 (ε)
and J0(z) has the series expansion
J0 (z ) = 1 −
z2
+ O( z 4 )
4
Therefore
u=
J 0 (εr ) 1 − (εr )2 / 4 + O(ε 4 )
=
1 − (ε)2 / 4 + O(ε 4 )
J 0 (ε)
= 1 + ε 2 (1 − r 2 ) / 4 + O(ε 4 )
It is interesting to note that ε must be smaller than the first zero of the Bessel function in order for the reduced problem to yield a useful result.
Example 6.27
This example considers the freezing of a saturated liquid in a semi-infinite region [13].
A saturated liquid is initially at its freezing temperature Tf. At some time, the face is
maintained at a constant subfreezing temperature T0(T0 < Tf ). As heat is removed from
the liquid, it freezes. If the freezing front at any time t is at xf and if it can be assumed
that the uniform liquid remains at Tf throughout the process, what is the temperature
profile T(x, t) in the solid phase?
Solution
A model for this problem is
1 ∂T ∂ 2 T
=
α ∂t ∂ x 2
T (0, t ) = T0 , T ( x f , t ) = Tf
k
∂T
dx
| x = xf = ρλ f
∂x
dt
where α is thermal diffusivity, k and ρ are thermal conductivity and density, respectively, of the solid phase and λ is the latent heat.
Introducing the dimensionless quantities,
θ=
Tf − T
x
x
kt
C (Tf − T0 )
, X = , Xf = f , τ =
, ε=
ρCxs2
λ
Tf − T0
xs
xs
where xs is a reference distance and C is the solid phase specific heat. Further, by
changing the variables from (X, τ) to (X, Xf ), the dimensionless model becomes
262
Applied Mathematical Methods for Chemical Engineers
∂2 θ
∂θ ∂θ
= −ε
∂X 2
∂Xf ∂X
X = Xf
θ( X = 0, X f ) = 1, θ( X = X f , X f ) = 0
dX f
∂θ
= −ε
dτ
∂X
X = Xf
Here, the quantity ε is the Stefan number, which represents the ratio of sensible to
latent heat during a phase change. For a process with small ε or a comparatively large
latent heat, such as in this case, let
θ = θ0 + εθ1 + ε 2θ2 + 
Then following substitution into the dimensionless model and equating ­coefficients
of like powers of ε results in
∂2 θ0
=0
∂X 2
θ0 ( X = 0, X f ) = 1 θ0 ( X = X x , X f ) = 0
ε0 :
ε:
∂ 2 θ1
∂θ ∂θ
=− 0 0
∂X 2
∂Xf ∂X
X = Xf
θ1 ( X = 0, X f ) = 0, θ1 ( X = X f , X f ) = 0
and
 ∂θ ∂θ

∂2 θ2
∂θ ∂θ
= − 0 1
+ 1 0

2
∂X
 ∂ X f ∂ X X = Xf ∂ X f ∂ X X = Xf 
θ2 ( X = 0, X f ) = 0, θ2 ( X = X f , X f ) = 0
ε2 :
for coefficients of terms up to ε 2. The three-term expansion becomes
θ = 1−
2
2
4
 X 
 X
X 1 X   X  1 2 X 
ε
− ε 1 −    +
19 − 10   − 9   
X f 6 X f   X f   360 X f 
 Xf 
 X f  
To derive an expression for the progress of the freezing front with respect to time,
recall that
dX f
∂θ
= −ε
dτ
∂X
=
X = Xf
1 
1
7 
 ε − ε 2 + ε 3  + higher-order terms,
Xf
3
45
subject to the condition that
X f = 0 at τ = 0
263
Partial Differential Equations
Solution of this latter equation results in
1
7
X f2 = 2τ  ε − ε 2 + ε 3  + higher-order terms,

3
45 
or
−1
1 2 −1  1
7
X f ε  1 − ε + ε 2 
 3
2
45 
1
1
1
= ε −1 X f2 + X f2 − εX f2 + terms of order ε 2 .
2
6
45
τ=
Hopefully, these examples (and more in Chapter 7) have demonstrated the importance of the regular perturbation method as a technique that can be used to reduce
some nonlinear problems to sets of linear problems. And, as was stated earlier, we
like to convert new problems to old ones that we know how to solve.
6.8 PROBLEMS
1. In each of the following problems, use the method of separation of variables
to solve the one-dimensional heat equation. Also, define the steady-state
temperature at the midpoint of the region.
∂T 1 ∂2 T
=
a.
∂t 2 ∂ x 2 , T(0, t) = T(3, t) = 0, T(x, 0) = sin πx, 0 < x < 3
∂T ∂2 T
∂T (0, t ) ∂T (π, T )
=
,
=
= 0, T(x, 0) = cos x, 0 < x < π
∂t ∂ x 2
∂x
∂x
∂T (− π, t ) ∂T (π, t )
∂T ∂2 T
=
, T (− π, t ) = T (π, t ),
=
c.
∂t ∂ x 2
∂x
∂x
T(x, 0) = x + π, – π < x < π
∂T 1 ∂2 T
d.∂t = 2 ∂ x 2 , T(0, t) = 100, T(2, t) = 50, T(x, 0) = 100–13x,
0 < x < 2
2.Solve the heat equation
b.
∂T ∂2 T
=
−T
∂t ∂ x 2
subject to
 1, 0 < x < 0.5 
T (0, t ) = T (1, t ) = 0, T ( x , 0) = 

 0, 0.5 < x < 1 
264
Applied Mathematical Methods for Chemical Engineers
3.Use the method of eigenfunction expansions to solve, without reducing to
homogeneous boundary conditions
∂w
∂2 w
=k 2
∂t
∂x
 w(0, t ) = A 
w( x , 0) = h( x ), 
 constant
 w( L , t ) = B 
4.Use the method of Laplace transforms to solve the following problem:
∂u
∂2 u
=v 2
∂t
∂y
at t = 0, u = 0
y = 0, u = V
(constant)
y = ∞, u = 0
5.A fluid of constant density, ρ, and viscosity, μ, is contained in a very long
horizontal pipe of length L and radius R. Initially, the fluid is at rest. At t
= 0, a pressure gradient (p 0 − pL)/L is impressed on the system. Can the
method of Laplace transform be used to determine how the velocity profiles
change with time?
Hint: Use cylindrical coordinates and assume that the z-component of
velocity, vz, is a function of r and t, while the r- and θ-components of velocity are both zero. Then combine the equations of continuity and motion to
get [1]
ρ
∂ vz p0 − pL
1 ∂  ∂ vz 
=
+µ
r

L
r ∂r  ∂r 
∂t
subject to the conditions:
vz (r , 0) = 0
vz (0, t ) is finite
v z ( R, t ) = 0
6.Find a bounded solution to Laplace’s equation ∇ 2w = 0 for the half plane y
> 0 if w takes on the value f(x) on the x-axis.
Hint: (a) Separate the variables and set each side equal to −λ2; (b) argue that
the lack of restrictions on λ allow the replacement of the arbitrary constants
265
Partial Differential Equations
with arbitrary functions of λ, thus leading to the Fourier integral defined by
Equation 5.56.
Answer : w( x , y) =
1 ∞ ∞
e −λy f (u) cos λ(u − x ) du d λ
π ∫0 ∫u =−∞
7. The surface of a cylinder of radius R is maintained at a constant temperature
T0, whereas the initial temperature was zero throughout [16]. Use Laplace
transform to derive the temperature distribution.
Model:
∂T
 ∂2 T 1 ∂T 
= k 2 +

 ∂r
∂t
r ∂r 
T (r ,0) = 0, T ( R, t ) = T0
lim T (r , t ) is finite
r→ 0
 2 ∞ J (α r )

exp(− kα 2n t ) 
Answer: T (r , t ) = T0 1 − ∑ 0 n
 R n =1 α n J1 (α n R)

where J0(α nR) = 0 defines the α n.
∂u
∂2 u
8.Given the model
=k 2 +q
∂t
∂x
subject to u(0, t) = 0, u(x, 0) = 0; u (∞, t) is finite; derive
u( x , t ) =
t
x
 −x2 
 x 
exp 
dt + qt
− q ∫ erfc 

3
0
 4 kt 


kt
4
4 kπt
where q is a constant.
Hint: Use the formula
L−1
{ }
t
u (s )
= ∫ u(t ) dt
o
s
where ū(s) is a known (tabulated) transform to carry out the inversion [16].
9.Show that the solution to the Helmholtz equation
∂2 u 1 ∂u
+
+ ε 2 u = 0; u(1) = 1
∂r 2 r ∂r
which is bounded at the origin, solves to
u=
J0 (εr )
J 0 (ε)
266
Applied Mathematical Methods for Chemical Engineers
10.In Example 6.5, Equation 6.55 was explicitly stated without a verbal
description of the steps. Locate the equation of energy from an appropriate reference source and reduce it to Equation 6.55 by making appropriate
assumption indicated in the example.
11.Consider a circular plate that is composed of two different materials in the
form of concentric circles. If the temperature in the plate is described by
∂2 u 1 ∂u ∂u
+
=
, 0 < r < 2, t > 0
∂r 2 r ∂r ∂t
(6.237)
u(2, t ) = 100, t > 0
(6.238)
200, 0 < r < 1
u(r ,0) = 
100, 1 < r < 2,
(6.239)
determine the temperature profile u(r , t ) by making the substitution
u(r , t ) = w(r , t ) + V (r )
(6.240)
12.Solve the Heat Equation (Equation 6.12), subject to
1, 0 < x < L / 2
u(0, t ) = 0, u( L , t ) = 0; u( x ,0) = 
0, L / 2 < x < L
13.Solve the Heat Equation (Equation 6.12), subject to
u(0, t ) = 0, u( L , t ) = 0; u( x ,0) = x ( L − x )
14.Suppose heat is lost from the lateral surface of a thin rod of length L into a
surrounding medium at temperature zero. If the linear law of heat transfer
applies, then the heat equation takes on the form
∂2 u
∂u
− hu =
, 0 < x < L, t > 0
2
∂x
∂t
h = aconst
k
Determine the temperature u ( x , t ) if the initial temperature is f ( x ) and the
ends x = 0 and x = L are insulated.
15.Determine the concentration profile of
α
∂2 C
∂C
+ 2C =
, 0 < x < L, t > 0
∂x 2
∂t
267
Partial Differential Equations
subject to the conditions
C ( 0, t ) = 0, C ( L , t ) = 0
and
C ( x ,0 ) = f ( x )
16.Given the diffusion equation
k
∂2 u ∂u
=
, 0 < x < L, t > 0
∂ x 2 ∂t
subject to the conditions
u ( 0, t ) = 5, u ( L , t ) = 8
and
u ( x ,0 ) = f ( x ) .
Hints:
a. Find an equilibrium distribution u0 ( x ) , satisfying
d 2u0
= 0, u0 ( 0 ) = 5 and u0 ( L ) = 8.
dx 2
b. Determine the problem (partial differential equation + conditions) does
the difference between u ( x , t ) and u0 ( x ) must satisfy.
c. Solve the problem in part (b) for w ( x , t ) then combine with u0 ( x ) to give
the solution for u ( x , t ) .
REFERENCES
1.Bird, R.B., Stewart, W.E., and Lightfoot, E.N. Transport Phenomena, John Wiley &
Sons, New York, 1960.
2. Giordano, F.R. and Weir, M.D. Differential Equations: A Modeling Approach, AddisonWesley, Reading, MA, 1991.
3.Myint-U, T. and Debnath, L. Partial Differential Equations for Scientists and
Engineers, 3rd ed., Prentice Hall, Englewood Cliffs, NJ, 1987.
4. Haberman, R. Elementary Applied Partial Differential Equations with Fourier Series
and Boundary Value Problems, Prentice Hall, Englewood Cliffs, NJ, 1983.
5. Churchill, R.V. and Brown, J.W. Fourier Series and Boundary Value Problems, 4th ed.,
McGraw-Hill, New York, 1987.
6.Boyce, W.E. and DiPrima, R.C. Elementary Differential Equations and Boundary
Value Problems, 3rd ed., John Wiley & Sons, New York, 1977.
7. Spiegel, M.R. Mathematical Handbook, McGraw-Hill, New York, 1968.
268
Applied Mathematical Methods for Chemical Engineers
8. Churchill, R.V. and Brown, J.W. Complex Variables and Applications, McGraw-Hill,
New York, 1984.
9. Spiegel, M.R. Complex Variables, McGraw-Hill, New York, 1964.
10. Williams, W.E. Partial Differential Equations, Oxford, 1980.
11.Myers, G.E. Analytical Methods in Conduction Heat Transfer, McGraw-Hill, New
York, 1971.
12. Loney, N.W. On using a boundary perturbation technique to linearize a system of nonlinear pde, Chem. Eng. Educ., Winter, 58, 1996.
13. Aziz, A. and Na, T.Y. Perturbation Methods in Heat Transfer, Hemisphere, Washington,
1984.
14.Turian, R.M. and Bird, R.B. Viscous heating in the cone-and-plate viscometer II,
Chem. Eng. Sci., 18, 689, 1963.
15.Zauderer, E., Partial Differential Equations of Applied Mathematics, John Wiley &
Sons, New York, 1983.
16.Walas, S.M. Modeling with Differential Equations in Chemical Engineering,
Butterworth-Heinemann, Boston, 1991.
17. Plawsky, J., Transport Phenomena Fundamentals, 2nd ed., Taylor & Francis, FL, 2010.
7
7.1
Applications of Partial
Differential Equations in
Chemical Engineering
INTRODUCTION
The primary objective of this chapter is to present several worked-out examples.
These examples reflect typical chemical engineering science research results, and it
is recommended that the reader dedicate some time to work through these examples.
The examples also demonstrate the application of much of the mathematics discussed in the previous chapters.
Examples are provided from heat transfer; mass transfer; simultaneous diffusion
and convection; simultaneous diffusion and chemical reaction; simultaneous diffusion, convection, and chemical reaction; and viscous flow.
Some examples may be worked out in more detail than others. Those worked-out
examples with missing details provide an opportunity for the readers to check their
knowledge of the mathematical techniques used.
7.2 HEAT TRANSFER
Although we know from our experience that heat flows from regions of high temperature to regions of low temperature, one might want to know how the temperature
in a solid changes with time and position. Assuming that the heat transfer is strictly
by conduction, one can analyze this situation with reference to the sketch shown as
follows.
An energy balance on a small volume of the solid of cross-sectional area A and
thickness Δ x is
{Rate of accumulation of energy} = {Rate of heat conduction in}
− {Rate of heat conduction out}
(7.1)
The rate of accumulation term is given by*
A ∆xρCp
∂u
( J /s)
∂t
269
270
Applied Mathematical Methods for Chemical Engineers
q x+Δ
x
L
x+Δx
x
Δx
qx
where u(x, t) is the solid temperature (ºC), x is the position along the solid (cm), t is
the time (s), ρ is the density (g/cm3), and Cp is the solid specific heat (J/g ºC).
The rate of heat conduction into the solid volume is given by Aq|x where q|x is heat
flux at position x (J/cm2 s); whereas Aq|x+Δx is the rate of heat conduction out. q|x+Δx
is the heat flux at position x + Δ x.
Substituting these terms into Equation 7.1 results in
A ∆xρCp
∂u
= Aq x − Aq x + ∆x
∂t
Then, dividing through by A Δ xρ Cp gives
∂u  1  Aq x − Aq x + ∆x
=
∂t  A ρCp 
∆x
 1  q x + ∆x − q x
= −

∆x
 ρCp 
Taking the limit as Δ x → 0, leads to
 1  ∂q
∂u
= −

∂t
 ρCp  ∂ x
Inserting Fourier’s first law
q = −κ
∂u
∂x
(κ is the thermal conductivity)
results in the familiar form
∂u  κ  ∂2 u
∂2 u
κ
=
k
=
; k=

∂t  ρCp  ∂ x 2
∂x2
ρCp
(7.2)
Applications of Partial Differential Equations in Chemical Engineering
271
Example 7.1
A sheet of polymer 1/2-in. thick is to be cured at 292ºF for 50 min [1]. If the sheet is
initially at 70ºF, and heat is applied from both surfaces, find the time required for the
temperature at the center of the sheet to reach 290ºF. It can be assumed that the surfaces are brought to 292ºF as soon as curing has begun and held at that temperature
throughout the process. The thermal diffusivity k/ρ Cp of this polymer can be taken as
0.0028 ft2/h (see Figure 7.1).
The differential equation for unsteady heat conduction in one direction (Equation
7.2) is
∂u
k ∂2 u
=
; 0 < x < 1 / 48
∂t ρCp ∂ x 2
(7.3)
The origin is chosen at the center of the sheet, so that x is the distance from the
center, as shown in Figure 7.1, and is in feet. Also, x0 is the half thickness. The boundary conditions are t > 0
∂u(0, t )
=0
∂x
u( x 0 , t ) = 292°F
(7.4)
and the initial condition is
u( x ,0) = 70°F; 0 < x <
1
48
(7.5)
Remark: It is good practice whenever possible to express the differential equation
in dimensionless form so that the result can be portable.
Let
Y (ξ , τ) =
292 − u( x , t)
x
kt
, ξ= , τ=
292 − 70
x0
Cpρ× 20
292˚F
292˚F
x
1/
4˝
x=0
x = x0
FIGURE 7.1 Unsteady heat conduction in polymer sheet.
(7.6)
272
Applied Mathematical Methods for Chemical Engineers
Then Equation 7.3 becomes
subject to
∂Y ∂ 2 Y
=
∂τ ∂ξ 2
(7.7)
∂Y (0, τ)
=0
∂ξ
(7.8)
Y (1, τ) = 0
(7.9)
Y (ξ,0) = 1
(7.10)
From our previous experience, we will try a solution of the form
Y (ξ , τ) = f (ξ ) g(τ)
(7.11)
Then Equation 7.7 becomes
g′ f ′′
=
= −λ 2
g
f
where the negative sign is chosen based on our experience using separation of variables
up to now (the reader should check this).
Therefore
f ′′ + λ 2 f = 0
(7.12)
subject to
f ′(0) = 0
and
f (1) = 0
Also
g(τ) = c1e − λ
2τ
The general solution of Equation 7.12 is
f (ξ) = c2 cos λξ + c3 sin λξ
and
f ′(0) = 0 = λc3 ⇒ c3 = 0
then for nontrivial solution to exist, c2 ≠ 0, so that
f (1) = 0 = c2 cos λ ⇒ λ =
(2n − 1)π
, n = 1,2,
2
(7.13)
Applications of Partial Differential Equations in Chemical Engineering
273
Therefore, for each n
Yn (ξ, τ) = An e − λ n t cos λ n ξ
2
and by the principle of superposition
∞
Y (ξ, τ) = ∑ An e − λ n t cos λ n ξ
2
n =1
solves Equation 7.7 through Equation 7.9.
Then Equation 7.10 gives
∞
Y (ξ,0) = 1 = ∑ An cos λ n ξ
n =1
such that for n ≥ 1
1
1
∫0 cos λ n ξ dξ = An ∫0 cos2 λ n ξ dξ
or
4
(2n − 1)π
sin
(2n − 1)π
2
4
(−1)n +1
=
(2n − 1)π
An =
That is,
∞
Y (ξ, τ) = ∑ (−1)n +1
n =1
  2n − 1  2 
4
 2n − 1 
exp  − 
π  τ  cos 
πξ 
 2



(2n − 1)π
2


Then the time required for the temperature at the center of the sheet to reach 290ºF
is estimated as follows:
Y (0, τ) =
292 − u(0, t ) 292 − 290
=
= 0.009
292 − 70
292 − 70
Therefore
0.009 =
4 −4π
e
π
2
τ
274
Applied Mathematical Methods for Chemical Engineers
using only the first term of the series. That is, τ ≅ 2.01. Then, from Equation 7.6,
τ=
Cpρ 2
kt
2.01
, or t =
= 0.313 h = 18.7 min
x0 τ =
2
Cpρx 0
(0.0028)(48)2
k
Remark: The reader should check the validity of the approximation, which employed
only the first term of the series.
Example 7.2
Consider a plane wall of thickness L [2] initially at temperature T0 when suddenly at
t = 0, the surface temperature at x = 0 is changed to T∞, and the surface at x = L is
suddenly exposed to a bath with an ambient temperature also of T∞ (see Figure 7.2).
At the surface x = L
qconducted = qconvected
such that the boundary condition becomes
−k
∂T
= h(T − T∞)
∂x
where h is the convective heat transfer coefficient and k is the thermal conductivity.
Determine the temperature distribution in this wall.
Solution
The mathematical description of the problem is
1 ∂T ∂ 2 T
=
, 0 < x < L, t > 0
α ∂t ∂ x 2
Surface at x = L
qconv
qcond
FIGURE 7.2 Plane wall.
Applications of Partial Differential Equations in Chemical Engineering
275
subject to the boundary conditions
T (0, t ) = T∞
−k
∂T ( L , t )
= h(T − T∞ )
∂x
and the initial condition
T ( x ,0) = T0
To employ the method of separation of variables, the differential equation and
boundary conditions are required to be linear and homogeneous. Presently, the linearity requirement is satisfied, but the boundary conditions are not homogeneous. In this
problem, recasting the variables into dimensionless quantities reduces the problem to
a homogeneous one. That is, let
u( z , τ) =
αt
T − T∞
x
, z = , and τ = 2
T0 − T∞
L
L
then the dimensionless problem becomes
∂u ∂ 2 u
=
∂τ ∂ z 2
subject to
u( z ,0) = 1
u(0, τ) = 0
uz (1, τ) = − N B u(1, τ)
where NB is the Biot number defined by
NB =
hL L /kA
=
k
1/hA
Notice that the Biot number compares the steady-state conduction resistance of
a plane wall L-units thick to the convection resistance at the surface. Small or large
Biot numbers can aid in deciding on the specific boundary condition to use in setting
up a physical model. For example, a small Biot number implies that convection resistance is significant whereas a large Biot number implies that conduction resistance is
significant.
Using the substitution
u ( z , τ ) = y( z ) f ( τ )
the dimensionless problem becomes
f ′ y′′
=
= −λ 2
f
y
276
Applied Mathematical Methods for Chemical Engineers
where the sign was chosen based on previous experience (Chapter 6). As a result, we
get the two ordinary differential equations
f ′ + λ 2 f = 0 or
f (τ) = c1e − λ
2τ
and
y′′ + λ 2 y = 0
The conditions on the y-equation are derived as follows:
u(0, τ) = 0 = y(0) f (τ) ⇒ y(0) = 0
since f(τ ) is arbitrary, and
uz (1, τ) = y′(1) f (τ) = − N Bu(1, τ) = y(1) f (τ), ⇒ y′(1) = − N B y(1)
Then the general solution of the y-equation is
y( z ) = c2 cos λz + c3 sin λz
and the condition at z = 0 gives
y(0) = 0 = c2
whereas the condition at z = 1 results in
y′(1) = λc3 cos λ = − N Bc3 sin λ
Therefore, for a nontrivial solution, c3 ≠ 0 and the eigenvalues are given by
λ cot λ = − N B
The corresponding eigenfunctions are given by
yn = c3, n sin λ n z , n = 1, 2, 
because there are infinitely many eigenvalues. Then, for each n
un ( z , τ) = yn ( z ) fn (τ) = Bn e − λ n τ sin λ n z
2
Further, by the principle of superposition
∞
u( z , τ) = ∑ Bn e − λ n τ sin λ n z
2
n =1
is the solution to the dimensionless differential equation and the given boundary conditions. The initial condition will be satisfied if
Applications of Partial Differential Equations in Chemical Engineering
277
∞
u( z ,0) = 1 = ∑ Bn sin λ n z
n =1
such that for n ≥ 1
1
Bn =
∫0 sin λ n z d z
1

1
 2 − 4 λ sin 2λ n 
n


4(1 − cos λ n )
=
2λ n − sin 2λ n
=
1 − cos λ n
λ n sin 2λ n
−
2
4
Finally, the dimensionless temperature distribution is
∞
u( z , τ) = ∑
n =1
4(1 − cos λ n ) − λ 2n τ
e
sin λ n z
2λ n − sin 2λ
where
λ n cot λ n = − N B , n = 1,2 
defines the λ n. The results can now be reported in terms of the dimensioned
variables.
Example 7.3
Consider an infinitely long, solid cylinder of radius r0 whose initial temperature is T0 [2].
If the temperature of its outside surface is suddenly changed to T∞, determine the temperature distribution in the cylinder.
Solution
The governing equation is
1 ∂T ∂ 2 T 1 ∂T
=
+
α ∂t ∂r 2 r ∂r
and the boundary and initial conditions are
T (r0 , t ) = T∞
and
T (r , 0) = T0
respectively. It is important to point out that as we have a second-order differential
equation in r, there should be two boundary conditions involving r. The second boundary condition is that the temperature is expected to be finite at r = 0. This conclusion
is based on our “engineering understanding” of the problem.
278
Applied Mathematical Methods for Chemical Engineers
An alternative boundary condition at r = 0 is
∂T
=0
∂r
due to the symmetry of the temperature distribution in this problem. If, however, the
temperature varies with angular position, then symmetry would not be valid. Further,
to solve this problem using separation of variables, it is sufficient to express the temperature distribution as
w(r , t ) = T − T∞
such that
1 ∂ w ∂2 w 1 ∂ w
= 2 +
α ∂t
∂r
r ∂r
subject to
w(0, t ) < ∞
w(r0 , t ) = 0
w(r ,0) = T0 − T∞
is homogeneous. Then letting
w(r , t ) = R(r ) g(t )
the partial differential equation reduces to
1 g′
2
= −λ 2 , ⇒ g(t ) = c1e −αλ t
α g
and
1
R′′ + R′ + λ 2 R = 0
r
subject to
R(0) < ∞ and R(r0 , t ) = 0
The R-equation and the accompanying boundary conditions constitute a singular
Sturm–Liouville boundary value problem. Also the R-equation is Bessel’s equation of
order zero.
Bessel’s equation can be solved indirectly by using the following procedure:
Recall Equation 3.80
y′′ −
2a − 1
a 2 − ν 2c 2 

y′ +  b 2c 2 x 2 c − 2 +
 y = 0

x
x2
with general solution: y = c1 xa Jv (bxc) + c2xa J−v(bxc)
Applications of Partial Differential Equations in Chemical Engineering
279
By comparing the coefficients of the first and zeroth derivatives in both equations
we get the coefficient of first derivative:
2a − 1 = −1, ⇒ a = 0
2c − 2 = 0, ⇒ c = 1
and the coefficient of the zeroth derivative:
b 2c 2 = λ 2 , ⇒ b = λ
a − ν2c 2 = 0, ⇒ ν = 0
2
resulting in a general solution
R(r ) = c2 J 0 (λr ) + c3 J −0 (λr )
In customary notation, Y0(·) is used instead of J−0(·). Therefore, the general solution is
R(r ) = c2 J 0 (λr ) + c3Y0 (λr )
where J0(·) is the zero-order Bessel function of the first kind and Y0(·) is the zero-order
Bessel function of the second kind. Further, as R(r) must be finite at r = 0, then c3 must
be chosen as zero due to the fact that Y0 is unbounded at r = 0. Also, for nontrivial
solution c2 ≠ 0 such that
R(r0 ) = 0 = c2 J 0 (r0 λ ), ⇒ J 0 (r0 λ ) = 0
The function J0(r0 λ ) oscillates about the r 0λ axis with infinitely many intersections,
that is,
r0 λ1 = 2.4048
r0 λ 2 = 5.5201
r0 λ 3 = 8.6537
and more. These points of intersection can be read from a table of zeros of the Bessel
function [3]. Therefore, the eigenvalues are defined by
J 0 (r0 λ n ) = 0, n = 1, 2, 
and
R n = c2, n J 0 (λ n r )
are the corresponding eigenfunctions. Then for each n
wn (r , t ) = Rn gn = An e −αλ n t J 0 (λ n r )
2
By the principle of superposition
∞
w(r , t ) = ∑ An e −αλ n t J 0 (λ n r )
n =1
2
280
Applied Mathematical Methods for Chemical Engineers
satisfies the differential equation and the boundary conditions. The initial condition
gives
∞
w(r ,0) = ∑ An J 0 (λ n r ) = T0 − T∞
n =1
which is recognizable as a generalized Fourier series. The Fourier coefficient can be
evaluated with the aid of the orthogonality property discussed in the context of Sturm–
Liouville problems (Chapter 4). That is,
r0
∫0 rJ0 (λ mr ) J0 (λ nr ) dr = 0
for m ≠ n
where r is the weighting function determined from the Sturm–Liouville form of the
differential equation. Therefore,
r0
∫ (T0 − T∞ )rJ0 (λ nr ) dr ,
An = 0 r
∫0 r[ J0 (λ nr )]2 dr
0
n ≥1
The integrals can be evaluated from standard tables containing integrals of Bessel
functions [3]. The overall solution to this problem is
∞
w(r , t ) = ∑ An e −αλ n t J 0 (λ n r )
2
n =1
with the eigenvalues defined by
J 0 (r0 λ n ) = 0, n = 1,2, 
and the An as given earlier.
Example 7.4
This example considers unsteady-state heat conduction in one dimension (see
Figure 7.3) [4].
Consider a section of a flat wall of thickness L ft, whose height and length are both
large in comparison to L. Suppose the temperature distribution is uniform throughout the wall initially, and heat is supplied at a fixed rate per unit area to one surface.
Determine the temperature profile as a function of position and time.
Solution
Temperature is constant in any plane parallel to the surface (as initial temperature
is uniform and every part of each wall surface sees the same conditions). Then one
space coordinate is sufficient (see sketch). Further, for a section of unit area through
the wall, the thermal equilibrium of a slice of the wall between a plane at distance x
from the heated surface and parallel to a plane at x + Δ x from the same surface gives
the following:
Rate of heat input at distance x and time t is −k(∂T/∂x)
Applications of Partial Differential Equations in Chemical Engineering
281
∆x
x
L
FIGURE 7.3 One-dimensional heat transfer.
Rate of heat input at distance x and time t + Δ t is
−k
∂T ∂  ∂T 
+  −k
 ∆t
∂ x ∂t 
∂x 
which comes from the first two terms of the Taylor series expansion of T(x, t) while
treating x as a constant. Similarly,
Rate of heat output at distance x + Δ x and time t is
−k
∂T ∂  ∂T 
+
 −k
 ∆x
∂x ∂x 
∂x 
which is the two-term Taylor series expansion of T(x, t) holding t constant. Also, Rate
of heat output at distance x + Δ x and t + Δ t is
−k
∂  ∂T ∂  ∂T  
∂T ∂  ∂T 
−k
+  −k
+  −k
 ∆t ∆x
 ∆t +
∂ x  ∂ x ∂t 
∂ x  
∂ x ∂t 
∂x 
The heat content of the element at time t is ρ Cp TΔ x, whereas that at t + Δ t is
∂T 

ρCp  T +
∆t  ∆x

∂t 
such that the accumulation of heat in time Δ t is
ρCp
∂T
∆t∆x
∂t
282
Applied Mathematical Methods for Chemical Engineers
Then by the conservation law, Input − Output = Accumulation, we get
 ∂T 1 ∂  ∂T  
 − k ∂ x + 2 ∂t  − k ∂ x  ∆t  ∆t −


 ∂T ∂  ∂ T 
1 ∂  ∂T ∂  ∂T   
−k
+
+
− k
 −k
 ∆x ∆t  ∆t
 −k
 ∆x +
∂ x   
2 ∂t  ∂ x ∂ x 
∂x 
 ∂ x ∂ x 
∂T
= ρCp
∆t∆x
∂x
where we use the arithmetic average input and output rates during the time interval Δ t.
Following simplifications and taking the appropriate limits we get
∂T
∂2 T
=α 2
∂t
∂x
for α =
k
ρCp
where the physical properties are assumed constant. Further, notice that even though
the differential equation was derived based on a finite thickness L, there is no thickness dependency, and the equation can be used to model semi-infinite domain (x > 0)
problems. Therefore, if at
t = 0, T = T0
and at
x = 0, T = T1
∂2 T 
 ∂T
=α 2 
L
∂x 
 ∂t
gives
α
d 2 y( x , s )
= sy( x , s) − T0 , where y( x , s) = L{T ( x , t )}
dx 2
subject to the boundedness of y(x, s) and
L{T (0, t )} = y(0, s) =
T1
s
Therefore
y( x , s ) =
T1 − T0 −
e
s
s
x
α
+
T0
s
which inverts to
 x 
T ( x , t ) = (T1 − T0 ) erfc 
+ T0
 2 αt 
Example 7.5
A solid rectangular slab at a uniform temperature T0 has its four edges thermally
insulated. The temperature of one exposed face is raised to and maintained at T1,
Applications of Partial Differential Equations in Chemical Engineering
283
whereas the temperature of the other exposed face is held fixed at T0. Determine how
the temperature distribution varies with time.
Solution
As the edges are insulated, heat is expected to flow in one direction, and the differential equation
∂T
∂2 T
=α 2
∂t
∂x
can be used to model the temperature distribution subject to the conditions
T ( x ,0) = T0
T (0, t ) = T0
T ( L , t ) = T1
Then using the method of Laplace transform we get
sU ( x , s) − T ( x ,0) = α
d 2U ( x , s)
, U ( x , s) = L{T ( x , t )}
dx 2
or
sU ( x , s) − T0 = α
d 2U ( x , s)
dx 2
with general solution
s
U ( x , s) = c1 (s)e − α x + c2 (s)e
− αs x
+
T0
s
The transformed boundary conditions become
T0
s
T1
L{T ( L , t )} = U ( L , s) =
s
L{T (0, t )} = U (0, s) =
Upon using the transformed boundary conditions, the constants of integration are
determined such that
U ( x , s) =
T1 − T0 e
s e
(T − T )
= 1 0
s
sx
α
− e−
sL
α
s
− e− α L
s
x
T
α
+ 0
s
s
L
sin h
α
sin h
sx
α
+
T0
s
284
Applied Mathematical Methods for Chemical Engineers
Two methods will be used to find T(x, t) = L−1 {U(x, s)}.
Method I
In a suitable table of Laplace transform [3], we can locate
 sinh x s  x 2 ∞ (−1)n − n2 π 2 αt /L2
nπx
L−1 
e
sin
= + ∑
sinh
π
s
a
s
a
n
a
n =1


then, if a is replaced by L / α and x / α replaces x

 sinh x
L−1 
 s sinh L

s
α
s
α

 x 2 ∞ (−1)n
nπx
2 2
2
e − n π αt / L sin
= + ∑
L
 L π n =1 n

Therefore,
 x 2 ∞ (−1)n − n2 π 2 αt / L2
nπx 
T ( x , t ) = (T1 − T0 )  + ∑
e
sin
 + T0
L
π
n
L 
n =1

Method II
Consider the quantity
T1 − T0
s
s
α P (s )
=
s Q (s )
sinh L
α
sinh x
Then
Q(s) = s sinh L
s
α
and Q(s) = 0 at either s = 0 or
s
L = inπ, n = 1, 2, 
α
because sinh in π = i sin(n π ). The singular values
s = 0, sn =
− n 2 π 2α
L2
are poles and in particular, simple poles as opposed to multiple poles. Further,
Q ′(s) = sinh L
s L s
s
+
cosh L
α 2 α
α
Applications of Partial Differential Equations in Chemical Engineering
285
such that
inπx
(T1 − T0 )sinh
P ( s ) sn t
2 2
2
L
ρn (t ) =
e =
e− n π α / L
inπ
Q ′(s )
sinh inπ +
cosh inπ
2
nπx − n2 π 2 αt / L2
(T1 − T0 )sin
e
L
=
nπ
cos nπ
2
or
ρn (t ) = (T1 − T0 )
nπx
2
2 2
2
(−1)n e − n π αt / L sin
nπ
L
For the simple pole s = 0.
ρ0 (t ) = (T1 − T0 ) lim
s→ 0
sinh x
s
α
sinh L
s
α
= (T1 − T0 )
x
L
where the series expansion of the hyperbolic functions were used in the limiting process. Therefore,
 x 2 ∞ (−1)n − n2 π 2 αt / L2
 P (s ) 
nπx 
f (t ) = L−1 
e
sin

 = (T1 − T0 )  + ∑
L 
 Q (s ) 
 L π n =1 n
such that
 x 2 ∞ (−1)n − n2 π 2 αt / L2
nπx 
T ( x , t ) = (T1 − T0 )  + ∑
e
sin
 + T0
L
π
n
L 
1
n
=

Recall Table 6.1. One could certainly reduce the labor by employing that table where
appropriate.
7.3 MASS TRANSFER
Example 7.6
A slab of porous solid 1/2-in. thick is soaked in pure ethanol [1]. The void space in
the solid occupies 50% of its volume. The pores are fine, so that molecular diffusion
can take place through the liquid in the passages: there is no convective mixing. The
effective diffusivity of the system ethanol–water in the pores is one-tenth that in the
free liquid.
If the slab is placed in a large well-agitated reservoir of pure water at 77ºF, how
long will it take for the mass fraction of ethanol at the center of the slab to fall to
0.009? Assume that there is no resistance to mass transfer in the water phase and
that the concentration of ethanol in the water, and thus at the surface of the slab, is
constant at zero.
286
Applied Mathematical Methods for Chemical Engineers
Solution
Since the densities of alcohol and water differ by only 20%, then one may assume that
the total density remains constant such that
∂CA
∂2 CA
= DAB
∂t
∂ y2
is a reasonable mathematical description of the unsteady-state process under discussion. If the following substitutions
τ=
DAB t
C
y
, Y = A , ξ=
2
y0
Ctot
y0
are made, where the distance y is measured normal to the center of the slab, and y0 is
the half thickness of the slab, then we get
∂Y ∂ 2 Y
=
∂τ ∂ξ 2
subject to
∂Y (0, τ)
=0
∂ξ
Y (1, τ) = 0
Y (ξ, 0) = 1
This system of equations was solved in the context of heat transfer previously
(Example 7.1). There the solution was given as
∞
Y (ξ, τ ) = ∑ (−1)n
n =1
  2n − 1 2   2n − 1 
4
πξ 
π  τ  cos 
exp − 

   2
(2n − 1)π
  2
For ξ = 0 and Y = 0.009, and DAB = 1.0 cm2/s, it is determined that τ = 2.01.
Therefore,
t=
τy02
(2.01)(1/48)2
=
= 0.0217 h or 1.30 min
DAB (1/10)(1.0)(3.87)
Note that use is made of the solution from a previous problem that was solved in
dimensionless form. Also, the analogy between heat conduction and molecular diffusion can best be exploited when dimensionless variables are utilized.
Example 7.7
Diffusivities of gases in polymers [5] is a model of diffusion through a membrane,
which separates two compartments of a continuous-flow permeation chamber.
Essentially, at time t = 0, a penetrant is introduced into one compartment (the upstream
compartment) and permeates through the membrane into a stream flowing through the
other (downstream) compartment.
Applications of Partial Differential Equations in Chemical Engineering
287
Assumptions:
1. Diffusion of the penetrant in the gas phase and absorption at the membrane
surface are instantaneous processes.
2. Diffusion in the membrane is Fickian with a constant diffusivity D(cm2/s).
3. The concentration of dissolved gas at the downstream surface of the membrane is always sufficiently low compared to that at the upstream surface, such
that the downstream surface concentration may be set equal to zero.
Below are the models for a flat membrane of thickness h and a cylindrical membrane of inner radius a and outer radius b. The penetrant is introduced from the outside
(cylindrical case). Determine the rate at which the gas permeates through the downstream membrane surface.
Flat Membrane
∂C (t , x )
∂ 2 C (t , x )
=D
∂t
∂x2
C (0, x ) = 0
C (t ,0) = C1
C (t , h) = 0
Cylinder
∂C (t , x ) D ∂  ∂C 
=
r

r ∂r  ∂r 
∂t
C (0, r ) = 0
C (t , a) = 0
C (t , b) = C1
Solution
For the flat membrane case:
Let L{C (t , x )} = y(s, x )
then the differential equation transforms to
d2 y s
− y=0
dx 2 D
whose general solution is
 s 
 s 
y(s, x ) = k1 cosh 
x  + k 2 sinh 
x
 D 
 D 
subject to
L{C (t ,0)} =
and
C1
s
L{C (t , h)} = 0
288
Applied Mathematical Methods for Chemical Engineers
Therefore
 s 
h
−C1 cosh 
 D 
C
k1 = 1 , k 2 =
s
 s 
s sinh 
h
 D 
The solution in the s-domain is

 s 
 s 
 s 
 s 
h  cosh 
h  − cosh 
h  sinh 
x 
 sinh 
 D 
 D 
 D 
 D  

y(s, x ) = C1 

 s 


s sin 
h


 D 
and the inverse transform is derived using the residue theorem

s
 sinh(h − x )
D
−1 
C (t , x ) = C1L 
 s sinh  s h 
 D 



∞
P (s1 , x )

exp(sn t )
 = C1 ∑
n = 0 Q ′ ( sn )


s
h− x
D
=
For s0 = 0, the residue = lim
s→ 0
h
 s 
s sinh 
h
D


s sinh(h − x )
using L’Hopital’s rule. For sn ≠ 0
 h
 s 
 s 
Q ′(sn ) = sinh 
h +s
cosh 
h 
2
sD
 D 
 D  

Also, substituting
s
= iλ
D
simplifies the results and we get
π
λ = n , n = 1,2,
h
from sinh s / Dh = 0. Finally,
P ( sn , x )
2
nπx 
= − sin 

Q ′ ( sn )
nπ  h 
Applications of Partial Differential Equations in Chemical Engineering
289
and the concentration profile is
h − x 2 ∞ 1
 n 2 π 2tD   nπx  
C (t , x ) = C1 
− ∑ exp  −

 sin 

π n =1 n
h2   h  
 h
The rate of penetrant across the surface x = h is given by
∞
DAC1 
 n 2 π 2 Dt  
 ∂C 
=
J (t ) = − DA 
1 + 2∑ (−1)n exp  −


 ∂x  x =h

h 
h2  
n =1
for a flat membrane with a surface area A (cm2). Also, notice that the steady-state rate
Jss, is given by
Jss = D
AC1
h
Cylinder
The differential equation is Laplace transformed to
d 2u 1 du s
+
− u=0
dr 2 r dr D
subject to
u(s , a) = 0
u(s , b) =
C1
s
The general solution of the transformed differential equation is
 s 
 s 
u(s, r ) = k1 J 0  i
r + k 2Y0  i
r
 D 
 D 
where J0(·) are Y0(·) the zero-order Bessel functions of the first and second kind, respectively. Following the use of the transformed boundary conditions
k1 =
C1Y0 (αb)
s[ J 0 (αa)Y0 (αb) − J 0 (αb)Y0 (αa)]
and
k2 = −
C1 J 0 (αb)
s[ J 0 (αa)Y0 (αb) − J 0 (αb)Y0 (αa)]
where the substitution
α=i
s
D
290
Applied Mathematical Methods for Chemical Engineers
has been used. Therefore
u(s, r ) = C1
[Y0 (αb) J 0 (αr ) − J 0 (αb)Y0 (αr )]
s[ J 0 (αa)Y0 (αb) − J 0 (αb)Y0 (αa)]
The inverse transform gives
∞
C (t , r ) = ρ0 (t , r ) + ∑
n =1
P ( sn , r )
exp(sn t )
Q ′ ( sn )
where
ρ0 (t , r ) = lim s
s→ 0
P (s , r )
ln(b / r )
≡ lim s u(s, r ) = C1
0
s
→
Q (s )
ln(b / a)
The results for small arguments of the Bessel functions were employed where
appropriate. (Where?)
Finally, the concentration profile for the cylindrical geometry is
∞


ln(b / r )
+ π∑ J 0 (α n b0 (α n a)


ln(b / a)


n =1
C (t , r ) = C1 

[
Y
(
α
b
)
J
(
α
r
)
−
J
(
α
b
)
Y
(
α
r
)]
0
0
n
n
2
× 0 n 0 n

exp
−α
Dt
(
)
n


J 02 (α n a) − J 02 (α n b)


where
J 0 (α n a)Y0 (α n b) − J 0 (α n b)Y0 (α n a) = 0
defines the eigenvalues, α n ≠ 0, n = 1, 2, …
The rate of penetrant across the surface at r = a, for a cylinder of length L is
 ∂C 
J (t ) = 2πDLa 
 ∂r  r = a
=
∞

2πDLaC1 
J 0 (α n a) J 0 (α n b)
 b
exp ( −α n2 Dt ) 
1 + 2 ln   ∑ 2
ln(b / a) 
a n =1 J 0 (α n a) − J 02 (α n b)

Again, the steady-state permeation rate is
Jss =
2πDL aC1
ln(b / a)
for the cylinder.
Example 7.8
This model describes the release of relatively small molecules, such as benzoic
acid [6]. Initially, the solute to be released is present in solution in a reservoir. A
microporous membrane (a ≤ x ≤ b) without nonporous coating bounds the r­ eservoir.
The pores of the membrane are filled with a liquid that is immiscible with the r­ eservoir
phase (0 ≤ x < a).
291
Applications of Partial Differential Equations in Chemical Engineering
In addition, we assumed the following:
1.
2.
3.
4.
5.
6.
7.
8.
Diffusion of the agent (benzoic acid) is Fickian.
Interfacial boundary layers are not influential here.
Diffusivities of the agent are independent of concentration.
Aqueous–organic partition coefficient for the agent is independent of
concentration.
Reservoir and bath solutions are ideal.
Uniform temperature exists throughout the system.
Aqueous and organic phases are immiscible.
Initially, the agent in the reservoir is at some concentration below its saturation value in the solvent.
Following previous works in this area [7, 8], the governing equation for the agent
concentration in the reservoir is
and
∂C1
∂ 2 C1
= D1
∂t
∂x 2
(7.14)
∂C2
∂ 2 C2
= D2
∂t
∂x 2
(7.15)
is the governing equation for the agent in the membrane. The subscripts refer to the
respective regions [0, a] and [a, b] as shown in Figure 7.4.
D2 is an effective diffusivity and is defined as
D2 =
Dε
τ
(7.16)
where D is the agent diffusivity in the pore liquid, ε is the membrane porosity, and
τ is the membrane tortuosity. Both the agent diffusivity in the pore liquid (D) and in
the reservoir liquid (D1) are calculated (Wilke–Chang correlation [9]). The quantity
τ was defined and measured for various systems[10]; here we adopt the value given
x
0
a
b
FIGURE 7.4 Cross-section of membrane device.
292
Applied Mathematical Methods for Chemical Engineers
for a hydrophobic membrane. The porosity value (0.38) is a manufacturer-supplied
quantity.
Equations 7.14 and 7.15 are subject to the following boundary conditions:
(7.17)
∂C1 (0, t )
=0
∂x
(7.18)
∂C1 (a, t )
∂C (a, t )
= D2 2
∂x
∂x
(7.19)
∂C2 (b, t )
∂C (b, t )
= − D2α 2 m2, w 2
∂t
∂x
(7.20)
D1
Vw
C1 (a, t ) = m1,2C2 (a, t )
Further, as the entire agent is initially present in the reservoir phase, then
C1 ( x ,0) = C10
(7.21)
C2 ( x ,0) = 0
(7.22)
Equation 7.17 is a statement of the equilibrium partitioning at the reservoir–pore
liquid interface with m1,2 the partition coefficient. Equation 7.18 indicates that the
solute concentration is expected to be finite at the bottom of the reservoir. Equation
7.19 displays the continuity of the agent flux across the reservoir–pore interface,
whereas Equation 7.20 accounts for the material leaving the membrane and entering the surrounding water bath. The quantity α 2 is the membrane area at the outer
wall (cm 2).
In deriving the solution to the model, we recast the model in a dimensionless form
by introducing the following quantities:
u1 (ξ, θ) =
C1 ( x , t )
C10
(7.23)
u2 (ξ, θ) =
C2 ( x , t )
C10
(7.24)
x
Dt
, θ = 12
b
b
(7.25)
where
ξ=
The dimensionless model now consists of the following eight equations:
∂u1 ∂ 2 u1
=
∂θ ∂ξ 2
(7.26)
D1 ∂u2 ∂ 2 u2
=
D2 ∂θ
∂ξ 2
(7.27)
Applications of Partial Differential Equations in Chemical Engineering
293
u1 (a / b, θ) = m1,2u2 (a / b, θ)
(7.28)
∂u1 (0, θ)
=0
∂ξ
(7.29)
D1 ∂u1 (a / b, θ) ∂u2 (a / b, θ)
=
D2
∂ξ
∂ξ
(7.30)
∂u2 (1, θ)
∂u (1, θ)
=− 2
∂θ
∂ξ
(7.31)
β
u1 (ξ,0) = 1
(7.32)
u2 (ξ,0) = 0
(7.33)
where
β=
Vw D1
bm2, w D2α 2
(7.34)
This type of coupled system of equations is very amenable to the technique of Laplace
transform. As such, we let
∞
∞
0
0
u1 (ξ, s) = ∫ u1 (ξ, θ)e − sθ dθ and u2 (ξ, s) = ∫ u2 (ξ, θ)e − sθ dθ
(7.35)
such that Equations 7.26, 7.27, 7.32, and 7.33 transform to the second-order linear differential equations:
d 2u1
dξ 2
(7.36)
D1
d 2u2
su2 =
D2
dξ 2
(7.37)
su1 − 1 =
and
subject to the transformed boundary conditions:
u1 (a / b, s) = m1,2u2 (a / b, s)
(7.38)
du1 (0, s)
=0
dξ
(7.39)
D1 du1 (a / b, s) du2 (a / b, s)
=
D2
dξ
dξ
(7.40)
294
Applied Mathematical Methods for Chemical Engineers
βsu2 (1, s) = −
du2 (1, s)
dξ
(7.41)
The solution to the dimensionless model, Equations 7.36 through 7.41, is
D2  D2
a
a 
D2
ξ
λβ
cos λ  1 −  + sin λ  1 −   cos λ
 b
 b 
D1  D1
D1
sq(λ )
1
u1 = +
s
and
u2 =
[βλD2 / D1 sin λ (1 − ξ) − cos λ(1 − ξ)]  a
sin  λ
sq(λ)
 b
(7.42)
D2 
D1 
(7.43)
where
 D
a
a   a
q(λ ) = m1,2  λβ 2 sin λ  1 −  − cos λ  1 −   sin  λ



b
b   b
 D1
−
D2
D1
D2 
D1 
 a
 D2
a
a 
cos λ  1 −  + sin λ  1 −   cos  λ
 λβ




D
b
b
 b


1
(7.44)
D2 
D1 
The substitution
iλ =
D1s
D2
(7.45)
where i is the imaginary unit, was used in Equations 7.42 through 7.44.
Equations 7.42 and 7.43 are inverted by the residue theorem [11] to give
u1 (ξ, θ) =
m1,2 a / b
D2 a
1+ β
+ (m1,2 − 1)
D1 b
∞
+∑
n =1
D2
D1

D

 D2  −  λ 2n D12 θ

D2
 a
 a 
 λ nβ D cos λ n  1 − b  + sin λ n  1 − b   cos  λ n D ξ  e


1
1
 λ dq 


2 dλ  λ = λ
n
(7.46)
and
u2 (ξ, θ) =
a/b
D2 a
1+ β
+ (m1,2 − 1)
D1 b
  a

D2
 λ nβ D sin λ n (1 − ξ) − cos λ )n (1 − ξ)  sin  λ n b

 
1
+∑
 λ dq 
n =1
 2 dλ  λ = λ
n
∞

D

D2  −  λ 2n D12 θ
e
D1 
(7.47)
295
Applications of Partial Differential Equations in Chemical Engineering
25
Benzoic acid released (mg)
20
15
Theory
Expt.
10
5
0
0
20
40
60
80
100
120
Time (h)
FIGURE 7.5 Release profile for benzoic acid. (From Ramraj, R., Farell, S., and Loney,
N.W., Sep. Sci. Technol., 34, 225, 1999.)
where the eigenvalues, λ n, are defined by
tan λ n (1 − a / b) =
m1,2 tan(λ n a / b D2 / D1 ) + D2 / D1 D2 / D1 βλ n
λ n m1,2 D2 / D1β tan(λ n a / b D2 / D1 ) − D2 / D1
(7.48)
Then using Equation 7.24, the concentration profile of the agent at x = b can be
determined.
Figure 7.5 shows the release profile for benzoic acid, which was calculated using
the first eigenvalue (Equation 7.48) and the first two terms of Equation 7.47.
Example 7.9
This example considers drug delivery. A mathematical model that is used to describe
the sustained release of human immunoglobulin G from biodegradable polymers poly
(l-lactide) and poly (d,l-lactide-co-glycolide) microspheres is given in [34]. In the
development of this model, it was assumed that the mass transfer coefficient at the
surface is finite. If the mass balance is given as
∂C
 ∂ 2 C 2 ∂C 
= D 2 +
; 0 <r < R
 ∂r
r ∂r 
∂t
(7.49)
subject to the initial condition
C (r ,0) = C0 , 0 < r < R
(7.50)
296
Applied Mathematical Methods for Chemical Engineers
and boundary condition
∂C (0, t )
= 0, t > 0
∂r
(7.51)
and
C ( R, t ) = C ∞ , t > 0
(7.52)
Determine the mass of drug released to total mass M t / M T .
Solution
Let
∞
L {C (r , t )} = y (r , s ) ≡ ∫ e − st C (r , t ) dt
0
then Equation 7.49 becomes
 d 2 y(r , s)
s y (r , s ) − C (r ,0 ) = D 

dr 2
+
2 dy(r , s) 
r dr 
(7.53)
and the associated boundary conditions transform to
dy ( 0, s )
=0
dr
(7.54)
C∞
= y ( R, s )
s
(7.55)
Then the solution of the transformed system (Equations 7.49 through 7.55) is carried out in two parts:
a. By comparison of the associated homogeneous differential equation to
Equation 3.80
 d 2 y(r , s) 2 dy(r , s)  s
+
 − y (r , s ) = 0

r dr  D
 dr 2
we can see that
2a − 1 = −2 ⇒ a = −1 2; 2c − 2 = 0 ⇒ c = 1; a 2 − γ 2c 2 = 0 ⇒ γ = ±1 / 2;
b 2c 2 = −
s
s
⇒ b = ±i
D
D
Applications of Partial Differential Equations in Chemical Engineering
leading to
 s 
 s 
yc (r , s) = k1 r −1/ 2 J1/ 2  i
r  + k 2 r −1/ 2 J −1/ 2  i
r
D


 D 
 s 
 s 
r
r
sin  i
cos  i
 D 
 D 
≡ K1
+ K2
r
r
b. Determination of the particular solution, yP (in this case a constant) say
y p = B and following substitution into Equation 7.53, we get
s
C
C
yP = in ⇒ yP = in
D
D
s
Such that the general solution is given by
 s 
 s 
sin  i
r
cos  i
r
D


 D  Cin
yg (r , s) = K1
+ K2
+
r
r
s
Applying the transformed boundary conditions:
dy ( 0, s )
=0
dr
implies that the general solution must be bounded at the origin since
 s 
cos  i
r
 D 
→ ∞ as r → 0
r
therefore K 2 must be chosen as zero to obtain a bounded solution.
C∞
C
At r = R, y = ∞ ⇒
= K1
s
s
 s 
sin  i
R
 D  Cin
+
r
s
resulting in
K1 =
(C∞ − Cin ) R
 s 
R
Ssin  i
 D 
297
298
Applied Mathematical Methods for Chemical Engineers
Finally, the dimensionless concentration profile (in the Laplace Domain) is
 s 
r
sin  i
 D  Cin
.
+
r
s
 s
s sin  i
 D 
(C − Cin ) R
y (r , s ) = ∞
The dimensional concentration profile becomes


 sin  i

R

C ( r , t ) = L−1 { y ( r , s )} = Cin + (C∞ − Cin ) L−1 
r
 s sin  i


s  
r 
D  

s 
R
D  
employing the residue theorem to carry out the inversion

sin i


Ssin i

s 
r
D 
s 
R
D 
≡
 s 
 s 
P (r , s )
R
= F ( s ) ,where P (r , s ) = sin i
r  , Q ( s ) = s sin i
Q (s )
 D 
 D 
where
L−1 { F ( s )} =
∞
∑ ρ (t ),
n
n=0
ρn (t ) =
P ( sn )
Q ′ ( sn )
e sn t
and the poles of F (s) are the zeroes of Q(s).
This means that
 s 
 s 
0 = s sin  i
R ⇒ s = 0 or sin  i
R =0
 D 
 D 
For the case

sin  i

s = 0, ρn (t ) = ρ0 (t ) = lim s F (s) = lim
s→ 0
s→ 0

sin  i

 s 
1
i r s −1/ 2 D −1/ 2 cos  i
r
2
 D 
r
= lim
=
s→ 0
 s  R
1 −1/ 2 −1/ 2
cos  i
iR s D
R
2
 D 
s 
r
D 
s 
R
D 
299
Applications of Partial Differential Equations in Chemical Engineering
and for the case

s ≠ 0, sin  i

s 
s
− n2π 2 D
R = 0 ⇒i
R = nπ, ⇒ sn =
, n = 1,2,3
D 
D
R2
and also,
Q ′(s ) =
 s   R nπ
d
n nπ
R  =
cos nπ = ( −1)
 s sin  i
D
R
2
ds 
2

 
Consequently,
r
sin  nπ  n2 π2 D t

R  e − R2
ρn (t ) =
n nπ
( −1) 2
Hence
2
R ∞
r −n π D t
n
C (r , t ) = Cin + (C∞ − Cin ) + (C∞ − Cin ) ∑ ( −1) sin  nπ  e R2

R
π
r n =1
2 2
R ∞
r −n π D t
2
n
C∞ − Cin ) ∑ ( −1) sin  nπ  e R2
(

π
r n =1
R
2 2
= C∞ +
r −
sin  nπ  e
 R
∂C
2
R
n
= − (C∞ − Cin ) 2 ∑ ( −1)
∂r
π
r
n
+ (C∞ − Cin )
2 ∞
r −n
( −1)n cos  nπ  e
∑
r n =1
R
2
n2 π2 D t
R2
π2 D t
R2
At r = R,
∞ −
2
 ∂C 
 ∂r  = − R Cin − C∞ ∑ e
n =1
(
)
n2 π 2 D t
R2
Then
n2 π 2 D τ

t
∞ R3 −
∂C
R2
 dτ = −8 Cin − C∞ ∑
M (t ) = ∫  − D A
e
∂r r = R 
n =1 n 2π
0 
(
)

n2 π 2 D t 
−
∞ R3 
R2 
= 8 Cin − C∞ ∑

1 − e
2
n =1 n π 



(
)
t
0
300
Applied Mathematical Methods for Chemical Engineers
Finally,
n
−
R3 
−
e
1

2
n =1 n π 
∞
M (t )
=
MT
8 (Cin − C∞ ) ∑
2
π2 D t 
R2


4 3
πR (Cin − C∞ )
3
=
6 ∞ 1
6 ∞ 1 −n
− 2∑ 2e
∑
2
2
π n =1 n π n =1 n
2
π2 D t
R2
However,
1
1
1
1
+
+
+
+
12 p 22 p 32 p 4 2 p
=
2 2 p −1 π 2 p B p
( 2 p )!
, Bk are the Bernoulli numbers
therefore
1 2π 2 (1 6 ) π 2
∑ 2 = 2! = 6 , B1 = 1 / 6
n =1 n
∞
resulting in
M (t )
6 ∞ 1 −n
= 1− 2 ∑ 2 e
MT
π n =1 n
2
π2 D t
R2
7.4 COMPARISON BETWEEN HEAT AND MASS TRANSFER RESULTS
Quite frequently heat transfer problems have their analogs in mass transfer. This
can be fortuitous if recognized, as time and labor can be saved when solving a given
problem. One approach that can be very helpful in exposing the similarities between
two problems requires the use of dimensionless quantities. That is, recast the given
differential equation and its conditions into a dimensionless form. Then derive a
dimensionless solution. At this juncture, the solution is not tied to either heat transfer
or mass transfer and can be interpreted as needed.
In two previously worked-out applications, Examples 7.1 and 7.6, both situations
were reduced to the identical dimensionless differential equations
∂Y ∂2 Y
=
∂τ ∂ξ 2
subject to
∂Y (0, τ)
=0
∂ξ
Y (1, τ) = 0 and Y (ξ,0) = 1
This dimensionless model has the solution
Y (ξ , τ) =
∞ ( −1)n
∑
n =1
  2n − 1  2 
4
 2n − 1 
exp  − 
π  τ  cos 
πξ 


 2

(2n − 1)π
2


Applications of Partial Differential Equations in Chemical Engineering
301
This result may now be interpreted in terms of a heat transfer application
(Example 7.1) or a mass transfer application (Example 7.6).
As a second illustration, consider a solid body occupying the space from y = 0
to y = ∞ that is initially at a temperature T0. At time t = 0, the surface at y = 0 is
suddenly raised to a temperature T1 and is maintained at that temperature for some
t > 0. Determine the temperature profile T(y, t), if the mathematical statement of the
problem is given by
∂T
∂2 T
=α 2 ; y>0
∂t
∂y
T ( y,0) = T0
T (0, t ) = T1
T (∞, t ) = T0
Conveniently, the dimensionless temperature profile can be taken as
θ( y, t ) =
T − T0
T1 − T0
which recasts the differential equation into
∂θ
∂2 θ
=α 2
∂y
∂t
subject to
θ = 0 at t ≤ 0 ∀y
θ = 1 at y = 0 ∀t > 0
θ = 0 at y = ∞ ∀t > 0
Then, if we let
θ = f ( η), η =
y
4αt
(7.56)
the dimensionless differential equation can be reduced to an ordinary differential
equation:
f ′′( η) + 2 ηf ′( η) = 0
This latter differential equation has the general solution
η
f ( η) = k1 ∫ e − η d η + k2
2
0
with arbitrary constants k1 and k2. By employing the conditions
f (0) = 1 and
f ( ∞) = 0
(7.57)
302
Applied Mathematical Methods for Chemical Engineers
there results
θ=
T − T0
2
= 1−
T1 − T0
π
η
∫0 e−ξ
2
 y 
d ξ = 1 − erf 
 4αt 
Comparing this dimensionless temperature profile with the dimensionless
concentration profile (Example 7.11) results in identical form and substance:


cA − cA∞
x
= 1 − erf 

cA0 − cA∞
 4 DAB z / v0 
The error functions were previously discussed and defined in Section 6.4 but with
differing arguments. In the heat transfer interpretation, α represents thermal diffusivity whereas DAB represents mass diffusivity in the mass transfer case. Also,
the quantity z/v0 represents time whereas x and y are coordinates in their respective
systems. If one is able to anticipate analogies between conduction and diffusion in
certain specific situations, then a given issue may be resolved in a fraction of the time
it would otherwise take.
A procedure on how to convert dimensional differential equations to their dimensionless forms is given in Chapter 8.
7.5
SIMULTANEOUS DIFFUSION AND CONVECTION
By extending our definition of diffusion to include the process of heat transfer by
conduction, the examples that follow demonstrate how some problems involving diffusion and flow can be treated effectively with the mathematical tools previously
discussed. For example, consider the problem involving heat transfer to a flowing
fluid. This problem was solved [12] with the use of the confluent hypergeometric
function [13].
Example 7.10
An example of heat transfer to a laminar flow fluid in a circular tube, this, the so-called
Graetz problem, involves the determination of the temperature profile in a fully developed laminar flow fluid inside a circular tube.
The governing equation for the Graetz problem may be obtained from an energy
balance in cylindrical coordinates. Alternatively, one can start with the equation of
energy in terms of transport properties for Newtonian fluids of constant density ρ and
thermal conductivity k [14]. In cylindrical coordinates, the steady-state equation of
energy excluding the r and θ component of velocities and neglecting viscous dissipation is given by
ρCp vz (r )
∂T
 1 ∂  ∂T  1 ∂ 2 T ∂ 2 T 
+ 2
=k
r
+ 2
2
∂z 
∂z
 r ∂r  ∂r  r ∂θ
(7.58)
Applications of Partial Differential Equations in Chemical Engineering
303
Equation 7.58 can be further simplified if both the terms
∂2 T
∂2 T
and
∂θ2
∂z 2
are neglected on the basis that the amount of heat conducted in these directions are
negligible in comparison to that conducted in the r-direction as well as that conducted
by convection. The dimensionless form of the reduced Equation 7.58 is
(1 − ξ 2 )
∂ u 1 ∂  ∂u 
=
ξ
∂ζ ξ ∂ξ  ∂ξ 
(7.59)
subject to
u(0, ζ) is finite
(7.60)
u(1, ζ) = 0
(7.61)
u(ξ,0) = 1
(7.62)
where the dimensionless quantities
u ( ξ , ζ) =
Tw − T
r
kz
, ξ= , ζ=
Tw − T0
r1
ρCp vz max r12
have been used. Here, the quantities T0, Tw, r1, and vzmax are entering fluid temperature,
wall temperature, radius of tube, and maximum axial fluid velocity, respectively. Then,
applying the method of separation of variables to Equation 7.59, by assuming that
u(ξ, ζ) = f (ξ) g(ζ)
(7.63)
such that Equation 7.59 reduces to
g′ + λ 2 g = 0, ⇒ g(ζ) = c1e − λ ζ
(7.64)
d 2 f df
+
+ λ 2 ξ(1 − ξ 2 ) f = 0
dξ 2 dξ
(7.65)
2
and
ξ
where λ is real. To solve Equation 7.65, the Frobenius series method is appropriate.
However, the following substitutions will be made to recast the differential equation
into a more recognizable form:
(1) Let w = λ ξ 2 and (2) f(w) = e−w/2 y(w).
Then Equation 7.65 becomes
w
d2 y
dy  1 λ 
+ (1 − w)
− −  y= 0
2
dw
dw  2 4 
(7.66)
304
Applied Mathematical Methods for Chemical Engineers
following application of the chain rule. Equation 7.66 is a confluent hypergeometric
equation for which there are Tabulated solutions [13]. That is, Equation 7.66 has two
linearly independent solutions:
y1 ( w) = 1F1[a; b; w] = 1 +
a
a(a + 1) w 2 a(a + 1)(a + 2) w 3
w+
+
+
b
b(b + 1)2! b(b + 1)(b + 2)3!
where, in this case
b = 1, a =
1 λ
−
2 4
and
y2 ( w) = y1 log w +
aw  1 2 
 −  +
1!1!  a 1 
Therefore, the general solution to Equation 7.66 is
y( w) = c2 y1 ( w) + c3 y2 ( w)
The boundary condition given by Equation 7.60 requires that f(0) be finite, which
means that y(w) must also be finite. However, y2(w) is unbounded at w = 0, thus c3 must
be chosen as zero. For a nontrivial solution, c2 ≠ 0 such that
f (ξ) = c2 e − λ n ξ
2
1 λ

F 
;1; λξ 2 
2 4

/2
1 1
(7.67)
gives
1 λ

f (1) = c2 e − λ / 2 1F1  − ;1; λ  = 0
2 4

following application of the boundary condition given by Equation 7.61 ­resulting in
1 λ

F  − n ;1; λ n  = 0 for n ≥ 1
2 4

1 1
(7.68)
Equation 7.68 defines the n eigenvalues whereas Equation 7.67 defines the corresponding
eigenfunctions. Then, by the principle of superposition,
∞
1 λ

2
n
u(ξ, ζ) = ∑ Cn e−λ 2 ζ e−λ n ξ / 21F1  − n ;1; λ n ξ 2 


2
4
n =1
(7.69)
Applications of Partial Differential Equations in Chemical Engineering
305
is the solution to Equations 7.59 through 7.61. The condition given by Equation 7.62
reduces Equation 7.69 to
∞
u(ξ,0) = 1 = ∑ Cn e − λ n ξ
n =1
2
/2
1 λ

F  − n ;1; λ n ξ 2 
2 4

1 1
which is a generalized Fourier series. Then, by making use of the orthogonal properties of a Sturm–Liouville problem, Cn is given by
Cn =
 1 1  − λn / 2  3 λ n

; 2; λ n 
1F1  −
 2 − λ  e
2 4

n
1
∫0 ξ(1− ξ
2
2
)e
− λnξ2
  1 λn

;1; λ n ξ 2  dξ
F
−
 1 1  2 4

(7.70)
From the temperature profile given by Equation 7.69, the heat flux at the wall, the total
rate of heat transfer, and the bulk temperature of the fluid at the exit can be evaluated.
Also, using the arithmetic mean of terminal temperature differences together with
the definition of heat transfer coefficient, the arithmetic mean Nusselt number can be
expressed as a function of the Graetz number. Similarly, the logarithmic Nusselt number can also be obtained as a function of the Graetz number [12].
Example 7.11
This example considers diffusion into a falling film (see Figure 7.6) [8]. Consider the
diffusion of a solute A into a moving liquid film B. The liquid is in laminar flow.
Assuming that (1) the film moves with a flat velocity profile v0, (2) the film may be
taken to be infinitely thick with respect to the penetration of the absorbed material,
and (3) the concentration at the interface x = 0 is cA0, then the mathematical statement
of this problem is
v0
∂c A
∂ 2 cA
= DAB
∂z
∂x2
(7.71)
subject to
cA = cA0 at x = 0
(7.72)
cA = cA∞ at x = ∞
(7.73)
cA = cA∞ at z = 0
(7.74)
a. Derive the concentration profile for the solute A.
b. Derive a liquid-film mass transfer coefficient based on the driving force
cA0 − cA∞.
306
Applied Mathematical Methods for Chemical Engineers
x
z
v0
d
FIGURE 7.6
Diffusion into a falling film.
Solution
Let
cA − cA∞
x
= f ( η), η =
cA0 − cA∞
4 DAB z / v0
Then
∂c A
dη
= (cA0 − cA∞ ) f ′( η)
dz
∂z
dη
∂c A
= (cA0 − cA∞ ) f ′( η)
dx
∂x
2
2
d2 η
∂ cA
 dη 
c
c
f
(
)
(
)
=
−
η
+ f ′( η) 2
′′


A0
A∞
2


dx
dx
∂x
but
dη
2 DAB
=−
dz
v0
1
;
4 DAB z / v0 4 DAB z / v0
x
dη
1
=
dx
4 DAB z / v0
Applications of Partial Differential Equations in Chemical Engineering
307
Therefore, the differential equation reduces to
f ′′
= −2 η
f′
and the boundary conditions become
f ( η) = 1 at η = 0;
f ( η) = 0 at η = ∞
Integration of this new ordinary differential equation results in
η
f ( η) = k1 ∫ e − ξ d ξ + k 2
2
0
where k1 and k 2 are arbitrary constants. Imposing the boundary conditions results in
f ( η) = −
2
π
η
∫0 e − ξ
2


x
d ξ + 1 = 1 − erf 

 4 DAB z / v0 
That is,


cA − cA∞
x
= 1 − erf 

cA0 − cA∞
D
z
v
4
/

AB
0 
c. For short contact times for absorption in wetted-wall towers, the following
expression for the liquid-phase mass transfer coefficient was developed in
the literature [15].
The total moles of A transferred per unit time per unit cross-sectional transfer area is
NA =
ν0
L
∞
∫0 (cA − cA∞ )z = L d x =
4 DAB ν0
(cA0 − cA∞ ) = k L (cA0 − cA∞ )
πL
such that
kL =
4 DAB ν0
πL
Note that the quantity L/v0 is the time required for the liquid film to traverse the
length L.
The next two examples are solutions to the models that were developed in Chapter
1. We apply some of the mathematical methods discussed in the last five chapters to
address issues of some practical concerns. In both cases we were able to obtain favorable comparisons with available experimental data. It is understood that a mathematical model is useful so long as it reasonably describes the physics, chemistry, or biology
it is attempting to capture.
308
Applied Mathematical Methods for Chemical Engineers
Example 7.12
Recall the model developed in Chapter 1 describing the molecular contribution to the
mass transfer coefficient of a turbulent flowing fluid in a smooth tube. Use Equations
1.29 through 1.31 to derive the concentration profile for species A. Substitute the
derived concentration profile into Equation 1.14 and then develop a local average mass
transfer coefficient, k AV = NAV/Cb,AV (NAV is the average molar flux and Cb,AV is the average bulk concentration).
Vb
dC b
2
=−
N Ar
dz
Rb
Rb
(1.14)
Vb ∂CA
∂2 CA
x
=D
∂x2
δ
∂z
(1.28)
CA = 0 at x = 0
(1.29)
CA = Cb ( z ) at
CA = C0 at
x=δ
z=0
(1.30)
(1.31)
Solution
First, we recast Equations 1.28 through 1.31 by letting
u = C A − C0
Then taking the Laplace transform with respect to z
L{u( z , x )} = CA (s, x )
transforms the recast Equation 1.28 and 1.31 into Airy’s differential equation
d 2CA
− a 2 sxCA = 0
dx 2
where
V
a 2 =  b 
 Dδ 
The general solution to Airy’s equation can be given in either 1/3-Bessel functions or
Airy functions [17], that is,

2

2

CA ( x , λ ) = x 1/ 2  k1 J1/ 3  aλx 3/ 2  + k 2 J −1/ 3  aλx 3/ 2  




3
3

(7.80)
Applications of Partial Differential Equations in Chemical Engineering
309
or
C A ( y, λ ) =
3 1
(aλ )1/ 3 2
{
× k1  3 Ai(− y) − Bi(− y)  + k 2  3 Ai(− y) + Bi(− y) 
}
(7.81)
where
3 2

y =  ⋅ aλx 3/ 2 
2 3

2/3
= ( aλ ) 2 / 3 x
and
λ=i s
Both forms are utilized to evaluate the constants k1 and k2. The quantities Ai(−y) and
Bi(−y) are Airy functions [17].
The constants k1 and k2 turn out to be
 C (λ ) + C0  δ −1/ 2 − C0 (aλ )1/ 3 Γ  2  J  2 aλδ 3/ 2 

 b

  −1/ 3 
λ 2 31/ 3
λ2 
3
3
k1 =
2
J1/ 3  aλδ 3/ 2 
3

and
k2 =
C0 (aλ )1/ 3  2 
Γ 
 3
λ 2 31/ 3
where Cb (λ ) = L{Cb ( z )} symbolizes the Laplace transform and Γ (·) is the gamma
function.
The next step is to solve for the concentration of the transferring species in the
turbulent core, Cb(z). As the mass fluxes of the turbulent core and the laminar sublayer
are equal at the interface, Equation 7.75 may be written as
dCb
2 D ∂CA
=−
| x =δ
RVb ∂ x
dz
and Laplace transformed to
sCb (s) − C0 = −
2 D dC A
| x =δ
RVb dx
(7.82)
310
Applied Mathematical Methods for Chemical Engineers
Then using Equation 7.80 and performing the necessary simplification, we get
Dδ −1/ 2 (aλ )1/ 3 Γ (2 / 3)32 / 3 3
C b (λ )
1
RVb
π
=− 2 −
C0
λ


2
D
2
2
δ1/ 2 aλJ −1/ 3  aλδ 3/ 2  
λ 2  λ 2 J1/ 3  aλδ 3/ 2  −




3
RV
3
b


(7.83)
Equation 7.83 is inverted using the residue theorem to give the dimensionless concentration profile at the intersection of the laminar sublayer and the turbulent core:
Cb ( z ) Dδ −1/ 2 a1/ 3 37 / 6  2 
=
Γ  ×
 3
C0
RVb
π
∞
e− λn z
2 D 2 2 λ n2 RVb 
2
n = 1 5/ 3  2
J1/ 3  aλ n δ 3/ 2 
λn  +
δ a + δ
3

6
D 
 3 3 RVb
2
∑
(7.84)
The values for λ n, are defined by

2
 2 D 1/ 2
2
λ n J1/ 3  aλ n δ 3/ 2  =
δ aJ −2 / 3  aλ n δ 3/ 2 
3
 RVb
3

(7.85)
Mass Transfer Coefficient
To estimate a local mass transfer coefficient for comparison to available experimental data we take the approach that the mass transfer coefficient, k, can be defined as
the flux at the wall divided by the concentration difference between the bulk and
wall concentrations. In the case that the wall concentration is zero and the bulk
concentration is the same as that at the intersection of the laminar sublayer and the
turbulent core, Cb(z), we can define the flux at the wall, Nw, as
N w = − N Ax
x =δ
since δ is small. Employing Equations 7.82 and 7.84 results in
N Ax
x =δ
=
R dCb
Vb
2
dz
Therefore, the mass transfer coefficient, k, is
∞
R
k = Vb
2
∑ λ 2n Bn exp ( −λ 2n z )
n =1
∞
∑ Bn exp ( −λ n2 z )
n =1
Applications of Partial Differential Equations in Chemical Engineering
311
where
Bn =
1
2

D
RV 
2
2
2
λ
λ 5/3
δ 2 a 2 + n δ b  J1/3  aλ n δ 3/ 2 
n  +


D 
6
3
 3 3 RVb
In practice, an average value of the mass transfer coefficient, k AV, is used. Here, we
consider the average flux at the wall, NAV, over the closed interval [0, z] to be
N AV =
=
∞
z
RVbC0 Dδ −1/ 2 a1/3 37/6
Γ (2 / 3) ∫ ∑ λ 2n Bn exp ( −λ 2n z ) dz
0
2z
RVb π
n =1
∞
∞

DC0 δ1/ 2 a1/3 37/6
Γ (2 / 3)  ∑ Bn − ∑ Bn exp ( −λ 2n z ) 
2πz
n =1
 n =1

Also, the average bulk concentration is
Cb ,AV =
=
∞
z
C0 Dδ1/ 2 a1/3 37/6
Γ (2 / 3) ∫ ∑ Bn exp ( −λ 2n z ) dz
0
π
z RVb
n =1

C0 Dδ1/ 2 a1/3 34 /6  ∞  Bn  ∞  Bn 
exp ( −λ 2n z ) 
−∑
∑
π  n =1  λ 2n  n =1  λ 2n 
z RVb

Then the local average mass transfer coefficient, k AV, is defined to be
k AV = N AV / Cb ,AV
∞
=
( R / 2)Vb ∑ Bn 1 − exp ( −λ 2n z ) 
∞
n =1
∑ ( Bn / λ n2 ) 1 − exp ( −λ n2 z ) 
n =1
Comparison with Experimental Data
In the works cited, the experimentally derived mass transfer coefficients are referenced to the frictional velocity as
 f
K ∞+ = K ∞ / V * ; V * = Vb   ;
 2
f=
0.0791
N Re
where K∞ is the fully developed mass transfer coefficient (cm/s). Therefore, we also
reference k AV to the frictional velocity to get
*
K AV
= k AV / V *
312
Applied Mathematical Methods for Chemical Engineers
TABLE 7.1
Model Predictions versus Experimental Data
λ 1 × 103
5.9543
5.8209
5.6411
5.5643
5.3037
*
K Avg
× 104
K ∞+ × 10 4
K ∞+ × 10 4
(Model)
(Expt [18])
(Correlation [19])
y+ δ =
f(y+)
NRe
3.46
3.47
3.47
3.47
3.47
3.52
3.50
3.46
3.46
3.50
3.71
3.71
3.71
3.71
3.71
1.2
1.2
1.2
1.2
1.2
7750
11200
18600
23200
50200
Nsc
2400
2400
2400
2400
2400
Source: Huang, Chem. Eng. Sci., Vol. 59, 1191–1197, 2004. With permission.
Before making the comparisons, we needed to determine how many terms of the
infinite series are required to give a reasonable estimate of kAV. Because the eigenvalues increase rapidly as n increases (λ2/λ1 ≈ 2 orders of magnitude), we discovered that
for z ≥ 100 cm, kAV is influenced more by the first eigenvalue than by z. Also, the cited
experimental mass transfer coefficients [18,19] were all measured in the fully developed
flow region. Therefore, the criterion z ≥ 100 cm is satisfied in all cases, as the reported
fully developed region is well beyond 100 cm. This fact (z ≥ 100 cm) is used to get
R
k AV =   Vb λ12
 2
such that
*
K AV
=
( R2 )Vbλ12
V*
The first eigenvalue λ 1 can be determined using the Mathematica routine FindRoot
[20]. Then the local dimensionless fully developed mass transfer coefficient can be
calculated. Results using the first eigenvalue, λ 1, are reported in Table 7.1.
Example 7.13
This example considers the model of a subdivided mass exchanger that was developed
in Example 1.2. Determine the local solute concentration profile, CA(z, r) on the tube
side using the method of separation of variables discussed in Chapter 6. As part of
your solution, you will need to define the relationship that will yield the eigenvalues.
Also, use
2π
R
∫ ∫ CA ( L, r )νz (r )r dr dθ
CAb = 0 0 2π R
∫0 ∫0 νz (r )r dr dθ
to develop an expression for the bulk concentration. Finally, develop an expression for
CAb / CA0.
313
Applications of Partial Differential Equations in Chemical Engineering
Model
i. Tube-side:
1 ∂  ∂CA 
r 2  ∂C

νmax  1 − 2  A = DA
r


R  ∂z
r ∂r  ∂r 
(7.86)
subject to the boundary conditions
CA (0, r ) = CA0
(7.87)
∂CA ( z ,0)
=0
∂r
(7.88)
∂CA ( z , R)
= K (CA|r = R − CAS )
∂r
(7.89)
dCAS
= −2πRNK (CA|r = R − CAS )
dz
(7.90)
− DA
ii. Shell-side:
Q
subject to
CAS ( L ) = CASL
(7.91)
N is the number of fibers and Q is volumetric flow rate of the shell-side (sweep) stream.
Total mass balance of species A between the two streams:
Q(CAS0 − CASL ) =
NπR 2 νmax
2
4

CA0 − R 2

r=R

r2 

∫r = 0 C A| z = L  1 − R2  r dr 
(7.92)
CAS0 is the outgoing sweep stream concentration of species A (Figure 1.3).
Solution
Equations 7.89 through 7.86 were put into dimensionless forms:
(1 − ξ 2 )
∂θ 1 ∂  ∂θ 
=
ξ
∂ζ ξ ∂ξ  ∂ξ 
θ = 1 at ζ = 0
(7.93)
(7.94)
314
Applied Mathematical Methods for Chemical Engineers
∂θ
= 0 at ξ = 0
∂ξ
−
∂θ KR
=
(θ + θ S − 1)
∂ξ DA
(7.95)
(7.96)
= N Sh (θ + θ S − 1), at ξ = 1
The dimensionless variables were defined as follows:
Dimensionless tube-side concentration
θ(ζ, ξ) =
CA − CASL
CA0 − CASL
Dimensionless shell-side concentration
θ S (ζ) =
CA0 − CAS
CA0 − CASL
where ξ = r/R and ζ = DA z/vmax R2 are the dimensionless radial and axial coordinates,
respectively.
Equation 7.90 for the dialysate side is transformed into
dθ S 2πRNK νmax R 2
=
(θ| ξ =1 + θS − 1)
dζ
Q
DA
= 4 N ShV (θ| ξ =1 + θ S − 1)
(7.97)
subject to the condition
θS = 1 at ζ =
DA L
1  L2
=
 
2
Pe  R 
νmax R
(7.98)
The quantity V is the tube-side volumetric flow rate divided by the sweep-side (shellside) volumetric flow rate, Nsh is the Sherwood number and Pe is the length Peclet
number.
The method of separation of variables was used to solve the dimensionless system
of Equations 7.96 through 7.93; however, one could have used the methods of Laplace
transform.
Notice that Equation 7.93 is identical to Equation 7.59 of Example 7.9. Then the
boundary value problem will contain the identical second-order differential equation
(Equation 7.65):
ξ
d 2 f df
+
+ λ 2 ξ(1 − ξ 2 ) f = 0
dξ 2 dξ
Applications of Partial Differential Equations in Chemical Engineering
315
In Example 7.10, this differential equation was shown to be the confluent hypergeometric equation (Equation 7.66):
w
d2 y
dy  1 λ 
+ (1 − w)
− −  y= 0
dw 2
dw  2 4 
with linearly independent solutions
a
a(a + 1) w 2 a(a + 1)(a + 2) w 3
w+
+
+
b
b(b + 1)2! b(b + 1)(b + 2)3!
y1 ( w) = 1F1[a; b; w] = 1 +
where in this case
b = 1, a =
1 λ
−
2 4
and
y2 ( w) = y1 log w +
aw  1 2 
 −  +
1!1!  a 1 
The boundary condition given by Equation 7.95 requires that the solution be finite,
which eliminates the second solution. The resulting dimensionless concentration profile is given by
∞
θ(ζ, ξ) = ∑ An exp ( −λ n2ζ ) exp(−λ n ξ 2 / 2) 1F1[1 / 2 − λ n / 4;1; λ n ξ 2 ]
n =1
The substitution of this dimensionless concentration profile into Equation 7.97 and
solving the subsequent linear first-order differential equation produces the shell-side
dimensionless concentration profile, θ S (ζ ):
θ S (ζ ) =
(λ
4 N Sh V
2
n
∞
∑ Ane− λ
V)
+ 4 N Sh
n =1
n
2
1 λ

F  − n ;1; λ n 
2 4

1 1


 λ + 4 N ShV 
+ 4 N ShVζ − exp ( −λ n2ζ ) + 1
 exp  −
2 
Pe
(
R
L
)




2
n
The Fourier coefficient, An is defined (using Equation 7.94) by
An =
e− λn / 2
[1 F1[1 / 2 − λ n / 4;1; λ n ] − (1 − λ n / 2)1F1[3 / 2 − λ n / 4; 2; λ n ]]
λn
1
∫0
ξ(1 − ξ 2 )e − λ n ξ (1 F1[1 / 2 − λ n / 4;1; λ n ])2 d ξ
2
n ≥1
316
Applied Mathematical Methods for Chemical Engineers
The eigenvalues, λ n are defined (Equation 7.96) by
(λ n 1F1[1 / 2 − λ n /4;1; λ n ] − 2λ n (1 / 2 − λ n / 4)[1 F1 3/2 − λ n /4; 2; λ n ])
1  L2
 
Pe  R 
 
 1  L2
λ n2
  λ 2 + 4 N V  Pe  R 
n
Sh
= N Sh 1F1[1 / 2 − λ n /4;1; λ n ] 

4 N ShV
2
2
+ 2
2 1 − exp 
 − ( λ n + 4 N ShV / Pe( L / R) 
 ( λ n + 4 N ShV )
(
)
Where
and
−λ n ξ exp(−λ n ξ 2 / 2) 1F1[1 / 2 − λ n / 4;1; λ n ξ 2 ] 
dθ(ζ, ξ) ∞


2
= ∑ An exp ( −λ nζ ) 
d
2 
2
exp(
/
2)
(
[1
/
2
/
4;1;
+
−λ
ξ
−
λ
λ
ξ
])
F
dξ
n
n
n
1
n =1


dξ 1


λ
d
1


( F1[1 / 2 − λ n / 4;1; λ n ξ 2 ]) = 2λ n ξ  − n  1 F1 [ 3 / 2 − λ n / 4; 2; λ n ξ 2 ]
2 4 
dξ 1
Now the quantity, CAb / CA0 can be determined using the bulk concentration, CAb given
by
2π






R
∫ ∫ C A ( L, r )νz (r )r dr dθ
CAb = 0 0 2 π R
∫0 ∫0 νz (r )r dr dθ
such that
∞
A e − λ n / 2 1F1[1 / 2 − λ n / 4;1; λ n ]
CAb
C − CASL
= 1 + A0
4 N Sh ∑ n
CA0
CA0
λ 2n + 4 N ShV
n =1

 λ 2 + 4 N ShV  
×  exp−  n
−1
 Pe( R / L )2  

Typically, in the design of a dialysis system, one would like to know how much material would be removed for a given set of flow characteristics and system geometry.
To address that question, the eigenvalue equation was solved using the Mathematica
routine FindRoot to determine the first eigenvalue. Then, working in the same
Mathematica notebook, the Fourier coefficient was calculated for each case of
interest.
An application of the results from the above model (CASL = 0 and the first term of
the infinite series) was compared with published experimental data for the dialysis of
beer. That comparison is displayed in Figure 7.7.
Applications of Partial Differential Equations in Chemical Engineering
317
1
Model—Alcohol
Expt. —Alcohol
Model—Extract
Expt. —Extract
Fractional removal
0.8
0.6
0.4
0.2
0
50
100
200
300
400
500
600
Beer flow rate (mL/min)
FIGURE 7.7
7.6
Alcohol and extract removal as a function of beer flow rate.
SIMULTANEOUS DIFFUSION AND CHEMICAL REACTION
There are numerous practical situations in which both diffusion and chemical reaction may be occurring, for instance, during low-pressure chemical vapor deposition
(LPCVD), solid catalytic processes, or decoking a pyrolysis furnace, to name a few.
Example 7.14
This example involves the derivation of the differential equation and boundary conditions for a process step that is integral to microelectronics processing.
Consider the process of LPCVD in a horizontal cylindrical reactor heated from
the outside [16]. That is, the reactor is surrounded by a furnace that supplies heat to
the reacting contents. This heating strategy is the so-called hot wall process, and it is
usually assumed that heats of reaction are small in comparison to the supplied heat. In
this assumed isothermal process, thin circular disks called wafers are supported in a
special wafer holder consisting of prearranged slots of equal distance apart so that the
disks are located axisymmetric with the cylindrical tube. Material flows from one end
of the reactor in the annulus created by the wafers and the reactor wall, but diffusion is
anticipated to be the dominant mass transfer mechanism in the region bounded by any
two wafers. Derive the mathematical model using the following assumptions:
1. Diffusion is the mass transfer mechanism in the region between any two
wafers.
2. Gap between two wafers (inter-wafer region) is 2δ long.
3. Surface reaction dominates over homogeneous reaction.
318
Applied Mathematical Methods for Chemical Engineers
4. Azimuthal flow effects can be neglected.
5. Pseudo-binary mixture prevails.
6. Homogeneous gas phase reactions are negligible.
Also solve the derived system of equations for the concentration profile as a function of r (radial) and z (along the axis).
Solution
Conservation of mass applied to the reactant species A in the inter-wafer region:
1 ∂
∂
(rN Ar ) + N Az = 0
r ∂r
∂z
(7.99)
where NA is the molar flux relative to stationary coordinates [14] and is defined by
N A = −CDAB∇X A + X A ( N A + N B )
(7.100)
Then the molar flux in the r-direction for a dilute system is
N Ar = − DAB
∂CA
+ X A ( N Ar + N Br )
∂r
(7.101)
which consists of a diffusion part and a bulk flow part. For a diffusion-dominated
mechanism, Equation 7.101 becomes
N Ar = − DAB
∂CA
∂r
(7.102)
N Az = − DAB
∂CA
∂z
(7.103)
and the z-directed flux becomes
Therefore, substitution of Equation 7.102 and Equation 7.103 into Equation 7.99 gives
1 ∂  ∂CA  ∂ 2 CA
=0
r
+
r ∂r  ∂r  ∂ z 2
(7.104)
∂CA (0, z )
=0
∂r
(7.105)
subject to
Applications of Partial Differential Equations in Chemical Engineering
319
that is, no concentration gradient exists along the axis of the cylinder. By symmetry,
∂CA (r ,0)
=0
∂x
(7.67)
(7.106)
Also
CA ( RW , z ) = CAb
0 < z < δ)
(7.107)
where RW is the radius of the wafer and CAb is the bulk concentration of species A,
which varies along the length of the reactor. In addition, only half the inter-wafer
region need be considered.
The surface reaction can be taken as a first-order reaction; that is,
− DAB
∂CA
= kCA
∂z
at z = δ
(7.108)
Therefore, the mathematical model for the outlined process is
1 ∂  ∂CA  ∂ 2 CA
=0
r
+
r ∂r  ∂r  ∂ z 2
∂CA (0, z )
=0
∂r
∂CA (r ,0)
=0
∂z
CA ( RW , z ) = CAb , 0 < z < δ
− DAB
∂CA
= kCA
∂z
at z = δ
To solve this system of equations, the method of separation of variables will be
employed. Note that this is a homogeneous problem that requires special handling.
At this point, we need to broaden the definition of homogeneous to include a linear
condition or equation that when satisfied by a particular function F is also satisfied by
cF, where c is an arbitrary constant. This means that Equation 7.108 is homogeneous,
but cannot be treated in the usual way. In this problem, Equation 7.107 plays the role
of the initial condition.
Let CA(r, z) = R(r) Z(z), then substitute into the differential equation to get
1
R′′ + R′ − λR = 0
r
(7.109)
Z ′′ + λR = 0
(7.110)
and
320
Applied Mathematical Methods for Chemical Engineers
where λ is the separation constant (three cases to be considered). The homogeneous
boundary conditions become
R′(0) = 0
Z ′(0) = 0
The other two nonhomogeneous boundary conditions will be dealt with Section 7.6.
Case 1: λ = 0
Equation 7.109 solves to
R(r ) =
c2
+ c3
r
and R′(0) → ∞ unless c2 is choosen as zero.
Further, Equation 7.110 becomes
Z ′′ = (0) ⇒ Z ( z ) = m1z + m2
and
Z ′(0) = 0 = m1
Therefore, the implication is
CA (r , z ) = a constant.
However, Equation 7.108 would be violated; therefore, on physical grounds, the case λ
is zero must be rejected.
Suppose λ > 0, say λ = α 2; then we get from Equation 7.109
1
R′′ + R′ − α 2 R = 0
r
a modified Bessel’s equation [3,21]. This equation can be solved by comparing with
Equation 3.80 to give
R(r ) = c4 I 0 (αr ) + c5 K 0 (αr )
where I0(α r) is the zero-order modified Bessel function of the first kind and K0(α r) is
the zero-order modified Bessel function of the second kind, which contains a logarithmic term.
The constant c5 must be chosen as zero, as K0(·) and its derivative becomes
unbounded as r approaches zero. Therefore,
R(r ) = c4 I 0 (αr )
Applications of Partial Differential Equations in Chemical Engineering
Also, for this λ , Equation 7.110 gives Z(z) = m3 cos α z + m4 sin α z and
Z ′(0) = 0 = αm4 ⇒ m4 = 0
such that
Z ( z ) = m3 cos αz
Then for each n, we expect that
CA, n (r , z ) = Rn Z n = An I 0 (α n r ) cos α n z
and by the principle of superposition
∞
CA (r , z ) = ∑ An I 0 (α n r ) cos α n z
n =1
which must now satisfy
− DAB
∂CA
= kCA
∂z
at z = δ
from which we get
∞
∞
n =1
n =1
DAB ∑ An α n I 0 (r , z )sin α n δ = k ∑ An I 0 (α n r ) cos α n δ
Then, for n ≥ 1, the α n are defined by
α n tan α n δ =
k
DAB
Now, Equation 7.107 will be useful in defining the quantity An, that is,
∞
CA ( RW , z ) = CAb = ∑ An I 0 (α n RW ) cos α n z
n =1
which is recognizable as a generalized Fourier series. Therefore, for n ≥ 1,
δ
δ
∫0 CAb cos α n z d z = An I 0 (α n RW ) ∫0 cos2 α n z d z
δ 1
1
= An I 0 (α n RW ) ∫  + cos 2α n z  dz
0 2
2


δ 1  1 
= An I 0 (α n RW )  + 
 sin 2α n δ 
2
2
2
α

n


321
322
Applied Mathematical Methods for Chemical Engineers
or




1

An = 

 δ sin 2α n δ  

 I 0 (α n RW )  +
4α n  

2
(∫ C
δ
0
Ab
cos 2 α n z d z
)
For the case λ < 0, say, λ = −β 2, β > 0, Equation 7.109 becomes
R′′ +
1
R′ + β 2 R = 0
2
a Bessel differential equation [3,21], which can be solved by the same process of comparison used earlier. That is, compare this new R-equation with
a 2 − γ 2c 2 

 2a − 1 
y′′ − 
y′ +  b 2c 2 x 2 c − 2 +

 y = 0
 x 

x2
whose general solution is
y = x a J γ (bx c ) + x a J − γ (bx c )
Then, by comparison to the R-equation
2a − 1 = −1 ⇒ a = 0
2c − 2 = 0 ⇒ c = 1
a − γ 2c 2 = 0 ⇒ γ = 0
2
b 2c 2 = β 2 ⇒ b = β
such that the R-equation has general solution
R(r ) = c6 J 0 (βr ) + C7Y0 (βr )
where J0(β r) is the zero-order Bessel function of the first kind and Y0(β r) is the zeroorder Bessel function of the second kind, which contains a logarithmic term. As a
result of the logarithmic term, Y0(β r) and its derivative become unbounded as their
argument approaches zero. Therefore, the constant c7 must be chosen as zero, such that
R(r ) = c6 J 0 (βr )
Also, Equation 7.110 gives the general solution
Z ( z ) = m5eβz + m6 e −βz
Applications of Partial Differential Equations in Chemical Engineering
323
and
Z ′(0) = 0 = βm5 − βm6 ⇒ m5 = m6
such that
Z ( z ) = m5 (eβz + e −βz ) = 2m5 cosh βz
Then, for each n, all we can conclude at this point is
CA, n = H n J 0 (β n r ) cosh β n z
where the β n are to be defined. Then, by the principle of superposition,
∞
CA (r , z ) = ∑ H n J 0 (β n r ) cosh β n z
n =1
and
∂CA (r , δ) ∞
= ∑ H nβ n J 0 (β n r ) cosh β n δ
∂z
n =1
Therefore, Equation 7.108 becomes
∞
∞
n =1
n =1
− DAB ∑ H nβ n J 0 (β n r ) cosh β n δ = k ∑ H n J 0 (β n r ) cosh β n δ
or
β n tanh β n δ = −
k
, n ≥1
DAB
which defines β n. However, the argument of the hyperbolic tangent is positive, which
means that the left-hand side is always positive, whereas the right-hand side is negative.
This is impossible and therefore λ < 0 has to be rejected.
Finally, the solution to this model is given as
∞
CA (r , z ) = ∑ An I 0 (α n r ) cos α n z
n =1
where the Fourier coefficient is given by




1

An = 

 δ sin 2α n δ  

 I 0 (α n RW )  +
4α n  

2
(∫ C
δ
0
Ab
cos α n z d z
)
324
Applied Mathematical Methods for Chemical Engineers
and the eigenvalues are defined by
α n tan α n δ =
k
DAB
for n ≥ 1.
Example 7.15
This example considers the steady-state absorption of a gas that is sparingly soluble
in an agitated liquid [42] accompanied by an irreversible reaction. If the process is
described by
∂C
∂2 C
= D 2 − kC
∂t
∂x
(7.111)
C = Ci at x = 0, t > 0
(7.112)
C = C0 at t = 0, x > 0
(7.113)
C = C0 e − kt at x = ∞, t ≥ 0
(7.114)
C ( x , t ) = u ( x , t ) e − kt
(7.115)
∂u
∂2 u
=D 2
∂t
∂x
(7.116)
subject to the conditions
determine C ( x , t ) .
Solution
Letting
reduces Equation 7.111 to
which can be solved by the Combination of Variables method.
Substituting
u ( x , t ) = f ( η) , η =
x
4 Dt
(7.117)
into Equation 7.116 such that
du ( x , t ) = df ( η)
and applying the chain rule to Equation 7.118 results in
∂u
∂u
df
dx +
dt =
dη
∂x
∂t
dη
(7.118)
325
Applications of Partial Differential Equations in Chemical Engineering
Recalling the total derivative of η ( x , t ) is
dη =
∂η
∂η
dx +
dt
∂x
∂t
results in
 ∂η
∂u
∂η 
∂u
dx + dt = f ′ ( η)  dx + dt 
∂x
∂x
∂t
∂t 
(7.119)
Upon equating like coefficients of both sides,
dx :
∂u
∂η
= f ′ ( η)
∂x
∂x
(7.120)
dt :
∂u
∂η
= f ′ ( η)
∂t
∂t
(7.121)
From Equation 7.120, we get
∂2 u
 ∂η 
= f ′′ ( η)  
 ∂x 
∂x2
since
2
(7.122)
∂η
is independent of x . Substituting Equations 7.120 through 7.122 results in
∂x
f ′′ ( η) + 2 ηf ′ ( η) = 0
subject to
u ( 0, t ) = Ci = f ( 0 )

u ( x ,0 ) = C0 = f ( ∞ )
u ( ∞, t ) = C = f ( ∞ )
0

The general solution to Equation 7.123 is
f ( η) = m1 ∫ e − η d η+ m2
2
Applying the conditions results in
f ( η) =
∞
2
(C0 − Ci ) ∫ e − η2 d η+ Ci
π
0
= C0 erf ( η) + Ci erfc ( η)
 x 
 x 
C ( x , t ) = C0 e − kt erf 
+ Ci e − kt erfc 
 4 Dt 
 4 Dt 
(7.123)
326
Applied Mathematical Methods for Chemical Engineers
Example 7.16
The following system of equations have been used in the modeling of biodegradation
processes:
1 ∂CA ∂ 2 CA 2 ∂CA  1 − ε s  K
=
+
−
CA
∂r 2
Dse ∂t
r ∂r  ε s  Dse
(7.124)
CA (0, t ) is finite
(7.125)
∂CA
k
=
(C A − Cb ) at r = R
Dse
∂r
(7.126)
CA (r ,0) = CA0
(7.127)
Determine the concentration profile for species A.
Solution
To simplify the problem let
CA (r , t ) = u(r , t ) + F (r )
(7.128)
where u(r, t) represents the transient solution and F(r) represents the steady-state solution. Further, we require that
2
F ′′ + F ′ − βF = 0
r
(7.129)
F is to be finite at r = 0
(7.130)
dF ( R) k m
=
( F ( R) − C b )
dr
Dse
(7.131)
and
Then Equations 7.124 through 7.126 reduce to
1 ∂u ∂ 2 u 2 ∂u
=
+
− βu
Dse ∂t ∂r 2 r ∂r
(7.132)
Applications of Partial Differential Equations in Chemical Engineering
327
subject to
u(0, t ) is finite
(7.133)
∂u k m
u at r = R
=
∂r Dse
(7.134)
where
β=
1 − εs K
ε s Dse
As a further simplification to Equations 7.132 through 7.134, let
u(r , t ) = e − Dse βt w(r , t )
(7.135)
such that Equations 7.132 through 7.134 become
1 ∂ w ∂2 w 2 ∂w
= 2 +
Dse ∂t
∂r
r ∂r
(7.136)
subject to
w(0, t ) is finite
(7.137)
∂ w km
=
w at r = R
∂r Dse
(7.138)
Then, by separation of variables, that is, for w = f(r)T(t), we get
1 T ′ f ′′ 2 f ′
=
+
=λ
Dse T
f r f
For the case λ = 0, we get f(r) = a constant, which implies that zero is an eigenvalue for
this problem. This solution must be rejected, however, since Equation 7.138 could be
satisfied only for the particular case of w being identically zero.
The case λ > 0, say, λ = α 2, produces
T (t ) = c1e λDse t
and
f ′′ +
2
f ′ − α2 f = 0
r
328
Applied Mathematical Methods for Chemical Engineers
which has
f (r )c2r −1/ 2 J1/ 2 (iαr ) + c2r −1/ 2 J −1/ 2 (iαr )
as its general solution. However, w = f(r)T(t) is required to remain finite, even as t gets
larger and larger. This condition cannot be met for λ > 0.
For λ < 0, say, λ = −η 2, then we have
f ′′ +
2
f ′ + η2 f = 0
r
whose general solution is
f (r ) = c4
J1/ 2 ( ηr )
J ( ηr )
+ c5 −1/ 2
r
r
Again, for a bounded solution, c5 must be chosen as zero, as
J −1/ 2 ( ηr )
r
becomes unbounded as r approaches zero. However, for a nontrivial solution to exist,
c4 ≠ 0.
Recall now that
J1/ 2 ( ηr ) =
2
sin ηr
ηπr
J1/ 2 ( ηr )
=
r
2 sin ηr
ηπ r
such that
Therefore, the solution up to now is
∞
w(r , t ) = ∑ Ai e − η Dse t
i =1
2
2 sin ηr
ηπ r
(7.139)
with the use of the superposition principle. That is, Equation 7.139 solves Equations
7.136 and 7.137. Equation 7.138 will define the eigenvalues for this system in the following way:
∂w ∞
2  η cos ηr sin ηr 
2
= ∑ Ai e − η Dse t
− 2 

r
r 
∂r n = 1
ηπ 
329
Applications of Partial Differential Equations in Chemical Engineering
then, at r = R
η cos ηR sin ηR k m sin ηR
−
=
, i ≥1
R
R2
Dse R
or
k R 
ηi R =  m + 1 tan ηi R; i ≥ 1
 Dse

(7.140)
u(r ,0) = w(r ,0) = CA0 − F (r )
(7.141)
The initial condition is
where F(r) is the solution to Equations 7.129 through 7.131. That is,
let F (r ) =
q(r )
q′(r ) − q(r )
q′′(r ) 2
2q(r )
, then F ′(r ) =
, and F ′′(r ) =
− q′ + 3
r
r
r2
r
r
r
Then these substitutions reduce Equation 7.129 to
q′′(r ) − βq(r ) = 0
whose general solution is
q(r ) = k1 cosh βr + k 2 sinh βr
Therefore
F (r ) =
k1 cosh βr k 2 sinh βr
+
r
r
However, k1 must be chosen as zero, as F(0) is required to be finite. Also, Equation
7.131 gives
k2 =
R 2C b k m
 R k m 

Dse  1 +
sinh β R − R β cosh β R 
Dse 


such that
F (r ) =
R 2Cb k m sinh βr
 R k m 

Dse  1 +
sinh β R − R β cosh β R  r

Dse 


(7.142)
330
Applied Mathematical Methods for Chemical Engineers
Finally,
∞
u(r , t ) = e − Dse βt w(r , t ) = ∑ Ai e − ( Dse β+ ηi Dse )t
2
i =1
2 sin ηi π
ηi π r
or
∞
CA (r , t ) = F (r ) + ∑ Ai e − ( Dse β+ ηi Dse )t
2
i =1
2 sin ηi π
ηi π r
then at t = 0,
∞
CA (r ,0) = F (r ) + ∑ Ai
i =1
2 sin ηi π
= CA0
ηi π r
or
∞
CA0 − F (r ) = ∑ Ai
i =1
2 sin ηi π
ηi π r
defines Ai. That is, for i ≥ 1,
R
∫0 (CA0 − F (r ))r 2
2
sin ηi r
2 R 2  sin ηi r 
r
dr = Ai
dr
r
ηi π ∫0  r 
where r2 is the weighting function.
7.7 SIMULTANEOUS DIFFUSION, CONVECTION,
AND CHEMICAL REACTION
This type of phenomenon is typified by flowing systems, in which both surface and
homogeneous chemical reactions are occurring. However, sometimes the mathematics associated with these phenomena may be too nontractable and a simpler model
may be sought. Simplifying assumptions that are used to reduce a model would still
require some measure of justification, at least in theory. In the very next example, an
approach is taken that can be used to determine the effect of diffusion and surface
reaction on a chemical vapor deposition process.
Example 7.17
In multiwafer LPCVD systems, the convection contribution to the transport of reactants to surface sites in the interwafer region is usually neglected [22]. Consider laminar flow with a velocity profile in the annulus, between the wafers and the reactor
walls. This velocity profile is assumed to be constant and contains the ratio of wafer
Applications of Partial Differential Equations in Chemical Engineering
331
radius to that of the reactor, denoted by κ . Then in this case, an average velocity, vavg
can be described by [14]
vavg =
( P0 − PL ) R 2  1 − κ 4
1− κ2 
−

2
8 µL
ln(1 / κ ) 
1 − κ
(7.143)
where R is the reactor radius. A mathematical description of the process occurring in
this annulus region is given as
vavg
1 ∂  ∂CA 
∂CA
= DAB
r
 − k bCA
∂z
r ∂r  ∂r 
(7.144)
subject to
at z = 0
(7.145)
CA is finite at r = 0
(7.146)
CA = CA0
and
− DAB
∂CA
= k sC A
∂r
at r = R
(7.147)
The differential equation is the equation of continuity of species A for constant density ρ and binary diffusivity DAB [14]. Also, the r and θ components of velocity are
neglected. Develop an equation that can be used to justify the assumption of transport by diffusion in the interwafer region of a multiwafer LPCVD reactor.
Solution
Equations 7.144 through 7.147 can be recast in dimensionless form as
∂ F ∂2 F 1 ∂ F
=
+
− αF
∂ζ ∂ξ 2 ξ ∂ξ
(7.148)
F = 1 at ζ = 0
(7.149)
F is finite at ξ = 0
(7.150)
∂F
= βF at ξ = 1
∂ξ
(7.151)
subject to
−
332
Applied Mathematical Methods for Chemical Engineers
where the dimensionless quantities
F ( ξ , ζ) =
CA
r
D z
R2 kb
kR
; ξ = ; ζ = AB 2 ; α =
; β= s
CA0
R
vavg R
DAB
DAB
were used. Equation 7.148 is nonhomogeneous and can be made homogeneous by the
substitution
w(ξ, ζ) = Feαζ
(7.152)
Therefore, the system
∂ w ∂2 w 1 ∂ w
=
+
∂ζ ∂ξ 2 ξ ∂ξ
w = 1 at ζ = 0
w is finite at ξ = 0
−
∂w
= βw at ξ = 1
∂ξ
can now be solved using the method of separation of variables to give
∞
F = ∑ Bn J 0 (λ n ξ)e − ( λ n +α )ζ
2
n =1
(7.153)
where the eigenvalues λ n are defined by
β J 0 (λ n ) = λ n J1 (λ n ), n ≥ 1
(7.154)
and
Bn =
2 J1 (λ n )
λ n [( J1 (λ n ))2 + ( J 0 (λ n ))2 ]
(7.155)
The axial concentration profile can be predicted from
∞

∂F
2
= −  ∑ Bn λ 2n J 0 (λ n ξ) + αBn J 0 (λ n ξ)e − ( λ n +α )ζ 
∂ζ
 n =1

= −λ n2 F − αF
{
(7.156)
The left-hand side of the Equation 7.156 can now be written in dimensional form as
dCA /dt. That is,
D
dC A
= −  λ n2 AB
+ k b  CA


R2
dt
(7.157)
D
dpA
= −  λ n2 AB
+ k b  pA


R2
dt
(7.158)
or by the ideal gas law
where t = z/vavg has been used.
Applications of Partial Differential Equations in Chemical Engineering
333
Equation 7.157 or 7.158 can be used to argue the effect of diffusion and surface
reaction on the overall deposition process. Notice that the eigenvalues, λ n, are defined
in relation to the overall surface rate coefficient ks, and the term ( λ 2n DAB /R 2 ) grows as
n increases, whereas kb tends to remain relatively constant.
Example 7.18
This is an example of rapid chemical reaction in the laminar boundary layer on a flat
plate. Consider the steady-state dissolution of a slightly soluble solid in a flowing dilute
solution, and suppose the solid is acidic whereas the flowing solution is basic [23]. The
geometry under consideration is a flat plate consisting of acid, located at zero incidence
to the flow. The process may be assumed isothermal, and the fluid properties are to be
treated as independent of position.
Species A dissolves from the plate and diffuses into the reaction zone, whereas
species B diffuses into the reaction zone from the main body of the solution. In
the negligibly thin reaction region, the two substances undergo a fast irreversible
reaction:
aA + bB → products
(7.159)
In the region between the reaction zone and the surface, the diffusional process can
be described by
u
∂CA
∂C
∂2 CA
+ v A = DA
∂x
∂y
∂ y2
(7.160)
u
∂CB
∂C
∂2 CB
+ v B = DB
∂x
∂y
∂ y2
(7.161)
whereas
describes the diffusional process in the region outside the reaction zone. DA and DB
represent the diffusivities of species A and B in the fluid, whereas CA and CB are molar
concentrations. The quantities u and v are respectively the x and y components of the
boundary layer velocity and satisfy the continuity equation [14, 24]
∂u ∂ v
+
=0
∂x ∂ y
(7.162)
and the x-component equation of motion [14, 24]
u
∂u
∂u
∂2 u
+v
=γ 2
∂x
∂y
∂y
(7.163)
Then, the velocity components [24] are given by
u=
∂Ψ ∂Ψ ∂η
=
= U ∞ f ′( η)
∂ y ∂η ∂ y
(7.164)
334
Applied Mathematical Methods for Chemical Engineers
and
v=−
∂Ψ 1 νU ∞
=
( ηf ′ − f )
∂x 2
x
(7.165)
with U∞ being the free stream velocity (far away from the surface) and η the combined
variable defined as
η= y
U∞
νx
(7.166)
where Y is the kinematic viscosity. The dependent variable Ψ is the stream function
[14].
Upon substitution of Equations 7.164 through 7.166 into Equation 7.163, there results
ff ′′ + 2 f ′′′ = 0
(7.167)
the so-called Blasius equation [24].
Now, one would like to know the rate at which dissolution takes place as a function
of distance from the leading edge of the plate and the concentration of reactant in the
mainstream (far from the surface).
Solution
Let
CA
C
, cB = B
CAS
CBM
cA =
(7.168)
where CAS is the surface concentration (moles/L) of A, and CBM is the mainstream
concentration (moles/L) of B. Then, for
cA ( x , y) = f ( η)
(7.169)
∂c A
∂c
df
dx + A dy =
dη
∂x
∂y
dη
(7.170)
η = η( x , y)
(7.171)
but
Therefore,
dη =
∂η
∂η
dx +
dy
∂x
∂y
Substituting Equation 7.172 into Equation 7.170 gives
df  ∂η
∂c A
∂c
∂η 
dx + A dy =
dx +
dy
dη  ∂ x
∂x
∂y
∂ y 
(7.172)
Applications of Partial Differential Equations in Chemical Engineering
Equating coefficients of dx and dy,
dx :
∂cA df ∂η
∂η
=
= f ′( η)
∂ x dη ∂ x
∂x
dy :
∂cA df ∂η
∂η
=
= f ′( η)
∂ y dη ∂ y
∂y
and
By letting
H ( x , y) =
∂cA
∂η
and φ( η, y) = f ′( η)
∂y
∂y
suggest that
dH ( x , y) = dφ( η, y)
such that
∂H
∂H
∂φ
∂φ
dx +
dy =
dη +
dy
∂x
∂y
∂η
∂y
=
∂φ  ∂η
∂η  ∂φ
dx +
dy +
dy
∂η  ∂ x
∂ y  ∂ y
and equating coefficients give
∂ H ∂φ ∂η
=
∂ x ∂η ∂ x
∂ H ∂φ ∂η ∂φ
=
+
dy :
∂ y ∂η ∂ y ∂ y
dx :
that is,
2
 ∂η 
∂  ∂η 
∂ H ∂ 2 cA
∂2 η
+
η
+
η
=
=
f
η
f
f
)
(
)
2
(
)
(
′
′
′′




 ∂y 
∂η  ∂ y 
∂y
∂ y2
∂ y2
But
∂η
U∞
=
,
∂y
νx
∂2 η
∂  U∞ 
=0= 2


∂y
∂η  νx 
and
∂η
η
=−
∂x
2x
335
336
Applied Mathematical Methods for Chemical Engineers
Therefore, Equation 7.160 becomes
−
uηf ′( η)
U
U
+ v ∞ f ′( η) = 2 DA ∞ f ′′( η)
2x
νx
νx
Then, with Equations 7.164 and 7.165,
−
U ∞ η[ f ′( η)]2 1  U ∞ ν  1/ 2  U ∞  1/ 2
U∞
f ′′( η)
+ 
 
 f ′( η) ( ηf ′ − f ) = 2 DA
2x
2  x   νx 
νx
which reduces to
−
ff ′
D
= 2 A f ′′
2
ν
That is,
2 d 2cA f dcA
+
=0
SA dη2 2 dη
(7.173)
Equation 7.161 can be similarly transformed to
2 d 2cB f dcB
+
=0
SB dη2 2 dη
(7.174)
The quantities SA and SB are Schmidt numbers (Y /D) for the respective species.
Equations 7.173 and 7.174 are subject to the conditions
cA = 1 at η = 0
cA = cB = 0 at η = ηR
cB = 1 at η = ∞
and
cB = 1 at η = ∞.
Substituting Equation 7.167 into Equation 7.173 and integrating results in
η
∫ ( f ′′)SA / 2 d η ,
cA = 1 − η0
∫0 ( f ′′)SA / 2 d η
R
0 < η < ηR
(7.175)
, ηR < η < ∞
(7.176)
Similarly, Equation 7.174 gives
η
∫η ( f ′′)S
cB = 1 − ∞
∫η ( f ′′)S
B/2
dη
B/2
dη
R
R
337
Applications of Partial Differential Equations in Chemical Engineering
Example 7.19
This is an example of rapid chemical reaction in the laminar boundary layer on a flat
plate. Reconsider the previous example with nonisothermal condition and constant
fluid properties. In this case, assume that the surface temperature TS and the mainstream temperature TM are constant. This implies that the temperature of the reaction
zone TR is also constant. Under these conditions, determine the temperature profile for
species A.
Solution
The equation of energy [14] can be modified to
u
∂TA
∂T
∂ 2 TA
+v A =α
∂x
∂y
∂ y2
(7.177)
for the problem under consideration. The temperature of species A can be made
dimensionless by
TR − TA
TR − TS
tA =
(7.178)
Equation 7.177 becomes
∂t A
∂t
∂2 t
+ v A = α 2A
∂x
∂y
∂y
u
(7.179)
Then, following the procedure of Example 7.18, Equation 7.179 can be reduced to
2 d 2 t A f dt A
+
=0
Pr dη2 2 dη
(7.180)
subject to the conditions
t A = 1 at η = 0
(7.181)
t A = 0 at η = ηR
where the quantity Pr is the Prandtl number (cp ρ Y / k).
Equations 7.180 and 7.181 solve to
T − TA
tA = R
= 1−
TR − TS
η
∫0 ( f ′′)P
η
∫0 ( f ′′)P
r/2
R
r/2
dη
dη
, 0 < η < ηR
338
Applied Mathematical Methods for Chemical Engineers
Example 7.20
In this example of carrier-facilitated transport in membrane separation, consider a
bundle of parallel hollow fibers through which a fluid flows [25]. One can examine the
concentration profile in a single fiber and then predict the performance of the separation device. Further, consider a fluid (Newtonian) from which the solute is to be
extracted while entering the reactive section of the hollow fiber in fully developed,
one-dimensional laminar flow. As shown in Figure 7.8, at z equal zero, the fluid contacts the reactive membrane. At such a location the solute concentration CA is uniform
and has the value CA0. As the fluid flows further into the reactive section, the solute
diffuses through the membrane by carrier-facilitated transport and emerges into the
second fluid (shell side), which surrounds the hollow fiber. CA is negligible axially on
the shell side, as the incoming shell-side fluid is devoid of the solute, and is at a much
higher flow rate. An alternative to this condition is a constant solute concentration on
the shell side.
Following the development in the literature [26], a reversible equilibrium reaction
of the form
k1
A + B = AB
(7.182)
k2
occurs inside the membrane, where A is the solute, B is the carrier, and AB is the
solute–carrier complex. The quantities k1 and k 2 are the forward and reverse rate
coefficients.
The equation of continuity for the solute (species A) in this system is
1 ∂  ∂CA 
r 2  ∂C

2 νavg  1 − 2  A = DA
r


R  ∂z
r ∂r  ∂r 
(7.183)
Shell side
Reactive section
R
r
Impermeable wall
z
Fluid side
A + B = AB
Shell side
Inlet plane
FIGURE 7.8 Hollow fiber with reactive walls containing the supported carrier.
Applications of Partial Differential Equations in Chemical Engineering
339
subject to
CA = CA0
− DA
at z = 0
(7.184)
∂CA
= 0 at r = 0
∂r
(7.185)
∂CA
= k w Sf (CA ) at r = R
∂r
(7.186)
where DA is the solute diffusivity in the fluid, kw is the membrane mass transfer coefficient for the solute, and S is the shape factor based on the inside radius, R, of the hollow
fiber. This shape factor [25,27] behaves as a correction factor for geometry. It permits
the translation of experimental data derived in flat membranes to nonflat membrane
configurations for the same experimental conditions.
Equation 7.186 is the boundary condition that incorporates the relevant information
given in Equation 7.182 as to the rate of disappearance of species A. Usually, f(CA) is a
quotient of two polynomials, and is typically of the form [25]
f (CA ) =
DB′ CT K eq
DA′ (1 + K eqCA H )
CA
(7.187)
where the prime indicates diffusivity of that substance in the membrane, Keq is k1/k2.
The equilibrium (thermodynamic) distribution coefficient, H, is defined as a proportionality factor relating the concentration of species A in the two phases (membrane and fluid). The quantity CT accounts for the concentration of species B and AB.
Determine the concentration profile for species A.
Solution
Introducing the dimensionless variables
C=
CA
r
zDA
; ξ= ; ζ=
CA0
R
νavg R 2
into Equations 7.183 through 7.185, we get
2(1 − ξ 2 )
∂C ∂ 2 C 1 ∂C
=
+
∂ζ ∂ξ 2 ξ ∂ξ
(7.188)
C = 1 at ζ = 0
(7.189)
∂C
= 0 at ξ = 0
∂ξ
(7.190)
Then, recognizing that f(CA) can be recast as an infinite series in dimensionless form
to be
340
Applied Mathematical Methods for Chemical Engineers
∞
(1 + α )C + α ∑ (−1)n ε nC n +1
n =1
Equation 7.186 becomes
−
∂C
= w[(1 + α )C − εαC 2 + ε 2αC 3 − ε 3αC 4 + ] at ξ = 1
∂ξ
(7.191)
where w is defined as
w=
Rk w S
DA
(7.192)
a dimensionless group called the wall Sherwood number. The dimensionless quantities
α and β are defined in the literature [25]. In this work ε is less than one, and can be
associated with the quantity β in two cases. In one case, let ε be β , whereas in another
let ε be the reciprocal of β (for β > 1).
The system consisting of Equations 7.188 through 7.189 and Equation 7.191 can be
recast by using the following form of the dimensionless concentration:
C = F0 + εF1 + ε 2 F2 + 
(7.193)
such that
∂C ∂ F0
∂F
∂F
=
+ ε 1 + ε2 2 + 
∂ζ
∂ζ
∂ζ
∂ζ
∂C ∂ F0
∂ F1
∂
F
=
+ε
+ ε2 2 + 
∂ξ ∂ξ
∂ξ
∂ξ
∂ 2 C ∂ 2 F0
∂2 F
∂ 2 F2
=
+ ε 21 + ε 2
+
2
2
∂ξ
∂ξ
∂ξ
∂ξ 2
which then results in
 ∂F

∂F
∂F
2(1 − ξ 2 )  0 + ε 1 + ε 2 2 + 
∂ζ
∂ζ
∂ζ



∂ 2 F0
∂2 F
1  ∂F
∂F
+ ε 21  +  0 + ε 1 + 
2
∂ξ
∂ξ
ξ  ∂ξ
∂ξ

(7.194)
F0 + εF1 + ε 2 F2 +  = 1 at ζ = 0
(7.195)
∂ F0
∂F
∂F
+ ε 1 + ε 2 2 +  = 0 at ξ = 0
∂ξ
∂ξ
∂ξ
(7.196)
 ∂F

∂F
−  0 + ε 1 +  = w{(1 + α ) F0 + ε((1 + α ) F1 − αF02 ) + O(ε 2 )}
∂ξ
 ∂ξ

(7.197)
=
Applications of Partial Differential Equations in Chemical Engineering
341
Equating coefficients of like powers of ε gives
ε 0 : 2(1 − ξ 2 )
−
(7.199)
∂ F0
= 0 at ξ = 0
∂ξ
(7.200)
∂ F0
= w(1 + α ) F0
∂ξ
at ξ = 1
(7.201)
∂ F1 ∂ 2 F1 1 ∂ F1
=
+
∂ζ
∂ξ 2 ξ ∂ξ
(7.202)
F1 = 0 at ζ = 0
(7.203)
∂ F1
= 0 at ξ = 0
∂ξ
(7.204)
∂ F1
= w[(1 + α ) F1 − αF02 ] at ξ = 1
∂ξ
ε 2 : 2(1 − ξ 2 )
−
(7.198)
F0 = 1 at ζ = 0
ε : 2(1 − ξ 2 )
−
∂ F0 ∂ 2 F0 1 ∂ F0
=
+
∂ζ
∂ξ 2 ξ ∂ξ
∂ F2 ∂ 2 F2 1 ∂ F2
=
+
∂ζ
∂ξ 2 ξ ∂ξ
(7.205)
(7.206)
F2 = 0 at ζ = 0
(7.207)
∂ F2
= 0 at ξ = 0
∂ξ
(7.208)
∂ F2
= w[(1 + α ) F2 − 2αF0 F1 + αF03 ] at ξ = 1
∂ξ
(7.209)
The system of Equations 7.198 through 7.201 is linear, and can be solved using separation of variables to give
∞
 λ

F0 = ∑ Bn exp − n (λ nζ + ξ 2 ) 
 2

n=0
1 λ

F  − n ; 1; λ n ξ 2 
2 4

1 1
(7.210)
342
Applied Mathematical Methods for Chemical Engineers
where the λ n are defined by
1 λ

{λ n − w(1 + α )} 1F1  − n ; 1; λ n 
2 4

1 λ 
3 λ

−2λ n  − n  1F1  − n ; 2; λ n  = 0
2 4 
2 4

(7.211)
and Bn by
{
−
λn 2
ξ
2
}
1 λ

F  − n ; 1; λ n ξ 2  d ξ
2 4

 , n≥0
Bn =
1
λn
2 1
2
2
2
∫0 ξ(1 − ξ ) exp{−λ n ξ } 1F1  2 − 4 ; 1; λ n ξ  dξ
1
∫0 ξ(1 − ξ) exp
1 1
(7.212)
where
1 λ

F  − n ;1; λ n ξ 2 
2 4

1 1
is one solution of the confluent hypergeometric equation or Kummer’s equation [13].
Values of both λ n and Bn can be derived as described in the literature [28], or by
employing standard software packages, such as Mathematica [20,29].
The system described by Equations 7.202 through 7.205 is also linear, but separation of variables is not the appropriate solution technique. Here Laplace transform is
more suitable. That is, by transforming the ζ variable while treating ξ as a parameter,
one gets Kummer’s equation as follows:
∞
Let L{F1 (ζ, ξ)} ≡ ∫ e − sζ F1 (ζ, ξ) dζ = F1 (s, ξ)
0
(7.213)
Then Equations 7.202 and 7.203 become
d  dF1 
− 2sξ(1 − ξ 2 ) F1 = 0
ξ
dξ  dξ 
(7.214)
where s is a complex number. Solving Equation 7.214 and applying the transformed
Equation 7.204 results in

1 i s

2s 2 
; 1; i 2s ξ 2 
F1 (s, ξ) = η(s) exp − i
ξ  1F1  −
2
2 2 2



and one can see that replacing i 2s with λ results in
1 λ

F1  − n ;1; λ n ξ 2 
2 4

(7.215)
343
Applications of Partial Differential Equations in Chemical Engineering
the identical solution of Kummer’s equation previously obtained, where η (s) is defined
by
η(s) =
{ }
−αF02 exp i
s
2
[i 2s − w(1 + α)] 1F1  12 − i2 22s ;1; i 2s 
1 i s 
 3 i 2s

; 2; i 2s 
− 2i 2s  −
1 F1  −
2
2
2
 2 2 2 


following the Laplace transformation of Equation 7.205. Here the quantity F02 represents the Laplace transform of F02 , where F0 is the solution of Equations 7.198 through
7.201. Equation 7.215 can now be expressed in terms of λ as
F1 (s, ξ) =
−αwF02 exp{λ /2(1 − ξ 2 )} 1F1  12 − λ4 ; 1; λξ 2 
[λ − w(1 + α )] 1F1  12 − λ4 ; 1; λ  − 2λ ( 12 − λ4 ) 1F1  32 − λ4 ; 2; λ 
(7.216)
where i 2s is replaced by λ . Equation 7.216 can be inverted with the use of the residue theorem [30]. That is,
∞
p(sn )
exp{snζ}
q
n = 0 ′ ( sn )
L−1{F1 (s, ξ)} = ∑
(7.217)
where p(sn) and q’(sn) are the numerator and denominator, respectively, of Equation
7.216.
This latter example demonstrates that several mathematical techniques may be
required to achieve an analytical solution to a complicated transport model. In addition, the regular perturbation technique is used to reduce the problem to a set of linear
problems that we know how to solve.
7.8
VISCOUS FLOW
Example 7.21
A fluid of constant density (ρ ) and viscosity (μ) is contained in a very long horizontal
pipe of length L and radius R [14, 35]. The fluid is at rest initially. At t = 0, a pressure
gradient
 p0 − pL 


L 
is impressed on the system. Determine how the velocity profiles change with time.
344
Applied Mathematical Methods for Chemical Engineers
Solution
Cylindrical coordinates are convenient.
Assumptions:
1. Both the r and θ -component of velocity are zero.
2. vz = vz(r, t).
Problem Setup:
The equations of motion and continuity [14] are combined to give
ρ
1 ∂  ∂ vz 
∂ vz p0 − pL
=
+µ
r

L
r ∂r  ∂r 
∂t
subject to
vz (r ,0) = 0, 0 ≤ r ≤ R
vz (0, t ) is finite, t > 0
vz ( R, t ) = 0, t > 0
Then it is convenient to introduce the following dimensionless variables:
φ(ξ, τ) =
vz
µt
r
; ξ= ; τ= 2
( p0 − pL ) R 2 /4µL
ρR
R
Substitution of the dimensionless variables into the differential equation gives
1 ∂  ∂φ 
∂φ
= 4+
ξ
∂τ
ξ ∂ξ  ∂ξ 
and the conditions become
φ(ξ,0) = 0 φ(1, τ) = 0
and φ(0, τ) is finite
This is a case in which the differential equation is nonhomogeneous. However, the fact
that the system is expected to reach a steady state as τ → ∞ can be used to reduce the
differential equation to a homogeneous one. That is, assume a solution of the dimensionless system to be
φ(ξ, τ) = φ∞ − w(ξ, τ)
where ɸ ∞ is the steady-state solution satisfying
0= 4+
1 d  dφ ∞ 
ξ
ξ dξ  dξ 
φ∞ (1) = 0 and φ∞ (0) is finite
Applications of Partial Differential Equations in Chemical Engineering
345
and w(ξ , τ ) is the transient solution satisfying
∂w 1 ∂  ∂w 
=
ξ
∂τ ξ ∂ξ  ∂ξ 
w(ξ,0) = φ∞
w(1, τ) = 0
w(0, τ) is finite
Further, assuming a solution of the form
w(ξ, τ) = Z (ξ)T (τ)
gives
T ′ Z ′′ 1 Z ′
=
+
= −α 2
T
Z ξ Z
or
T′
2
= −α 2 ⇒ T (τ) = c1e −α τ
T
and
Z ′′ +
1
Z ′ + α2 Z = 0
ξ
subject to
Z (0) is finite and Z ( I ) = 0
which is a singular Sturm–Liouville problem involving Bessel’s differential equation.
As in previous examples, the general solution to this differential equation is
Z (ξ) = c2 J 0 (αξ) + c3Y0 (αξ)
where J0(·) and Y0(·) are zero-order Bessel functions. Applying the boundary conditions, we see that the constant c3 must be chosen as zero, as Y0(α ξ ) becomes unbounded
as ξ → 0 and Z(ξ ) is to be finite. The second boundary condition gives
J 0 (α ) = 0
for nontrivial solutions to exist. Further, as J0(α ) crosses the α -axis infinitely many
times, then for each n
Z n = c2, n J 0 (α n ξ)
346
Applied Mathematical Methods for Chemical Engineers
is the eigenfunction corresponding to the eigenvalue α n satisfying
J 0 (α n ) = 0
Also for each n
wn (ξ, τ) = Bn e −α n τ J 0 (α n ξ)
2
where the constants c1 and c2,n are combined as Bn. Then, by the principle of
superposition
∞
wn (ξ, τ) = ∑ Bn e −α n τ J 0 (α n ξ)
2
n =1
satisfies the differential equation and the boundary conditions. Application of the initial condition gives
∞
(1 − ξ 2 ) = ∑ Bn J 0 (α n ξ)
n =1
which is a generalized Fourier series. Then the Fourier coefficient can be determined
by (Sturm–Liouville theory of Chapter 4)
1
1
∫0 ξ(1 − ξ 2 ) J0 (α n ξ) dξ = Bn ∫0 ξ[ J0 (α n ξ)]2 dξ,
n ≥1
Here, the weight function is ξ , for the case of a singular Sturm–Liouville problem as
discussed in Chapter 4. Then with the aid of integral tables for Bessel functions [3,21],
we get
Bn =
8
α 3n J1 (α n )
for n ≥ 1
Therefore
∞
J 0 (α n ξ) −α 2n τ
e
3
α
n = 1 n J1 (α n )
φ(ξ, τ) = (1 − ξ 2 ) − 8∑
is the solution.
An alternative to the steady-state hypothesis is to solve the dimensionless problem
using Laplace transform. That is, reconsider
1 ∂  ∂φ 
∂φ
= 4+
ξ
∂τ
ξ ∂ξ  ∂ξ 
Applications of Partial Differential Equations in Chemical Engineering
347
and the conditions
φ(ξ,0) = 0
φ(1, τ) = 0
φ(0, τ) is finite
Then let
∞
L{φ(ξ, τ)} = u(ξ, s) = ∫ φ(ξ, τ)e − sτ d τ
0
The differential equation transforms to
d 2u 1 du
−4
+
− su =
2
ds
s
ξ dξ
subject to
{L{φ(0, τ)} = u(0, s)
L{φ(0, τ)} = u(1, s) = 0}
The general solution to the nonhomogeneous differential equation is
(
)
(
)
u(ξ, s) = c1 J 0 i s ξ + c2Y0 i s ξ +
4
s2
As ɸ (0, τ ) is finite, then its Laplace transform is also expected to be finite. This means
that c2 must be chosen as zero, since Y0 (i s ξ) → ∞ as ξ → 0. The second
boundary condition gives
c1 =
−4
s 2 J0 i s
( )
Therefore
u(ξ , s ) =
( )+ 4
( ) s
−4 J 0 i s ξ
s 2 J0 i s
2
348
Applied Mathematical Methods for Chemical Engineers
The inverse transform for u(ξ ,s) can be located in a table of Laplace transforms, for
example [3],
(
)
( )
2
∞
 J 0 i s ξ  1
e − λ n τ J 0 (λ n ξ )
L−1 
= (ξ 2 − 1) + τ + 2∑

3
2
n = 1 λ n J1 (λ n )
 s J 0 i s  4
where λ 1, λ 2, … are the positive roots of J0 (λ ) = 0. Therefore
∞
e − λ n τ J 0 (λ n ξ )
3
n = 1 λ n J1 (λ n )
2
φ(ξ, τ) = (1 − ξ 2 ) − 8∑
Example 7.22
Consider now the problem of tangential Newtonian flow in annuli. Suppose one is
interested in studying the velocity profiles of an isothermal, incompressible viscous
fluid in the annular space between two cylinders, with either one or both cylinders
rotating (Figure 7.9). Then, following the literature [31],
∂ vθ
∂ 1 ∂

(rvθ ) 
=µ 
∂t
∂r  r ∂r

vθ = κRΩi at r = κR
ρ
vθ = RΩo
at r = R
vθ = 0 at t = 0
Ω
Ωi
(r, q)
r
θ
Fluid
κR
R
FIGURE 7.9 Fluid in annular space between rotating cylinders.
Applications of Partial Differential Equations in Chemical Engineering
349
models the phenomena of interest. If the following dimensionless variables are
substituted,
ξ = r /R : radical coordinate
τ = µt / ρR 2 : dimensionless time
vθ
φ=
: tangential velocity
R(Ωo − Ωi )
Ωi
−α =
: angular velocity
(Ωo − Ωi )
the model can be reduced to

∂φ ∂  1 ∂
=
(ξφ) 

∂τ ∂ξ  ξ ∂ξ

subject to
φ = −ακ
at ξ = κ
φ = 1 − α at ξ = 1
(7.218)
φ = 0 at τ = 0
The condition given by Equation 7.218 motivates the use of the Laplace transform
method to determine ɸ (τ , ξ ). If
∞
L{φ(τ, ξ)} = ∫ e − sτ φ(τ, ξ) d τ ≡ y(s, ξ)
0
(7.219)
then the dimensionless differential equation and Equation 7.218 become
sy(s, ξ) − φ(0, ξ) =
d 2 y ( s , ξ ) 1 dy ( s , ξ ) y
+
− 2
dξ 2
ξ dξ
ξ
subject to the Laplace transformed boundary conditions:
y(s, k ) = −κα / s
y(s,1) = (1 − α ) / s
Rewriting, the second-order ordinary differential equation is recognizable as a Bessel
equation where s is a parameter and ξ is the independent variable:
d 2 y(s, ξ) 1 dy(s, ξ) 
1
+
−s+ 2  y = 0
2
dξ
ξ dξ
ξ 

350
Applied Mathematical Methods for Chemical Engineers
Then, by comparison to
a 2 − v 2c 2 

 2a − 1 
y′′ − 
y′ +  b 2c 2 x 2 c − 2 +
 y = 0
 x 

x2
whose solution is
y = c1 x a J ν (bx c ) + c2 x a J − ν (bx c )
where a = 0, c = 1, b = i s , and Y = 1, we get
y(s, ξ) = c1 J1 (i s ξ) + c2Y1 (i s ξ)
where the second solution, J−1(·), is denoted by Y1(·). Then at ξ = κ ,
c1 J1 (i sκ ) + c2Y1 (i sκ ) = −κα / s
and at ξ = 1,
c1 J1 (i s ) + c2Y1 (i s ) = (1 − α )/s
Therefore
ακ
Y1 (i sκ )
s
1− α
Y1 (i s )
s
−
ακ
1− α
Y1 (i s ) −
Y1 (i sκ )
s
s
c1 =
=
J1 (i sκ )Y1 (i s ) − J1 (i s )Y1 (i sκ )
J1 (i sκ ) Y1 (i sκ )
−
J1 (i s ) Y1 (i s )
and
1− α
ακ
J1 (i sκ ) +
J1 (i s )
s
s
c2 =
J1 (i sκ )Y1 (i s ) − J1 (i s )Y1 (i sκ )
Therefore
y( s , ξ ) =
−
Y1 (i s )ακ + (1 − α )Y1 (i sκ )
J1 (i s ξ)
s( J1 (i s )Y1 (i sκ ) − J1 (i sκ )Y1 (i s ))
(1 − α ) J1 (i sκ ) + ακJ1 (i s )
Y1 (i s ξ)
s( J1 (i s )Y1 (i sκ ) − J1 (i sκ )Y1 (i s ))
Applications of Partial Differential Equations in Chemical Engineering
Let
λ j = i s j ⇒ s j = −λ 2j
and
dλ j
ds
=
−1
2λ j
then in terms of λ , y(s, ξ ) becomes
y( λ , ξ ) =
[Y1 (λ )ακ + (1 − α )Y1 (λκ )]J1 (λξ) [(1 − α ) J1 (λκ ) + ακJ1 (λ )]Y1 (λξ)
−
−λ 2 ( J1 (λ )Y1 (λκ ) − J1 (λκ )Y1 (λ )) −λ 2 ( J1 (λ )Y1 (λκ ) − J1 (λκ )Y1 (λ ))
Now, by applying the formula
∞
L−1{y(s, ξ)} = φ(τ, ξ) = ∑ ρn (τ, ξ)
n=0
where
ρn (τ, ξ) =
P ( s n , ξ ) sn τ
e
Q ′ ( sn )
the inverse Laplace transform of y(s, ξ ) can be derived.
First, recall that
P ( sn )
P (s )
P (s)
= lim (s − sn )
= lim
Q ′ ( s n ) s → sn  Q ( s ) − Q ( s n )  s → sn
Q(s)


s − sn


such that for s0 = 0
ρ0 (τ) =
P (0)
P (s )
= lim s
0
s
→
Q ′(0)
Q (s )
Then for
y( λ , ξ ) =
P (λ , ξ )
Q (λ )
where
P (λ , ξ) = [ακY1 (λ ) + (1 − α )Y1 (λκ )]J1 (λξ) − [(1 − α ) J1 (λκ ) + ακJ1 (λ )]Y1 (λξ)
and
Q(λ ) = −λ 2 [ J1 (λ )Y1 (λκ ) − J1 (λκ )Y1 (λ )]
ρ0 (τ) = lim s
s→ 0
P (s )
P (λ , ξ )
= lim(−λ 2 )
Q(s) λ→ 0
Q (λ )
351
352
Applied Mathematical Methods for Chemical Engineers
But
−λ 2 P (λ , ξ) [ακY1 (λ ) + (1 − α )Y1 (λκ )]J1 (λξ) − [(1 − α ) J1 (λκ ) + ακJ1 (λ )]Y1 (λξ)
=
Q(λ )
J1 (λ )Y1 (λκ ) − J1 (λκ )Y1 (λ )
and for small values of λ
J1 (λκ ) = λκ /2
and
Y1 (λκ ) = −2/πλκ
such that
[ακY1 (λ ) + (1 − α )Y1 (λκ )]J1 (λξ) − [(1 − α ) J1 (λκ ) + ακJ1 (λ )]Y1 (λξ)
J1 (λ )Y1 (λκ ) − J1 (λκ )Y1 (λ )
k2
1 − α (1 − κ 2 )
=
ξ−
ξ −1
1− κ2
1− κ2
lim
λ→ 0
That is,
ρ0 (τ) =
k2
1 − α (1 − κ 2 )
ξ−
ξ −1
1− κ2
1− κ2
is the steady-state solution.
Then for sn ≠ 0 ⇔ λ n ≠ 0, n = 1,2,
J1 (λ n )Y1 (λ n κ ) − J1 (λ n κ )Y1 (λ n ) = 0
(7.220)
With the use of Equation 7.220, P(λ , ξ ) becomes
P (λ , ξ ) =
1
[(1 − α ) J1 (λκ ) + ακJ1 (λ )][Y1 (λκ ) J1 (λξ)
J1 (λκ )
− J1 (λκ )Y1 (λξ)
Differentiating Q(λ ) and using Equation 7.220 results in
dQ
= −λ 2 [ J1′(λ)Y1 (λκ ) + J1 (λ)Y1′(λκ ) − J1′(λκ )Y1 (λ) − J1 (λκ )Y1′(λ )]
dλ
But
1
J1′( z ) = J 0 ( z ) − J1 ( z )
z
(7.221)
Applications of Partial Differential Equations in Chemical Engineering
353
and
1
Y1′( z ) = Y0 ( z ) − Y1 ( z )
z
therefore

J (λκ ) J1 (λ )Y1 (λκ )  
dQ

= −λ 2  J 0 (λ )Y1 (λκ ) − J1 (λκ )Y0 (λ ) + κ  J1 (λ )Y0 (λκ ) − 0

J1 (λκ )
dλ

 

which reduces to
−2λ
dQ
=
[ J12 (λ) − J12 (λκ )]
dλ πJ1 (λκ ) J1 (λ )
following substitution of
J1 (λ )Y0 (λ ) − J 0 (λ )Y1 (λ ) = 2/πλ
and
J1 (λκ )Y0 (λκ ) − J 0 (λκ )Y1 (λκ ) = 2/πλκ
Therefore
Q ′ ( sn ) =
−1  dQ 
1
=
[ J12 (λ n ) − J12 (λ nκ )]


2λ  dλ  λ = λ n πJ1 (λ n κ ) J1 (λ )
Finally
ρn (τ, ξ) =
=
P (λ n , ξ) − λ n2 τ
e
Q ′ ( sn )
πJ1 (λ n )[(1 − α ) J1 (λ n κ ) + ακJ1 (λ n )][Y1 (λ n κ ) J1 (λ n ξ) − J1 (λ n κ )Y1 (λ n ξ)] − λ 2n τ
e
J12 (λ n ) − J12 (λ n κ )
and
1 − α (1 − κ 2 )
κ
ξ−
ξ −1
1− κ2
1− κ2
∞
πJ (λ )[(1 − α ) J1 (λ n κ ) + ακJ1 (λ n )][Y1 (λ n κ ) J1 (λ n ξ) − J1 (λ n κ )Y1 (λ n ξ)] − λ 2n τ
e
+∑ 1 n
J12 (λ n ) − J12 (λ n κ )
n =1
φ(τ, ξ) =
Using these dimensionless results, now back-substitute to recover the dimensioned
variables in which the problem was stated.
354
Applied Mathematical Methods for Chemical Engineers
Example 7.23
This example considers Laminar Flow in a Flat Duct with Permeable Walls [38]. In this
example a system is modeled, which consists of a dilute solution flowing in a fully developed laminar mode through a semi-infinite flat duct. The material concentration is uniform up to a point ( z = 0 ) , where the fluid contacts a permeable wall, outside of which
the concentration is constant. One would like to determine the concentration profile and
mass flux for the region z > 0. Assumptions include steady-state conditions, absence of
convection through the wall, homogeneous fluid with no sources or sinks, a solute partition coefficient of one between the ducted fluid and outside the wall and neglecting axial
diffusion. The dimensionless model is given as
3
∂Ψ ∂ 2 Ψ
(1 − 4 y 2 ) = 2
2
∂x
∂y
Ψ = 1, x ≤ 0, ∀y
subject to
∂Ψ
= 0, y = 0 , ∀x
∂x
∂Ψ
1
−
= N Sh Ψ , y =
∂x
2
(7.222)
(7.223)
(7.224)
(7.225)
The dimensionless quantities are defined as
Ψ=
(c − c0 ) ; x = z D
ci − c0
v h 2 ; y = r h; N Sh = local Sherwood number , k h D
where c is concentration, D is diffusion coefficient, v is average velocity, h is channel height, z axial coordinate, k is local mass transfer coefficient, and r is transverse
coordinate.
Solution
Employing the method of separation of variables leads to
X′
2
= − β2
X
3
(7.226)
d 2Y
+ β 2 (1 − 4 y 2 ) Y = 0
dy 2
(7.227)
dY
= 0, at y = 0
dy
(7.228)
and
subject to the conditions
−
dY
= N ShY at y = 1 2
dy
(7.229)
Applications of Partial Differential Equations in Chemical Engineering
355
Here the assumed product solution was
Ψ ( x , y ) = X ( x )Y ( y )
(7.230)
At this point we deviate from the approach used in [38] to emphasize an approach
that was used in Section 7.5 (i.e., Example 7.10). Here we seek to transform Equation
7.227 into a prototype, Kummers differential equation [13], which then allows us to
write down the linearly independent solutions without having to determine the summation of the infinite series used in [39].
If we let
(7.231)
u = β y2
then
du
= 2βy
dy
and
dY dY du
dY d 2Y
dY
d 2Y
2 2
=
= 2βy
;
=
2
β
+
4
β
y
dy du dy
du d y 2
du
du 2
2
dY
dY
= 2β
+ 4βu 2
du
du
Back-substitution into Equation 7.227, results in
u
d 2Y 1 dY β 
u
+
+ 1− 4  Y = 0
du 2 2 du 4 
β
(7.232)
Employing a second substitution
Y ( u ) = e − uW ( u )
(7.233)
into Equation 7.232 results in
u
d 2W  1
 dW  1 β 
+  − 2u 
−
− W = 0.
 du  2 4 
du 2  2
(7.234)
Equation 7.233 is to be compared with Kummers differential equation [13]
z
d2 R
dR
+ (b − z )
− aR = 0
dz 2
dz
(7.235)
whose linearly independent solutions are
a
z
b
a ( a + 1) z 2 a ( a + 1)( a + 2 ) z 3
+
+
+
b ( b + 1) 2! b ( b + 1)( b + 2 ) 3!
R1 ( z ) = 1 F1 [ a; b; z ] = 1 +
(7.236)
356
Applied Mathematical Methods for Chemical Engineers
R2 ( z ) = R1 ( z ) logz+
+
az  1 2 
 − + 
1!1!  a 1 
( a )r  1
1
2
2
− −  − + 
 ++

r
r !r ! a
a + r −1 1
(7.237)
such that
R ( z ) = m1 R1 ( z ) + m2 R2 ( z )
(7.238)
is the general solution to Kummers equation, where m1 and m2 are arbitrary constants.
In our case,
a = 1 / 2 − β 4 , b = 1 / 2, z = 2u
Such that the solutions to Equation 7.234 are
W1 ( u ) = 1 F1 1 / 2 − β 4;1 / 2; 2u 
(7.239)
W2 ( u ) = W1 ( u ) log 2u +
(7.240)
2 (1 / 2 − β 4 ) u 
1
2
−  +

1!1!
 (1 / 2 − β 4 ) 1 
Therefore
Y ( y ) = e −βy 1 F1 1 / 2 − β n 4;1 / 2; 2β n y 2 
2
= 1+
(1 / 2 − β 4 ) 2βy + (1 / 2 − β 4 )(3 / 2 − β 4 ) ( 2β y ) + 
n
2
1/ 2
n
n
n
2
(7.241)
1 / 2 ( 3 / 2 ) 2!
is the appropriate eigenfunction, following substitution into Equations 7.231 and 7.233
and noting that Equation 7.228 implies that the eigenfunction must be finite as y → 0.
We note that R2 ( z ) and its derivative will approach infinity as y → 0, such that R ( z )
would become unbounded unless m2 is chosen as zero.
Equation 7.229 implies that
β 
3 β 3 β 
1 β
−β n e −βn / 4 1 F1  − n ;1 / 2; n  + 2e −βn / 4β n (1 − β n / 2 ) 1 F1  − n ; ; n 
4
2 4 2 4 
2 4
(7.242)
1
β
β

n
n 
= N Sh 1 F1  − ;1 / 2;  , n ≥ 1
4
2 4
and defines the eigenvalues β n , noting that
d
a
{ 1 F1 [a; b;z ]} = 1 F1 [a + 1; b + 1;z ]
dy
b
(7.243)
since the series 1 F1 [ a; b; z ] is absolutely convergent (see Example 7.13). The Fourier coefficient can now be determined as given in Colton and coworkers [38] (see Problem 18).
357
Applications of Partial Differential Equations in Chemical Engineering
Example 7.24
This example considers a proposed analysis for the wall region velocity profile [40].
Assuming that the wall exchange process on the average can be represented by
the motion of fluid masses with fixed velocity, uL and a constant wall contact time,
tc . Additionally, the transport of momentum within such masses is proposed to be
represented as
∂u µ  ∂ 2 u 
=
∂t ρ  ∂ y 2 
subject to the conditions
u = 0 at y = 0
u = uL at y = ∞
u = uL at t = 0.
Using the method of Combination of Variables (Section 6.5) similar to Example 7.11,
let
φ ( η) =
u
y
; η=
, γ =µ ρ
4 γt
uL
such that
∂
η dφ ( η) ∂
φ ( η) = −
;
φ ( η) =
∂t
2t dη
∂y
1 dφ ( η)
∂2
1 d 2φ ( η)
φ ( η) =
and
2
4 γt dη
∂y
4 γt dη2
results in the ordinary differential equation
φ′′ + 2 ηφ′ = 0
(7.244)
φ ( 0 ) = 0 and φ ( ∞ ) = 1.
(7.245)
subject to
The general solution to this resulting ordinary differential Equation 7.244 is
φ ( η) = c1 ∫ e − η d η + c2
2
Applying the accompanying conditions, Equation 7.245 leads to


 y 

u ( t , y ) = uL erf ( η) = uL erf 
 µ 
2
t

ρ 
(7.246)
358
Applied Mathematical Methods for Chemical Engineers
In summary, this chapter attempts to capture varied examples adapted from published research in the chemical engineering literature. Primarily, an attempt is made
to emphasize the analytical techniques that are discussed in the undergraduate prerequisite mathematics courses but are under-applied in undergraduate chemical engineering curricula. Additional methods such as regular perturbation and combination
of variables are introduced as a path to advanced analysis techniques that are also
useful in chemical engineering research. More on the combination of variables as
applied to the analysis of semi-infinite systems can be found in [36].
7.9 PROBLEMS
1. a. Use Equations 7.162, 7.163, and 7.166 to derive Equation 7.167.
b. Solve Equation 7.167, subject to
y = 0; u = v = 0
y = ∞; u = U ∞
2. Show all the intermediate steps to derive Equations 7.175 and 7.176 using
Equation 7.167 and the given conditions in Example 7.17.
3. Solve
 f (0) = 1
2
ff ′
f ′′ +
= 0; subject to 
f ( ηR ) = 0
2
SA

4. For the region ηR < η < ∞ reduce the equation of energy to
2 d 2 TB f dTB
+
=0
ρ dη2 2 dη
Solve the reduced equation subject to
TB = 0 at η = ηR
TB = 1 at η = ∞
5. In a porous medium, the continuity equation can be written as
ε
∂ρ
= −∇ ⋅ ρu
∂t
where ε is the porosity, and the equation of motion (Darcy’s law) can be written as
κ
u = − ∇p
µ
Applications of Partial Differential Equations in Chemical Engineering
359
where gravity is neglected, κ is the permeability and μ is the viscosity [14,4].
a. Show that for an incompressible fluid, ∇ 2p = 0.
b. Show that for isothermal flow of a compressible gas,
2εµρ0 ∂ρ
= ∇ 2 ρ2
κ ∂t
6. Two concentric spherical metallic shells of radii a and b cm (a < b) are
separated by a solid of thermal diffusivity α (cm 2/s). The outer surface
of the inner shell is maintained at T0 ºC and the inner surface of the outer
shell at T1ºC. Derive the differential equation governing the unsteadystate temperature distribution in the solid as a function of time and radial
coordinate.
Show that the solution takes the form
T(t,r) =
T1 b − T0 a ab T0 − T1 ∞ Bn
+
+ ∑ sin[β(r − a)]exp(−β 2 αt)
b−a
r b−a
n =1 r
where β = nπ/(b − a). Demonstrate how Bn can be determined from any
initial temperature distribution.
7. If a liquid is flowing through a fixed bed at a rate v cm/s when a pulse of a
tracer is added, show that the later distribution of the tracer is given by the
solution of
E
∂2 C
∂C ∂C
−v
=
2
∂x
∂ x ∂t
here E is the mixing coefficient which operates in the axial direction (x)
w
only. Use the substitution z = x − vt, and assume infinite bed length to find C.
8. The steady laminar flow of a liquid through a heated cylindrical pipe has
a parabolic velocity profile if natural convection effects, and variation of
physical properties with temperature are neglected [4]. If the fluid entering
the heated section is at a uniform temperature (T1) and the wall is maintained at a constant temperature (Tw), develop Graetz’s solution by neglecting the thermal conductivity in the axial direction.
9. The sudden closure of a valve generates a pressure wave within the liquid
flowing in the pipe leading to the valve. The passage of this wave causes
compression of the liquid and expansion of the pipe. Show that the velocity
of the liquid and the pressure are related by
−
∂ p ρ ∂v
=
∂ x g ∂t
and
−
∂2 p
∂2 p
2
=
c
∂t 2
∂x 2
360
Applied Mathematical Methods for Chemical Engineers
where c is the velocity of propagation of the pressure wave.
If a uniform pipe of length L connects a reservoir at x = 0 to the valve at x = L,
show that
p( x , t ) = p0 +
4c ρv0
πg
∞
(−1)n
πx
πct
∑ (2n + 1) sin(2n + 1) 2 L sin(2n + 1) 2 L
n =1
10. Consider the case of plug flow with homogeneous chemical reaction and
reaction at the wall of a tubular reactor [32]. For an average velocity, a firstorder homogeneous reaction and a first-order wall reaction, show that a
reasonable model is
vavg
subject to
and
∂CA
 1 ∂  ∂CA  
= DAB 
r
  − kCA
∂z
 r ∂r  ∂r  
∂CA
= 0 at r = 0
∂r
CA = CA0 at z = 0
∂CA
= k W CA at r = R
∂r
Find the concentration profile and use it to show that
− DAB
dC A
D λ2
βJ (λ )
k
= −( kd + k )CA , kd = AB2 n , λ n = o n , β = wR
dt
R
J1 (λ n )
DAB
11. Consider a tubular flow reactor modeled by

r 2  ∂C
 1 ∂  ∂CA  ∂2 CA 
v0 1 −    A = DAB 
+ kCAn
 r
 +
2 


R
∂
z
r
∂
r
∂
r
z
∂




where DAB is the binary diffusivity and v0 is the axial velocity at the center
of the tube of radius R. The differential equation is subject to the following
boundary conditions
CA = CA0
at z = 0
∂CA
= 0 at r = 0
∂r
∂C
− DAB A = k W CA
∂r
at r = R
Applications of Partial Differential Equations in Chemical Engineering
361
Further, supposing that n = 1 and that axial diffusion is negligible in comparison to bulk flow, determine the “cup mixing” concentration
1
CA = 4 ∫ [1 − u 2 ]θu du
0
where u =
r
C
, θ= A
R
CA0
12. Consider evaluating the diffusion coefficient, D, for the resin phase in an
ion exchange system modeled by
∂qi
 ∂2 q 2 ∂qi 
= D  2i +
∂t
r ∂r 
 ∂r
where qi represents point concentration (meq/g dry resin), and t is time (s).
The differential equation is subject to
qi = 0 for t < 0, 0 < r < b
and
qi = qs
at r = b, t > 0
where qs = A + Bt + Ct2; A, B, and C are experimentally determined constants. Find the total amount of acid, w, adsorbed per particle up to time t
where w is defined as
t
 ∂q 
w = ∫ Dρ  i  1 / 2(4πb 2 ) dt
0
 ∂r  r = b
in which ρ is the bulk density of the resin (g dry resin/cm3).
13. Bounded equimolal counterdiffusion [8]. Consider a system containing A
and B with a partition at z = 0. At the boundaries, z = ±L, ∂cA /∂z = 0 for
all t and at t = 0, cA = cA− for −L < z < 0 and cA = cA+ for 0 < z < L. The differential equation describing this system is given by
∂cA
∂ 
∂c 
=  DAB A 
∂t
∂z 
∂z 
Derive the concentration profile for the case when the diffusion coefficient is
independent of concentration.
362
Applied Mathematical Methods for Chemical Engineers
Answer:

cA − cA− 1  2 ∞ sin(n + 1 / 2)πz / L
= 1 + ∑
exp− [(n + 1 / 2)π / L ]2 DABt 
+
−
cA − cA 2  π n = 0
(n + 1 / 2)

14. Diffusion in a two-phase system [8].Consider the system consisting of two
immiscible phases, I (−∞ < z < 0) and II (0 < z < +∞), separated by a partition. Initially, the solute concentration in phase I is cI0 and cII0 in phase II.
At time t = 0 the partition at z = 0 is removed and diffusion is allowed to
take place. Assuming that the diffusion can be described by Fick’s second
law in both phases, and there is equilibrium at the interface (cII = mcI),
derive the concentration profile for each phase in terms of the respective
initial concentration. The mathematical statement of the problem is
Diffusion in phase I:
∂cI
∂2 c
= DI 2I
∂t
∂z
Diffusion in phase II:
∂cII
∂2 cII
= DII
∂t
∂z 2
Boundary conditions:
At z = 0 cII = mcI
At z = 0 DI (∂cI / ∂ z ) = DII (∂cII / ∂ z )
At z = −∞ ∂cI / ∂ z = 0
At z = +∞ ∂cII / ∂ z = 0
Initial conditions : At t = 0
cI = cI0
cII = cII0
Answer:
1 + erf( z / 4 DI t )
cI − cI0
=
cII0 − mcI0
m + DI /DII
1 − erf( z / 4 DII t )
cII − cII0
=
c − (1/m)cII0 (1 / m) + DII /DI
0
I
where m is the distribution coefficient, DI and DII are the diffusion coefficients in the respective phase.
Applications of Partial Differential Equations in Chemical Engineering
363
15. If the flat velocity profile assumed in Example 7.10 is incorrect, use the
Navier–Stokes equations of motion to show that
0=µ
d 2 vz
+ ρg
dx 2
For the boundary conditions vz = 0 at x = δ , and dvz/dx = 0 at x = 0, show
that
vz =
ρgδ 2
2µ
  x2
  x2
1 −    = vmax 1 −   
δ 
δ 


where the maximum velocity occurs at the film surface. Also show that the
film thickness is
δ=
3
3µΓ
=
ρ2 g
3
3µ 2
Re
4ρ2 g
where Re = 4Γ /µ and Γ = ρ vavgδ is the mass rate of flow in the z-direction
per unit width of wetted wall in the y direction.
Use the derived velocity profile together with the boundary conditions
cA = cA0
at x = 0
∂cA / ∂ x = 0 at x = δ
cA = cA1
at z = 0
to derive the concentration profile for cA.
16. Reconsider the model discussed in Example 7.8, but with cylindrical
­geometry [8,33].
Following the development in the literature [7,8], the governing ­equation
for the agent concentration in the reservoir is
∂C1
 ∂2 C 1 ∂C1 
= D1  21 +

 ∂r
∂t
r ∂r 
(7.247)
∂C2
 ∂2 C2 1 ∂C2 
= D2 
+

 ∂r 2
∂t
r ∂r 
(7.248)
and
is the governing equation for the agent in the membrane. The subscripts
refer to the respective region as shown in Figure 7.4. D2 is an effective diffusivity and is defined as
364
Applied Mathematical Methods for Chemical Engineers
D2 =
Dε
τ
(7.249)
where D is the agent diffusivity in the pore liquid, ε is the membrane porosity, and τ is the membrane tortuosity. Both the agent diffusivity in the pore
liquid (D) and in the reservoir liquid (D1) are calculated with the Wilke–
Chang correlations [9]. The quantity τ was defined and measured for various systems [10]; we use the values given for hydrophobic membrane. The
porosity value is a manufacturer-supplied quantity.
Equations 7.247 and 7.248 are subject to the following boundary conditions:
C1 (a, t ) = m1,2 C2 (a, t )
(7.250)
∂C1 (0, t )
=0
∂r
(7.251)
∂C1 (a, t )
∂C (a, t )
= D2 2
∂r
∂r
(7.252)
∂C2 (b, t )
∂C (b, t )
= − D2 α 2 m2, w 2
∂t
∂r
(7.253)
D1
Vw
Further, since the entire agent is initially present in the reservoir phase, then
C1 (r ,0) = C10
(7.254)
C2 (r ,0) = 0
(7.255)
Equation 7.250 is a statement of the equilibrium partitioning at the reservoir–pore liquid interface with m1,2 being the partition coefficient. Equation
7.251 indicates that the solute concentration is expected to be finite at the
bottom of the reservoir. Equation 7.252 displays the continuity of the agent
flux across the reservoir–pore interface, whereas Equation 7.253 accounts
for the material leaving the membrane and entering the surrounding water
bath. The quantity α 2 is the membrane area at the outer wall (cm2).
Determine the concentration profile exiting the membrane (region 2).
H
int: In deriving the solution to the model, first recast the model in
dimensionless form by introducing the following quantities:
u1 (ξ, θ) =
C1 (r , t )
C10
(7.256)
u2 (ξ, θ) =
C2 (r , t )
C10
(7.257)
Applications of Partial Differential Equations in Chemical Engineering
365
where
ξ=
r
Dt
, θ = 12
b
b
(7.258)
17. Abdekhodaie [37] presented an exact solution for the diffusional release
from theophylline microspheres coated with ethyl vinyl acetate copolymer
into a finite external volume using the Laplace transform method. The solute was assumed to have very low solubility in the polymeric membrane
and the diffusion coefficient was assumed to be independent of concentration. The diffusion of drug into the surroundings was described by Fick’s
second law of diffusion as
∂C D ∂  2 ∂C 
=
r
∂t r 2 ∂r  ∂r 
subject to the conditions
C ( r ,0 ) = Cs , C ( a, t ) = Cs , C ( b, t ) = KCb ( t )
where Cs is the solubility limit of the drug and K is the equilibrium distribution coefficient between polymeric membrane and external bulk concenMt
tration Cb ( t ) . Determine the cumulative amount of solute
released.
M∞
REFERENCES
1. Bennett, C.O. and Myers, J.E. Momentum, Heat and Mass Transfer, McGraw-Hill,
New York, 1962.
2. Myers, G.E. Analytical Methods in Conduction Heat Transfer, McGraw-Hill, New
York, 1971.
3. Spiegel, M.R. Mathematical Handbook, McGraw-Hill, New York, 1968.
4. Jenson, V.G. and Jeffreys, G.V. Mathematical Methods in Chemical Engineering,
Academic Press, London, 1963.
5. Felder, R.M., Spence, R.D., and Ferrell, J.K. A method for the dynamic measurement
of diffusivities of gases in polymers, J. Appl. Polym. Sci., 19, 3193, 1975.
6. Ramraj, R., Farrell, S., and Loney, N.W. Analytical solution to controlled release using
microporous membrane, Sep. Sci. Technol., 34, 225, 1999.
7. Jost, W. Diffusion in Solids, Liquids and Gases, Academic Press, New York, 1960.
8. Bird, R.B. Theory of diffusion, in Advances in Chemical Engineering, Vol. I, Drew,
T.B. and Hoopes, J.W., Eds., Academic Press, New York, 1956, p. 156.
9. Reid, R., Prausnitz, J., and Sherwood, T. Properties of Gases and Liquids, McGrawHill, New York, 1977.
10. Prasad, R. and Sirkar, K. Dispersion-free solvent extraction with microporous hollowfiber modules, AIChE J., 34, 177, 1988.
366
Applied Mathematical Methods for Chemical Engineers
11. Loney, N.W. Analytical solution to mass transfer in laminar flow in hollow fiber with
heterogeneous chemical reaction, Chem. Eng. Sci., 51, 3995, 1996.
12. Huang, C.R., Matlosz, M., Pan, W.D., and Snyder, W. Heat transfer to a laminar flow
fluid in a circular tube, AIChE J., 30, 833, 1984.
13. Slater, L.C.J. Confluent Hypergeometric Functions, Cambridge University Press,
London, 1960.
14. Bird, R.B., Stewart, W.E., and Lightfoot, E.N. Transport Phenomena, 2nd ed., John
Wiley & Sons, New York, 2002.
15. Higbie, R. The rate of absorption of a pure gas into a still liquid during short periods of
exposure, Trans. Am. Inst. Chem. Eng., 31, 365, 1935.
16. Loney, N.W. and Huang, C.R. Analytical solution of an LPCVD reactor interwafer
region, Thin Solid Films, 226, 15, 1993.
17. Abramowitz, M. and Stegun, I.A. Handbook of Mathematical Functions, Dover, New
York, 1968.
18. Son, J.S. and Hanratty, T.J. Limiting relation for the Eddy diffusivity close to a wall,
AIChE J., 13, 689, 1967.
19. Shaw, D.A. and Hanratty, T.J. Turbulent mass transfer rates to a wall for large Schmidt
numbers, AIChE J., 23, 28, 1977.
20. Wolfram, S.M. Mathematica Book, Cambridge, University Press, 1996.
20a. Huang, C.R., Denny, A.F., and Loney, N.W. Molecular diffusion in the laminar sublayer during turbulent flow in a smooth tube, Chem. Eng. Sci., 59, 1191, 2004.
21. Watson, G.N. A Treatise on the Theory of Bessel Functions, 2nd ed., Cambridge
University Press, London, 1966.
22. Loney, N.W. Justification of the assumption of transport by diffusion in the interwafer
region of a multiwafer CVD reactor, J. Mater. Sci. Lett., 15, 1219, 1996.
23. Friedlander, S.K. and Litt, M. Diffusion controlled reaction in a laminar boundary
layer, Chem. Eng. Sci., 7, 229, 1958.
24. Schlichting, H., Boundary-Layer Theory, 7th ed., McGraw-Hill, New York, 1979.
25. Kim, J.I. and Stroeve, P. Mass transfer in separation devices with reactive hollow fibers,
Chem. Eng. Sci., 43, 247, 1988.
26. Noble, D.R. and Way, D.J. Facilitated transport, in Membrane Handbook, Ho, W.S.W.
and Sirkar, K., Eds., Van Nostrand Reinhold, New York, 1992, chap. 44.
27. Noble, R.D. Shape factors in facilitated transport through membranes, Ind. Chem.
Fundam., 22, 139, 1983.
28. Brown, G.M. Heat or mass transfer in a fluid in laminar flow in a circular or flat conduit,
AIChE J., 6, 179, 1960.
29. Wolfram, S. Mathematica: A System for Doing Mathematics by Computer, AddisonWesley, Redwood City, 1991.
30. Mickley, H.S., Sherwood, T.K., and Reed, C.E. Applied Mathematics in Chemical
Engineering, McGraw-Hill, New York, 1957.
31. Bird, R.B. and Curtiss, C.F. Tangential Newtonian flow in annuli-I, Chem. Eng. Sci.,
11, 108, 1959.
32. Smith, G.K., Krieger, B.B., and Herzog, P.M. Experimental and analytical study of wall
reaction and transport effects in fast reaction systems, AIChE J., 26, 567, 1980.
33. Ramraj, R., Farrell, S., and Loney, N.W. Mathematical modeling of controlled release
from a hollow fiber, J. Membr. Sci., 162, 73, 1999.
34. Wong, H. M., Wang, J. J., and Wang, C.H. In vitro sustained release of human immunoglobulin G from biodegradable microspheres, IE&C Res. 40, 933, 2001.
35. Slattery, J. C. Advanced Transport Phenomena, Cambridge University Press, 1999.
36. Plawsky, J. L. Transport Phenomena Fundamentals, 2nd ed., CRC Press—Taylor &
Francis, 2010.
Applications of Partial Differential Equations in Chemical Engineering
367
37. Abdekhodaie, M.J. Diffusional release of a solute from a spherical reservoir into a
finite volume, Journal of Pharmaceutical Sciences, 91(8), 1803, 2002.
38. Colton, C.K., Smith, K.A., Stroeve, P. and Merrill, E.W. Laminar flow mass transfer in
a flat duct with permeable walls, AIChE J., 17, 773, 1971.
39. Van der Does De Bye, J.A.W. and Schenk, J. Applied Science Research, Sect. A., 3, 308,
1952.
40. Hanratty, T.J. Turbulent exchange of mass and momentum with a boundary, AIChE J.,
2, 359, 1956.
41. Hughmark, G.A. Heat and mass transfer in the wall region of turbulent pipe flow,
AIChE J., 17, 51, 1971.
42. Lightfoot, E.N. Steady state absorption of a sparingly soluble gas in an agitated tank
with simultaneous irreversible reaction, AIChE J., 4, 499, 1958.
This page intentionally left blank
8
Dimensional Analysis
and Scaling of Boundary
Value Problems
8.1 INTRODUCTION
In the practice of chemical engineering, dimensional analysis and scaling are ­techniques
that can be employed to emphasize similarities between a prototype and its model.
Dimensionless quantities are developed, which can serve as new variables. Usually, the
number of new variables is much smaller than the original number of physical variables
of the system under consideration. For example, suppose one is interested in conducting an investigation to determine the power required to drive an ordinary house fan [1].
More specifically, suppose one wants to relate the size and shape of the fan to the rotational speed and torque, where Newton’s second law relates the torque (t) to the forces
generated when the fan accelerates the air that passes through it. Suppose the torque is
chosen as the dependent variable and the physical variables are the following:
• Fan diameter (d)
• Fan design or shape of fan (R)
• Medium characteristics (air viscosity, density, sound velocity, and ratio of
specific heats)
• Rotative speed (n)
Since the house fan is to be uncomplicated, one can neglect the effects of the air
viscosity, sound velocity, and the ratio of specific heats. Then, using the mass (M),
length (L), and time (T) system, Table 8.1 can be generated.
If the torque is divided by the density, Table 8.2 results.
If t/ρ is divided by the product D5n2, there results the quantity
 t 
 ρD 5 n 2  = 1


Therefore, the final analysis yields

 t
f
,R = 0
 ρD 5 n 2 
which means that the torque for a given design R is proportional to the dimensionless
product
 t 
 ρD 5 n 2 


369
370
Applied Mathematical Methods for Chemical Engineers
TABLE 8.1
Dimensional Analysis on a Domestic House Fan
Dimensions
Quantity
Torque
Fan diameter
Fan design
Air density
Rotative speed
Symbol
M
L
T
t
D
R
ρ
n
1
0
0
1
0
2
1
0
−3
0
−2
0
0
0
−1
Source: Taylor, E.S., Dimensional Analysis for Engineers, Oxford Uni­
versity Press, London, U.K., 1974. With permission.
TABLE 8.2
Analysis to Develop Drag in a Pipe
Symbol
M
L
T
t/ρ
D
N
0
0
0
5
1
0
−2
0
−1
Source: Taylor, E.S., Dimensional Analysis for Engineers, Oxford Uni­
versity Press, London, U.K., 1974. With permission.
Therefore, instead of five variables, only one variable needs to be considered.
Another example, more familiar to chemical engineers, involves fluid flow.
Consider a very long cylindrical pipe having a uniform cross-section area (A) in
which an incompressible fluid is flowing. Assume that the motion is steady and that
viscosity (μ) and density (ρ ) are not negligible. One may want to characterize the
motion of the fluid. In this case, the pressure drop along the pipe, the average velocity
(v) of the fluid, or the fluid discharge per unit time through A is needed. Hence, the
motion in the pipe can be determined by ρ , μ, v, and D, where D is the pipe inside
diameter. That is, if one forms the dimensionless quantity (drag)
φ=
p1 − p2
 ρv 2 

 D 
then the resistance of a section of pipe of length ℓ is
( p1 − p2 ) A = ∆pA = φ

Aρv 2
D
Dimensional Analysis and Scaling of Boundary Value Problems
371
Among the four physical variables, only one dimensionless quantity can be formed,
namely,
ρvD
N Re =
µ
where NRe is the Reynolds number. Therefore
φ = φ( N Re )
Again, instead of four variables, the Reynolds number can be used to characterize
the phenomenon.
8.2
CLASSICAL APPROACH TO DIMENSIONAL ANALYSIS
The pi theorem is a generalized method of dimensional analysis and detailed discussions can be found in [1–7]. Below is a brief review of the pi theorem.
Consider the magnitude f1 of some physical quantity depending on other, independent magnitudes g1, g2, …, gn, then
f1 = φ( g1 , g2 ,, gn )
or alternatively
ψ ( f1 , g1 , g2 ,, gn ) = 0
(8.1)
Equation 8.1 is required to be dimensionally homogeneous. The pi theorem says that
if the number of distinct reference quantities required to express the dimensional
formula of all n magnitudes is r, then the n magnitudes may be grouped into n − r
independent dimensionless ∏ terms, resulting in the relation
φ(Π1 , Π2 ,, Πn − r ) = 0
(8.2)
An immediate advantage is demonstrated if Equation 8.1 is compared with Equation
8.2. That is, the number of independent variables to be studied is reduced to n − r.
Usually, it is not difficult to determine the value of n; just add up the variables.
However, determining r requires more effort. Above, r is stated as distinct reference
quantities. The term distinct is significant. That is, in the linear algebra sense, r is
the rank of the dimensional matrix. For example, suppose a problem involving force
(F), velocity (v), density (ρ ), viscosity (μ), and length (L) is to be restated in terms
of dimensionless groups. Then, the rank of the dimensional matrix must be determined. In solving such problems, a usual first step is the construction of a table, listing the variables and their associated dimensions. Such a table is shown in Table 8.3.
TABLE 8.3
Classical Approach to Dimensional Analysis
Variable
Symbol
Dimensions
Force
Velocity
Density
Viscosity
Length
F
v
ρ
μ
L
M L/t2
L/t
ML3
M/L t
L
372
Applied Mathematical Methods for Chemical Engineers
The next step is to define the dimensional matrix whose elements are the exponents of the fundamental dimensions M, L, and t appearing in Table 8.3.
Dimensional Matrix
F
1
1
−2
M
L
t
ρ
1
−3
0
V
0
1
−1
L
0
1
0
μ
1
−1
−1
In order to determine r, recall that the definition of the rank, r, of a matrix is the
number of rows (columns) in the largest nonzero determinant, which can be formed
from the matrix. In our situation, we have a matrix that contains three rows and five columns. However, determinants are only defined for square matrices (see Appendix A).
Therefore, the largest possible determinant would contain three rows and three columns
(determinant of order 3). It turns out that, for this problem, the largest nonzero determinant is of order 3; therefore, the rank is 3. However, in other situations, one should verify
that the determinant is, in fact, nonzero.
As a second example of the determination of the rank, r, consider the dimensional
matrix:
M
L
T
P
Q
R
S
2
−1
1
1
6
20
3
−3
−3
4
0
8
Here, the largest determinant will be that which contains three rows and three
columns. However, all such determinants are zero. That is,
2
−1
1
3
2
6 −3 = −1
1 20 −3
1 4
2
3 4
6 0 = −1 −3 0 =
1 20 8
1 −3 8
1
3 4
6 −3 0 = 0
20 −3 3
It turns out here that only second-order determinants have nonzero values. For example, the determinant
21
= 13 ≠ 0
−1 6
Therefore, the rank of this dimensional matrix is 2.
8.3
FINDING THE ΠS
In this section, two ways of deriving the ∏s are discussed. The first is based on the
pi theorem, whereas the second is a more practical approach. Recall the example
of fluid flow through a long, smooth pipe of circular cross section. There are five
Dimensional Analysis and Scaling of Boundary Value Problems
373
variables representing the n magnitudes, namely Δ p/ℓ, ρ , μ, v, and D. The number
of distinct reference quantities (r) is 3 (rank of the dimensional matrix). Therefore,
there should be 5 − 3 = 2 independent dimensionless products (∏1 and ∏2). Further,
the theorem requires that, from among the n original variables, r of them is to be
selected to form a recurring set. This recurring set further requires that the r variables, together, must involve the r distinct reference quantities. Here v, μ, and ρ form
a suitable recurring set. Each ∏ will be formed from the recurring set and one of the
remaining variables. For example, ∏1 is constructed from v, ρ , μ, and Δ p/ℓ, whereas
∏2 from ρ , μ, v, and D. For the formulation of ∏1, let the dimensionless number be
vaμ bρ cΔ p/ℓ, where a, b, and c are constants to be determined. Then, the dimensional
formula of this product is
[ LT −1 ]a [ ML−1T −1 ]b [ ML−3 ]c [ ML−2 T −2 ] = [ M 0 L0 T 0 ]
Equating exponents of like magnitudes gives
L : a − b − 3c − 2 = 0
M : b + c +1= 0
T : −a−b−2=0
resulting in a = −3, b = 1, and c = −2. Therefore, the dimensionless number ∏1 is
µ∆p / 
v 3ρ2
Similarly, for the formation of ∏2, let vaμ bρcD be the dimensionless number. Then,
the dimensional formula of this product is
[ LT −1 ]a [ ML−1T −1 ]b [ ML−3 ]c [ L ] = [ M 0 L0 T 0 ]
giving a = 1, b = −1, and c = 1. Therefore, Equation 8.2 for this example is
φ(Π1 , Π2 ) = 0
That is,
 µ∆p /  vDρ 
φ 3 2
=0
µ 
 vρ
or, in terms of Δ p/ℓ
∆p /  =
v 3ρ2
φ1 ( N Re )
µ
It is important to note that the recurring set must provide the opportunity for canceling of any dimensional components that are involved in the other magnitudes.
Therefore, its constituent magnitudes must involve each of the reference magnitudes
at least once. However, it must not be possible to form a dimensionless group from
the recurring set alone.
374
Applied Mathematical Methods for Chemical Engineers
As a second illustration on finding the ∏s, consider a screw propeller operating in a
fluid of constant density, such as seawater. Here, one is interested in the thrust produced
by the propeller, and the goal is to determine how the magnitude of this force depends
on other associated quantities. Following Massey [2], the fluid is assumed to be homogeneous (no air bubbles) and the propeller is remote from all other surfaces (this latter
assumption excludes ships, etc.). Listed in Table 8.4 are the relevant quantities.
The quantity, g, is included to account for work done against gravity in moving
the fluid surface vertically. However, surface tension is being neglected, as the propeller is assumed to be large. From Table 8.4, it can be seen that the n magnitudes
are 7 and the number of reference magnitudes (mass, length, and time interval) is 3.
Therefore, 7 − 3 = 4 dimensionless quantities (products) are expected. That is,
φ(Π1 , Π2 , Π3 , Π4 ) = 0
(8.3)
is the appropriate form to expect.
As the number of reference magnitudes is 3, then 3 magnitudes (variables) must
be selected from among the 7 for use as a recurring set. The variables F, ρ , and D are
suitable, whereas the set D, v, and ω is not suitable because the reference magnitude
M is not included. In addition, the set consisting of F, ρ , and μ is an unsuitable choice,
even though all the reference magnitudes are included. This latter set is unsuitable
because a dimensionless group, Fρ /μ2, can be formed from these variables alone.
Using F, ρ , and D as the recurring set, the dimensionless numbers (∏s) take the
forms
F a1ρb1 D c1 v; F a 2 ρb 2 D c 2 ω; F a 3ρb 3 D c 3µ; F a 4 ρb 4 D c 4 g
For the first ∏, the dimensional formula is
[ MLT −2 ]a1 [ ML−3 ]b1 [ L ]c [ LT −1 ] = [ M 0 L0 T 0 ]
such that al = −1/2, b1 = 1/2, and c1 = 1. Therefore, the first ∏ may be written as
F−1/2ρ 1/2 Dv.
However, the fractional exponents may prove to be inconvenient and can be
removed by squaring to get
Π1 =
ρD 2 v 2
F
TABLE 8.4
Relevant Quantities of a Screw Propeller in a Constant Density Fluid
Quantity
Thrust (force)
Fluid density
Propeller diameter
Speed of advance
Angular speed
Fluid viscosity
Weight per unit mass
Symbol
Dimensional Formula
F
ρ
D
v
ω
μ
g
[MLT−2]
[ML−3]
[L]
[LT−1]
[T−1]
[ML−1T−1]
[LT−2]
Dimensional Analysis and Scaling of Boundary Value Problems
375
Similarly, the other ∏s are derived:
Π2 =
µ2
ρD 3 g
ρD 4 ω 2
, Π3 =
, Π4 =
F
Fρ
F
Then, Equation 8.3 may be expressed as
 ρD 2 v 2 ρD 4 ω2 µ 2 ρD 3 g 
,
,
,
φ
=0
F
Fρ
F 
 F
(8.4)
It is important to note that the recurring set F, ρ , and D is not unique. However, if
analysis is performed with any other suitable recurring set, the same information,
appearing in different forms, would result. For example, the recurring set consisting
of ρ , D, v results in
 ρD 2 v 2 Dω ρDv Dg 
,
,
,
φ
=0
v
µ
v 
 F
(8.5)
It appears that only the first of the arguments in Equation 8.4 corresponds directly
with any in Equation 8.5. However, the first two arguments of Equation 8.4 may be
divided to yield
Π1  Dω 
=

Π2  v 
−2
which is a power of the second ∏ in Equation 8.5. The other two products in Equation
8.5 may also be obtained from combinations of those in Equation 8.4. This type of
transformation of ∏s may be useful, but none of the original magnitudes must be
completely removed from the set of ∏s. Also, the number of independent ∏s must be
that specified by the pi theorem, n – r. That is, given
φ(Π1 , Π2 , Π3 , Π4 ) = 0
then
φ(Π1 , Π2 , Π1 / Π2 , Π4 ) = 0
is not appropriate, whereas the following is:
φ(Π1 / Π2 , Π3 , Π4 ) = 0
The following example illustrates the key steps in the application of the pi theorem [8].
Example 8.1
Determine the dimensionless groups formed from the variables involved in the flow
of a fluid external to a solid body. The force exerted on the body is a function of v, ρ ,
μ, and L[8].
376
Applied Mathematical Methods for Chemical Engineers
Solution
Typically, a table of the variables and their dimensions is constructed.
Variable
Force
Velocity
Density
Viscosity
Length
Symbol
F
v
ρ
μ
L
Dimensions
M L /t2
L /t
M / L3
M/L t
L
Source: Welty, J.R. et al.: Fundamentals of Momentum, Heat and Mass
Transfer, 3rd ed. 1984. Copyright Wiley-VCH Verlag GmbH &
Co. KGaA. Reproduced with permission.
Then, a dimensional matrix is formed whose elements are the exponents of the
fundamental dimensions M, L, and t appearing in each of the variables. In this case,
the dimensional matrix is
M
L
t
F
v
ρ
μ
L
1
1
−2
0
1
−1
1
−3
0
1
−1
−1
0
1
0
From the above matrix, the rank is determined. This was done in the previous section,
and there, as well as in this case, the rank r is 3. To determine the number of independent
dimensionless groups, the number of variables is determined. In this case, n = 5. Therefore,
the number of ∏s is n – r = 2. Next, a recurring set of r variables is selected. This recurring
set will be made up of those variables, which will appear in each pi group, and among
them, contain all of the fundamental dimensions. One approach in choosing this set is to
exclude from it those variables whose effect is under investigation. In this problem, one
would like to isolate the drag force effect; therefore, it will not be a part of the recurring
set. For the remaining exclusion, the viscosity is chosen. The remaining variables are v, ρ,
and L, which include the fundamental dimensions M, L, and t among them. That is, the
recurring set consists of v, ρ, and L.
Each of the two ∏s will include the recurring set and one of the previously excluded
variables. That is,
Π1 = v aρb Lc F and Π 2 = v d ρe L f µ
Notice that each ∏ is required to be dimensionless. As such, the variables in the recurring set are raised to certain exponents, which will satisfy this dimensionless condition. Each pi group is evaluated independently. Therefore
Π1 = v aρb Lc F
Dimensionally,
L a M b
ML
[ M 0 L0t 0 ] =    3  [ L ]c 2
t
 t  L 
Dimensional Analysis and Scaling of Boundary Value Problems
377
Equating exponents of M, L, and t, on both sides, results in
M: 0 = b + 1
L: 0 = a −3b + c + 1
t: 0 = − a − 2
giving a = −2, b = −1, and c = −2. Therefore
Π1 =
F / L2
ρv 2
which is the Euler number. Similarly, evaluating the exponents for the second pi group
results in
Π 2 = µ / ρvL = 1 / N Re
where NRe is the Reynolds number. Therefore, the application of dimensional analysis
has reduced a 5-variable problem to a 2-parameter problem:
Eu = φ1 ( N Re )
The second method for finding the ∏s in this section is demonstrated using the following example. Reconsider the illustration involving the flow of a fluid through a very
long, smooth pipe. This method involves the construction of a series of tables containing the variables and their dimensions as follows.
Following the construction of Table 8.5, the dependence of each variable on the
reference magnitudes is systematically eliminated: eliminate the dependence on M by
dividing each variable having dimensions in respect to M by ρ . This results in Table 8.6.
Eliminate the dependence on T. Each variable with dimensions involving T is multiplied or divided by an appropriate power of v, so as to make the T exponent zero, as
shown in Table 8.7. Finally, eliminate the dependence on L by using appropriate powers of D, as shown in Table 8.8.
The resulting two dimensionless groups (∏s) are DΔ p/ℓρ v2 and μ/ρ vD. If a particular variable is to be used as the dependent variable, then that variable (or any power
of it) must be excluded as a multiplier or divisor in the elimination steps (Δ p/ℓ). Also,
the order in which reference magnitudes are eliminated is only important insofar as
expediency is concerned. Even though this latter technique may involve more labor, it
is more straightforward to apply.
TABLE 8.5
Systematic Elimination of Dependence Variables on
Reference Magnitudes
Δ p/ℓ
D
v
μ
ρ
[M]
[L]
1
0
0
1
1
−2
1
1
−1
−3
[T]
−2
0
−1
−1
0
378
Applied Mathematical Methods for Chemical Engineers
TABLE 8.6
Result of Systematic Elimination of Dependence on
Reference Magnitudes
Δ p/ℓρ
D
v
μ/ρ
ρ /ρ = 1
[M]
[L]
[T]
0
0
0
0
0
1
1
1
2
0
−2
0
−1
−1
0
TABLE 8.7
Elimination of the Dependence on T
[M]
Δ p/ℓρ v
D
v/v = 1
μ/ρ v
2
0
0
0
0
[L]
−1
1
0
1
[T]
0
0
0
0
TABLE 8.8
Elimination of the Dependence on L
DΔ p/ℓρ v2
D/D = 1
μ/ρ vD
[M]
[L]
0
0
0
0
0
0
[T]
0
0
0
So far, the discussion has been centered on developing dimensionless groups from
a set of given process variables. These dimensionless groups are available as design
parameters instead of the individual process variables. This is especially helpful when
relationships are to be established between a model and an as yet designed larger scale
process. Scaling of the independent and dependent variables in given differential equations to establish dimensionless group is presented later.
8.4 SCALING BOUNDARY VALUE PROBLEMS
In studying transport phenomena one is guaranteed to encounter situations involving
fluid–solid or gas–liquid interfaces. These problems usually become more complex
when fluid motion is involved. Traditionally, such complex problems are analyzed
with the aid of the concept of a boundary layer. The boundary layer equations are
well established for fluid flow, heat transfer, and mass transfer [8, 9–13]. This set of
Dimensional Analysis and Scaling of Boundary Value Problems
U∞
U∞
Free stream
379
d(x)
U
y
d
t
t
x
FIGURE 8.1 Velocity boundary layer.
equations is a convenient starting point for the scaling of the independent and dependent variables. However, before we begin it is helpful to briefly review descriptions
of the three types of boundary layers.
In fluid flow, one may consider a flat plate over which the fluid is flowing (Figure
8.1). Then fluid particles making contact with the surface are presumed to have zero
velocity. These particles further act to retard the motion of particles in the adjacent fluid
layers until, at some distance, y = δ from the solid surface, the fluid velocity is no longer
influenced by the surface. The quantity δ is the boundary layer thickness. This retardation of fluid motion is associated with shear stresses, τ, acting in planes parallel to the
fluid velocity (see Figure 8.1). In addition, as one moves away from the solid surface in
the y-direction, the x component of the fluid velocity, u, increases until it approaches
the free stream value u∞. This is the velocity boundary layer and is expected to develop
whenever there is fluid flow over a surface.
The velocity boundary layer is important in establishing surface frictional effects,
such as local friction coefficient Cf:
τ
(8.6)
Cf = 2 s
ρu∞ / 2
where the subscript s refers to the surface. For Newtonian fluids, the surface shear
stress is
 ∂u 
τs = µ  
 ∂ y  y= 0
(8.7)
where μ is the fluid viscosity.
Similar to a velocity boundary layer developing whenever there is fluid flow over
a surface, a thermal boundary layer develops whenever there is a temperature gradient between the surface and the free stream fluid. That is, flow over an isothermal flat
plate (see Figure 8.2) is expected to have a uniform temperature profile T(y) = T∞ at
its leading edge. However, those fluid particles that come into contact with the plate
achieve thermal equilibrium at the surface temperature. These equilibrated particles
exchange energy with those in the adjacent layers, thus developing a temperature
gradient in a region of the fluid. The region in which such temperature gradients
develop is the thermal boundary layer whose thickness is δ t.
380
Applied Mathematical Methods for Chemical Engineers
T
U∞
Free stream
d(x)
T
T
y
dt
x
FIGURE 8.2
Ts
Thermal boundary layer.
CA∞
U∞
Free stream
dc(x)
CA
dc
y
C
x
FIGURE 8.3
CA,S
Species concentration boundary layer.
A relation between conditions in the thermal boundary layer and the convection
heat transfer coefficient, h, is
k (∂T / ∂ y) y = 0
(8.8)
h=−
Ts − T∞
since at the surface (y = 0), there is no fluid motion and energy transfer occurs by
conduction.
Analogous to velocity and thermal boundary layers is the concentration boundary layer. That is, it determines convection mass transfer, similar to the velocity
boundary layer determining wall friction or the thermal boundary layer determining
convection heat transfer.
When a binary mixture of species A and B flows over a surface (see Figure 8.3)
and the concentration of species A at the surface, CA,S, differs from CA,∞, the free
stream concentration, a concentration boundary layer is expected to develop. That
is, the region of the fluid in which concentration gradients exist is the concentration boundary layer. The thickness of the concentration boundary layer is δ c.
Similar to Equation 8.8, a relationship between conditions in the concentration
boundary layer and the mass transfer coefficient, hm, is given by
hm = − DAB
(∂CA / ∂ y) y = 0
CA,S − CA,∞
(8.9)
Dimensional Analysis and Scaling of Boundary Value Problems
381
For steady, two-dimensional velocity, thermal, and concentration boundary layers,
the equations of change apply. These equations are developed elsewhere [8–10,13].
However, it is unusual for all the terms in the equations of change to be needed
to resolve a given situation. Therefore, it is customary to simplify these equations
by assuming fluids with constant physical properties (ρ , k, and μ), negligible body
forces, no chemical reaction, and no heat generation. In addition, the usual boundary layer approximations are incorporated to further reduce the equations of change
[10] to
Continuity :
X-momentum : u
∂u ∂ v
+
=0
∂x ∂ y
(8.10)
∂u
∂u
1 ∂p
∂2 u
+v
=−
+v 2
ρ ∂x
∂x
∂y
∂y
∂T
∂T
∂2 T
v  ∂u 
+v
=α 2 +
Energy : u
∂x
∂y
∂y
Cp  ∂ y 
Species continuity : u
(8.11)
2
∂CA
∂C
∂2 CA
+ v A = DAB
∂x
∂y
∂ y2
(8.12)
(8.13)
Equation 8.10 through 8.13 are the convection transfer equations. When appropriate
boundary conditions are included, these equations can be solved to determine spatial
variations of u, v, T, and CA in the boundary layers. In this section, these reduced
equations will be scaled to establish important analogies between momentum, heat,
and mass transfer, while identifying key design parameters.
To achieve the stated purpose, we will define dimensionless independent and
dependent variables in the following way:
Let x * =
x
L
and
y* =
y
L
(8.14)
where L is a characteristic length for the surface of interest, such as the length of a
flat plate. Also, define the dimensionless velocities v* and u* as
u* =
u
u∞
and
v* =
v
u∞
(8.15)
and the dimensionless temperature, T*, and species concentration, as CA*,
T* =
T − Ts
T∞ − Ts
and CA* =
CA − CA,S
CA,∞ − CA,S
(8.16)
The substitution of these dimensionless quantities into the convection transfer equations results in
∂u* ∂ v*
(8.17)
Continuity :
+
=0
∂ x * ∂ y*
382
Applied Mathematical Methods for Chemical Engineers
Velocity : u*
∂u*
∂u*
dp*
1 ∂ 2 u*
+ v*
=−
+
∂ x*
∂ y*
dx * N ReL ∂ y* 2
(8.18)
*
2
where p = p /ρu∞ and NReL = u∞L/ν is the Reynolds number, based on length as
opposed to diameter.
Thermal : u*
∂T *
∂T *
1
∂2 T *
+ v*
=
∂ x*
∂ y* N ReL Pr ∂ y*2
(8.19)
where Pr = ν / α is the Prandtl number and the viscous dissipation term (∂u/∂y)2
neglected.
Concentration : u*
∂CA*
∂C *
1 ∂2 C *A
+ v* A =
∂ x*
∂ y* N ReL Sc ∂ y*2
(8.20)
where Sc = ν /DAB is the Schmidt number.
Notice the similarity between Equations 8.19 and 8.20. Either one of these equations can now be used to model heat or mass transfer, and only the interpretation
would change for heat or mass transfer.
The dimensionless differential equations suggest how important results may be
generalized. For example, in functional form, the dimensionless velocity is
dp * 

u* = f1  x * , y* , N ReL ,


dx * 
(8.21)
such that the friction coefficient may be expressed as
Cf =
2
f2 ( x * , N ReL )
N ReL
(8.22)
for a given geometry. Similarly, the dimensionless temperature is

dp* 
T * = f3  x * , y* , N ReL , Pr ,


dx * 
(8.23)
and can be used to establish the Nusselt number:
Nu = +
∂T *
= f4 ( x * , N ReL , Pr )
∂ y*
(8.24)
An average Nusselt number may be derived based on an average heat transfer coefficient, which is the result of integrating over the surface of the body under consideration. Such an average Nusselt number Nu would be more familiar, and is given in
functional form as
Nu = f5 ( N ReL , Pr )
(8.25)
Dimensional Analysis and Scaling of Boundary Value Problems
383
Also, the Sherwood number, Sh, which is the mass transfer analog of the Nusselt
number, is derivable from
dp* 

CA* = f6  x * , y* , N ReL , Sc,


dx * 
(8.26)
That is,
hm = +
DAB  ∂CA* 
L  ∂ y*  y* = 0
(8.27)
but
Sh =
 ∂C * 
hm L
= f7 ( x * , N ReL , Sc)
= + A 
 ∂ y*  y * = 0
DAB
(8.28)
or an average Sherwood number, Sh:
Sh = f8 ( N ReL , Sc)
(8.29)
From the above discussion, we observe that scaling offers significant advantage in
­identifying important dimensionless groups. In fluid flow, the friction coefficient is
important and for a given geometry, only the Reynolds number is needed (Equation 8.22).
In the case of heat (or mass) transfer, the Nusselt (Sherwood) number can be ­correlated
through the Reynolds and Prandtl (Schmidt) numbers (Equation 8.25 or 8.29).
Application of Equations 8.22, 8.24, 8.25, 8.28, and 8.29 is not limited to the
boundary layers. These are general results that are repeatedly used in other situations, such as for flow in conduits.
Another advantage resulting from scaling is the ability to reduce the order of
a given differential equation. For example, Equation 8.20 could be reduced to a
­first-order equation if the product of the Reynolds and Schmidt numbers is large
enough. This reduction would not be as straightforward based on Equation 8.13
alone. To further emphasize this application, consider the steady-state laminar flow
in a tube of radius R in which a solute A contained in the fluid undergoes a first-order
reaction at the wall [14]. Suppose one wants to determine the conditions justifying
two different approximations:
1.Assume that the reaction causes total depletion of A at the pipe wall.
2.Assume the “plug-flow reactor” approximation, for which the radial concentration gradient is ignored while the flow is taken to be equal to the
average velocity.
The mathematical statement of the problem is as follows (see Figure 8.4):
vz
∂CA
 1 ∂ ∂CA 
= DAB 
r
 r ∂r ∂r 
∂z
384
Applied Mathematical Methods for Chemical Engineers
Nonreactive wall
Reactive wall
r
R
z
vz(r)
CA(r, z)
CA0
L
FIGURE 8.4 Schematic of steady-state laminar flow in a tube with reactive walls.
CA = CA0
at z = 0
∂CA
= 0 at r = 0
∂r
− DAB
∂CA
= k1CA
∂r
at r = R, 0 ≤ z ≤ L
where CA0 is the initial concentration of the solute, DAB is the binary diffusivity, and
k1 is the first-order reaction rate coefficient.
The laminar flow velocity vz is given by
vz =
3   r 2
v 1 −

2   R 
where v is the average velocity.
Let
CA* =
r
z
CA
, r * = , and z * =
rs
zs
Cs
Then substitute these scaled values into the differential equations and their boundary
conditions. Following the substitution, divide through by the dimensional coefficient
of one term. In this case it is convenient to divide by vCs /zs to obtain
3   rs  2 2  ∂CA* DAB zs  1 ∂
∂CA* 
*
r


1 −   r*  * =
∂r * 
2
R
v rs2  r* ∂r *
 ∂z
CA* =
CA0
Cs
at z * = 0
∂CA*
= 0 at r* = 0
∂r *
∂C *
kr
R
L
− A = 1 s CA* at r* = 0 ≤ z * ≤
∂r*
DAB
rs
zs
Dimensional Analysis and Scaling of Boundary Value Problems
385
In this problem, the dimensionless groups suggest the following choices for the scale
factors:
CA0
= 1,
Cs
rs
L
= 1, and
=1
R
zs
Therefore, the dimensionless equations become
3
∂C * L 1  1 ∂
∂C * 
r* A 
[1 − r* 2 ] A =

∂ z * R Pe  r * ∂r *
∂r * 
2
CA* = 1 at z * = 0
∂CA*
= 0 at r * = 0
∂r *
−
∂CA*
= N ShCA*
∂r *
at r * = 1, 0 ≤ z * ≤
L
zs
where the quantity Pe = vR/DAB is the Peclet number and is the ratio of convective
mass transfer to molecular mass transfer, and
N Sh =
k1 R
DAB
is a Sherwood number or a Damkohler number.
If, NSh ≫ 1, then CA* ≈ 0 to assure that ∂CA* / ∂r * is of order 1 at r * = 1. Therefore,
for this limiting case (very fast reaction), the boundary condition can be replaced by
CA* ≈ 0 at r * = 1
If NSh ≪ 1, then since CA* is of order 1, ∂CA* / ∂r *  1 at r * = 1. However, ∂CA* / ∂r * is
largest at r * = 1. Therefore, ∂CA* / ∂r *  1 throughout the tube, and one can conclude
that CA* ≈ C*A ( z * ). As the radial concentration gradient is negligible, the heterogeneous reaction term can be directly included into the species mass balance to
obtain
v
dC A
2k
= − 1 CA
R
dz
for 0 ≤ z ≤ L
subject to
CA = CA0
at z = 0
which describes the classic plug-flow reaction assumption.
386
Applied Mathematical Methods for Chemical Engineers
In summary, scaling analysis can be reduced to a stepwise procedure. Following
Krantz and Sczechowski [14]:
1.Write down the dimensional differential equations and their initial and
boundary conditions appropriate to the transport or reactor design process
being considered.
2.Form dimensionless variables by introducing unspecified scale factors for
each dependent and independent variable: this also may involve introducing
unspecified reference factors for some variables whose values we seek to normalize to zero.
3.Introduce these dimensionless variables into the describing differential
equations and their initial and boundary conditions.
4.Divide through by the dimensional coefficient of one of the terms (preferably, one which will be retained) in each of the describing equations and
their initial and boundary conditions.
5.Determine the scale and reference factors by ensuring that the principal
terms in the describing equations are of order 1; identifying the principal
terms is dependent on the particular conditions for which the scaling is
being done. (For example, a highly viscous flow, a conductive heat t­ ransfer
process, etc. This step may require introducing a “region of influence,”
wherein the dependent variable[s] goes through a characteristic change in
value.)
6.
Above steps result in the minimum number of dimensionless
groups (parameters) for the problem. The describing equations can now
be explored for very small or very large values of the dimensionless
group.
Finally, a second example is due to Krantz and Sczechowski [14]: consider the problem of steady-state, fully developed laminar flow between two infinitely wide parallel plates, shown in Figure 8.5. The lower plate is stationary, whereas the upper plate
moves at a constant velocity Vp. The flow is also subjected to a constant axial pressure gradient such that Δ P > 0. Determine the conditions for which the effect of the
upper plate velocity Vp can be neglected.
Vp
P
x=0
H
P
x=L
y
x
L
FIGURE 8.5
plates.
Schematic of steady-state, fully developed laminar flow between two parallel
Dimensional Analysis and Scaling of Boundary Value Problems
387
Solution
The equations of motion and their boundary conditions are as follows:
0=−
∂P
d2v
+ µ 2x
∂x
dy
(8.30)
∂P
+ ρg
∂y
(8.31)
0=−
vx = 0 at y = 0
v x = VP
(8.32)
at y = H
(8.33)
Equation 8.31 can be integrated and combined with Equation 8.30 to obtain
0=
∆P
d2v
+ µ 2x
L
dy
(8.34)
where Δ P = PX = 0 − PX = L . Define the following dimensionless variables
vx* =
vx
Us
and
y* =
y
ys
(8.35)
Substitute Equation 8.35 into Equations 8.32 through 8.34 to yield
0=
∆P µU s d 2 vx*
+ 2
L
ys dy*2
U s vx* = 0 at ys y* = 0
U s vx* = VP
at ys y* = H
(8.36)
(8.37)
(8.38)
Since the viscous term in Equation 8.36 must be retained to satisfy the two no-slip
conditions at the solid boundaries, divide through by its dimensional coefficient.
Similarly, in the boundary conditions, divide through by the dimensional coefficient of
the dimensionless dependent variable. This results in
∆Pys2 d 2 vx*
+
LµU s dy*2
(8.39)
vx* = 0 at y* = 0
(8.40)
0=
vx* =
vP
Us
at y* =
H
ys
(8.41)
Since this problem is being scaled for conditions such that the flow is caused principally by the pressure gradient, the pressure force is to be balanced by the viscous term
given in Equation 8.39. That is,
∆Pys2
=1
LµU s
(8.42)
388
Applied Mathematical Methods for Chemical Engineers
which ensures that the magnitude of the dimensionless derivative, d2vx/dy*2, is of order
1. Further, the dimensionless variable, y*, will be bounded of order 1 if we impose the
condition that
H
=1
ys
(8.43)
Therefore, using Equations 8.42 and 8.43 gives
Us =
H 2 ∆P
µL
(8.44)
The velocity scale given by Equation 8.44 is directly proportional to the maximum
velocity for flow between two flat plates driven only by a pressure gradient. This scaling ensures that dimensionless velocity goes from its minimum value of 0 to its maximum value of 1.
Finally, the dimensionless equations are described by Equations 8.45, 8.40, and 8.46.
0 = 1+
d 2 vx
dy*2
(8.45)
vx* = 0 at y* = 0
vx* =
VP µL
H 2 ∆P
at y* = 1
(8.46)
Therefore, to ignore the effect of the moving upper plate on the flow relative to that of
the imposed pressure gradient,
VP µL
1
H 2 ∆P
(8.47)
If one is interested in determining conditions such that flow is caused principally by
the upper moving boundary, then the velocity scale would be
U s = Vp
according to Equation 8.41. In this case, the dimensionless equations would become
0=
∆PH 2 d 2 vx*
+
LµVP dy*2
Then, to neglect the effect of the pressure gradient on the flow, the criterion must be
satisfied:
H 2 ∆P
1
µVP L
The analytical solution of this problem permits assessing the error incurred by neglecting the plate velocity. For example, if (Vp μ L/H2Δ P) ≤ 0.1, comparison with the exact
Dimensional Analysis and Scaling of Boundary Value Problems
389
analytical solution shows that the error is 20% in the drag at the wall, whereas a 2%
error in the drag results if (Vp μ L/H2Δ P) ≤ 0.01.
From this discussion, one can see that scaling can provide the criteria for simplifying the equations of change. Scaling is also helpful in assessing the error incurred
in making these simplifying assumptions. Generally, one can observe that the error
incurred in using the discussed scaling technique will be of the same order as the
dimensionless group, which must be small enough to be neglected.
8.5
PROBLEMS
1.Consider a fluid flowing in a closed conduit at some average velocity, v,
with a temperature difference existing between the fluid and the tube wall.
If the important variables, their symbols, and dimensional representations
are tabulated below.
a. Determine the number of pi groups.
b. List the contents of the recurring set.
c. What are the dimensionless groups?
Variable
Tube diameter
Fluid density
Fluid viscosity
Fluid heat capacity
Fluid thermal conductivity
Velocity
Heat transfer coefficient
Symbol
Dimensions
D
ρ
μ
cp
K
V
H
L
M/L3
M/L t
Q/M T
Q/t L T
L/t
Q/t L2T
Note: The quantity Q represents heat, whereas T is temperature.
Answer:
Nu = f ( N Re , Pr ) or N St = f ( N Re , Pr )
2. In the study of natural convection heat transfer from a vertical plane wall to
an adjacent fluid, the variables are as follows:
Variable
Significant length
Fluid density
Fluid viscosity
Fluid heat capacity
Fluid thermal conductivity
Fluid thermal expansion
Gravitational acceleration
Temperature difference
Heat transfer coefficient
Symbol
Dimensions
L
ρ
μ
cp
K
β
G
ΔT
H
L
M/L3
M/L t
Q/M T
Q/t L T
1/T
L/t2
T
Q/t L2 T
390
Applied Mathematical Methods for Chemical Engineers
a. Determine the number of pi groups.
b. List the contents of the recurring set.
c. What are the dimensionless groups?
Answer:
Nu = f (Gr , Pr )
3.Consider the transfer of mass from the walls of a circular conduit to a fluid
flowing through the conduit. The important variables are as follows:
Variable
Tube diameter
Fluid density
Fluid viscosity
Fluid velocity
Fluid diffusivity
Mass transfer coefficient
Symbol
D
ρ
μ
V
DAB
kc
Dimensions
L
M/L3
M/L t
L/t
L2/t
L/t
a. Determine the number of pi groups.
b. List the contents of the recurring set.
c. What are the dimensionless groups?
Answer:
NuAB = f ( N Re , Sc)
REFERENCES
1.Taylor, E.S. Dimensional Analysis for Engineers, Oxford University Press, London,
1974.
2. Massey, B.S. Measures in Science and Engineering, Ellis Horwood Limited, Chichester
West, U.K., 1986.
3.Massey, B.S. Units, Dimensional Analysis and Physical Similarity, Van Nostrand,
London, 1971.
4.Pankhurst, R.C. Dimensional Analysis and Scale Factors, Chapman and Hall,
New York, 1964.
5.Hansen, A.G. Similarity Analysis of Boundary Value Problems in Engineering,
Prentice Hall, Englewood Cliffs, NJ, 1964.
6. Murphy, G. Similitude in Engineering, Ronald Press Company, New York, 1950.
7. Isaacson, E. de St Q. and Isaacson, M. de St Q. Dimensional Methods in Engineering
and Physics, John Wiley & Sons, New York, 1975.
8.Welty, J.R., Wicks, C.E., and Wilson, R.E. Fundamentals of Momentum, Heat and
Mass Transfer, 3rd ed., John Wiley & Sons, New York, 1984.
9.Bird, R.B., Stewart, W.E., and Lightfoot, E.N. Transport Phenomena, John Wiley &
Sons, New York, 1960.
Dimensional Analysis and Scaling of Boundary Value Problems
391
10.Incropera, F.P. and DeWitt, D.P. Fundamentals of Heat and Mass Transfer, 4th ed.,
John Wiley & Sons, New York, 1996.
11. Kays, W.M. and Crawford, M.E. Convective Heat and Mass Transfer, 3rd ed., McGrawHill, New York, 1993.
12. White, F.M. Viscous Fluid Flow, 2nd ed., McGraw-Hill, New York, 1991.
13. Schlichting, H. Boundary Layer Theory, 7th ed., McGraw-Hill, New York, 1979.
14.Krantz, W.B. and Sczechowski, J.G. Scaling initial and boundary value problems,
Chemical Engineering Education, 28, 236, 1994.
This page intentionally left blank
9
Selected Numerical
Methods and Available
Software Packages
9.1 INTRODUCTION AND PHILOSOPHY
Numerical methods will play a more significant role in engineering science as computer technology continues to improve. Methods that were previously thought to be
too effort consuming are now commercially available in a number of software packages, such as Mathematica® (Wolfram Research, Inc.), Maplesoft (Waterloo Maple,
Inc.), or MATLAB® (The Math Works, Inc.). For example, finding the roots of an
equation, involving several confluent hypergeometric functions, can be done with a
single Mathematica command. There are also websites, such as http://gams.nist.gov/
cgi-bin/serve.cgi/Packages or http://www.netlib.org/index.html, where math packages are available for downloading and use on local machines.
In this chapter, the notion will be to alert the reader to some of the commercially
available packages and identify which numerical methods are applied. It is not the
intention of this chapter to produce an exposition on numerical analysis. However, it
may be helpful to be aware of what kind of results a particular method might yield
and be able to make informed decisions. To this end, the chapter will briefly review
various methods and highlight their central ideas to allow a user to be mindful of the
methods’ virtues as well as their limitations. There will be examples worked out to
varying level of completion as needed to demonstrate critical steps. In the last few
sections under the discussion of the method of lines approach, given examples will
need to include computer programming. The computer programming details will
be referenced and provided in the appendices as developed for the solution of that
example given in that section.
9.2
SOLUTION OF NONLINEAR ALGEBRAIC EQUATIONS
Nonlinear algebraic equations turn up quite frequently in chemical engineering and
may appear in several different forms. For example, in thermodynamics, pressure–
volume–temperature relationships of real gases are often described by equations of
state, such as,
PV 4 − RTV 3 − βV 2 − γV − δ = 0
(9.1)
where P, V, and T are the pressure, specific volume, and temperature, respectively.
R is the gas constant and β, γ, and δ are empirical functions of temperature, specific
393
394
Applied Mathematical Methods for Chemical Engineers
to each gas. Equation 9.1 is the Beattie–Bridgeman equation of state and is a fourthdegree polynomial in the specific volume.
In multicomponent distillation, it may be necessary to estimate the minimum
reflux ratio using classical methods [1, 2]. This estimate usually requires the solution
of a polynomial in ɸ of degree n, such as the equation
n
α z jF F
∑ αj
j =1
j
−φ
− F (1 − q) = 0
(9.2)
where F is the molar feed flow rate, n the number of components in the feed, zjF the
mole fraction of each component in the feed, q the feed quality, α j the relative volatility of each component at some average column conditions, and ɸ the sought-after
root of the equation.
Fanning friction factor, f, for turbulent flow of an incompressible fluid in a smooth
pipe is
f
2 1 
= ln  N Re
+ B− A
f k 
8 
(9.3)
The quantities A, B, and k are constants. NRe is the Reynolds number. Equation 9.3
is not in polynomial form, but can be rearranged to have all nonzero terms on one
side of the equation. In fact, all three of the equations mentioned can be represented
by the general form
f (x) = 0
(9.4)
where x is a variable, which can have multiple values that satisfy the equation. It is
important to remember that the roots of Equation 9.4 can be real and distinct or real
and repeated, or have complex conjugates or some mixture of real and complex.
Regardless of the type of roots, it may be helpful to have some sense as to which
method one should use to attack the problem. That is, one would like to know if, by
choosing a particular iterative procedure, there would be convergence.
A standard approach rearranges Equation 9.4 to develop a convergence criterion [3].
Suppose x is a root of Equation 9.4; then
f (x ) = 0
.
and the equation is satisfied. However, the value x, which is not a root when substituted into Equation 9.4, would result in
f ( x ) ≠ 0
This guessing could go on indefinitely. But suppose we perform some algebraic
manipulations on Equation 9.4 to extract an x out of it and bring it to the other side
of the equation to get
Selected Numerical Methods and Available Software Packages
x = g( x )
395
(9.5)
Then, if x is substituted into Equation 9.5, we would get the result
x = g( x )
(9.6)
whereas
x ≠ g( x )
Notice that g(x) is a new function that is different from the original f(x).
Because we usually have no idea where the roots of f(x) lie, it is typical to make
a guess, and check that guess to determine which way to go next. However, it turns
out that the criterion [3]
g ′( x ) < 1
(9.7)
can be used to increase the chance of finding the roots of Equation 9.4 in an efficient
way. That is, the absolute value of the derivative of g(x) needs to be less than 1 in the
region containing the root x to guarantee convergence. For example, if
f ( x ) = e x − 3x = 0
then
x=
ex
≡ g( x )
3
such that
g ′( x ) =
ex
3
and the range of x, for which the absolute value of the derivative is less than 1, is
given by
ex
<1
3
Therefore
x < ln 3 ≅ 1.1
Essentially, one should guess starting values of x smaller than 1.1 to expect
convergence.
While this rearranging of the independent variable seems straightforward, one
should exercise caution in accepting what appears to be obvious. For suppose the
model
396
Applied Mathematical Methods for Chemical Engineers
dCA F0
F
= CA0 − 0 CA − kCA2
dt
V
V
is used to represent the material balance of species A in an isothermal, constant
volume chemical reactor system with second-order reaction. If one is interested in
the steady-state concentration, CA,s, then for an initial concentration, CA0 of 1 mol/L,
a feed to volume ratio, F0/V of 1 min−1, and a rate coefficient, k = 1 L/(mol min), the
model becomes
2
1 − CA,s − CA,s
=0
In the form of Equation 9.4, substituting x = CA,s, we get
1 − x − x2 = 0
a quadratic whose direct solutions are x = −1.618 and 0.618. Of course, being a physical system, the negative result is ignored. For solving this problem by a substitution
method, one would develop the form of Equation 9.5. In this example, there are two
possibilities:
1. g1 ( x ) ≡ x = 1 − x
2. g2 ( x ) ≡ x = − x 2 + 1
The first case results in
g ′( x ) =
−1
2 1− x
such that x < 3/4 satisfies the requirement of Equation 9.7. After several iterations
using direct substitution, the result x = 0.618 is achieved.
The second possibility results in
g ′( x ) = −2 x
such that x < 1/2 satisfies the requirement of Equation 9.7. However, initial guess
values of x < 1/2 would be useless, as convergence to the correct value of 0.618 could
never be achieved.
If one were to solve either of these examples explicitly using an iterative procedure, the Mathematica routine “FindRoot” [4] could perform this task with a starting value, x0, a minimum value, xmin, and a maximum value, xmax, selected from the
suggested range. FindRoot employs either of the two approaches, depending on the
number of starting values of x. If only one starting value is given, FindRoot employs
Newton’s method [3,5,6]. On the other hand, if one specifies two starting values, then
a variant of the Secant method is employed [5].
Selected Numerical Methods and Available Software Packages
397
As a demonstration of the use of FindRoot, consider the following equation, which
defines the eigenvalues in a model of controlled release from a hollow fiber [7]:
a

 ax 
 a   ax  
[ kJ1 ( x ) + βxJ0 ( x )] Y1  x  J0 

 − m kY0  x  J1 



b
b
b
k
b k 

(9.8)

 ax   a  
 ax   a 
−
+ [ kY1 ( x ) + βxY0 ( x )] m k J1 
=
J
x
J
J
x
0
0
 b k  1  b  
 b k  0  b 

where a, b, β, k, and m are given constants and J0(.), Y0(.), J1(.), and Y1(.) are Bessel
functions. With given values of the constants, the line



 ax  
a






BesselY 1, x  BesselJ 0,
  kBesselJ [1, x ]  

 b
 b k  


+


 ax  

a
 +βxBesselJ [0, x  



 −m k BesselY 0, x b  BesselJ 1, b k  





FindRoot 


 ax 


a




  kBesselY [1, x ]   m k BesselJ 1, b k  BesselJ 0, x b  − 


= 0, 


 ax 
 a 
 +βxBesselY [0, x ] 

BesselJ 0,
 BesselJ 1, x  




b
b k




 {x ,{x , x }}

0
1


returns a numerical value for x. It is clear from this example that very complicated
nonlinear functions can be dealt with in a straightforward manner by this routine.
Previously, several lines of Fortran codes with careful attention to stability issues
would be required to effect a solution. In addition to a single nonlinear equation,
this routine can also be used to produce numerical solutions to systems of equations
without regard to linearity.
In addition to FindRoot, there is also “NSolve” [4], which is more suited to finding the roots of polynomials. Following the Mathematica system, polynomial root
finding is based on the Jenkins–Traub algorithm [8].
As mentioned previously, FindRoot can give results for systems of equations
without regard to linearity. Therefore, similar to Equation 9.7, a criterion for systems
can be established [3]. For a system of two equations, we have
∂ g1
∂g
+ 2 ≤ M <1
∂x
∂x
∂ g1
∂g
+ 2 ≤ M <1
∂y
∂y
(9.9)
398
Applied Mathematical Methods for Chemical Engineers
for all x and y in the region containing all the values xi and yi, the correct values x and
y. When the bound, M, on the partial derivatives are very small in the entire region,
the iteration converges very quickly.
The quantities xi and yi are the iterants, whereas g1 and g2 are formed exactly the
way Equation 9.5 was developed. Two common methods for finding roots to nonlinear systems are (1) Newton–Raphson and (2) the modified Newton–Raphson. Both
approaches are briefly discussed in the subsections below.
9.2.1 NEWtON–RAPhsON MEthOD
Suppose one wishes to solve the simultaneous equations
f1 ( x , y) = 0
f2 ( x , y ) = 0
If both functions are continuous and differentiable, the following system can be
developed [3]:
∂ f1
∂f
h + 1 k = − f1 ( xi , yi )
∂x
∂y
∂ f2
∂f
h + 2 k = − f2 ( xi , yi )
∂x
∂y
(9.10)
This system is the heart of the Newton–Raphson procedure. Here the partial
derivatives are evaluated at xi and yi. The quantities h and k are the unknowns, and
are defined as
x i +1 = x i + h
(9.11)
yi +1 = yi + k
The system given by Equation 9.10 is very straightforward to solve, but requires
the Jacobian determinant, J (see Appendix A),
J=
∂ f1 ∂ f1
∂x ∂ y
∂ f2 ∂ f2
∂x ∂ y
(9.12)
to be nonsingular.
For example, if one were to solve the system
y = cos x;
x = sin y
using the Newton–Raphson procedure, the first step is to rewrite the system as
f1 ( x , y) = cos x − y = 0
f2 ( x , y) = x − sin y = 0
Selected Numerical Methods and Available Software Packages
399
Then differentiate to get
∂ f1
∂ f2
= − sin x;
=1
∂x
∂x
∂ f1
∂ f2
= −1;
= − cos y
∂y
∂y
such that the Jacobian is
J=
− sin x −1
= sin x cos y + 1
1 − cos y
Then, in order for the Jacobian to vanish, either sin x or cos y must be negative;
that is, sin x cos y = −1.
Therefore, as long as the iterants xi and yi are selected from the first quadrant, the
Jacobian will not vanish. Then h and k can be determined for each iteration until
some tolerance is met.
The need to know if the Jacobian is nonzero a priori cannot be met without some
difficulty. In most cases, the procedure has to be carried out before such knowledge is
in hand. Also, many computations are required for the use of this procedure; that is, for
n simultaneous equations in n unknowns, n2 partial derivatives must be determined.
One must also solve for n increments h, k, … by solving n simultaneous equations for
n unknowns. These two disadvantages make it attractive to select other approaches of
solving systems of nonlinear equations. One such approach involves a modification to
the Newton–Raphson procedure and is highlighted in the next section.
9.2.2 MODIFIED NEWtON–RAPhsON MEthOD
This procedure is essentially applying the single variable Newton–Raphson method
n times, once for each variable. Each time the other variables are held constant. The
approach is, given
f1 ( x , y) = 0
f2 ( x , y ) = 0
then
x1 = x 0 −
f1 ( x 0 , y0 )
∂ f1 / ∂ x
(9.13)
where ∂f1/∂x is evaluated at x0 and y0. Next, f 2 and the most recent values of x and y,
in this case x1 and y0, are used to calculate y1:
y1 = y0 −
f2 ( x1 , y0 )
∂ f2 / ∂ y
(9.14)
400
Applied Mathematical Methods for Chemical Engineers
∂f 2/∂y is evaluated at x1 and y0. With xi and yi, f1 is reused to calculate x2. Then f 2 and
the most recent values of x and y are used to calculate y2 [3]. Notice that the choice
of using f1 to calculate a new x and using f 2 to calculate a new y appears arbitrary.
Sometimes, that is, indeed, the case. However, the choice is supposed to be based on
choosing the function with the steeper slope at the solution point ( x , y) to determine
the next x. Otherwise, if both functions have the same slope in a neighborhood of the
solution, the iteration will oscillate about a true solution.
The real disadvantage in the modified Newton–Raphson method is the need to
know a priori which function has the steeper slope at the solution point.
In practice, a graph of the functions can help to identify the curve with the
steeper slope at the solution point. If a graph is not available, then one has to resort
to an arbitrary choice of functions, and if divergence occurs, switch the roles of f 1
and f 2.
In summary, whether we are faced with a single nonlinear equation or a system,
it is very likely that only one starting value will be available. A systematic selection
of that value can improve the likelihood of a convergent solution. Equations 9.7 and
9.9 provide such a systematic approach.
At this point, it is important to point out that there are other software packages,
such as MATLAB, MAPLE, and MATHCAD, that can also be employed to solve
nonlinear algebraic equations. As a matter of fact, there are books providing a wide
range of problems solved with MATLAB [9].
Mathematica has packages available for calling MATLAB from within
Mathematica and vice versa. MATLAB also has toolboxes that incorporate some of
the symbolic capabilities of MAPLE, as pointed out in the literature [10].
MATHCAD, on the other hand, is lacking in its ability to carry out symbolic computations when compared to Mathematica or MATLAB. However, it is intuitive and
very popular with the beginner, because there is no need to memorize commands.
MAPLE can produce program statements for a Fortran compiler in addition to its
ability to perform symbolic algebra and numeric approximations. However, in a comparative study with Mathematica and MATLAB, it was ranked behind Mathematica
and MATLAB, respectively [11].
9.3 SOLUTION OF SIMULTANEOUS LINEAR
ALGEBRAIC EQUATIONS
When compared to other areas of numerical analysis, numerical linear algebra is
well developed, because there is general agreement as to the best algorithms, and
why they are best [5,13]. There is a large body of work on the implementation of
algorithms. This has resulted in packages of very efficient and reliable subroutines
for the solution of problems in linear algebra [5]. A primary goal of this section is
to familiarize the reader with some of the background reasoning for the selection of
algorithms.
Familiarity with matrix–vector notation and results involving matrices will be
assumed, but most of what is needed is provided in the Appendix A. Detailed derivations will be replaced by clarifying examples, most of which will be borrowed from
Selected Numerical Methods and Available Software Packages
401
the literature. These borrowed examples are chosen, because they have already been
tested in the context of the algorithm or method under discussion.
Starting the discussion with the example [14],
x1 + x 2 + 2 x3 = 9 : E1
3 x1 − 2 x 2 + 3 x3 = 8 : E 2
(9.15)
4 x1 + 2 x 2 − 2 x3 = 2 : E 3
The objective is to determine the values of x1, x2, and x3 that will simultaneously
solve all three equations. In general, the System 9.15 is a subset of the n linear equations in n unknowns represented by
Ax = b
(9.16)
where A is an n × n matrix and both x and b represent column vectors (n × 1).
Specifically, Equation 9.16 can be expanded into
a11 x1 + a12 x 2 + a1n x n = b1 : E1
a21 x1 + a22 x 2 + a2 n x n = b2
: E2
ak 1 x1 + ak 2 x 2 + akn kn = bk
: Ek
an1 x1 + an 2 x 2 + ann x n = bn
(9.17)
: En
or condensed using summation notation to
n
∑ aki xi = bk (k = 1,2,, n)
(9.18)
i =1
Regardless of the form, the objective will be the same.
Linear equations result naturally when we conduct material and energy balances,
but most applications occur when we implement other numerical methods. One of
the most basic solution techniques for systems such as Equation 9.15 is Gaussian
elimination [3,5,9,13,14], which is illustrated using the System of Equations 9.15.
We start by using the coefficient of x1 in the first equation, designated as E1, to
eliminate the coefficients of x1 in the other equations—designated as E2 and E3,
respectively. That is, (−4) times E1 added to E3 produces
0 x1 − 2 x 2 − 10 x3 = −34
and (−3) times E1 added to E2 produces
0 x1 − 5 x 2 − 3 x3 = −19
402
Applied Mathematical Methods for Chemical Engineers
The new equivalent system of equations resulting from the above elementary
operation is
x1 + x 2 + 2 x3 = 9
−2 x2 − 10 x3 = −34
(9.19)
−5 x 2 − 3 x3 = −19
The next step is to repeat the procedure on this equivalent system, starting with
the coefficient of the second row to eliminate the coefficient of x2 in the third row.
That is, (−5/2) times the new row 2, add to the new row 3, gives
0 x 2 + 22 x3 = 66
The final equivalent system of equations is in triangular form:
x1 + x 2 + 2 x3 = 9
−2 x2 − 10 x3 = −34
(9.20)
22 x3 = 66
It is not difficult to see how to derive the final results by solving for x3 then x2 and
x1, respectively, such that
 x1   1 
   
x =  x2  = 2
 
 x3   3 
 
or x1 = 1, x2 = 2, and x3 = 3.
The procedure just described can be summarized into two basic steps:
1. Reduce or transform the given problem to an equivalent one, which is more
easily solved
2.Solve the reduced problem
By equivalent problem we mean a problem that has the same solution as the
original one.
The procedure can be generalized and is available in algorithms in many
texts on numerical analysis [5, 9, 13–15]. The first equation in the system of
Equations 9.17 times (a21/a11) is subtracted from the second to eliminate the first
term of the second equation; likewise, the first term of every equation thereafter, k
> 2, is eliminated by subtracting the first equation times (ak1/a11). The result of this
step should be
Selected Numerical Methods and Available Software Packages
403
a11 x1 + a12 x 2 + a1n x n = b1
a22
′ x 2 + a2′ n x n
= b2′
ak′ 2 x 2 + akn
′ xn
= bk′
an′ 2 x 2 + ann
′ xn
= bn′
where
akj′ = aij − mk 1aij ; mkl = (ak 1 /a11 )
Next, the second term of every equation in the third through the last equation, k
> 2, is eliminated by subtracting the second equation times ak′ 2 /a22
′ = mk′ 2. Following
this step, the third terms of the fourth through the last equation are eliminated. This
is continued until the forward elimination process is completed and the form
a11 x1 + a12 x 2 + a13 x3 + + a1n x n = b1
a22
′ x 2 + a23
′ x3 + + a2′ n x n = b2′
a33
′′ x3 + + a3′′n x n = b3′′
(9.21)
( n −1)
nn
n
a
x
= bn′ ( n −1)
results. The leading terms in each equation are called pivots.
The backward substitution procedure starts with the last equation, giving the
solution
xn =
bn( n −1)
( n −1)
ann
Subsequently,
x n −1 =
( bn(n−−11) − an(n−−1,1)n xn )
an( n−−1,2)n −1

n


x1 =  b1 − ∑ aij x j  a11


j=2
completing Gaussian elimination.
(9.22)
404
Applied Mathematical Methods for Chemical Engineers
In actual machine computation, the form given by Equation 9.16 is more useful
for large systems. Here, we will rework the example using the above procedure, but
with the alternate form given by Equation 9.16:
x1 + x 2 + 2 x3 = 9 : E1
 1 1 2   x1   9 
 
3 x1 − 2 x 2 + 3 x3 = 8 : E 2 ⇔  4 2 −2   x 2  =  2 
 


4 x1 + 2 x 2 − 2 x3 = 2 : E 3
 3 −2 3   x3   8 
1 1 2  9


⇒  4 2 −2  2 


 3 −2 3  8 
where the first three columns are the coefficients of the equations in the System 9.15
and the last column is the vector b as represented in Equation 9.16 or the nonhomogeneous term. This vector b is appended unto the array of coefficients to give what
is known as an augmented array. Notice that the second and third equations in the
System 9.15 are switched for convenience.
To start the forward elimination process, the first row times 4 is subtracted from
the second row. The first row times 3 is subtracted from the third row. The resulting
augmented matrix is
 1 1 2 9


 0 −2 −10  −34 
 0 −5 −3  −19 
Continuing the forward elimination, the second row times (5/2) is subtracted from
the third row. The augmented matrix is now
 1 1 2 9


 0 −2 −10  −34  ,
 0 0 22  66 
which ends the forward elimination part of the procedure. Notice the form of the
array; that is, each element below the main diagonal is zero. This is an example of an
upper triangular array (see Appendix A). The same triangular form resulted earlier.
The backward substitution starts with the last row. Interpreting the last row as
22 x3 = 66
results in x3 = 3. Similarly, the second and first rows, respectively, result in
2 x 2 − 10 x3 = −34 ⇒ x 2 = 2 and
x1 = 1
Selected Numerical Methods and Available Software Packages
405
Also demonstrated in this example is the fact that Gaussian elimination works
when all the pivots are nonzero and in most cases are of the same order of magnitude as the other elements. The method fails if the pivots are zero. When the pivots
are relatively small, round-off error can create erroneous results unless corrective
measures are introduced early. Here is an example in which the pivots are of very
different orders of magnitude.
The system
0.0030 x1 + 59.14 x 2 = 59.17 : E1
5.291x1 − 6.130 x 2 = 46.78 : E 2
has exact solution x1 = 10.00 and x2 = 1.000.
However, if we perform Gaussian elimination using four-digit arithmetic
with rounding, the first pivot is a11 = 0.0030, and its associated multiplier, m21, is
5.291/0.0030 = 1764. Carrying out the operation (E2 − m21E1) is supposed to give the
equivalent system:
0.0030 x1 + 59.14 x 2 = 59.17
−104300 x 2 = −104400
Then, backward substitution gives x2 = 1.001, and x1 = −10.000. However, notice
that a small error of 0.001 in x2 leads to a very large error in x1 (factor of 20,000).
If we revisit the system, but this time institute the corrective action by switching
E1 with E2 to get
5.291x1 − 6.130 x 2 = 46.78 : E1
0.0030 x1 + 59.14 x 2 = 59.17 : E 2
then the multiplier for this system is m21 = (0.0030/5.291) and the operation (E2 −
m21E1) results in the equivalent system
5.291x1 − 6.130 x 2 = 46.78
59.14 x 2 = 59.14
such that the four-digit results, using backward substitution, are x1 = 10.00 and x2 =
1.000.
This illustrates that Gaussian elimination can run into difficulties in cases where
(k )
is small relative to the entries aij( k ) for k ≦ i ≦ n and k ≦ j ≦
the pivot element akk
n. Pivoting strategies are usually accomplished by selecting a new element for the
pivot, a (pqk), and then interchanging the kth and pth rows followed by the interchange
of the kth and qth columns, if necessary. The strategy used in the latter example is
termed partial pivoting or maximal column pivoting. Detailed discussions on pivoting can be found elsewhere [5, 9, 13, 16–18].
406
Applied Mathematical Methods for Chemical Engineers
A class of procedures that are not as sensitive to round-off errors is the so-called
iterative procedures. One such procedure is the Gauss–Seidel method, briefly
described below [3, 5, 9, 14].
Consider the System 9.17, in which the diagonal elements a11, a22, …, ann are all
nonzero, if necessary, the equations must be rearranged so that all diagonal elements
are nonzero.
Solve the first equation for x1, solve the second equation for x2, and so on, to get
1
(b1 − a12 x 2 − a13 x3 − a1n x n )
a11
1
(b2 − a21 x1 − a23 x3 − a2 n x n )
x2 =
a22
1
(b3 − a31 x1 − a32 x 2 − a3n x n )
x3 =
a33
x1 =
(9.23)
xn =
1
(bn − an1 x1 − an 2 x 2 − an ,n −1 x n −1 )
ann
Then start the iteration by choosing an initial set of guesses for all the xi and
inserting these into the first equation to calculate a new x1. This value of x1 along
with the previously guessed values for x3, x4, …, xn are inserted into the second
equation to calculate x2. The procedure is continued down the list until a new value
of xn is determined, and then return to the top of the list to repeat the procedure if
necessary.
As an illustrative example, consider the system
6 x1 − x 2 + x3 = 7 : E1
x1 + 4 x 2 − x3 = 6 : E 2
x1 − 2 x 2 + 4 x3 = 9 : E 3
Then, solving for x1 using the first equation, E1, x2 using E2 and x3 using E3 results in
7 1
1
+ x 2 − x3
6 6
6
3 1
1
x 2 = − x1 + x3
2 4
4
9 1
1
x3 = − x1 + x 2
4 4
2
x1 =
Next, we guess x = (0, 0, 0)t as the starting point, and successive application leads to
Selected Numerical Methods and Available Software Packages
407
7
1 7
29
= 1.16, x 2 = 3 / 2 −   =
= 1.21,
6
4  6  24
1 7
1  29 
x3 = 9/4 −   +   = 2.56
4  6  2  24 
x1 =
The vector x = (1.16, 1.21, 2.56)t constitutes the values for the next iteration. This
process was carried out until the result x = (1, 2, 3)t was achieved. This required six
iterations.
Convergence is assumed when a change in each of the answers satisfies a preset
criterion. Generally, the procedure is guaranteed to converge whenever the diagonal
element is larger than the sum of the row elements or column elements.
Another in the class of iterative procedure is the Jacobi method. This method is
illustrated by solving the following system:
10 x1 − x 2 + 2 x3 = 6 : E1
− x1 + 11x2 − x3 + 3 x 4 = 25 : E 2
2 x1 − x2 + 10 x3 − x4 = −11: E 3
3 x2 − x3 + 8 x 4 = 15 : E 4
This system has exact solution x = (1, 2, −1, 1)t.
The goal of the method is to convert Ax = b to the form x = Tx + c. This is accomplished by solving equation Ei for xi, for each i = 1, 2, 3, 4 to obtain
1
1
3
x 2 − x3 +
10
5
5
1
1
3
25
x 2 = x1 + x3 − x 4 +
11
11
11
11
1
1
1
11
x3 = − x1 + x 2 + x 4 −
5
10
10
10
3
1
15
x 4 = − x 2 + x3 +
8
8
8
x1 =
Thus, the matrix T is given by
 0 1 / 10 −1 / 5 0 
 1 / 11 0 1 / 11 −3 / 11 

T=
 −1 / 5 1 / 10 0 1 / 10 
 0 −3 / 8 1 / 8
0 
and the vector c, by c = (3/5, 25/11, −11/10, 15/8)t.
408
Applied Mathematical Methods for Chemical Engineers
To start this procedure, we guess x(0) = (0, 0, 0, 0)t and generate xi(1) by
1 (0) 1 (0) 3
x 2 − x3 + = 0.6000
10
5
5
1
1
3
25
= x1(0) + x3(0) − x 4(0) +
= 2.2727
11
11
11
11
1
1
1
11
= − x1(0) + x 2(0) + x 4(0) −
= −1.1000
5
10
10
10
3
1
15
= − x 2(0) + x3(0) + = 1.8750
8
8
8
x1(1) =
x 2(1)
x3(1)
x 4(1)
Additional iterates, k, can be generated for x ( k ) = ( x1( k ) , x 2(k ) , x3(k ) , x 4(k ) ) . By continuing the procedure up to k = 10, we get
t
1 (9) 1 (9) 3
x 2 − x3 + = 1.0001
10
5
5
1
1
3
25
= x1(9) + x3(9) − x 4(9) +
= 1.9998
11
11
11
11
1
1
1
11
= − x1(9) + x 2(9) + x 4(9) −
= −0.9998
5
10
10
10
3
1
15
= − x 2(9) + x3(9) + = 0.9998
8
8
8
x1(10) =
x 2(10)
x3(10)
x 4(10)
The decision to stop after 10 iterations is due to the criterion that the relative
difference between the last two iterations is to be smaller than some appropriately
chosen tolerance.
Notice that one difference between the Gauss–Seidel and Jacobi methods is in
their use of the newly calculated xi value. In Gauss–Seidel, the newly calculated
xi value is used to determine the xi+1 value, but this is not so in the Jacobi method.
In most cases, this leads to faster convergence of the Gauss–Seidel over the Jacobi
method. Generally, iteration methods are most useful for large matrices with a substantial number of zero elements.
In procedures such as the Jacobi and Gauss–Seidel methods, a residual vector r,
r = b − Ax
(9.24)
where x is an approximation to the solution vector, is associated with each calculation of a component to the solution vector [5].
Then, if
ri(k) = ( rli( k ) , r2(ik ) ,, rni( k ) )
t
(9.25)
is the residual vector for the Gauss–Seidel method corresponding to the approximate
t
(k )
solution vector ( x1( k ) , x 2(k ) ,, xi(−k1) , xi( k −1) ,, x n( k −1) ) , the mth component of ri is
Selected Numerical Methods and Available Software Packages
i −1
n
j =1
j =1
i −1
n
409
rmi( k ) = bm − ∑ amj x (j k ) − ∑ amj x (j k −1)
= bm − ∑ amj x (j k ) −
j =1
∑
(9.26)
amj x (j k −1) − amj xi( k −1)
j = i +1
for each m = 1, 2, …, n.
Therefore, the ith component of ri( k ) is
i −1
rii( k ) = bi − ∑ aij x (j k ) −
j =1
n
∑ aij x (jk −1) − aii xi( k −1)
(9.27)
j = i +1
such that
i −1
rii( kk ) + aii xi( k −1) = bi − ∑ aij x (j k ) −
j =1
n
∑ aij x (jk −1)
(9.28)
j = i +1
However, in the Gauss–Seidel method,
xi( k −1) =
1
aii
i −1

(k )
b
−
 i ∑ aij x j −

j =1
n

∑ aij x (jk −1) 
j = i +1
Therefore
rii( k ) + aii xi( k −1) = aii xi( k )
(9.29)
or
xi( k ) = xi( k −1) +
rii( k )
aii
(9.30)
The result given by Equation 9.30 is obtained by requiring that the ith coordinate
of the vector, ri(+k1) be zero at each stage. However, the reduction to zero of one coordinate of the residual vector is not the most effective way to reduce the norm of ri(+k1).
A modification that can lead to a more significant improvement in convergence
speed is
xi( k ) = xi( k −1) + ω
rii( k )
aii
(9.31)
for certain choices of the positive relaxation parameter, ω. Methods using Equation
9.30 are called relaxation methods [5].
For choices of 0 < ω < 1, we have under-relaxation methods, which are successful for some systems that are not convergent for Gauss–Seidel. Those methods
410
Applied Mathematical Methods for Chemical Engineers
associated with ω > 1 are called over-relaxation methods and are useful in
accelerating the convergence for systems that are already convergent by Gauss–
Seidel. These over-relaxation methods are also named successive over-relaxation
(SOR), and find application in the numerical solution of certain partial differential
equations.
In practice, Equations 9.28 and 9.31 are appropriately combined to give
xi( k ) = (1 − ω ) xi( k −1) +
ω
aii
i −1

(k )
 bi − ∑ aij x j −

j =1
n

j = i +1

∑ aij x (jk −1) 
(9.32)
which is the central theme of the SOR methods.
Below is an illustration comparing the SOR, Equation 9.32, and the Gauss–Seidel
methods. The following system
4 x1 + 3 x 2 = 24 : E1
3 x1 + 4 x 2 − x3 = 30 : E 2
− x 2 + 4 x3 = −24 : E 3
has exact solution x = (3, 4, −5)t. For both methods the initial guess is x(0) = (1, 1, −1)t.
The equations for Gauss–Seidel are
x1( k ) = −0.75 x 2(k −1) + 6
x 2(k ) = −0.75 x1( k ) + 0.25 x3(k −1) + 7.5
x3(k ) = 0.25 x 2(k ) − 6
for each k = 1, 2, … and the equations for the SOR method with ω = 1.25 are
x1( k ) = −0.25 x1( k −1) − 0.9375 x 2(k −1) + 7.5
x 2(k ) = −0.9375 x1( k ) − 0.25 x 2(k −1) + 0.3125 x3(k −1) + 9.375
x3(k ) = 1.3125 x 2(k ) − 0.25 x3(k −1) − 7.5
Table 9.1 summarizes the results of the comparison for up to seven iterations. From
this table, we see that the SOR method is converging much faster than the Gauss–
Seidel. Not shown in the table is the fact that the Gauss–Seidel method required 34
iterations, versus 14 for the SOR to obtain seven-decimal-place accuracy. Guidelines
on how one may choose ω, including Kahan and Ostrowski-Reich conditions, can be
found in the literature [5].
Selected Numerical Methods and Available Software Packages
411
TABLE 9.1
Comparison of Gauss–Seidel and SOR Methods
Gauss–Seidel
SOR with ω = 1.25
(1)
1
x
5.2500
6.3125
x 2(1)
3.8125
3.5195
x3(1)
−5.0469
−6.6501
x1(5)
3.0343
3.0037
x 2(5)
3.9714
4.0029
x3(5)
−5.0071
−5.0057
x1(7)
3.0134
3.0000
x 2(7)
3.9888
4.0002
x3(7)
−5.0028
−5.0003
9.3.1 ERROR EstIMAtE
In addition to what has been said above about achieving a good approximation to the
solution vector, x in Ax = b, it is necessary to add a few more words regarding “very
difficult to converge” systems and suggest how one may attack such problems.
It is not unreasonable to expect that if x is an approximation to the solution x, then
the residual r = A x − b should have the property that the norm, ∥r∥ is small such
that the norm of the difference, x − x would be small. Quite often, this is exactly
the case. However, certain systems occurring in practice fail to display this behavior.
For example, the system given by
 1 2   x1   3 
 1.0001 2   x  =  3.0001 

  2  

has the approximate solution, x = (3,0) t with the residual vector
 3   1 2  3   0 
r = b − Ax = 
−

  = 
 3.0001   1.0001 2   0   .0002 
Using matrix property 8, given in the Appendix A (Equation A.20), we can evaluate
the ℓ∞ norm of the vector r to be ∥r∥ℓ ∞ = .0002. Even though the norm of this residual
vector appears to be quite small, it is clear that the approximation x = (3,0) t is poor;
in fact, using Equation A.22, x − x ∞ = 2.
412
Applied Mathematical Methods for Chemical Engineers
This example demonstrates what can happen when we approximate the solution
to a system representing two almost parallel lines. The point (3, 0) lies on one line:
x1 + 2x2 = 3 and is very close to the other line given by 1.0001x1 + 2x2 = 3.0001, but
is very different from the actual intersection point (1, 1).
Generally, the system geometry may not be available to help us determine a priori
when problems might occur; therefore, we must find an alternative. Such help can
be obtained from the norms of the matrix A and its inverse [5,16,19,20]. In this section, we will use the ℓ∞ norm as opposed to the ℓ2 norm for matrices (as opposed to
vectors), where
 A ∞ = max  Ax 
 x∞ =1
(9.33)
is the ℓ∞ norm and the ℓ2 norm is
 A 2 = max  Ax 2
 x2 =1
(9.34)
Further, if A = [aij] is an n × n matrix, then
n
 A ∞ = max ∑ | aij |
1≤ i ≤ n
j =1
To see how Equation 9.35 works, suppose
 1 2 −1 
A =  0 3 −1 


 5 −1 1 
then
n
∑ | a1 j | = | 1 | + | 2 | + | −1 | = 4
j =1
n
∑ | a2 j | = | 0 | + | 3 | + | −1 | = 4
j =1
n
∑ | a3 j | = | 5 | + | −1 | + | 1 | = 7
j =1
therefore
n
 A ∞ = max ∑ | aij | = max{4,4,7} = 7
1≤ i ≤ n
j =1
(9.35)
413
Selected Numerical Methods and Available Software Packages
To continue the discussion on how one might use the norms of A and its inverse,
A−1, to anticipate accuracy based on the residual of an approximation, we need the
following [5]:
x − x ≤ r A −1 (9.36)
x − x r
; x
≤ A A −1 x
b
(9.37)
and
A quantity called the condition number, K(A), is defined relative to a norm to be
K ( A) = A   A −1 
(9.38)
r
b
(9.39)
x − x r
≤ K ( A)
r b
(9.40)
such that
x − x ≤ K ( A)
and
Then, since
1 =  I  =  A ⋅ A −1  ≤  A   A −1  = K ( A)
it is expected that the matrix A will be a well-conditioned matrix if K(A) is close
to 1 and an ill-conditioned matrix if K(A) is much greater than 1.
Returning to the first example of this section
 1 2
A=

 1.0001 2 
has ∥A∥ ∞ = 3.0001. This quantity does not appear to be too large; however,
 −10000 10000 
A −1 = 

 5000.05 −5000 
such that ∥A−1∥ ∞ = 20000 and K(A) = 60002—indeed a very significant difference
from one. We have omitted the computation details of the inverse here, and refer the
reader to the Appendix A for a method on how to calculate it.
414
Applied Mathematical Methods for Chemical Engineers
In practice, the calculation of the inverse is subject to round-off error, and will
depend on the accuracy with which the calculation is performed. Based on this reasoning, it is desirable to estimate the condition number by an alternate procedure.
Such a procedure can be found in the literature [5].
Essentially, using t-digit arithmetic and Gaussian elimination to approximate the
solution to Ax = b, it has been shown [19] that the residual vector r for the approximation x has the property
r ≈ 10 − t x x (9.41)
From Equation 9.41, an estimate for the effective condition number in t-digit arithmetic can be obtained without the need to invert the matrix A. Also, Equation 9.41
assumes that all the arithmetic operations in the Gaussian elimination are performed
using t-digit arithmetic, but that the operations that are needed to determine the
residual are done in 2t-digit arithmetic.
To approximate the t-digit (effective) condition number, consider the system
Ay = r.
(9.42)
The approximate solution to Equation 9.42 is readily available, since the multipliers for the Gaussian elimination method have been calculated (and retained). Now,
then, the approximate solution of Ay = r, satisfies
y ≈ A −1r = A −1 ( b − Ax) = A −1 Ax − A −1 An = nn − n
(9.43)
such that is an estimate of the error in approximating the solution to the original
system. Then, using Equation 9.41,
y ≈ x − x = A −1r ≤ A −1 r ≈ A −1 (10 − t A x ) = 10 − t x K ( A)
resulting in
K ( A) ≈
y t
10
x (9.44)
an estimate for the condition number involved with solving Ax = b using Gaussian
elimination. Below is an illustrative example summarizing some of the main points
of this section [5].
Consider the system
 3.3330 15920 −10.333   x1   15913 
 2.2220 16.710 9.6120   x  =  28.544 

 2  

1.5611
5.1791
1.6852

  x3   8.4254 
415
Selected Numerical Methods and Available Software Packages
Using Gaussian elimination and five-digit arithmetic, this system results in the
augmented matrix
 3.3330 15920 −10.333  15913

 0 −10596 16.501  −10580
 0
0
−5.0790  −4.7000




whose approximate solution is x = (1.2001, .99991, .92538)t.
The residual vector corresponding to x is computed in double precision to be
 15913   3.3330 15920 −10.333  1.2001 

 


r = b − Ax =  28.544  −  2.2220 16.710 9.6120  .99991 
 8.4254   1.5611 5.1791 1.6852  .92538 
 −.00518 


=  .27413 
 −.18616 
such that ∥r∥ ∞ = .27413.
Using five-digit arithmetic for the calculations gives the approximation for the
inverse of A to be
 −1.1701 × 10 −4 −1.4983 × 10 −1 8.5416 × 10 −1

A −1 =  6.2782 × 10 −5 1.2124 × 10 −4 −3.0662 × 10 −4
 −8.6631 × 10 −5 1.3846 × 10 −1 −1.9689 × 10 −1




and Equation 9.35 gives ∥A−1 ∥ ∞ = 1.0041 and ∥A∥ ∞ = 15934, such that this estimate
of the condition number K(A) is 15,999 using Equation 9.38.
The estimate for the condition number using the t-digit approach, Equations 9.41
through 9.44, involves solving the system
 3.3330 15920 −10.333   y1   .00518 
 2.2220 16.710 9.6120   y  =  .27413 

 2  

1.5611
5.1791
1.6852

  y3   −.18616 
resulting in y = (−.20008, 8.9987 × 10 −5, .07461)t. Then, using Equation 9.44 we get
K ( A) ≈
y ∞ t
(.20008)
10 = 10 5
= 16672,
x ∞
1.2001
which gives the same quality information without involving the computation of A−1.
416
Applied Mathematical Methods for Chemical Engineers
In the development of Equation 9.44, the estimate y = x − x was used. A reasonable expectation is that x + y is a more accurate approximation to the solution
 This notion is developed into a method called iterative
of Ax = b compared to x.
refinement [5]. To see how this improvement works, reconsider the latter example.
The approximation to the given problem using five-digit arithmetic and Gaussian
elimination is x (1) = (1.2001, .99991, .92538) t and the solution to Ay = r(1) is y(1) =
(−.20008, 8.9987 × 10 −5, .07461)t.
Then, using the iterative refinement approach gives
x (2) = x (1) + y (1) = (1.0000, 1.0000, .99999) t
where the actual error in this approximation is x − x (2) ∞ = 1 × 10 −5 as compared
to x − x ∞ = .2001 or
x − x ∞
= .2001
x ∞
resulting from five-digit arithmetic with Gaussian Elimination.
One more iteration involves computing r (2) = b − A x (2) and solving Ay(2) = r(2),
resulting in y(2) = (1.5002 × 10 −9, 2.0951 × 10 −10, 1.0000 × 10 −5). Then
x (3) = x + y (2) = y (2) = (1.0000, 1.0000, 1.0000) t
which agrees with the actual solution of the given system.
9.3.2 SPEcIAL TYPEs OF MAtRIcEs
In this section some additional discussion on matrices is presented to facilitate subsequent numerical approaches that arise during the application of mathematics in chemical engineering. In the previous section we applied Gaussian Elimination to reduce a
given system to an equivalent system. We then used backward substitution to extract
the final results for the given variables. For example, if we start with the linear system
x1 + x 2
+ 3 x 4 = 4,
2 x1 + x 2 − x3 + x 4 = 1,
3x1 − x 2 − x3 + 2 x 4 = − 3,
− x1 + 2 x2 + 3 x3 − x4 = 4.
and use Gaussian elimination, we produce the equivalent system
1

0
0

 0
1
0
−1
−1
0
3
0
0
4 

−5  −7
13 
13 

− 13  − 13 
3 
Selected Numerical Methods and Available Software Packages
417
and then apply backward substitution to identify the final solutions for the given
variables. An equivalent matrix
1

0
U =
0

0
1
0
−1
−1
0
3
0
0
3 

−5 
13 

− 13 
is produced whose form is upper-triangular. In general, an upper-triangular n × n
matrix U has for each j entries
uij = 0 for i = j + 1, j + 2,, n and a lower-triangular matrix L whose j entries
are given by lij = 0 for each i = 1,2,, j − 1, i ≠ j. It is important to note that to derive
both an upper- and a lower-triangular matrix, the Gaussian elimination procedure
must be performed without row or column interchanges.
To find a lower-triangular corresponding to U , we consider i = 1,2,3, and define
m ji for each j = i + 1, i + 2,,4, to be the number used in the elimination step
E j − m ji Ei → E j; that is, m21 = 2, m31 = 3, m41 = −1, m32 = 4, m42 = − 3 and m43 = 0.
Then if L is defined to be the 4 × 4 lower-triangular matrix with entries lij given by
(
)
0,

lij = 1,
m
 ij
when i = 1,2,, j − 1,
when i = j,
when i = j + 1, j + 2,, n,
then
 1
 2
L=
 3

 −1
0 0 0
1 0 0

4 1 0

− 3 0 1
Note! The student should check that A = LU .
In addition to illustrating what is meant by upper- and lower-triangular matrices,
we have also factored the given matrix. However, more direct approaches to the
factorization of matrices are available [5, 25, 36, 37] for example, if we consider the
strictly diagonally dominant 4 × 4 matrix:
 6
 2
A = 
 1

 −1
2
4
1
0
−1 
1
0

4
−1 

−1
3
1
418
Applied Mathematical Methods for Chemical Engineers
Then A can be factored in the form A = LU , where


L=



l11
2
l21
l22
l41
l42


U=



u11
u12
l31
0
0
l32
l33
l43
0
0

0 

l44 
and
0
u13
u22
u23
0
0
u33
0
0
0
u 14 
u24 

u34 

u44 
In this example we will employ the Doolittle’s method, which arbitrarily requires
that the elements l11 = l22 = l33 = l44 = 1. To arrive at the product LU that satisfies the
first row of the given matrix A,
u11 = 16, u12 = 2,
u13 = 1, u14 = −1.
The portion of the multiplication that determines the remaining entries in the first
column of the given matrix A, provides equations
l21u11 =
1
3
1
l31 =
6
1
l 41 = −
6
l21 =
2
l31u11 = 1
and
l41u11 = −1
At this stage of the proceedings the matrices L and U assume the form
 1
 1

 3
L= 1

 6
 1
 −6

1
0
1
0
l32
1
l42
l43
0

0


0


1

and


U=



6
2
1
0
u22
u23
0
0
u33
0
0
0
−1 
u24 

u34 

u44 
Selected Numerical Methods and Available Software Packages
419
The part of the multiplication that satisfies the remaining entries in the second
row of the given matrix A are
2
10
+ u22 = 4
u22 =
3
3
1
2
+ u23 = 1 such that u23 =
3
3
1
1
− + u24 = 0
u24 =
3
3
and the remaining entries in the second column of the given matrix A are
2 10
+ l32 = 1
6 3
l32 =
1
5
l31 =
1
6
such that
2 10
− + l42 = 0
6 3
Continuing the process, alternate columns and rows between L and U to finally
arrive at
 1
 1

 3
L= 1

 6
 1
 −6

1
0
1
0
1
5
1
10
1
−
9
37
0

0


0


1

and




U=





6
2
1
0
10
3
0
0
2
3
37
10
0
0
0
−1 
1 

3 
9
− 
10 
191 
74 
It is very important to keep in mind the specific aim is to solve the linear system
Ax = b. One path to achieving the solution of a given system is to use the Gaussian
elimination with backward substitution. Furthermore, the matrix A can be factored
420
Applied Mathematical Methods for Chemical Engineers
into a lower-triangular matrix L and an upper-triangular matrix U whenever the
given system Ax = b can be solved uniquely by Gaussian elimination without row
(or column) interchanges. The system LUx = Ax = b can then be transformed into
the system Ux = L−1b and since U is upper-triangular, backward substitution can be
applied.
However to be able to solve many systems using the matrix A it is desirable to
have available more direct methods to determine L and U so that only a forward
and backward substitution need to be performed. In addition to Doolittle’s method
[5], there is Choleski’s Method, which requires that lii = uii for each value of i and
Crout’s Method which requires that all the diagonal elements of U be one.
To illustrate the key steps involved in using Choleski’s method [5, 38], we consider
the matrix (positive definite)
 4

A =  −1
 1

−1
4.25
2.75


2.75 
3.5 
1
Step 1:
l11 = a11 = 4 = 2
Step 2:
l21 =
a21 −1
a
1
= = 0.5, l31 = 31 = = 0.5
l11 2
l11 2
Step 3:
i=2
Step 4:
2
l22 = ( a22 − l21
) = ( 4.25 − (0.5)2 )
12
12
=2
Step 5:
l32 =
1
1
( a32 − l31l21 ) = ( 2.75 − 0.5(−0.5)) = 1.5
l22
2
Step 6:
2
2
l33 = ( a33 − l31
− l32
) = (3.5 − (0.5)2 − (1.5)2 )
12
12
=1
Selected Numerical Methods and Available Software Packages
421
In this procedure it is required that U = Lt , t ≡ transpose, that is,
l12 = l13 = l23 = 0,
u11 = l11 = 2, u12 = l21 = − 0.5,
u13 = l31 = 0.5,
u21 = l12 = 0, u22 = l22 = 2,
u23 = l32 = 1.5,
u31 = l13 = 0, u32 = l23 = 0,
u33 = l33 = 1,
Such that
 2

L =  − 0.5
 0.5

0
0
2
0
1.5
1
 2 − 0.5

U= 0
2
 0
0

0.5
1.5
1










The key steps of Crout’s method [5] are illustrated through the given tridiagonal
system of equations Ax = b:
2 x1
− x2
=1
− x1 + 2 x 2 −
− x2
=0
x3
+ 2 x3 −
x4 = 0
− x3 + 2 x 4 = 1
whose augmented matrix is
 2

 −1
 0

 0
−1
0  1

−1 0  0
2 −1  0 

2  1 
−1
0
2
−1
0
where
 2
 −1
A=
 0

 0
−1
2
0
−1
−1
2
0
−1
0 
0 

−1 

2 
422
Applied Mathematical Methods for Chemical Engineers
Step 1:
l11 = 2, u12 =
a12
1
=−
l11
2
Step 2:
i=2
1
3
l21 = a21 = − 1, l22 = a22 − l21u12 = 2 − ( −1)  −  =
 2 2
1
2
a
=−
u23 = 23 = −
3
l22
 3
 
2
i=3
 2 4
l32 = a32 = − 1, l33 = a33 − l32 u23 = 2 − ( −1)  −  =
 3 3
3
a34
=−
u34 =
4
l33
Step 3:
3 5
l43 = a43 = − 1, l44 = a44 − l43 u 34 = 2 − ( −1)  −  =
 4 4
Step 4:
z1 =
a15 1
=
l11 2
Step 5:
1
z2 =  a25 − l21z1  =
l22
1
0 − ( −1)  
 2
1
=
3
 3
 
2
1
0 − ( −1)  
 3 1
=
4
 4
 
3
1
1 − ( −1)  
 4
1
=1
z4 =
 a45 − l43 z3  =
l44 
 5
 
4
1
z3 =
 a35 − l32 z2  =
l33 
Selected Numerical Methods and Available Software Packages
423
Step 6:
x4 = 1
Step 7:
1
3
x3 = z3 − u34 x 4 = −  −  = 1
4  4
1
2
x 2 = z2 − u23 x3 = −  −  = 1
3  3
1
1
x1 = z1 − u12 x 2 = −  −  = 1

2
2
The matrix A is now factored into
 2
 −1

 0

 0
 2

 −1

= 
 0


 0
0
0
3
2
0
−1
4
3
0
−1
−1
0
2
−1
−1
2
0
−1
0 

0 


0 

5 
4 

1

0


0

 0
0 
0 

−1 

2 
−
1
2
1
0
0
0 

2
0 
−

3
3 

1 −
4 
0
1 
0
such that x1 = x 2 = x3 = x 4 = 1.
Note! Crout’s method requires that lii ≠ 0, i = 1,2,, n.
These matrices are recommended for use when the linear system is small enough
to be effectively accommodated in the main memory of a computer. Generally, it is
most effective to use a direct technique that minimizes rounding error effects.
9.4 SOLUTION OF ORDINARY DIFFERENTIAL EQUATIONS
In keeping with the philosophy of this chapter, we will highlight certain numerical
strategies for approximating the solutions of ordinary differential equations. In doing
so, we aim to point out the advantages and disadvantages of a given method or type
of method, while leaving the actual algorithms and their derivations to the numerical
analysis literature. Also, where appropriate, we will suggest available software packages that employ the numerical algorithm under discussion.
424
Applied Mathematical Methods for Chemical Engineers
Following the traditional approach, this section will be discussed under two subheadings: (1) initial value problems and (2) boundary value problems. Supporting
information, such as the algebra or calculus of finite differences, can be found in the
literature [5, 9].
9.4.1 INItIAL VALUE PROBLEMs
For chemical engineers, the unsteady-state problems are of great interest, since they
can help us to decide on process control strategies that can manage process upsets. As
it turns out, very few of these will yield analytical results without a substantial number of simplifying assumptions. When such assumptions are unwarranted or unjustifiable, we have to turn to a numerical approach. Once this decision is made, we are then
faced with choosing a method that will give a reliable approximation of the solution to
the given problem. In deciding on a method, one must be mindful of the various errors
that can occur and, in particular, propagation error, that can lead to instability in the
method. Even though error analysis is an important aspect of numerical analysis, we
will leave the in-depth discussion to the numerical analysis texts.
The discussion that follows assumes that the problem under consideration for a
numerical approach will be well posed [5,21].
Given a differential equation of the form
dy
= f (t , y)
dt
(9.45)
and the condition that y = b when t = a, the analytically derived solution, F(t), passing
through (a, b) would be an equation of the form
y = F (t )
(9.46)
The issue now is, how does Equation 9.45 describe the solution given by Equation
9.46, when all we know are Equation 9.45 and the initial value?
Generally, the procedures will rely on the fact that given any point (t, y) on the
solution curve, we can obtain the direction of the curve through that point. In principle, we have a starting point and a set of directions given by Equation 9.45, and,
without any other information, we must follow the directions to the desired final
destination, the approximate solution.
The most straightforward method, the Euler method, employs the strategy of
approximating the solution by constructing a tangent through the given initial point.
Then, use the given differential equation to determine the slope of this tangent. Once
this information is in hand, a small step in the right direction is taken at whose end
point another tangent is constructed and its slope determined using Equation 9.45.
By iterating this process, one can go as far as one wishes; however, round-off error
usually limits the use of this technique in practice.
Formally, the procedure is as follows: we wish to generate an approximation y
corresponding to the point t such that
y = F(t )
(9.47)
Selected Numerical Methods and Available Software Packages
425
The first step is to subdivide the interval a ≦ t ≦ t into n-subintervals, each of width
h=
t − t0
n
(9.48)
and the resulting boundaries between subintervals called mesh points are denoted by
t1, t2, …, tn−1, tn, such that t = tn and t0 = a.
Then, starting from (t0, b), draw a tangent with slope
dy
= f (t0 , b)
dt (t0 ,b )
such that
f (t0 , b) =
y1 − b
t1 − t0
(9.49)
Solving for y1, the y-coordinate of the tangent at the location t = t1, we get
y1 = f (t0 , b)(t1 − t0 ) + b
= hf (t0 , b) + b
(9.50)
In terms of Equation 9.46,
F (t1 ) ≈ F (t0 ) + F ′(t0 )(t1 − t0 )
(9.51)
since b = F(t0) and f(t0, b) = F′(t0).
The approximation (as opposed to equality) comes from the fact that Equation
9.51 neglects second- and higher-order derivatives of F(t) by comparison to the
Taylor series expansion of F(t).
Whatever the size of the error created in a step, we would like to minimize it by
shrinking h so that the tangent will closely approximate the actual solution, while
forcing the remaining terms of the Taylor series to vanish. However, shrinking h
requires increasing the number of steps to reach t . This then leads to a larger roundoff error and more than likely, an unacceptable result.
This brief discussion of Euler’s method raises two important issues in all methods for solving the initial value problem: to improve the approximate solution to the
initial value problem, we need to pay close attention to how the solution curve is
modeled (straight line vs. polynomials, etc.) and the size of the step to use (h). How
well these issues are resolved by a particular method is measured by a comparison
with the Taylor series for the expected solution F(t).
Many methods are based on the direct use of the Taylor series to develop the
approximate solution curve. Such methods are called Taylor methods. Euler’s method
is a Taylor method with a local truncation error, τ i, for the ith step
τi =
yi − yi −1
= f (ti −1 , yi −1 ), i = 1,2, n
h
(9.52)
426
Applied Mathematical Methods for Chemical Engineers
where yi is the exact value of the solution at ti. The local truncation error has been
defined as a measure of the amount by which the exact solution to the differential
equation fails to satisfy the difference equation used for the approximation [3, 5, 18,
21]. Euler’s method as well as the other Taylor methods are considered as singlestep methods. These are methods for which the approximation for the mesh point,
ti, involves information from only one of the previous mesh points ti − 1. In addition,
Euler’s method is first order, because the second- and higher-order derivatives are
neglected in the comparable Taylor series.
Taylor methods are developed for nth-order accuracy; that is, the (n+1)th and
higher derivatives are neglected. However, the need to determine the higher-order
derivatives of f(t, y) introduces a major difficulty, and consequently, these methods
are not very popular in practice.
Alternatives to the Taylor methods are the Runge–Kutta methods. These methods
were developed to utilize the high-order accuracy of the local truncation error of
the Taylor methods, while avoiding computation and evaluation of the derivatives
of f(t,y).
To appreciate some of the similarities between the Taylor and Runge–Kutta
methods we will state the associated difference equations without the detailed derivations. Full derivations and algorithms can be found in many texts on numerical
analysis [5, 9, 18, 22–24].
All methods seek to obtain an approximation, w, to the well-posed initial value
problem:
dy
= f (t , y), a ≤ t ≤ b,
dt
y( a ) = α
(9.53)
In the case of Euler’s method,
w0 = α
wi +1 = wi + hf (ti , wi )
(9.54)
where wi = y(ti) for each i = 1, 2, …, n. For Taylor method of order n, we have
w0 = α
wi +1 = wi + hT ( n ) (ti , wi ), i = 0,1,, n − 1
(9.55)
where
T ( n ) (ti , wi ) = f (ti , wi ) +
h
h n −1 ( n −1)
f ′(ti , wi ) +  +
f
(ti , wi )
2
n!
(9.56)
In the case of the Runge–Kutta methods, we have the so-called midpoint method,
w0 = α
h
h


wi +1 = wi + hf  ti + , wi + f (ti , wi ) , i = 0,1,, n − 1


2
2
(9.57)
Selected Numerical Methods and Available Software Packages
427
the modified Euler method,
w0 = α
h
wi +1 = wi + [ f (ti , wi ) + f (ti +1 , wi + hf (ti , wi ))], i = 0,1,, n − 1
2
(9.58)
the Heun method,
w0 = α
wi +1 = wi +
2
2
h


f (ti , wi ) + 3 f  ti + h, wi + hf (ti , wi )  , i = 0,1,, n − 1 (9.59)



4
3
3
and the very popular Runge–Kutta order-four method, given by
w0 = α
k1 = hf (ti , wi )
h
k 

k2 = hf  ti + , wi + 1 

2
2
h
k 

k3 = hf  ti + , wi + 2 

2
2
k4 = hf (ti +1 , wi + k3 )
(9.60)
1
wi +1 = wi + ( k1 + 2 k2 + 2 k3 + k4 ), i = 0,1,, n − 1
6
Equation 9.57 through 9.59 are second-order or Runge–Kutta order-two methods.
The approach used to develop Equation 9.57 is typical, in that a number of
parameters are evaluated by comparing their coefficients with the appropriate
derivatives in the expansion of T(n) (ti, wi) given by Equation 9.56. For a secondorder Runge–Kutta, such as the result given by Equation 9.57, three parameters,
a1, a 2, and a3 are used. These parameters have the property that a1f(t + a 2, y + a3)
approximates
T (2) (t , y) = f (t , y) +
h
f ′(t , y)
2
Since
∂
∂
dy
f (t , y) +
f (t , y)
∂t
∂y
dt
∂
∂
=
f (t , y) +
f (t , y) ⋅ f (t , y)
∂t
∂y
f ′(t , y) =
(9.61)
428
Applied Mathematical Methods for Chemical Engineers
then comparison of T(2) (t, y) with the truncated Taylor expansion of f(t + a2, y + a3)
about (t, y) gives
∂ f (t , y)
∂ f (t , y)
+ a1a3
∂t
∂y
h ∂ f (t , y) h ∂ f (t , y)
= f (t , y) +
+
⋅ f (t , y)
2 ∂t
2 ∂y
a1 f (t + a2 , y + a3 ) = a1 f (t , y) + a1a2
which result in a1 = 1, a2 = h/2, and a3 = h/2 · f(t, y) following the equating of coefficients. Notice that the truncated term in the Taylor expansion of f(t + a2, y + a3)
about (t, y) involves the second-order derivative, which implies the order of the local
truncation error.
Example 9.1
This example demonstrates an alternative approach to arrive at Equation 9.54.
Consider the differential equation
dy
= f ( x , y), y ( x 0 ) = y0
dx
Then if
y ( x k ) = yk , y ′ ( x k ) = yk′ = f ( x k , yk )
The differential equation can be approximated by the difference equation
yk +1 = yk + h yk′ = yk + h f ( x k , yk )
This is accomplished by
yk +1
∫
dy =
yk
x k +1
∫
xk
f ( x , y ) dx or yk +1 = yk +
x k +1
∫ f ( x , y) dx
xk
if f ( x , y ) is considered to be relatively constant between the points x k and x k +1 then,
Equation 9.54 describes the k + 1 value of y
yk +1 = yk +
x k +1
x k +1
xk
k
∫ f ( xk , yk ) dx = yk + f ( xk , yk ) x∫
dx
= yk + f ( x k , yk ) ( x k +1 − x k ) = yk + h f ( x k , yk ) ; k = 0,1, 2, , n
Selected Numerical Methods and Available Software Packages
429
Example 9.2
This example demonstrates how one may use Euler’s Method Equation (9.54) in practice
[5, 34, 35].
Suppose the initial values of x and y are given by x 0 = 0 and y0 = 1 , and the differential equation is
dy
= 2x + y
dx
Determine the value of y at x = 0.5 with step size h = 0.1.
Solution results are provided in Table 9.2:
f ( x k , yk ) = 2 x k + yk ; k = 0,1, 2,3, 4,5
Then in the context of Equation 9.54, we have
(
)
y2 = y1 + h f ( x1, , y1 ) = 1.1000 + (0.1)[2(0.1) + 1.1000] = 1.2300
y3 = y2 + h f ( x2, , y2 ) = 1.2300 + (0.1)[2(0.2) + 1.2300] = 1.3930
y1 = y0 + h f x0, , y0 = 1.0000 + (0.1)(1.0000) = 1.1000

Upon solving the given problem using the method for linear first order differential
equation described in Chapter 2, we get
y ( x ) = 3e x − 2 x − 2
then
y ( 0.5) = 3e 0.5 − 2(0.5) − 2 = 1.9462
TABLE 9.2
Euler Method
k
xk
0
1
2
3
4
5
0
0.1
0.2
0.3
0.4
0.5
yk
1.0000
1.1000
1.2300
1.3930
1.5923
1.8315
y ′ = f ( x k , yk ) y k + 1 = y k + h f ( x k , yk )
1.0000
1.3000
1.6300
1.9930
2.3923
1.1000
1.2300
1.3930
1.5923
1.8315
430
Applied Mathematical Methods for Chemical Engineers
By comparison, the actual (analytical) result is better by 5.89% when compared to
the Euler approximation.
Example 9.3
This example demonstrates the use of the Modified Euler Method Equation (9.58) in
practice [5, 34, 35]:
w0 = α
h
wi +1 = wi + [ f (ti , wi ) + f (ti +1 , wi + hf (ti , wi ))], i = 0,1, , n − 1 9.55
2
h
= wi + ( wk′ + wk′ +1 )
2
to resolve Example 9.2. Solution results are presented in Table 9.3.
Solution
From the given differential equation, we have
f ( xi , yi ) = 2 xi + yi ; i = 0,1, 2,3, 4,5
Then, at i = 0,
w1 ≡ y1 = f ( x 0 , y0 ) = w0 + h w0′ ≡ y(0.1)
= 1.0000 + 0.1(1.0000 ) = 1.1000,
which uses the Euler Method to approximate the value of y at h = 0.1.
Returning to the given differential equation, we determine that (at i = 1 ):
w1′ = f ( x1 , w1 ) = 2 x1 + y1
= 2(0.1) + 1.1000 = 1.3000.
TABLE 9.3
Modified Euler Method
Approximation I
Approximation II
Approximation III
i
xi
wi
wi ′
wi
wi ′
wi
wi ′
wi
0
1
2
3
4
5
0
0.1
0.2
0.3
0.4
0.5
1.0000
1.1000
1.2474
1.4313
1.6557
1.9247
1.0000
1.3000
1.6474
2.0313
2.4557
2.9247
1.1150
1.2640
1.4496
1.6759
1.9471
1.3150
1.6640
2.0496
2.4759
2.9471
1.1158
1.2648
1.4505
1.6769
1.9482
1.3158
1.6648
2.0505
2.4769
2.9482
1.1158
1.2648
1.4506
1.6770
1.9483
Selected Numerical Methods and Available Software Packages
431
Therefore, the Modified Euler Method yields
w0 = 1
h
w1 = w0 + [ f (t0 , w0 ) + f (t1 , w0 + hf (t1 , w1 ))]
2
h
= w0 + ( w0′ + w1′ )
2
= 1.0000 +
0.1
[1.0000 + 1.3000 ] = 1.1150
2
This is an improved approximation (Approximation II) of y1 to that given by the
Euler Method used in Example 9.3. The process is now repeated using Approximation
II to determine the value of the derivative, that is,
w1′ = f ( x1 , w1 ) = 2 x1 + y1
= 2(0.1) + 1.1150 = 1.3150
determining a third (more improved) approximation of w1 (Approximation III):
1
1
w1 = y0 + h ( y0′ + y1′ ) ≡ w0 + h ( w0′ + w1′ )
2
2
0.1
= 1.0000 +
[1.0000 + 1.3158] = 1.1158
2
This newer value of y1 is now used to re-estimate the derivative
w1′ = f ( x1 , w1 ) = 2 x1 + y1
= 2(0.1) + 1.1158 = 1.3158
which yields the approximation of w1 as
h
( w0′ + w1′ )
2
0.1
= 1.0000 +
[1.0000 + 1.3158] = 1.1158
2
w1 = w0 +
Since the last two approximations of w1 are the same, we now proceed to estimate
w2 ( which is the value of y(0.2) ) by following the same procedure but starting with
the value y1 ≡ w1 = 1.1158, which corresponds to x1 = 0.1.
w2 = w1 + hf ( x1 , w1 ) = w1 + h w1′
= 1.1158 + 0.1(1.3158 ) = 1.2474
and
w2′ = 2 x 2 + w2 = 2(0.2) + 1.2474
= 1.6474
432
Applied Mathematical Methods for Chemical Engineers
Continuing the process we can obtain the required value of w5 ≡ y ( 0.5) = 1.9483
as indicated in Table 9.3 below.
The major computational effort in applying the Runge–Kutta methods occurs in
the evaluation of f. For second-order methods, two functional evaluations per step are
required, and for the fourth-order method, four evaluations per step are required. As a
consequence, the lower-order methods with smaller step size may be less costly than the
higher-order methods using a larger step size. Relationships between evaluations per step
and the order of local truncation error can be found in the literature [24]. Also available in
the numerical analysis literature [15] are developments that combine the best features of
the Euler and a second-order Runge–Kutta method.
Example 9.4
This example illustrates the use of the Runge–Kutta order-four method.
Estimate w2 using the Runge–Kutta order-four method with an h = 0.1 for the given
initial value problem:
dy
= − y + t + 1; 0 ≤ t ≤ 1, y(0) = 1.
dt
Solution
w0 = α ≡ 1.0000,
f ( ti , wi ) ≡ − wi + ti + 1
Case i = 0 :
k1 = hf (ti , wi ) ≡ 0.1( −1 + 1) = 0
h
k 
0.1


k 2 = hf  ti + , wi + 1  ≡ 0.1  −1 + 1 +
 = 0.005


2
2
2 
h
k 
0.005 0.1 


+
+ 1 = 0.00475
k3 = hf  ti + , wi + 2  ≡ 0.1  −1 −



2
2
2
2
k 4 = hf (ti +1 , wi + k3 ) ≡ 0.1( 0.1 + 1 − 1 − 0.00475) = 0.009525
1
1
wi +1 = wi + ( k1 + 2 k 2 + 2 k3 + k 4 ) ⇒ w1 = w0 + ( k1 + 2 k 2 + 2 k3 + k 4 )
6
6
1
= 1 + ( 0 + 2(0.005) + 2(0.00475) + 0.009525)
6
= 1.0048375
Case i = 1:
k1 = hf (ti , wi ) ≡ 0.1( −1.0048375 + 0.1 + 1) = 0.00951625
h
k 
0.00951625
0.1 


k 2 = hf  ti + , wi + 1  ≡ 0.1  (−1.0048375 −
) + 1 + (0.1 +
)


2
2
2
2 
= 0.0140404375
h
k 
0.0140404375
0.1


k3 = hf  ti + , wi + 2  ≡ 0.1  −1.0048375 −
+ 1 + 0.1 +




2
2
2
2 
= 0.0138142281
k 4 = hf (ti +1 , wi + k3 ) ≡ 0.1( −1.0048375 − 0.0138142281 + 1 + .2) = 0.0181348272
Selected Numerical Methods and Available Software Packages
433
1
1
wi +1 = wi + ( k1 + 2 k 2 + 2 k3 + k 4 ) ⇒ w2 = w1 + ( k1 + 2 k 2 + 2 k3 + k 4 )
6
6

1  0.00951625 + 2(0.0140404375)
= 1.0048375 + 
6  + 2(0.0138142281) + 0.0181348272
= 1.0187309014
All of the above methods choose the step size prior to carrying out the approximation
step. Further, the step size remains fixed throughout the iterations. This feature can
become a limitation when irregular regions are encountered, or when the solution to
the differential equation behaves nonuniformly in parts of the interval.
An adaptive strategy that allows for changes in the step size during iterations is the
Runge–Kutta–Fehlberg. This method also reduces the number of required evaluations
of the function f per step size. Various versions of this adaptive strategy can be found
in the literature [5,9,13,25,33]. Algorithms that suggest mechanisms for adjusting the
step size are also available [13]. The optimum step size should be such that the local
errors are within a given tolerance, to ensure accuracy at the same time not adversely
affecting efficiency. To further clarify this idea, we use the following result, which is
typical in the numerical analysis literature [5,12,18,20,22,23]:
y(t ) − yn ≤ kh p
(9.62)
where k is a constant that accounts for the smoothness of the solution y and the interval
of approximation, p is related to the order of the difference scheme, and h is the step
size. Even though Equation 9.62 is written for the global (entire interval) error, the
essential idea remains the same. That is, reducing h by a factor of 10 reduces the error
given by Equation 9.62 by a factor 10p. However, the number of algebraic operations is
increased by about the same factor, which leads to an increase in the round-off error.
Therefore, to get a sense of the optimal h, one that will not be too costly, a trial-anderror strategy is the usual approach taken.
Many software packages have incorporated adaptive difference schemes for ordinary differential equations as the core of their designs. NDSolve of Mathematica and
ode45 of MATLAB are two applications that are based on an adaptive extension of the
fourth-order Runge–Kutta method.
In addition to the single-step methods, there are methods that utilize the approximation at more than one previous mesh point to determine the approximation at the next
point. These are the so-called multistep methods, and there are two types.
Generally, the multistep method for solving the initial value problem described by
Equation 9.53 is one whose difference equation for wi+1 at ti+1 is given by
wi +1 = am −1 wi + am − 2 wi −1 + + a0 wi +1− m
+ h[bm f (ti +1 , wi +1 ) + bm −1 f (ti , wi ) + + b0 f (ti +1− m , wi +1− m )];
i = m − 1, m,… , n − 1
for the given starting values
w0 = α 0 , w1 = α1 , w2 = α 2 , , wm −1 = α m −1
and an integer m > 1.
(9.63)
434
Applied Mathematical Methods for Chemical Engineers
If bm = 0, we have an explicit or open method, in which wi + 1 is explicitly given in
terms of previously determined values. The explicit method constitutes one of the two
types of multistep methods. For example,
w0 = α 0 , w1 = α1 , w2 = α 2 , w3 = α 3
h
[55 f (ti , wi ) − 59 f (ti −1 , wi −1 ) + 37 f (ti − 2 , wi − 2 ) − 9 f (ti − 3 , wi − 3 )], (9.64)
24
i = 3, 4, , n − 1
wi +1 = wi +
defines the explicit four-step method known as the fourth-order Adams–Bashforth
technique.
If bm ≠ 0, we have an implicit or closed method, since wi + 1 occurs on both sides of
Equation 9.63. The implicit method constitutes the second of the two types of multistep
methods. For example,
w0 = α 0 , w1 = α1 , w2 = α 2
h
[9 f (ti +1 , wi +1 ) + 19 f (ti , wi ) − 5 f (ti −1 , wi −1 ) + f (ti − 2 , wi − 2 )],
24
i = 2,3, , n − 1
wi +1 = wi +
(9.65)
defines the implicit three-step method known as the fourth-order Adams–Moulton
technique. Derivations of these and other multistep methods can be found in the
numerical analysis literature [5,20].
The required starting values in either Equation 9.64 or Equation 9.65 are derived
by assuming that the initial value, α, is the same as α 0. The remaining values, α 1, α 2,
or α 3, are generated by either a Runge–Kutta method or some other single-step procedure. The following example illustrates the potential use of both types of multistep
methods.
Example 9.5
Consider
dy
= − y + t + 1; 0 ≤ t ≤ 1, y(0) = 1
dt
Both Equations 9.64 and 9.65 will be used to approximate the solution. Also, we will
use a step size of h = 0.1 together with the values from the exact solution, y(t) = e−t +
t, as starting values.
Therefore, for h = 0.1, ti = 0.1i, Equation 9.64 becomes (see Problem 11)
1
[18.5wi + 5.9 wi −1 − 3.7 wi − 2 + 0.9 wi − 3 + 0.24i + 2.52],
24
i = 3, 4, ,9
wi +1 =
and Equation 9.65 becomes (see Problem 12)
(9.66)
435
Selected Numerical Methods and Available Software Packages
1
[−0.9 wi +1 + 22.1wi + 0.5wi −1 − 0.1wi − 2 + 0.24i + 2.52]
24
i = 2,3, ,9
wi +1 =
(9.67)
which can be rearranged to give
1
[22.1wi + 0.5wi −1 − 0.1wi − 2 + 0.24i + 2.52],
24.9
i = 2,3, ,9
wi +1 =
(9.68)
Results for this example are given in Table 9.4. The table shows that the implicit method
gives better results than the explicit method of the same order. Generally this is true.
However, implicit methods have an inherent disadvantage in requiring that an algebraic conversion to an explicit representation be made; for example, the conversion
from Equation 9.67 to 9.68. This type of algebraic conversion can be very difficult or
even impossible to accomplish and is very dependent on the differential equation to be
solved. For example, if we needed to solve the differential equation given by
dy
= e y ; 0 ≤ t ≤ 0.25, y(0) = 1
dt
using Equation 9.65, we would get
wi +1 = wi +
h
[9e wi+1 + 19e wi − 5e wi−1 + e wi−2 ]
24
as its difference equation. There is no clear way to solve this equation algebraically, to
isolate the wi+1 to one side.
In practice, implicit multistep methods are used to improve upon approximations
obtained by explicit methods. This combination is the so-called predictor–corrector method. Predictor–corrector methods employ a single-step method, such as the
Runge–Kutta of order 4, to generate the starting values to an explicit method, such as
an Adams–Bashforth. Then the approximation from the explicit method is improved
upon by use of an implicit method, such as an Adams–Moulton method. Also, there
are variable step size algorithms associated with the predictor–corrector strategy in
the literature [5,25].
TABLE 9.4
Comparison of Implicit and Explicit Methods
ti
.3
.4
.5
.6
.7
Adams–Bashforth wi
Starting value
1.0703229200
1.1065354755
1.1488184077
1.1965933934
Error
—
2.874E-6
4.816E-6
6.772E-6
8.090E-6
Adams–Moulton wi
1.0408180061
1.0703196614
1.1065301384
1.1488110076
1.1965845932
Error
2.146E-07
3.846E-07
5.213E-07
6.285E-07
7.106E-07
436
Applied Mathematical Methods for Chemical Engineers
Example 9.6
This example demonstrates the predictor–corrector procedure using the four-step
Adams–Bashforth technique as the predictor and the three–step Adams–Moulton
technique as the corrector.
Consider the initial value problem
dy
= 1 − x − 4 y; 0 ≤ x ≤ 1, y(0) = 1
dt
Determine the approximate value of y at x = 0.4 with h = 0.1 using the ­predictor–
corrector method.
Solution
Starting values are determined, using the Runge–Kutta order-four method, to be
y0 = 1.000, y1 = 1.6089333, y2 = 2.5050062 and y3 = 3.8294145
Additional data needed are the values of the corresponding derivatives for each
corresponding estimate, using
dy
= 1 − x − 4 y ≡ f ( x, y)
dx
That is,
y0′ = 1 − x 0 + 4 y0 = 1 − 0 + 4(1) = 5, y1′ = 1 − x1 + 4 y1 = 1 − 0.1 + 4(1.6089333) = 7.3357332
y2′ = 1 − x 2 + 4 y2 = 1 − 0.2 + 4 (2.5050062) = 10.820025, y3′ = 1 − x3 + 4 y3 = 16.017658
Next we employ the Adams–Bashforth as the predictor, Equation 9.64:
yi +1 = yi +
h
[55 y i′− 59 y i′−1 + 37 y i − 2 − 9 y i′− 3 ].
24.
y4 = 3.8294145 +
0.1
( 469.011843) = 5.783631.
24
We now apply the corrector—Adams–Moulton, Equation 9.65:
yi +1 = yi +
h
[y i′+1 + 19 y i′− 5 y i −1 + y i′− 2 ].
24.
Noticing that we need the value of yi′+1 , we use
dy
= 1 − x − 4 y ≡ f ( x, y)
dx
Selected Numerical Methods and Available Software Packages
437
again, but with the recently determined estimate of y4 = 5.783631, such that
y4′ = 1 − 0.4 + 4 (5.783631) = 23.734524
Now the use of Equation 9.65 results in
y4 = 3.8294145 +
0.1
[471.181828] = 5.792673
24.
The actual value, correct to eight digits, is y(0.4) = 5.7942260.
9.4.2 BOUNDARY VALUE PROBLEMs
Boundary value problems appear in many different areas of chemical engineering.
Numerical approaches to solving them involve either a conversion to initial value
problems (Case I) or, more directly, by finite difference methods (Case II).
Because there are theorems that guarantee the existence of and the uniqueness
of the solutions to initial value problems, one may favor that approach. However,
we must not forget that quite often the physical situation is too complicated for us to
ascertain that all the conditions of such theorems are satisfied. A very brief discussion of each approach follows.
Case I: Conversion to initial value problems.
The general approach of converting a given boundary value problem to a system of initial value problems is called the shooting method. In the numerical analysis literature [5,9,25,26], the shooting method is discussed separately for the linear
and nonlinear problems. Burden et al. [5] present algorithms for both the linear and
nonlinear problems. Following Burden et al. [5] to solve the linear boundary value
problem
y ′′ = p( x ) y ′ + q( x ) y + r ( x ), a ≤ x ≤ b, y(a) = α , y(b) = β
(9.69)
one would consider the two initial value problems given by
y ′′ = p( x ) y ′ + q( x ) y + r ( x ), a ≤ x ≤ b, y(a) = α , y ′(a) = 0
(9.70)
y ′′ = p( x ) y ′ + q( x ) y + r ( x ), a ≤ x ≤ b, y(a) = 0, y ′(a) = 1
(9.71)
and
Then, if y1(x) is the solution to Equation 9.70 and y2(x) is the solution to Equation
9.71, the solution to Equation 9.69 is
y( x ) = y1 ( x ) +
β − y1 (b)
y2 ( x ),
y2 (b)
y2 (b) ≠ 0
(9.72)
438
Applied Mathematical Methods for Chemical Engineers
The solution methods discussed in the section on initial value problems can be used
to approximate y1(x) and y2(x).
For the nonlinear case, the technique remains the same as that used to obtain a
solution to Equation 9.69, except that a sequence of initial value problems of the form
y ′′ = f ( x , y, y ′) a ≤ x ≤ b,
y( a ) = α ,
y ′(a) = t k
(9.73)
are now required. The parameter, tk, must be chosen such that
lim y(b, t k ) = y(b) = β
(9.74)
k →+∞
where y(b, tk) is the solution to Equation 9.73. Choosing the parameter tk to satisfy
Equation 9.74 is not easy, and can be complicated by the fact that
y( b , t k ) − β = 0
(9.75)
is a nonlinear equation. In principle, the methodology in Section 9.2 can be employed
here to solve
t k = t k −1 −
( y ( b , t k −1 ) − β )
(dy /dt b ,tk −1 )
(9.76)
However, we cannot evaluate
dy
dt b , tk −1
directly because we do not have an explicit representation for y(b, tk). All we know
are the values y(b, t0), y(b, t1), …, y(b, tk −1). Burden et al. [5] show that we can rewrite
Equation 9.73 to reflect its dependence on tk, as well as on x:
y ′′( x , t ) = f ( x , y( x , t ), y ′( x , t )), a ≤ x ≤ b,
y( a , t ) = α ,
y ′(a, t ) = t k
(9.77)
The subscript k is dropped inside the functional notation for convenience.
Differentiating Equation 9.77 with respect to t and assuming that the order of differentiation of x and t is reversible gives
∂
∂
∂
∂
∂
y ′′( x , t ) =
f ( x , y( x , t ), y ′( x , t )) y( x , t ) +
y ′f ( x , y( x , t ), y ′( x , t )) y ′( x , t )
∂t
∂y
∂t
∂y
∂t
∂
∂
(a, t ) = 0, y ′(a, t ) = 1
∂t
∂t
Selected Numerical Methods and Available Software Packages
439
Simplification, using z(x, t) to represent ∂y(x, t)/∂t, results in
z ′′ =
∂
∂
f ( x , y, y ′ ) z +
( x , y, y ′) z ′, a ≤ x ≤ b, z (a) = 0, z ′(a) = 1
∂y
∂y′
Then, Newton’s method becomes
t k = t k −1 −
( y ( b , t k −1 ) − β )
z ( b , t k −1 )
(9.78)
Equation 9.78 requires that two initial value problems be solved at each iteration.
In practice, some version of the methods discussed under initial value problems
(Section 9.4.1) is used to approximate the solution required by Newton’s method.
In closing this section on the shooting methods, it is important to remember
that round-off error may become very significant when we use these methods. For
instance, β may be small enough such that the term (β − y1(b) )/y2(b) is dominated by
−y1(b)/y2(b). When β is too small, an alternate method must be employed.
Case II: Finite difference methods.
Finite difference formulations may occur as any one of three types, namely forward, central, or backward finite difference [5,9,25]. Generally, these formulations
lead to nonlinear systems of equations. The methods and approaches discussed in
Section 9.2 can be employed. However, if the resulting system of equations is linear,
then the methods of Section 9.3 apply. Next, we will briefly discuss a linear central
difference and a nonlinear central difference formulation.
In the linear case, we may reconsider the boundary value problem given by
Equation 9.69:
y ′′ = p( x ) y ′ + q( x ) y + r ( x ), a ≤ x ≤ b,
y( a ) = α ,
y( b ) = β
Then the interval [a, b] is divided into n + 1 equal subintervals having mesh points
xi = a + ih, i = 0, 1, 2,, n + 1
and h = (b − a)/(n + 1). At the interior mesh points, xi, i = 1, 2, …, n, the derivatives y″
and y′ are approximated by centered difference formula for y″(xi) and y′(xi) as
y ′′( xi ) ≈
1
[ y( xi +1 ) − 2 y( xi ) + y( xi −1 )]
h2
(9.79)
1
[ y( xi +1 ) − y( xi −1 )]
2h
(9.80)
and
y ′( xi ) ≈
440
Applied Mathematical Methods for Chemical Engineers
Substitution of Equations 9.79 and 9.80 into the differential equation results in
1
1
[ y( xi +1 ) − 2 y( xi ) + y( xi −1 )] = p( xi ) [ y( xi +1 ) − y( xi −1 )] + q( xi ) y( xi ) + r ( xi )
h2
2h
which can be restated as
 2 wi − wi +1 − wi −1 
 wi +1 − wi −1 

 + p( xi ) 
2

h
2h
+ q( xi ) wi = − r ( xi ), i = 1,2,, n
(9.81)
w0 = α , wn +1 = β
where w is the approximation to the given boundary value problem. A further convenient rearrangement gives
h
h




−  1 + p( xi ) wi −1 + (2 + h 2 q( xi )) wi −  1 − p( xi ) wi +1 = − h 2 r ( xi ) (9.82)




2
2
Then, if we let
h


ai = −  1 + p( xi )


2
d i = 2 + h 2 q( xi )
h


ci = −  1 − p( xi )


2
bi = − h 2 r ( xi )
Equation 9.82 becomes
ai wi −1 + di wi + ci wi +1 = bi
Equation 9.83 can now be represented as a system of linear equations:
d1 w1 + c1 w2 = b1 − a1α
ai wi −1 + di wi + ci wi +1 = bi , 2 ≤ i ≤ n − 1
an wn −1 + d n wn = bn − cnβ
This system may be solved by Gaussian elimination.
(9.83)
Selected Numerical Methods and Available Software Packages
441
Example 9.7
This example demonstrates the use of the central finite difference approximation to
solve a second-order boundary value problem given by
y ′′ − 4 y = 0; y(0) = 0, y(1) = 5
Use the finite difference Equations 9.82 and 9.83 given above to derive an approximate
solution for three steps, n = 3.
Solution
h=
b − a 1− 0
≡
=1/ 4
n +1
4
We can identify that the quantities, p( x ) = 0, q( x ) = 4 and r ( x ) = 0 by comparing the
given differential equation with Equation 9.69. Also the end points α = 0 and β = 5
are given. Employing Equation 9.83 leads to the derived system of equations:
2.25 w1 − w2 = 0
where a2 = −1, d2 = 2.25, c2 = −1, b2 = 0
− w1 + 2.25 w2 − w3 = 0;
− w2 + 2.25 w3 = 5;
Derived System
Notice that in this case
a1 = a2 = a3 , b1 = b2 = b3 ,
c1 = c2 = c3 and d1 = d 2 = d3
The solution of the derived system of equations results in the following estimates:
w1 = 0.7256, w2 = 1.6327 and w3 = 2.9479.
Comparison of these estimates with the closed form solution
y( x ) =
5
sinh(2 x )
sinh(2)
at the specified x-values is shown in Table 9.5. It is important to notice that the
error is reduced as the number of steps increases, which means smaller increments (more interior points), and we can anticipate more accurate results with
more steps.
442
Applied Mathematical Methods for Chemical Engineers
TABLE 9.5
Comparison of Analytic Solution to Finite Difference Estimates
xi
yi(Num)
y(Analytical)
% error
0.25
0.50
0.75
0.7256
1.6327
2.9479
0.7184
1.6201
2.9354
1.000
0.778
0.426
When the differential equation is nonlinear, an n × n nonlinear system results. For
example, the boundary value problem given by
y ′′( x ) = f ( x , y, y ′), a ≤ x ≤ b,
y( a ) = α ,
y( b ) = β
(9.84)
would result in the approximation
1
y ( x i +1 ) − y ( x i ) 

[ y( xi +1 ) − 2 y( xi ) + y( xi −1 )] = f  xi , y( xi ),
 ,

h2
2h
i = 1, 2, , n
(9.85)
following the same steps as in the linear case.
Then, in terms of w, Equation 9.85 becomes
w0 = α , wn +1 = β
wi +1 − wi −1 
 2 wi − wi +1 − wi −1 

 = 0, i = 1, 2, , n
 + f  xi wi ,

2h
h2
Finally, the n × n nonlinear system representation is
w − α
2 w1 − w2 + h 2 f  x1 , w1 , 2
 −α = 0

2h 
w − w1 
− w1 + 2 w2 − w3 + h 2 f  x 2 , w2 , 3
 =0

2h 


w − wn − 2 
− wn − 2 + 2 wn −1 − wn + h 2 f  x n −1 , wn −1 , n
 = 0

2h
β − wn − 1 

− w n − 1 + 2 w n + h 2 f  x n , wn ,
 −β = 0

2h 
This system may be solved by the Newton–Raphson method.
Although finite difference formulations are usually more stable than the shooting
methods, they are still approximations. The added level of approximation for the derivatives can generate errors, and care must be exercised when applying these methods.
Selected Numerical Methods and Available Software Packages
9.4.3
443
SYstEMs OF ORDINARY DIFFERENtIAL EQUAtIONs
In Section 9.4.1, selected numerical methods are examined for solving the initial
value problems associated with first-order differential equations. Those methods
are also applicable to higher-order differential equations following the reduction
to a system of first-order equations. For example, the second-order differential
equation
d2 y
= f (t , y, y ′)
dt 2
(9.86)
can be reduced to a system of two first-order differential equations [5,17,21]:
dy
=v
dt
(9.87)
dv
= f (t , y, v )
dt
(9.88)
In general, an nth-order differential equation such as
y( n ) = f (t , y, y ′,, y( n −1) )
(9.89)
can be reduced to a system of n first-order differential equations of the form
x1′ = f1 (t , x1 ,…, x n )
x 2′ = f1 (t , x1 ,…, x n )
(9.90)
x n′ = f1 (t , x1 ,…, x n )
In the particular case of the second-order equation, a procedure to approximate the
solution to a system of two first-order equations
x ′ = f (t , x , y)
(9.91)
y ′ = g(t , x , y)
(9.92)
x (t0 ) = x 0 , y(t0 ) = y0
(9.93)
subject to the initial conditions
is an extension of those methods discussed in Section 9.4.1.
444
Applied Mathematical Methods for Chemical Engineers
Following Boyce and DiPrima [21], the Euler method would be extended to
xi +1 = xi + hf (ti , xi , yi ), yi +1 = yi hg(ti , xi , yi ), i = 0,1,, n
= xi + hxi′
= yi + hyi′
(9.94)
for the mesh points ti = t0 + ih.
Similarly, the fourth-order Runge–Kutta method applied to Equations 9.91 and
9.92 would become
1
xi +1 = xi + h[ ki1 + 2 ki 2 + 2 ki 3 + ki 4 ],
6
1
yi +1 = yi + h[ i1 + 2 i 2 + 2 i 3 +  i 4 ],
6
(9.95)
where
ki1 = f (ti , xi , yi ),  i1 = g(ti , xi , yi )
h
k
1 
h
k
1 


ki 2 = f  ti + , xi + i1 , yi +  i1  ,  i 2 = f  ti + , xi + i1 , yi +  i1 


2
2
2 
2
2
2 
h
k
1 
h
k
1 


ki 3 = f  ti + , xi + i 2 , yi +  i 2  ,  i 3 = f  ti + , xi + i 2 , yi +  i 2 



2
2
2
2
2
2 
ki 4 = f (ti + h, xi + ki 3 , yi +  i 3 ),  i 4 = f (ti + h, xi + ki 3 , yi +  i 3 )
The predictor–corrector method described in Section 9.4.1, which involves the use of
Equations 9.64 and 9.65, would become
1
h[55 xi′1 − 59 xi′−1 + 37 xi′− 2 − 9 xi′− 3 ],
24
1
yi +1 = yi + h[55 yi′1 − 59 yi′−1 + 37 yi′− 2 − 9 yi′− 3 ]
24
(9.96)
1
h[9 xi′+1 + 19 xi′ − 5 xi′−1 + xi′− 2 ],
24
1
yi +1 = yi + h[9 yi′+1 + 19 yi′ − 5 yi′−1 + yi′− 2 ]
24
(9.97)
x i +1 = x i +
and
x i +1 = x i +
In the above discussion, it is assumed that the functions f and g satisfy the unique
solution conditions.
From Equations 9.95 through 9.97, it is evident that third- and higher-order equations will become cumbersome and are more manageable using matrix notations
[16,17,19,22,27].
Selected Numerical Methods and Available Software Packages
445
Both Mathmatica and MATLAB, as well as other available software packages,
have the capabilities to solve linear or nonlinear systems of algebraic and differential
equations.
Example 9.8
This example demonstrates the use of the Euler method for systems [21, 34, 35].
Given the second-order differential equation
y ′′ = y; y ( 0 ) = 1, y ′ ( 0 ) = 2
reduce the differential equation to a system of first-order equations and use Euler’s
method to estimate y (1) for h = 0.5. What is the absolute error in comparison to the
exact solution?
Solution
Let y ′ = x; then x ′ = y or
y′ = x ≡ f (t , x , y )
x ′ = y ≡ g (t , x , y )
subject to t0 = 0, x 0 = 2.0000, y0 = 1.000;
then we have
x1 = x 0 + h g ( t0 , x 0 , y0 ) = 2.0000 + 0.5(1.0000) = 2.5000
y1 = y0 + h f ( t0 , x 0 , y0 ) = 1.0000 + 0.5(2.0000) = 2.0000
Now
t1 = t0 + 0.5 = 0.5; g ( t1 , x1 , y1 ) = y1
f ( t1 , x1 , y1 ) = x1
such that
x 2 = x1 + h g ( t1 , x1 , y1 ) = 2.5000 + 0.5(2.0000) = 3.5000
y2 = y1 + h f ( t1 , x1 , y1 ) = 2.0000 + 0.5(2.5000) = 3.2500
The exact solution is y ( t ) =
3 t 1 −t
e − e ⇒ y (1) = 3.8935.
2
2
Resulting in an absolute error of
3.8935 − 3.2500
× 100 = 16.53%
3.8935
446
Applied Mathematical Methods for Chemical Engineers
9.5 NUMERICAL SOLUTION OF PARTIAL
DIFFERENTIAL EQUATIONS
One of the most frequently occurring partial differential equation in chemical engineering is the so-called parabolic type. This equation is used to describe time-dependent
diffusion processes and fluid flow. Therefore, the numerical solution methods for this
type of partial differential equation are important in heat transfer, molecular diffusion,
and fluid flow.
There are many numerical approaches one can use to approximate the solution to
the initial and boundary value problem presented by a parabolic partial differential
equation. However, our discussion will focus on three approaches: an explicit finite
difference method, an implicit finite difference method, and the so-called numerical
method of lines. These approaches, as well as other numerical methods for all types
of partial differential equations, can be found in the literature [5,9,18,22,25,28–33].
9.5.1 EXPLIcIt AND IMPLIcIt FINItE DIFFERENcE MEthODs
Following Burden et al. [5], we will consider the parabolic partial differential equation in one space dimension:
∂
∂2
u( x , t ) = α 2 2 u( x , t ) + S ( x , t ), 0 < x < L , t > 0
∂t
∂x
(9.98)
subject to the initial condition
u( x ,0) = f ( x ), 0 ≤ x ≤ L
(9.99)
u(0, t ) = φ L , u( L , t ) = φ R , t > 0
(9.100)
and the boundary conditions
As part of the development of a finite difference scheme to approximate the solution to Equations 9.98 through 9.100, we must select two mesh constants, h and k,
such that m = L/h and N = T k are an integers. The grid points are (xi, tj), where
xi = ih, i = 0, 1,, m and t j = jk , j = 0, 1,, N
Then, if we approximate the derivatives by
u( xi , t j + k ) − u( xi , t j )
∂
u( xi , t j ) ≈
∂t
k
and
u( xi + h, t j ) − 2u( xi , t j ) + u( xi − h, t j )
∂2
u( xi , t j ) ≈
2
∂x
h2
Selected Numerical Methods and Available Software Packages
447
and substitute into Equation 9.98 to get
wi , j +1 − wi , j
k
− α2
wi +1, j − 2 wi , j + wi −1, j
h2
= Si , j
(9.101)
Equation 9.101 can be rearranged to
α2k
α2k 
α2k

w
1
2
w
wi +1, j + Si , j ,
+
−
+
i
−
1,
j
i
,
j



h2
h2 
h2
i = 1,2,, m − 1, j = 1,2,, N
wi , j +1 =
(9.102)
where wi,j approximates u(xi, tj), the source term, Si,j is S(xi, tj) and T is a convenient
maximum time value. The initial and boundary conditions become respectively
wi ,0 = u( xi ,0) = f ( xi ), i = 0,1,2,, m
(9.103)
w0, j = u(0, t j ) = φ L ; wm , j = u( x m , t j ) = φ R , j = 1,2,, N
(9.104)
and
In the important case of no source term, and when both end conditions are zero,
Equation 9.102 reduces to
α2k
α2k 
α2k

wi −1, j +  1 − 2 2  wi , j + 2 wi +1, j ,
2

h 
h
h
i = 1,2,, m − 1, j = 1,2,, N
wi , j +1 =
(9.105)
with
w0, j = wm , j = 0
(9.106)
The method described by Equations 9.102 through 9.106 is an explicit method and is
commonly called the forward difference method. It is explicit because knowledge of
wi,j for tj at all the grid points means that wi,j + 1 can be calculated for the new time
tj + 1 without solving simultaneous equations.
The forward difference method is considered conditionally stable. Further, it can
be shown that the method converges with a rate of convergence on the order of (k +
h2) if the condition
α2k
≤1/ 2
h2
(9.107)
is satisfied [18,22]. This restriction means that a small value for h requires an even
smaller k-value, which can easily lead to round-off errors.
448
Applied Mathematical Methods for Chemical Engineers
Contrasting the forward difference method is the implicit method of Crank–
Nicolson [5,9,18,22,25]. The Crank–Nicolson difference formulation for the homogeneous case of Equation 9.98 with zero end conditions ( φ L = φ R = 0 ) is
wi , j +1 − wi , j
k
−
α2
[( wi +1, j − 2 wi , j + wi −1, j ) + ( wi +1, j +1 − 2 wi , j +1
2h 2
+ wi −1, j +1 )] = 0
(9.108)
Burden et al. [5] give an algorithm involving the Crank–Nicolson method for
solving Equation 9.108, while Constantinides et al. [9] have MATLAB examples
involving the nonhomogeneous case of Equation 9.108.
To facilitate the use of matrix methods discussed in previous sections (i.e., Section
9.3.2), Equation 9.108 can be restated as
wi , j +1 − wi , j =
α2k
[( wi +1, j − 2 wi , j + wi −1, j ) + ( wi +1, j +1 − 2 wi , j +1 + wi −1, j +1 )]
2h 2
λ
= [( wi +1, j − 2 wi , j + wi −1, j ) + ( wi +1, j +1 − 2 wi , j +1 + wi −1, j +1 )]
2
(9.109)
α2k
.
h2
(9.110)
where
λ=
upon expansion of
wi , j +1 − wi , j =
λ
[( wi +1, j − 2 wi , j + wi −1, j ) + ( wi +1, j +1 − 2 wi , j +1 + wi −1, j +1 )]
2
and collection of terms involving subscript j + 1 to the left of the equal sign and
terms involving subscript j to the right of the equal sign, as shown in the cases below
for i = 1 and 2.
i = 1:
w1, j +1 − w1, j =
w1, j +1 −
λ
[( w2, j − 2 w1, j + w0, j ) + ( w2, j +1 − 2 w1, j +1 + w0, j +1 )]
2
or
λ
λ
λ
λ
w2, j +1 + λw1, j +1 − w0, j +1 = w1, j + w2, j − λw1, j + w0, j
2
2
2
2
i=2:
w2, j +1 −
λ
λ
λ
λ
w3, j +1 + λw2, j +1 − w1, j +1 = w2, j + w3, j + λw2, j + w1, j
2
2
2
2
or
(1 + λ ) w2, j +1 −
λ
λ
λ
λ
w3, j +1 − w1, j +1 = (1 − λ ) w2, j + w3, j + w1, j
2
2
2
2
Selected Numerical Methods and Available Software Packages
449
which leads to a matrix representation of the Crank–Nicolson as Aw( j +1) = Bw( j ) for
each j = 0,1,2,, where
(
w( j ) = w1, j , w2, j ,, wm −1
λ

0
−
(1 + λ )
2

λ
− λ
(1 + λ ) −
 2
2

λ
A = 0
−
(1 + λ )

2



λ
−
 0 0
2


)
t

0 

0 


λ
− 0 

2



(1 + λ ) 


λ


0 0 
(1 − λ )
2


λ
 λ
1 − λ)
0 
(
 2

2


λ
λ
B= 0
0 
(1 − λ )


2
2






λ
(1 − λ ) 
 0 0
2




and both matrices A and B are tridiagonal, with A being positive definite and strictly
diagonal dominant. The Crank–Nicolson method is unconditionally stable and is
more accurate than the forward difference method.
9.5.2 MEthOD OF LINEs
As an alternative to the approaches described above for solving partial differential
equations, we could take advantage of the methods described in Section 9.4.1. The
numerical method of lines does exactly that [15, 33].
450
Applied Mathematical Methods for Chemical Engineers
Example 9.9
This example considers the problem described by
∂u ∂ 2 u
=
∂t ∂ x 2
(9.111)
subject to the typical initial condition
u( x , 0) = f ( x )
and the boundary conditions
u(0, t ) = 0
u( L , t ) = 0
Following Lee and Schiesser [33], the derivative ∂2 u/∂x2 is replaced with a finite difference approximation
∂ 2 u ui +1 − 2ui + ui −1
, i = 1, 2, , n
∂x 2
( ∆x )2
Notice that ∆x is the same as h, used in earlier sections. Typically, a spatial grid is
defined over the interval 0 ≤ x ≤ L. Along this grid, the value of a particular x is designated with the Index i. Therefore, i = 1 corresponds to x = 0 and i = n corresponds to x
= L. The spacing between adjacent grid points is ∆x (or h). Upon combining the finite
difference approximation with the left-hand side of Equation 9.111, we get
dui ui +1 − 2ui + ui −1
, i = 1,2,, n
dt
( ∆x )2
(9.112)
Equation 9.112 has only one independent variable, namely t, therefore we have an
ordinary differential equation, and specifically a system of ordinary differential equations (discretized) for i = 1, 2, …, n. Furthermore, this system is a set of initial value
ordinary differential equations that are subject to the initial conditions
u( xi ,0) = f ( xi ) ≡ ui (t ), i = 1, 2, , n
For example, if the initial condition was given as
f ( x ) = sin (πx )
Then we would restate the condition in terms of the discretized variables as
u( xi , 0) = ui (t ) = sin(πxi ), i = 1, 2, , n
451
Selected Numerical Methods and Available Software Packages
Finally all that remains is to step along the spatial grid and integrate the corresponding ordinary differential equations given by Equation 9.112. In carrying out this
step we will include the boundary conditions in the following way:
u(0, t ) ⇒ u( x1 , t ) = u1 (t ) = 0,
du1
=0
dt
Similarly, for i = n, u( L , t ) ⇒ u( x n , t ) = un (t ) = 0,
dun
=0
dt
An example of a MATLAB program [33] that was used to solve the problem
described above is given in Appendix B.
The program is composed of the following modules containing functions as defined
in the programming sense:
• Main program (pdelin).
• Initial parameters defined in a function (intpar); here parameters such as the
number of first-order equations, n (=21) to be used in Equation 9.112. Also,
contained in this function are the number of spatial steps to be taken in the
specified time interval and the error tolerances for this problem.
• Initial and boundary conditions are set in the function (inital); notice that
there are 21 initial values and x is defined on the interval 0 ≤ x ≤ 1.
• Derivative vector in a function called derv, which is the vectorized form of
Equation 9.112.
• Functions rkc4a and ssrkc4 combined as the programmed form of the
Runge–Kutta order four method, which was given in Equation 9.60.
• Formatted results are displayed using the function fprint.
9.5.3 SELEctED APPLIcAtIONs UsING thE MEthOD OF LINEs
In addition to the types of applications discussed in Chapter 7, the method of lines
can be employed in developing solutions to problems that are even more complex
and nontraditional.
Example 9.10
This example considers a simplified version of the transport and binding kinetics of
an analyte, such as an antigen on an antibody surface of a fiber-optic biosensor. A
1-D version of the model is given [39] for a distance z, measured from the antibody
interface as
∂C A ∂ 2 C A
=
, 0 < z < h, t > 0
∂t
∂z 2
(9.113)
subject to the conditions
DA
∂C A
= k f C A Cb , Sat − Cb − kr Cb
∂z
(
)
at z = 0
(9.114)
452
Applied Mathematical Methods for Chemical Engineers
C A = Cbulk
at z = h
C A = C0
at t = 0
(9.115)
(9.116)
where C A ( z , t ) represent the anylate concentration in the diffusion phase, Cb , Sat is the
saturated value of the binding concentration, and D A is the anylate diffusivity. The
concentration of the anylate bound to the antibody, Cb ( t ) , is described by
(
)
dCb
= k f C A ( 0, t ) Cb , sat − Cb − kr Cb
dt
(9.117)
which is subject to the condition
Cb ( 0 ) = Cb 0
(9.118)
where k f and kr represent rate coefficients for the forward and reverse binding. The
data for this example are
D A = 1 × 10 −10 m 2 s , k f = 1 × 10 5 ( mole m 3 ) s −1 , kr = 1 × 10 −2 s −1 ,
Cb , Sat = 2.66 × 10 −8 mole m 2 , Cbulk = 4.48 × 10 −5 m, C0 = 0 mole m 3
Cb = 0 mole m 2
Determine the anylate concentration profile C A ( z , t ) mole m 3 and the bound anylate
concentration profile Cb ( t ) mole m 2 using the method of lines.
Solution
Using the central finite difference approximations given by
dyi
1

( yi +1 − yi −1 ) and
dx 2h
1
d 2 yi
 2 ( yi +1 − 2 yi + yi −1 )
2
dx
h
the spatial derivatives in Equations 9.113 and 9.114 can be approximated by the central
differences, resulting in
∂2 C A ( z , t )
∂z
2

C A ( z + ∆z ,t ) − 2C A ( z , t ) + C A ( z − ∆z , t )
( ∆z )2
and
∂C A ( z , t )
∂z
C A ( z + ∆z , t ) − C A ( z − ∆z , t )
2 ∆z
with uniformly spaced grids:
z (1) = 0, z ( 2 ) = ∆z , , z ( i ) = ( i − 1) ∆z , , z ( n ) = ( n − 1) ∆z = h
453
Selected Numerical Methods and Available Software Packages
It is important to note that
z ( i ) = ( i − 1) ∆z , i = 1, 2, , n
is employed to accommodate software limitations that subscripts must be positive integers (0 cannot be used as a subscript). Substitution of the finite difference approximation into the left boundary condition results in
DA
C A ( z = ∆z , t ) − C A ( z = −∆z , t )
2 ∆z
(
)
= k f C A ( z = 0, t ) Cb , Sat − Cb − kr Cb
(9.119)
Observing that z = −∆z lies outside the given domain in z renders C A ( −∆z , t )
as a fictitious point and is addressed in the subsequent program as c f = C A ( −∆z , t ) ,
such that
c f = C A ( z = ∆z , t ) −
(
)
2 ∆z
k f C A ( z = 0, t ) Cb , Sat − Cb − kr Cb ,
DA
(
)
which is programmed as
cf + c(2) − ( 2 * dz / D ) * ( kf * c(1) * ( cbsat − cb ) − kr * cb ) .
An example of the MATLAB program [39] that was used to solve this problem is
given in Appendix C.
The program is composed of the following key steps:
pde_1 in which the parameters and variables are declared globally so that they can be
shared with other routines along with the main program.
• The derivative ∂C A ∂t is computed as ct over the grid of n points.
• At grid point i = 1 corresponding to z = 0 the fictitious value cf is used to
calculate ct(1).
• ode15s is a MATLAB routine that is designed to facilitate systems that have
convergence difficulties—typical of systems developed using finite differences such as in this example.
As a third example using the method of lines, we consider a problem containing two
partial differential equations, as follows:
Example 9.11
This example considers a model of a drug delivery system in which the drug is initially
embedded in a polymer matrix [39]. In this model two components are considered: the
concentration profile for water (component 1) and the embedded drug (component 2)
are described as (see Figure D.1)
∂C1
 ∂ 2 C 1 ∂C1 ∂ 2 C1 
= D1  21 +
+

 ∂r
∂t
r ∂r
∂z 2 
(9.120)
454
Applied Mathematical Methods for Chemical Engineers
and
∂C2
 ∂ 2 C2 1 ∂C2 ∂ 2 C2 
= D2 
+
+

 ∂r 2
∂t
r ∂r
∂z 2 
(9.121)
where D1 ( cm 2 s ) and D2 ( cm 2 s ) are the respective diffusivities of water and drug.
The initial conditions for this system are
C1 ( r , z , t = 0 ) = C10 and C2 ( r , z , t = 0 ) = C20
(9.122)
while the boundary conditions are
∂C1 ( r , z , t ) ∂C2 ( r , z , t )
=0
=
∂r
∂r
at r = 0
(9.123)
and
D1
∂C1
= k1 (C1e − C1 ) at r = R
∂r
(9.124)
D2
∂C2
= k 2 (C2e − C2 ) at r = R
∂r
(9.125)
D1
∂C1
= k1 (C1e − C1 ) at z = z L
∂z
(9.126)
D2
∂C2
= k 2 (C1e − C2 ) at z = z L
∂z
(9.127)
The quantities C1e and C2e are respectively exterior values of the water and drug concentrations, R ( cm ) is the radius of the polymer matrix and z L ( cm ) is the length. Also,
k1 and k 2 are mass transfer coefficients. We attempt to determine the concentration
profiles for water and the drug using the method of lines.
Solution
A MATLAB program [39] will be used to solve the system of equations and help
develop the concentration profiles. To be consistent the variables used to describe the
given model will be translated to the variables used in Figure D.1 (Appendix D) and the
program listed in Appendix D:
C1 ≡ u1, C2 = u 2, k1 = ku1 , k 2 = ku 2 , C1e = u1e , C2e = u2e , R = r0
D1 = Du1 and D2 = Du 2
Selected Numerical Methods and Available Software Packages
455
Finite difference approximations are
∂ 2 u1 u1( i + 1) − 2u1( i ) + u1( i − 1)

∂z 2
( ∆z )2
∂ 2 u1 u1( j + 1) − 2u1( j ) + u1( j − 1)

∂r 2
( ∆r )2
and
∂ 2 u 2 u 2 ( i + 1) − 2 u 2 ( i ) + u 2 ( i − 1)

∂z 2
( ∆z )2
∂ 2 u 2 u 2 ( j + 1) − 2 u 2 ( j ) + u 2 ( j − 1)

∂r 2
( ∆r )2
and are programmed for the axial direction as
u1zz ( i , j ) = ( u1( i + 1, j ) − 2 * u1( i , j ) + u1( i − 1, j )) / dzs
u 2 zz ( i , j ) = ( u 2 ( i + 1, j ) − 2 * u 2 ( i , j ) + u 2 ( i − 1, j )) / dzs
and for the radial direction as
u1rr ( i , j ) = ( u1( i , j + 1) − 2 * u1( i , j ) + u1(i , j − 1) )
u 2rr ( i , j ) = ( u 2 ( i , j + 1) − 2 * u 2 ( i , j ) + u 2(i , j − 1) )
Equations 9.120 and 9.121 are programmed as
u1t ( i , j ) = Du1* ( u1rr ( i , j ) + u1r ( i , j ) + u1zz (i , j ) )
u 2t ( i , j ) = Du 2 * ( u 2rr ( i , j ) + u 2r ( i , j ) + u 2 zz (i, j) )
1 ∂C
requires special attention as r → 0 ; however, one needs only to recall
r ∂r
l’Hôpital’s rule, which is applicable in this case:
The term
lim
r→0
such that
1 ∂C ∂ 2 C
=
r ∂r ∂r 2
456
Applied Mathematical Methods for Chemical Engineers
∂ 2 C1 1 ∂C1
∂2 C
+
= 2 21
2
∂r
∂r
r ∂r
(9.128)
which gives (C1 ≡ ul )
∂ 2 u1 u1( 2 ) − 2u1(1) + u1( 0 )

at j = 1
∂r 2
( ∆r )2
However, u1( 0 ) is a fictitious value corresponding to r = −∆r on 0 ≤ r ≤ r 0.
The finite difference approximation for Equation 9.123 results in
∂u1 u1( 2 ) − u1( 0 )

= 0 ⇒ u1( 0 ) = u1( 2 )
∂r
2 ∆r
Substituting into Equation 9.128 gives
 u1( 2 ) − u1(1) 
∂ 2 u1
 2
∂r 2

( ∆r )2 
and is programmed as
u1r ( i, j ) = 2 * ( u1( i, j + 1) − u1( i, j )) / drs
u 2r ( i , j ) = 2 * ( u 2 ( i, j + 1) − u 2 ( i , j )) / drs
When r ≠ 0, the term
1 ∂u1
is approximated as
r ∂r
1 ∂u1  1  u1( j + 1) − u1( j − 1)
≡ u1r ( i , j )

r ∂r  r ( j ) 
2 ∆r
Then the interior points in r , i.e. ( j ≠ 1, nr ) , are programmed as
(
)
(
)
u1r ( i , j ) = 1 r ( j ) * ( u1( i , j + 1) − u1(i , j − 1) / ( 2 * dr )
u 2r ( i , j ) = 1 r ( j ) * ( u 2 ( i , j + 1) − u 2(i , j − 1) / ( 2 * dr )
The point r = r 0 i.e ( j = nr ), involves the use of a fictitious point. Since
Du1
 u1( j + 1) − u1( j − 1) 
 u1f − u1( j = nr − 1) 
∂u1
 Du1 
= Du1 


2 ∆r
2 ∆r
∂r



457
Selected Numerical Methods and Available Software Packages
where u1f is a fictitious value at r = r 0 + ∆r , such that Equation 9.124 becomes
 u1f − u1( j = nr − 1) 
Du1 
 = k1( u1e − u1( j = nr ))
2 ∆r


or, solving for u1f,
u1f = u1( j = nr − 1) + 2 ∆r ( k1 Du1 ) ( u1e − u1( j = nr ))
(9.129)
and is programmed as
u1f = u1( i , j − 1) + 2 * dr * ku1 Du1* ( u1e − u1(i , j ) )
The second derivative ∂ 2 u1 ∂r 2 is also approximated at r = r 0 + ∆r, resulting in
∂ 2 u1 u1( j + 1) − u1( j − 1)

∂r 2
( ∆r )2
which is combined with Equation 9.129 and programmed as
u1rr ( i, j ) = ( u1f − 2 * u1( i, j ) + u1( i , j − 1))/drs
Similarly the second derivative in u 2 is programmed as
u 2f = u 2 ( i, j − 1) + 2 * dr * ku 2 Du 2 * ( u 2e − u 2(i , j ) )
and
u 2rr ( i , j ) = ( u 2f − 2 * u 2 ( i, j ) + u 2 ( i , j − 1))/drs
The MATLAB program given in Appendix D is composed of the following
modules:
• pde_1(t, u), which contains the discretized equations discussed above.
• pde_1m is the main program that calls pde_1(t, u).
• Ode15s is a MATLAB routine that is designed to address slow convergent
systems of equations. Such as those typically generated by finite difference
discretizations.
458
Applied Mathematical Methods for Chemical Engineers
An alternative set of programming (in MATLAB) which can be used to develop
comparable solutions is also given in Appendix D. This approach employs library routines dss004.m, based on the derivations given in [40], and dSS044.m to d­ iscretize the
derivatives and a main program pde_2(t,u) which calls each routine as needed. More
detailed explanation of the use of dss004.m and dSS044.m is given in Appendix D.
9.6 SUMMARY
Admittedly, the scope of the chapter is limited to a few of the methods that are used
in chemical engineering problem solving. They certainly are not expected to produce
desired results in all possible instances. However, they should provide the reader at least
a cursory view of what can be expected when a problem is to be solved numerically.
A notable exclusion is a discussion on solving the linear system Ax = 0. However,
this important case of a linear system deserves more buildup than the allowable
scope of this chapter. Hopefully, the curious reader will be stimulated enough to
further explore the selected references.
The chapter does highlight areas of concern to the practicing chemical engineer, namely, solution of nonlinear and linear algebraic equations, as well as solution of differential equations. Indeed, attempted numerical solution of differential
equations usually leads to the solution of nonlinear or linear algebraic equations.
Commercially available software packages that can aid the practicing chemical
engineer are also mentioned, and many downloadable packages can be found at
http://gams.nist.gov/cgi-bin/serve.cgi/Packages or http://www.netlib.org/index.html.
Principally, the chapter’s thrust is to expose readers to numerical analysis methods without overwhelming them with premature details.
9.7 PROBLEMS
1.The equilibrium reactions A ↔ B + D (1) and A ↔ B + 2D (2) occur at a
given temperature and pressure. At the given condition of temperature and
pressure, the following relationships are observed among the mole fractions:
yB yD
= 3.75,
yA
yC yD2
= 0.135
yA
a.On a basis of 100 mol of A, conduct the material balance to show that
the relationships can be recasted in terms of the extent, ξi, of each
reaction.
ξ1 ( ξ1 + 2 ξ 2 )
= 3.75
(100 − ξ1 − ξ 2 )(100 + ξ1 + 2ξ 2 )
ξ 2 ( ξ1 + 2 ξ 2 ) 2
= 0.135
(100 − ξ1 − ξ 2 )(100 + ξ1 + 2ξ 2 )
Selected Numerical Methods and Available Software Packages
459
b. Determine ξ 1 and ξ 2, using the Newton–Raphson method.
c. Determine ξ 1 and ξ 2, using a computer algebraic system.
d. Determine ξ 1 and ξ 2, using the modified Newton–Raphson method.
2. Given the two functions
f1 ( x ) = x 2 ,
f2 ( x ) =
x +1
x
determine the point of intersection
a. Using the modified Newton–Raphson method with f1 to find x and f 2 to
find y
b. Switching the roles of f1 and f 2
c. Using the Newton–Raphson method
3. Use the Gauss–Seidel method to solve the following system:
2 x1 + x 2 + x3 − x 4 = −3
x1 + 9 x 2 + 8 x3 + 4 x 4 = 15
− x1 + 3 x 2 + 5 x3 + 2 x 4 = 10
x2 + x4 = 2
4.
a.What happens if you attempt to use the Gauss–Seidel method to solve
the rearranged system?
− x1 + 3 x 2 + 5 x3 + 2 x 4 = 10
x1 + 9 x2 + 8 x3 + 4 x4 = 15
x2 + x4 = 2
2 x1 + x 2 + x3 − x 4 = −3
b. Solve this system using Gaussian elimination with backward substitution.
c. Solve by inverting the coefficient matrix.
d. Solve using a computer algebraic system.
5.
a. U
se Choleski’s Method to find a factorization of the form A = LLT for
the following matrices:
 2 −1

A =  −1
2
 0 −1

0

− 1
2 
460
Applied Mathematical Methods for Chemical Engineers
4
1
B=
1

1
1
1
3
−1
−1
2
1
0
1
1

0

2
b. Use Crout’s Method to solve the following linear systems:
i.
x1 − x 2
= 0
−2 x1 + 4 x 2 − 2 x3 = − 1
− x 2 + 2 x3 = 1.5
ii.
−2 x1 − x 2
= 3
− x1 + 2 x 2 − x3 = − 3
− x 2 + 2 x3 = 1
6.Use the Runge–Kutta order four method with step sizes of 0.02 and 0.01 to
approximate the solution to
y ′ = 1 − t + 3 y;
y(0) = 1
at t = 1.0. Also, compare your result to the exact answer.
7.Use the Adams–Moulton predictor–corrector method to approximate the
­solution to
dx
= x − 4 y, x (0) = 1
dt
dy
= − x + y, y(0) = 0
dt
with h = 0.1 at t = 0.4. Correct the predicted value twice.
Hint: See Example 9.5.
a. Use the exact solution values (five digits) to start the problem.
b. Use the Euler method to obtain the appropriate starting values (x1, x2,
x3, and y1, y2, y3) to the problem.
c. Use the midpoint method to obtain the starting values.
Selected Numerical Methods and Available Software Packages
461
8.Using the Runge–Kutta order four method for starting, the Adams–
Bashforth method as the predictor, and the Adams–Moulton method as a
corrector, approximate the solution to
dx
= x; x (0) = 1
dt
at t = 1.0 with a step size of 0.01.
9.Repeat problem 7 using the Runge–Kutta order four method.
10.Repeat problem 7 using the Adams–Bashforth method and the Runge–
Kutta order four method to obtain the appropriate starting values.
11. Repeat problem 7 using the Adams–Moulton method and the Runge–Kutta
order four method to obtain the appropriate starting values.
12.Given the initial value problem
dy
= − y + t + 1; 0 ≤ t ≤ 1, y(0) = 1
dt
use h = 0.1 and ti = 0.1i to verify Equation 9.66.
13.Verify Equation 9.67 using the same information given in Problem 11.
14. Given a slab of material 1.00 m thick at a uniform temperature of 100ºC. If
the front surface is suddenly exposed to a constant temperature of 0ºC, and
the back surface is insulated, calculate the temperature profile for a time of
5000 s.
Data:
∂T
∂2 T
= (2 × 10 −5 m 2 /s) 2 ; 0 ≤ x ≤ 1.00 m
∂t
∂x
15.Use the method of lines approach to solve problem 1 and problem 2 of
Chapter 6.
16.Solve the problem consisting of Equations 9.130–9.134 below using the
method of lines.
∂C A
1 ∂  ∂C A 
∂ 2 C A 1 ∂C A
= D AB
)
+
 r
 = D AB (
∂t
∂r
r ∂r
∂r 2
r ∂r
(9.130)
Initial and boundary conditions:
C A (r,0) = C A0
(9.131)
462
Applied Mathematical Methods for Chemical Engineers
C A (0, t) is finite or in this case
− D AB
∂C A (0, t )
=0
∂r
∂C A
kC
≅ 1 A (mol/cm2s)
∂r 1 + k 2 C A
(9.132)
(9.133)
Hint:
Numerical Solution letting ui (t ) ≡ C A (r , t ); i = 1,..., n (9.134)
Then Equation 9.131 becomes ui (0) = C A 0 ; i = 1,..., n (9.135)
Method of Lines:
yi +1 − 2 yi + yi −1
y −y
; y′ ≅ i +1 i −1
Using the finite difference approximations y′′ ≅
2
( ∆x )
2 ∆x
the spatial component of the partial differential equation can be transformed
so that the entire partial differential equation becomes
dui ui +1 (t ) − 2ui (t ) + ui −1 (t )
1 ui +1 (t ) − ui −1 (t )
+
; i = 2,..., n − 1
=
dt
( ∆r )2
i ∆r
2 ∆r
(9.136)
for the interior region. The left boundary condition ( i = 1 case), using Equation
9.132.
C A (0, t) is finite or in this case
∂C A (0, t )
=0
∂r
can be represented as
ui +1 (t ) − ui −1 (t ) u2 (t ) − u0 (t )
≡
= 0 ⇒ u2 (t ) = u0 (t ); i = 1.
2 ∆r
2 ∆r
(9.137)
such that
du1 u2 (t ) − 2u1 (t ) + u0 (t )  1 u2 (t ) − u0 (t ) 
=
+

( ∆r )2
2 ∆r
dt
 i ∆r

(9.138)
Selected Numerical Methods and Available Software Packages
463
1 ∂C A,
However, the term in the wing bracket is derived from
which is
r ∂r
undefined as r → 0.
To resolve this issue we use the well-known l’Hôpital’s rule:
1 ∂C A ∂2 C A ui +1 (t ) − 2ui (t ) + ui −1 (t )
=
≅
r → 0 r ∂r
∂r 2
( ∆r )2
lim
Therefore
du1 u2 (t ) − 2u1 (t ) + u0 (t )  1 u2 (t ) − u0 (t ) 
=
+

dt
( ∆r )2
2 ∆r
 i ∆r

 u (t ) − u1 (t ) 
 u (t ) − 2u1 (t ) + u0 (t ) 
= 4 2
= 2 2


2
( ∆r )


 ( ∆r )2 
(9.139)
The right boundary condition is described by Equation 9.136:
− D AB
kC
∂C A
≅ 1 A
∂r 1 + k 2 C A
However, the nth boundary is given in the discretized format by Equation
9.138 for the radial coordinate as
dun un +1 (t ) − 2un (t ) + un −1 (t )
1 un +1 (t ) − un −1 (t )
+
;i=n
=
2
dt
( ∆r )
n ∆r
2 ∆r
But the boundary condition is discretized as
− DAB [
k un (t )
un +1 (t ) − un −1 (t )
]= 1
1 + k2 un (t )
2 ∆r
(9.140)
or
un +1 (t ) = un −1 (t ) −
2 ∆r k1 un (t )
DAB 1 + k2 un (t )
Therefore, for the case i = n,
k1 un (t )
dun
2
∆r k1un (t )
1
[un −1 (t ) −
− un (t )] −
=
dt
( ∆r )2
DAB 1 + k2un (t )
n ∆rDAB 1 + k2 un (t )
(9.141)
464
Applied Mathematical Methods for Chemical Engineers
9.7.1 SUMMARY
The system of equations to be solved is
dui ui +1 (t ) − 2ui (t ) + ui −1 (t )
1 ui +1 (t ) − ui −1 (t )
+
; i = 2,..., n − 1
=
dt
( ∆r )2
i ∆r
2 ∆r
du1
 u (t ) − u1 (t ) 
= 4 2

dt
 ( ∆r )2 
k1 un (t )
dun
2
∆r k1un (t )
1
=
[un−1 (t ) −
− un (t )] −
2
dt
( ∆r )
DAB 1 + k2un (t )
n ∆rDAB 1 + k2 un (t )
REFERENCES
1.Underwood, A.J.V. Fractional distillation of multicomponent mixtures, Chem. Eng.
Prog., 44, 603, 1948.
2. Treybal, R.E. Mass Transfer Operations, 3rd ed., McGraw-Hill, New York, 1980.
3. Stark, P.A. Introduction to Numerical Methods, Macmillan, New York, 1970.
4.Wolfram, S. The Mathematica Book, 3rd ed., Wolfram Media, Champaign, Illinois,
and Cambridge University Press, London, 1996.
5.Burden, R.L., Faires, J.D., and Reynolds, A.C. Numerical Analysis, 2nd ed., Prindle,
Weber and Schmidt, Boston, 1978.
6.Constantinides, A. Applied Numerical Methods with Personal Computers, McGrawHill, New York, 1987.
7. Ramraj, R., Farrell, S., and Loney, N.W. Mathematical modeling of controlled release
from a hollow fiber, J. Membr. Sci., 162, 73, 1999.
8. Jenkins, M.A. and Traub, J.F. A three-stage algorithm for real polynomials using quadratic iteration, SIAM J. Numer. Anal. 7, 545, 1970.
9. Constantinides, A. and Mostoufi, N. Numerical Methods for Chemical Engineers with
Matlab Applications, Prentice Hall, Upper Saddle River, NJ, 1999.
10. Pattee, H.A. Selecting computer mathematics, Mech. Eng., 117, 82, 1995.
11. Mackenzie, J. and Allen, M. Mathematical power tools, Chem. Eng. Educ., Spring, 156,
1998.
12.Malek-Madani, R. Advanced Engineering Mathematics with Mathematica and
Matlab, Addison-Wesley Longman, Reading, MA, 1998.
13.Johnston, R.L. Numerical Methods: A Software Approach, John Wiley & Sons,
New York, 1982.
14. Riggs, J.B. An Introduction to Numerical Methods for Chemical Engineers, Texas Tech
University Press, Lubbock, TX, 1988.
15.Hanna, O.T. and Sandall, O.C. Computational Methods in Chemical Engineering,
Prentice Hall, Upper Saddle River, NJ, 1995.
16. Strang, G., Linear Algebra and Its Applications, 2nd ed., Academic Press, New York,
1980.
17.Amundson, N.R. Mathematical Methods in Chemical Engineering: Matrices and
Their Applications, Prentice Hall, Englewood Cliffs, NJ, 1966.
18. Nakamura, S. Applied Numerical Methods, Prentice Hall, Englewood Cliffs, NJ, 1991.
Selected Numerical Methods and Available Software Packages
465
19.Forsythe, G.E. and Moler, C.B. Computer Solution of Linear Algebraic Systems,
Prentice Hall, Englewood Cliffs, NJ, 1967.
20. Forsythe, G.E., Malcolm, M.A., and Moler, C.B. Computer Methods for Mathematical
Computations, Prentice Hall, Englewood Cliffs, NJ, 1977.
21.Boyce, W.E. and DiPrima, R.C. Elementary Differential Equations and Boundary
Value Problems, 8th ed., John Wiley & Sons, New York, 2005.
22.Isaacson, E. and Keller, H.B. Analysis of Numerical Methods, John Wiley & Sons,
New York, 1966.
23.Higham, N.J. Accuracy and Stability of Numerical Algorithms, SIAM, Philadelphia,
1996.
24. Butcher, J.C. On the attainable order of Runge–Kutta methods, Math. Comp., 19, 408,
1965.
25. Cheney, W. and Kincaid, D. Numerical Mathematics and Computing, 2nd ed., Brooks
and Cole Publishing Company, Monterey, CA, 1985.
26. Na, T.Y. Computational Methods in Engineering Boundary Value Problems, Academic
Press, New York, 1979.
27.Gear, C.W. Numerical Initial Value Problems in Ordinary Differential Equations,
Prentice Hall, Englewood Cliffs, NJ, 1971.
28.Myint, U.T. and Debnath, L. Partial Differential Equations for Scientists and
Engineers, 3rd ed., Prentice Hall, Englewood Cliffs, NJ, 1987.
29.Kythe, P.K., Puri, P., and Schaferkotter, M.R. Partial Differential Equations and
Mathematica, CRC Press, Boca Raton, FL, 1997.
30.Kreyszig, E. Advanced Engineering Mathematics, 7th ed., John Wiley & Sons,
New York, 1993.
31.O’Neil, P.V. Advanced Engineering Mathematics, 4th ed., PWS-Kent Publishing
Company, Boston, MA, 1995.
32. Cooper, J.M. Introduction to Partial Differential Equations with MATLAB, Birkhauser,
Boston, MA, 1998.
33. Lee, H.J. and Schiesser, W.E. Ordinary and Partial Differential Equation Routines in
C, C++, Fortran, Java®, Maple® and MATLAB®, Chapman & Hall and CRC Press,
Boca Raton, FL, 2004.
34.Spiegel, M.R. Calculus of Finite Differences and Difference Equations, Schaum’s
Outlines, 10th printing, McGraw-Hill, Inc., New York, 1971
35. Butenko, S. and Pardalos, P.M. Numerical methods and Optimization an Introduction,
CRC Press (Taylor & Francis), Boca Raton, FL, 2014.
36.Sewell, G., Computational Methods of Linear Algebra, 2nd ed., Wiley-Interscience,
John Wiley & Sons Inc., Hoboken, New Jersey, 2005.
37.Bronson, R. and Costa, G.B. Matrix Methods: Applied Linear Algebra, 3rd ed.,
Academic Press (Elsevier), Burlington, MA, 2009.
38.Sewell, G. The Numerical Solution of Ordinary and Partial Differential Equations,
2nd ed., Wiley-Interscience, John Wiley & Sons Inc., Hoboken, New Jersey, 2005.
39.Schiesser, W.E. Partial Differential Equation Analysis in Biomedical Engineering:
Case Studies with MATLAB, Cambridge University Press, New York, 2013.
40. Bickley, W.G. Formulae for numerical differentiation, Math. Gaz., Vol 25, 1941.
This page intentionally left blank
Appendix A: Elementary
Properties of Determinants
and Matrices
A.1
DETERMINANTS
The reader may be familiar with determinants, but a brief review is useful to the discussion on the solution of linear equations. It turns out that defining the determinant
is a more difficult task than listing its properties; however, we will make an attempt
to bring out somewhat of a working definition [1].
A determinant of the nth order is usually written in one of the forms
det A = A =
a11 a12 a1a
a21 a22 a2 a
aa1 aa 2 aaa
= dot
a11 a12 a1a
a21 a22 a2 a
aa1 aa 2 aaa
= aij
(A.1)
and is an array (matrix) of n2 (n × n) elements, where the elements aij may be real
or complex numbers or functions. The determinant itself is a function, and if the aij
are considered variables, then |A| is a function of n2 variables with a particular form.
Before we express the functional form of |A|, a list of its useful properties are given
and illustrated with a 2 × 2 case [1,2].
1.The determinant is a linear function of the first row:
ab
a + a′ b + b′
a′ b′
= (a + a′)d − (b + b′)c =
+
cd
c
d
c d
ta tb
ab
= tad − tbc = t
c d
cd
2.The determinant changes sign when two rows are exchanged:
a11 a12
a21 a22
= a11a22 − a12 a21 = −
a21 a22
a11 a12
467
468
Appendix A
3.The determinant of the identity matrix (see discussion on matrices) is 1:
10
=1
01
4.If two rows of the array A are equal, then |A| = 0:
ab
= ab − ab = 0
ab
5.The operation of subtracting a multiple of one row from another leaves the
determinant unchanged:
a11 − ta21 a12 − ta22
a11 a12
=
a21
a22
a21 a22
6.If the array A has a zero row, then |A| = 0:
0 0
=0
a21 a22
7. If the array is triangular, then |A| is the product a11 a22…ann of the entries on
the main diagonal:
a11 a12
a11 0
= a11a22 =
0 a22
a21 a22
8.If the |A| is zero, then the array A is singular:
a11 a12
a21 a22
is singular if and only if
a11 a12
= a11a22 − a12 a21 = 0
a21 a22
9.For any two n by n arrays (matrices), the determinant of the product is
the product of the determinants; that is, given two arrays A and B, then
|AB| = (|A|)(|B|).
a11 a12
a21 a22
b11 b12
a11b11 + a12 b21 a11b12 + a12 b22
=
b21 b22
a21b11 + a22 b12 a21b21 + a22 b22
469
Appendix A
10.The transpose of the array A has the same determinants as the array A:
t
A =A
Now the functional form of the determinant may be given in terms of cofactor
expansion:
det A = ai1 Ai1 + ai 2 Ai 2 +  + ain Ain
(A.2)
where Aij is called the cofactor and itself is given as
Aij = (−1)1+ j det Mij
(A.3)
where Mij is called the minor and is formed by deleting row i and column j of the
array A.
An example of this expansion:
 3 −2 3 


A =  4 2 −2 
 1 1 2 
Then
 2 − 2
A11 = (−1)1+1 det 
= 6
1 2 
4 − 2
A12 = (−1)1+2 det 
 = 10
1 2 
4 2 
A13 = (−1)1+3 det 
= 2
1 1 
Therefore, the |A| = a11 A11 + a12 A12 + a13A13 = 44.
An alternative and useful formula for the determinant is
det A = det P −1 det L det D det U = ±(product of the pivots)
(A.4)
where ±1 is the determinant of P−1 or of P and depends on whether the number of
row exchanges is even or odd. L and U are lower and upper triangular arrays, respectively, and their determinants are 1.
Triangular arrays are those whose elements are zeros above or below the main
diagonal. That is, a lower triangular array is one in which all elements above the
main diagonal are zeros. The main diagonal, D, is a diagonal array whose nonzero
elements appear on the main diagonal.
The array, P, is a permutation array (matrix) that reorders the rows of the array A,
so that the product PA admits a factorization with nonzero pivots [2].
While determinants themselves may have limited uses, they do facilitate the helpful applications of matrices.
470
A.2
Appendix A
MATRICES
A matrix is a rectangular array of elements arranged in rows and columns as
 a11 a12 a1n  


a a a2 n  
A =  21 22
=
  

 
 an1 an 2 ann  
a11 a12 a1n 
a21 a22 a2 n 
= [aij ]

an1 an 2 ann 
(A.5)
where the square or round brackets are meant to be different from the straight lines
used to represent determinants. The elements can be numbers (real or complex) or
functions. The matrix given in Equation A.5 is an m by n or, more frequently, stated
as m × n, which exploits the fact that there are m rows and n columns. If m = n, the
matrix is said to be square or of nth order. Matrices will be denoted with bold capital
letters. A special matrix containing only a single column is called a column vector,
and will be denoted by a small boldface letter, such as
x
 1
x
x =  2


x
 n
 
 
=
 
 
 
x1 

x2 
 

x n 
(A.6)
The element positioned in the ith row and jth column is designated by aij, the first
subscript identifying its row and the second its column.
Associated with each matrix A is the matrix At, known as the transpose of A.
This transpose is obtained by interchanging the rows and columns of A. Therefore,
if A = [aij], then At = [aji]. The transpose xt of a column vector (n × 1 matrix) is a row
vector (1 × n matrix). A square matrix in which all elements except those on the main
diagonal are zero is called a diagonal matrix, and the case in which the diagonal elements are all unity is called the identity matrix I.
The algebraic properties of matrices can be found in the literature on linear algebra [2–5]. Here we list those that facilitate the discussions in Chapter 9. Proofs are
left to the linear algebra literature:
1.
Equality: Two m × n matrices, A and B, are said to be equal if corresponding elements are equal; that is, if aij = bij for each i and j.
2.
Zero: A matrix whose elements are all zero is called a null matrix and is
denoted by 0.
3.
Addition: The sum of two m × n matrices is defined as the matrix obtained
by adding corresponding elements:
A + B = [aij ] + [bij ] = [aij + bij ]
(A.7)
4.
Multiplication: The product AB of two matrices is defined whenever the
number of columns of the first matrix is the same as the number of rows of
the second matrix. When this condition exists, the matrices are said to be
471
Appendix A
conformable. If A is n × m and B is n × r, then the product AB = C is an
m × r matrix. The element in the ith row and jth column of C is obtained by
multiplying each element of the ith row of A by the corresponding element
of the jth column of B, and then adding the resulting products. That is,
n
cij = ∑ aik bkj
k =1
(A.8)
Also, matrix multiplication satisfies the associative law
( AB)C = A(BC)
(A.9)
A(B + C) = AB + AC
(A.10)
and the distributive law
For this reason, it is necessary to use terminology which specifies the order of multiplication. For example, if the matrices A and B are n × n, then C = AB is read as B
premultiplied by A, whereas D = BA is read as B postmultiplied by A. Further, the
results AB and BA are not necessarily equal. This is a very different phenomenon
from the usual symbolic algebra and may even result in the product of two matrices
being the null matrix without either matrix being null. For instance,
 1 3 5
 2 0 6 




A =  −2 4 0  and B =  1 0 3 
 −1 0 −3 
 0 2 2 
 1x 2 + 3 x1 + 5 x (−1) 1x 0 + 3 x 0 + 5 x 0 1x 6 + 3 x 3 + 5 x (−3) 


AB =  −2 x 2 + 4 x1 + 0 x (−1) −2 x 0 + 4 x 0 + 0 x 0 −2 x 6 + 4 x 3 + 0 x (−3) 
 0 x 2 + 2 x1 + 2 x (−1) 0 x 0 + 2 x 0 + 2 x 0 0 x 6 + 2 x 3 + 2 x (−3) 


0 0 0


= 0 0 0 
 0 0 0 
whereas
 2 x1 + 0 x (−2) + 6 x 0
2x3 + 0 x 4 + 6x 2 2x5 + 0 x 0 + 6x 2 


BA =  1x1 + 0 x (−2) + 3 x 0
1x 3 + 0 x 4 + 3 x 2 1x 5 + 0 x 0 + 3 x 2 
 −1x1 + 0 x (−2) + (−3) x 0 −1x 3 + 0 x 4 + −3 x 2 −1x 5 + 0 x 0 + −3 x 2 


 2 18 22 


=  1 9 11 
 −1 −9 −11 
472
Appendix A
This example illustrates Equation A.8, as well as the fact that the product of two
conformable matrices is not necessarily commutative.
Matrix multiplication applies to the special cases of 1 × n and n × 1, row and column vectors, respectively. If we denote the 1 × n as xt and the n × 1 as y, then
a
x t y = ∑ xi yi
(A.11)
x t y = yx t , x t (y + z) = x t y + x t z, (αx t )y = αx t y = x t (αy)
(A.12)
i =1
Also
A special product called the scalar or inner product is defined by
n
( x, y) = ∑ xi yi = x t y
(A.13)
i =1
where y is the conjugate of y. A particular useful form of Equation A.13 is
n
n
i =1
i =1
( x, x) = ∑ x1 x1 = ∑ x1
2
(A.14)
If (x,y) = 0, then the two vectors are said to be orthogonal. These vector properties
can be illustrated with the following example.
Let
 2−i 
 i 




x =  −2  , y =  i 
 1+ i 
 3 




then
x t y = (i)(2 − i) + (−2)(i) + (1 + i)(3) = 4 + 3i
( x, y) = (i)(2 + i) + (−2)(−i) + (1 + i)(3) = 2 + 7i
x t x = (i)2 + (−2)2 + (1 + i)2 = 3 + 2i
( x, x) = (i)(−i) + (−2)(−2) + (1 + i)(1 − i) = 7
5.
Multiplication by a number: The product of a matrix A by a number α (real
or complex) is defined by
αA = α[aij ] = [αaij ]
(A.15)
That is, each element of the matrix is multiplied by the number α. This differs from the multiplication of a determinant by a number where only the
first row is multiplied.
473
Appendix A
6.
Subtraction: The difference A – B of two conformable matrices is de­fined by
A − B = A + (−B) = [aij ] − [bij ] = [aij − bij ]
(A.16)
7.
Inverse: This is the operation for square matrices that is analogous to division for numbers. That is, for a given square matrix A, we need to determine another matrix B such that AB = I, the identity matrix. If the matrix
B exists, it is called the inverse of A and we write B = A−1. Multiplication is
commutative between any matrix and its inverse.
AA−1 = A−1 A = I
(A.17)
Also, when A has an inverse, it is said to be nonsingular, otherwise A is said to be
singular. Property 8 for determinants is a necessary and sufficient condition for a
matrix to be singular. Direct use of the determinant to find the inverse is possible.
A procedure known as Cramer’s rule may be used on small systems of equations.
That is, given Ax = b, then x = A−1b (premultiplication by A−1) can be determined as
illustrated below:
x1 + 3 x 2 = 0
2 x1 + 4 x 2 = 6
then
x1 =
03
64
13
24
=
10
26
6
−18
= 9, x 2 =
=
= −3
2
−2
−
13
24
In general, the jth component of x = A−1b is given by
a a b a 
 11 12 1 1n 
xj =
; Bj =      
det A
 an1 an 2 bn ann 


det B j
(A.18)
The vector b replaces the jth column of A. Another way to arrive at Equation A.18
is to start with the definition given in Equation A.3. That is, if aij is any element of a
square matrix, and the cofactor of aij in |A| is Aij, the transpose of the matrix whose
elements are made up of all the Aijs is called the adjoint of A and is denoted adj
A = [Aji]. It can then be shown [2,5] that a typical element of A−1 is given by Aji/|A|.
A more useful way to compute A−1 is by means of elementary operations:
1.Interchange of two rows
2.Multiplication of a row by a nonzero scalar
3.Addition of any multiple of one row to another row
474
Appendix A
Generally, any nonsingular matrix A can be transformed into the identity I by a
systematic sequence of the elementary operations. It can be shown that the same
sequence of operations performed on I will yield A−1 [1,2,4]. An example illustrating
the process is as follows:
 1 −1 −1 


A =  3 −1 2 
 2 2 3 
Step 1
Obtain zeros in the off-diagonal position in the first column by adding (−3)
times the first row to the second row and adding (−2) times the first row to the
third row.
 1 −1 −1 
0 2 5 


 0 4 5 
Step 2
Obtain a one in the diagonal position in the second column by multiplying the
second row by 1/2.
 1 −1 −1
 0 1 5/2

5
 0 4




Step 3
Obtain zeros in the off-diagonal positions in the second column by adding the
second row to the first row and adding (−4) times the second row to the third
row.
 1 0 3/2 
 0 1 5/2 


 0 0 −5 
Step 4
Obtain a one in the diagonal position in the third column by multiplying the
third row by (−1/5).
 1 0 3/2 
 0 1 5/2 


1 
 0 0
Step 5
Obtain zeros in the off-diagonal positions in the third column by adding (–3/2)
times the third row to the first row, and adding (–5/2) times the third row to
the first row.
1 0 0 
0 1 0 


 0 0 1 
475
Appendix A
If the same sequence of operations in the same order is now performed on I, the
sequence of matrices as follows:
1 0 0 
 0 1 0 ,


 0 0 1 
 1 0 0 
 −3 1 0  ,


 −2 0 1 

1
0 0   −1 / 2 1 / 2 0 
 −3 / 2 1 / 2 0  ,  −3 / 2 1 / 2 0 


 
0 1  
4 −2 1 
 −2
 −1 / 2 1 / 2
0
 −3 / 2 1 / 2
0

 −4 / 2 2 / 5 −1 / 5

,


 7 / 10 −1 / 10 3 / 10 
 1 / 2 −1 / 2 1 / 2 


 −4 / 5 2 / 5 −1 / 5 
The last matrix is A−1.
8.
Distances: To define a distance in Rn, we will use the idea of the norm of a
vector. The, ℓ2 and, ℓ∞ norms for the vector x = (x1, x2,…, xn)t are defined by
1/ 2
2 : x
 n 
= ∑ xi2 
 i =1 
2
(A.19)
which is the usual Euclidean norm of the vector x and
∞ : x
∞
=
max | xi |
(A.20)
1≤ i ≤ n
Then if x = ( x1, x2,…, xn )t and y = ( y1, y2,…, yn )t are vectors in Rn, the, ℓ2 and, ℓ∞ distances between x and y are defined to be
2 : x − y
2
∞ : x − y
∞
 a
= ∑ xi − yi
 i =1
1/ 2



(A.21)
and
=
max | xi − yi |
1≤ i ≤ n
(A.22)
Our major concern with matrices has to do with solving linear algebraic equations as
discussed in Chapter 9. There the method of Gaussian elimination was emphasized.
Below is an alternate approach to solving the system given by Ax = b in which
the matrix A−1 is exhibited. That is, the solution will be of the form x = A−1b, where
b is premultiplied by A−1.
476
Appendix A
Consider the set of linear equations given by
2 x1 −3 x 2
−2 x 4
3 x 2 +2 x3 + x 4
x1 −2 x 2 −4 x3 +2 x 4
2 x1 + x2 −3 x3 − x 4
=8
=5
=2
=6
They can be recasted in the form
 2 −3 0
0 3 2

 1 −2 −4
 2 1 −3
−2 
1 
2
−1 






x1
x2
x3
x4
  
 8
=5
 2
  
  6 
where A is the 4 × 4 matrix. We now seek the solution x = A−1b through the use of
elementary operations. As a first step, we form the augmented matrix by appending
the unit matrix of order 4 to the 4 × 5 matrix formed from A and the vector b:
 2 −3 0 −2  8  1 0 0 0 


 0 3 2 1 5 0 1 0 0 
 1 −2 −4 2  2  0 0 1 0 


 2 1 −3 −1  6  0 0 0 1 
Second, we carry out the three operations in the order given:
1.Divide the first row by 2.
2.Add (−1) times the new first row to the third row.
3.Subtract 2 times the new first row from the fourth row.
These elementary operations result in
 1 1.5

0 3
 1 −0.5
2 1

0 −1  4  0.5
2 1  5  0
−4 3  −2  −0.5
−3 −1  2  −1
0
1
0
0
0
0
1
0
0
0
0
1






The third step requires the following elementary operations on the newest augmented matrix:
1.Add the fourth row to the first row.
2.Subtract the fourth row from the second row.
3. Subtract 3 times the fourth row from the third row.
477
Appendix A
 1 2.5

 0 −1

 0 − 12.5
0 4

− 3 0  2  −0.5 0 0 1 

5 0  7  1 1 0 −1 

5 0  4  2.5 0 1 − 3 
− 3 1  −2  −1 0 0 1 
The fourth step requires the operations:
1.Add two times the second row to the first row.
2.Subtract 12.5 times the second row from the third row.
3. Add four times the second row to the fourth row.
1

0

0
0

0 1.5 

1 0 −1 
−1 5 0  7  1

0 −57.5 0  − 83.5  − 10.0 − 12.5 1 9.5 
0 17 1  26  − 1
0 0 1 
0
9.5
0  19.5 
2
2.5
The fifth step involves the following elementary operations on the newest augmented
matrix:
1.Divide the third row by (−57.5).
2.Subtract 9.5 times the new third row from the first row.
3.Subtract 5 times the new third row from the second row.
4.Subtract 17 times the new third row from the fourth row.
1

0

0
0

0.069 

− 1 0 0  −0.261  0.130 − 0.087 0.087 − 0.174 

0 1 0  1.452  0.174 0.217 − 0.017 − 0.165 
0 0 1  1.313  0.043 0.304 0.296 − 0.191 
0 0 0  5.704  0.348
0.438
0.165
Finally, multiplying the second row by (−1) results in
1

0

0
0

0.069 

1 0 0  0.261  −0.130 0.087 −0.087 0.174 

0 1 0  1.452  0.174 0.217 −0.017 − 0.165 
0 0 1  1.313  0.043 0.304 0.296 − 0.191 
0 0 0  5.704  0.348 0.438
0.165
where the 4 × 4 identity matrix has moved completely to the left, taking the place
of A. This final augmented matrix represents the form Ix = A−1b, where the inverse
matrix is
478
Appendix A
A −1
 0.348

 −0.130
=
0.174

 0.043

0.069 

0.087 − 0.087 0.174 
0.217 − 0.017 − 0.165 

0.304 0.296 − 0.191 

0.438
0.165
and the solution vector Ix = (5.704, 0.261, 1.452, 1.313)t.
In summary, if we use Ei to denote any matrix representing the elementary operations performed above, then Ax = b can be adjusted to a succession of equivalent
forms
E n E n−1  E 2 E1 Ax = E n E n−1  E 2 E1 b
(A.23)
where the elementary matrices are selected to convert the square matrix A to the unit
matrix I. This means that
E n E n−1  E 2 E1 A = I
(A.24)
Since the same operations are being performed on the vector b, the column vector b
is appended to the n × n matrix A to form an augmented matrix Ab. Then, premultiplying Ab with the operators Ei produces the desired result x = A−1b, and, if needed,
the inverse of A is
E n E n−1  E 2 E1 = A−1
(A.25)
Another example: Find the inverse of
1 2 3


A = 2 5 7 
 1 1 1 
Solution
Form the 3 × 6 matrix [A⋮I3] and transform it by elementary row operations to the
form [I3⋮A]. The pivot element at each stage is emboldened.
 1 2 3 1 0 0


 2 5 7  0 1 0  Matrix A augmented by I3.
 1 1 1  0 0 1 
1 2 3  1 0 0


 0 1 1  −2 1 0  To make a21 = 0, replaced row 2 by the sum of itself and −2
 0 −1 −2  −1 0 1 
times row 1. To make a31 = 0, replaced row 3 by the sum of itself and −1 times row 1.
479
Appendix A
 1 0 1  5 −2 0 


 0 1 1  −2 1 0  To make a12 = 0, replaced row one by the sum of itself and


 0 0 1  3 −1 −1 
−2 times row 2. To make a32 = 0, replace row 3 by the sum of itself and row 2.
 1 0 1  5 −2 0 


 0 1 1  −2 1 0  Multiplied row 3 by −1.


 0 0 1  3 −1 −1 
 1 0 0  2 −1 1 


 0 1 0  −5 2 1  To make a13 = 0, replaced row one by the sum of itself and


 0 0 1  3 −1 −1 
−1 times row 3. To make a23 = 0, replaced row 2 by the sum of itself and −1 times
row 3. The final matrix is of the form [I3 ⋮ A−1], that is,
 2 −1 1 


A =  −5 2 1 
 3 −1 −1 
−1
A.3 ADDITIONAL PROPERTIES OF MATRICES
Square matrices can appear in series (finite or infinite) and may exhibit behavior
quite similar to those of scalar series. For instance, we could have
a0 Y n + a1 Y n−1 + a2 Y n−2 +  + an−1 Y + an I = 0
(A.26)
where Y is a square matrix. Matrix polynomials may be factored in ways similar to
that of scalar polynomials. For example: A3 − 9A2 + 26A − 24I can be factored into
(A − 2I)(A − 3I)(A − 4I).
It is also possible to use square matrices as exponents of scalar functions, such as
eA = I +
A A 2 A3
+
+
+
1! 2! 3!
(A.27)
Then, if B is a square matrix of the same order as A,
e A e B = e B e A = e ( A+ B )
(A.28)
e A e− A = I
(A.29)
and
For a given square matrix A of order n whose elements are constants and a column
vector x, the equation
Ax = λx
(A.30)
480
Appendix A
or
( A − λI) x = 0
(A.31)
has nontrivial solution if, and only if
( A − λI) = 0
(A.32)
Equation A.32 is called the characteristic equation.
A.4 CALCULUS OF MATRICES
If the elements of a matrix are functions of some appropriate independent variable(s),
the matrix can be differentiated or integrated with respect to the independent
variable(s).
Similar to the calculus of functions, we can differentiate matrices by differentiating the elements of the matrix in each case. The usual designation for the derivative
of a square matrix Y is dY/dx if the matrix elements are functions of the scalar x.
The differential coefficient of a product is also similar to that of a product of scalar
functions; however, the order of the matrices in the product must be maintained.
Therefore
d
dA
dB
dC
BC + A
C + AB
( ABC) =
dx
dx
dx
dx
(A.33)
where A, B, and C are conformable square matrices whose elements are functions
of x.
Integration of a matrix whose elements are derivatives or functions of an independent variable is accomplished by integrating each element with respect to the independent variable. Therefore, for a typical element, yij(x), of the matrix Y, the result
∫ Yd x =  ∫ yij ( x ) d x 
(A.34)
REFERENCES
1.Amundson, N.R. Mathematical Methods in Chemical Engineering, Prentice Hall,
Englewood Cliffs, 1966.
2. Strang, G. Linear Algebra and Its Applications, 2nd ed., Academic Press, New York,
1980.
3.Boyce, W.E. and DiPrima, R.C. Elementary Differential Equations and Boundary
Value Problems, 8th ed., John Wiley, New York, 2005.
4. Schneider, H. and Barker, G.P. Matrices and Linear Algebra, Holt, Rinehart & Winston,
New York, 1968.
5. Jenson, V.G. and Jeffreys, G.V. Mathematical Methods in Chemical Engineering, 2nd
ed., Academic Press, London, 1992.
Appendix B: Numerical
Method of Lines Example
Using MATLAB®
EXAMPLE 9.9
%
% Main program pdelin computes the numerical
% Solution to a linear PDE by six integrators
%
% Declare global variables
global nsteps;
%
% Step through six integrators
% for int = 1:6
int = 3 %Selecting the clasical Runge-Kutta order four
method
%
% Integration parameters
[neqn,nout,nsteps,t0,tf,abserr,relerr] = intpar;
%
% Initial condition vector
[u0] = inital(neqn,t0);
%
% Output interval
dt = tf-t0;
%
% Compute solution at nout output points
for j = 1:nout
%
% Print current solution
[out] = fprint(int,neqn,t0,u0);
%
% Fixed step modified Euler integrator
if int = = 1
[u] = euler2a(neqn,t0,tf,u0,nsteps);
end
%
% Variable step modified Euler integrator
if int = = 2
[u] = euler2b(neqn,t0,tf,u0,nsteps,abserr,relerr);
end
481
482
Appendix B
%
% Fixed step classical fourth order RK integrator
if int = = 3
[u] = rkc4a(neqn,t0,tf,u0,nsteps);
end
%
% Variable step classical fourth order RK integrator
if int = = 4
[u] = rkc4b(neqn,t0,tf,u0,nsteps,abserr,relerr);
end
%
% Fixed step RK Fehlberg (RKF45) integrator
if int = = 5
[u] = rkf45a(neqn,t0,tf,u0,nsteps);
end
%
% Variable step RK Fehlberg (RKF45) integrator
if int = = 6
[u] = rkf45b(neqn,t0,tf,u0,nsteps,abserr,relerr);
end
%
% Advance solution
t0 = tf;
tf = tf+dt;
u0 = u;
%
% Next output
end
%
% Next integrator
end
%
% End of pdelin
function[neqn,nout,nsteps,t0,tf,abserr, relerr] = intpar
%
% Function intpar sets the parameters to control the
% integration of the linear PDE
%
% Number of first order ODEs
neqn = 21;
%
% Number of output points
nout = 6;
%
% Maximum number of steps in the interval t0 to tf
nsteps = 250;
%
% Initial, final values of independent variable
t0 = 0.0;
tf = 0.2;
%
Appendix B
% Error tolerances
abserr = 1.0e-05;
relerr = 1.0e-05;
function [u] = inital(neqn,t)
%
% Function inital sets the initial condition vector
% for the linear PDE
%
% Problem parameters
xl = 0.0;
xu = 1.0;
%
% Initial condition
for i = 1:neqn
x = xl+(i-1)/(neqn-1)*(xu-xl);
u(i) = sin(pi*x);
end
function [ut] = derv(neqn,t,u)
%
% Function derv computes the derivative vector
% for the linear PDE
%
% Problem parameters
xl = 0.0;
xu = 1.0;
%
% BC at x = 0
ut(1) = 0.0;
%
% BC at x = 1
ut(neqn) = 0.0;
%
% Interior points
dx = (xu-xl)/(neqn-1);
dxs = dx*dx;
for i = 2:neqn-1
ut(i) = (u(i+1)-2.0*u(i)+u(i-1))/dxs;
end
function [u] = rkc4a(neqn,t0,tf,u0,nsteps)
%
% Function rkc4a computes an ODE solution by a fixed step
% classical fourth order RK method for a series of points
% along the solution by repeatedly calling function ssrkc4
% for a single classical fourth order RK step.
%
% Argument list
%
%
neqn number of first order ODEs
%
%
t0
initial value of independent variable
%
483
484
Appendix B
%
tf final value of independent variable
%
%
u0 initial condition vector of length neqn
%
%
nsteps number of rkc4 steps
%
%
u ODE solution vector of length neqn after
%
nsteps steps
%
% Integration step
h = (tf-t0)/nsteps;
%
% nsteps rkc4 steps
for i = 1:nsteps
%
%
rkc4 step
[t,u,e] = ssrkc4(neqn,t0,u0,h);
%
%
Reset base point values for next rkc4 step
u0 = u;
t0 = t;
%
% Next rkc4 step
end
%
% End of rkc4a
function [t,u,e] = ssrkc4(neqn,t0,u0,h)
%
% Function ssrkc4 computes an ODE solution by the classical
fourth
% order RK method for one step along the solution (by calls to
derv
% to define the ODE derivative vector). It also estimates the
% truncation error of the solution, and applies this estimate
as
% a correction to the solution vector.
%
% Argument list
%
%
neqn number of first order ODEs
%
%
t0 initial value of independent variable
%
%
u0 initial condition vector of length neqn
%
%
h integration step
%
%
t independent variable
%
%
u ODE solution vector of length neqn after
% one rkc4 step
Appendix B
%
%
e estimate of truncation error of the solution vector
%
% Derivative vector at initial (base) point
[ut0] = derv(neqn,t0,u0);
%
% k1, advance of dependent variable vector and
% independent variable for calculation of k2
k1 = h*ut0;
u = u0+0.5*k1;
t = t0+0.5*h;
%
% Derivative vector at new u, t
[ut] = derv(neqn,t,u);
%
% k2, advance of dependent variable vector and
% independent variable for calculation of k3
k2 = h*ut;
u = u0+0.5*k2;
t = t0+0.5*h;
%
% Derivative vector at new u, t
[ut] = derv(neqn,t,u);
%
% k3, advance of dependent variable vector and
% independent variable for calculation of k4
k3 = h*ut;
u = u0+k3;
t = t0+h;
%
% Derivative vector at new u, t
[ut] = derv(neqn,t,u);
%
% k4
k4 = h*ut;
%
% Second order step
sum2 = u0+k2;
%
% Fourth order step
sum4 = u0+(1.0/6.0)*(k1+2.0*k2+2.0*k3+k4);
t = t0+h;
%
% Truncation error estimate
e = sum4-sum2;
%
% Fourth order solution vector (from 2,4 RK pair);
% two ways to the same result are listed
% u = sum2+e;
u = sum4;
%
485
486
% End of ssrkc4
function [out] = fprint(ncase,neqn,t,u)
%
% Function fprint displays the numerical and exact
% solutions to the linear PDE
%
% Declare global variables
global nsteps;
%
% Return current value of independent variable
% (MATLAB requires at least one return argument)
out = t;
%
% Problem parameters
xl = 0.0;
xu = 1.0;
%
% Print a heading for the solution at t = 0
if(t< = 0.0)
% Label for ODE integrator
%
% Fixed step modified Euler
if(ncase = = 1)
fprintf(‘\n\n euler2a integrator\n\n’);
%
% Variable step modified Euler
elseif(ncase = = 2)
fprintf(‘\n\n euler2b integrator\n\n’);
%
% Fixed step classical fourth order RK
elseif(ncase = = 3)
fprintf(‘\n\n rkc4a integrator\n\n’);
%
% Variable step classical fourth order RK
elseif(ncase = = 4)
fprintf(‘\n\n rkc4b integrator\n\n’);
%
% Fixed step RK Fehlberg 45
elseif(ncase = = 5)
fprintf(‘\n\n rkc45a integrator\n\n’);
%
% Variable step RK Fehlberg 45
elseif(ncase = = 6)
fprintf(‘\n\n rkc45b integrator\n\n’);
end
%
% Heading
fprintf(‘ ncase = %2d
neqn = %2d
nsteps = %3d \n\n’,ncase,neqn,nsteps);
fprintf(‘t u(num)
Appendix B
487
Appendix B
u(exact)
diff\n’);
%
% End of t = 0 heading
end
%
% Numerical and analytical solution output
%
% Midpoint value of x
x = (xu-xl)/2.0;
%
% Analytical solution at midpoint
ue = exp(-pi*pi*t)*sin(pi*x);
%
% Grid index of midpoint
im = round((neqn+1)/2);
%
% Display the numerical and exact solutions, and their
difference
fprintf(‘%5.2f %11.6f %11.6f %13.4e\n’,t,u(im),
ue,u(im)-ue);
Below are the results for the case int = 3 (Runge–Kutta order four).
The table is a display of the formatting set in fprint.
rkc4a integrator
ncase = 3 neqn = 21 nsteps = 250
t
u(num)
u(exact)
diff
0.00
0.20
0.40
0.60
0.80
1.00
1.000000
0.139476
0.019453
0.002713
0.000378
0.000053
1.000000
0.138911
0.019296
0.002680
0.000372
0.000052
0.0000e + 000
5.6448e − 004
1.5714e − 004
3.2810e − 005
6.0893e − 006
1.0595e − 006
As is indicated in the main program, other integrators (such as the Euler or Runge–
Kutta–Fehlberg) could have been used to solve this problem. That approach would provide a means to compare the results from each method. However, in the present example
the classical Runge–Kutta method was used and the results are compared with those from
the analytical solution under the column labeled u(exact). The other columns, u(num) and
diff, are the numerical results and the difference between the exact and the numerical.
This page intentionally left blank
Appendix C: Program for
a Transport and Binding
Kinetics Model of an Analyte
EXAMPLE 9.10
%
% Clear previous files
clear all
clc
%
% Parameters shared with the ODE routine
global zl zu z dz dz2 D kf cbsat kr n cbulk ndss ncall
%
% Parameter numerical values
D=1.0e-10; kf=1.0e+05; cbulk=4.48e-05;
h=5.0e-05; c0=0; cb0=0;
%
% Variation in interface binding saturation
cbsat=1.66e-08;
cbsat=1.66e-09;
%
% Variation in interface unbinding rate
kr=1.0e-01;
kr=1.0e+01;
%
% Spatial grid
zl=0; zu=5.0e-05; n=21; dz=(zu-zl)/(n-1); dz2=dz^2;
%
% Initial condition
for i=1:n
u0(i)=c0;
end
u0(n+1)=cb0;
%
% Independent variable for ODE integration
t0=0.0;
tf=100;
tout=(t0:2:tf);
nout=51;
ncall=0;
489
490
Appendix C
%
% ODE itegration
%
% Variation in error tolerances
reltol=1.0e-06; abstol=1.0e-06;
reltol=1.0e-07; abstol=1.0e-07;
options=odeset('RelTol',reltol,'AbsTol',abstol);
mf=1;
if(mf==1) % explicit FDs
[t,u]=ode15s(@pde_1,tout,u0,options); end
if(mf==2) ndss=4; % ndss = 2, 4, 6, 8 or 10 required
[t,u]=ode15s(@pde_2,tout,u0,options); end
if(mf==3) ndss=44; % ndss = 42, 44, 46, 48 or 50 required
[t,u]=ode15s(@pde_3,tout,u0,options); end
%
% Store numerical solutions
for it=1:nout
c_plot(it)=u(it,1);
cb_plot(it)=u(it,n+1);
theta_plot(it)=cb_plot(it)/cbsat;
rate_plot(it)=kf*c_plot(it)*(cbsat-cb_plot(it))-kr*cb_
plot(it);
end
%
% Display selected output
fprintf('\n mf = %2d
abstol = %8.1e
reltol =
%8.1e\n',...
mf,abstol,reltol);
fprintf('\n
t
c(0,t)
cb(t)
theta
rate\n');
for it=1:nout
fprintf('%6.0f%12.3e%12.3e%12.3e%12.3e\n',...
t(it),c_plot(it),cb_plot(it),theta_plot(it),rate_plot(it));
end
fprintf('\n ncall = %4d\n',ncall);
%
% Plot numerical solution
figure(1);
subplot(2,2,1)
plot(t,c_plot); axis tight
title('c(0,t) vs t'); xlabel('t'); ylabel('c(0,t)')
subplot(2,2,2)
plot(t,cb_plot); axis tight
title('cb(t) vs t'); xlabel('t'); ylabel('cb(t)')
subplot(2,2,3)
plot(t,theta_plot); axis tight
title('theta(t) vs t'); xlabel('t'); ylabel('theta(t)')
subplot(2,2,4)
plot(t,rate_plot); axis tight
title('rate(t) vs t'); xlabel('t'); ylabel('rate(t)')
Appendix C
491
%
% Store numerical solution for 3D plot
for it=1:nout
for i=1:n
c_3D(it,i)=u(it,i);
end
end
z=[zl:dz:zu];
figure(2)
surf(z,t,c_3D)
xlabel('z (m)'); ylabel('t (sec)'); zlabel('c(z,t) (moles/
m^3)');
title('c(z,t) (moles/m^3), z=0,2.5\times10^{-6},..., 5\
times10^{-5} (m), t=0,2,...,100 (sec)')
% print -deps pde.eps; print -dps pde.ps
The routine below converts Equation 9.113 in the given example into a set of ODEs
that are then combined with the given ODE, Equation 9.117.
function ut=pde_1(t,u)
%
% Problem parameters
global zl zu z dz dz2 D kf cbsat kr n cbulk ndss ncall
%
% ODE and PDE
for i=1:n
c(i)=u(i);
end
cb=u(n+1);
%
% BCs
cf=c(2)-(2*dz/D)*(kf*c(1)*(cbsat-cb)-kr*cb);
c(n)=cbulk;
%
% PDE
for i=1:n
if(i==1)
ct(1)=D*(c(2)-2*c(1)+cf)/dz2;
elseif(i==n) ct(n)=0;
else
ct(i)=D*(c(i+1)-2*c(i)+c(i-1))/dz2;
end
end
%
% ODE
cbt=kf*c(1)*(cbsat-cb)-kr*cb;
%
% Derivative vector
for i=1:n
ut(i)=ct(i);
end
ut(n+1)=cbt;
%
492
Appendix C
% Transpose for ODE integrator
ut=ut';
%
% Increment calls to pde_1
ncall=ncall+1;
This file is called in the main program as ndss==4 for use with ode15s Supporting
routines being called (www.cambridge.org/9781107022805): both dss004 and
dss044 are used to compute numerical derivatives of 1-dimension (1D) arrays. More
details on the process used in dss004 and dss044 can be found in Partial Differential
Equation Analysis in Biomedical Engineering Case Studies with MATLAB® Shiesser,
W. E. pp. 363 –366.
%
%
File: dss004.m
function [ux]=dss004(xl,xu,n,u)
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
Function dss004 computes the first derivative, u , of a
x
variable u over the spatial domain xl le x le xu from
classical
five-point, fourth-order finite difference approximations
Argument list
xl
Lower boundary value of x (input)
xu
Upper boundary value of x (input)
n
N
umber of grid points in the x domain including
the
boundary points (input)
u
O
ne-dimensional array containing the values of u
at
t
he n grid point points for which the derivative
is
to be computed (input)
%
%
%
%
%
%
%
%
%
%
%
%
%
%
ux
One-dimensional array containing the numerical
v
alues of the derivatives of u at the n grid
points
(output)
The mathematical details of the following Taylor series (or
polynomials) are given in routine dss002.
Five-point formulas
(1)
Left end, point i = 1
493
Appendix C
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
2
3
( dx) + u1 ( dx) + u1 ( dx)
x
1f
2x 2f
3x 3f
a(u2 = u1 + u1
5
+ u1
( dx)
5x 5f
6
+ u1
( dx)
6x 6f
7
+ u1
( dx)
7x 7f
+ ...)
2
3
(2dx) + u1 (2dx) + u1 (2dx)
x
1f
2x 2f
3x 3f
b(u3 = u1 + u1
5
+ u1
(2dx)
5x 5f
6
+ u1
(2dx)
6x 6f
(2dx)
7x 7f
+ ...)
2
3
(3dx) + u1 (3dx) + u1 (3dx)
x
1f
2x 2f
3x 3f
5
(3dx)
5x 5f
6
+ u1
(3dx)
6x 6f
(3dx)
7x 7f
+ ...)
2
3
(4dx) + u1 (4dx) + u1 (4dx)
x
1f
2x 2f
3x 3f
5
(4dx)
5x 5f
6
+ u1
(4dx)
6x 6f
4
(3dx)
4x 4f
+ u1
7
+ u1
d(u5 = u1 + u1
+ u1
4
(2dx)
4x 4f
+ u1
7
+ u1
c(u4 = u1 + u1
+ u1
4
( dx)
4x 4f
+ u1
4
(4dx)
4x 4f
+ u1
7
+ u1
(4dx)
7x 7f
+ ...)
C
onstants a, b, c, and d are selected so that the
coefficients
of the u1 terms sum to one and the coefficients of
the u1 ,
x
u1
and u1
terms sum to zero
3x
4x
%
2x
%
%
%
% a +
2b +
3c +
4d = 1
%
% a +
4b +
9c + 16d = 0
%
% a +
8b + 27c + 64d = 0
%
% a + 16b + 81c + 256d = 0
%
% Simultaneous solution for a, b, c, and d followed by the solu% tion of the preceding Taylor series, truncated after the u
%
4x
494
%
Appendix C
terms, for u1 gives the following five-point
approximation
x
%
%
4
% u1 = (1/12dx)(-25u1 + 48u2 - 36u3 + 16u4 - 3u5) + O(dx (1)
%
x
%
%
(2) Interior point, i = 2
%
%
2
3
4
% a(u1 = u2 + u2 (-dx) + u2 (-dx) + u2 (-dx) + u2 (-dx)
%
x
1f
2x 2f
3x 3f
4x 4f
%
%
5
6
7
%
+ u2 (-dx) + u2 (-dx) + u2 (-dx) + ...)
%
5x 5f
6x 6f
7x 7f
%
%
2
3
4
% b(u3 = u2 + u2 ( dx) + u2 ( dx) + u2 ( dx) + u2 ( dx)
%
x
1f
2x 2f
3x 3f
4x 4f
%
%
5
6
7
%
+ u2 ( dx) + u2 ( dx) + u2 ( dx) + ...)
%
5x 5f
6x 6f
7x 7f
%
%
2
3
4
% c(u4 = u2 + u2 (2dx) + u2 (2dx) + u2 (2dx) + u2 (2dx)
%
x
1f
2x 2f
3x 3f
4x 4f
%
%
5
6
7
%
+ u2 (2dx) + u2 (2dx) + u2 (2dx) + ...)
%
5x 5f
6x 6f
7x 7f
%
%
2
3
4
% d(u5 = u2 + u2 (3dx) + u2 (3dx) + u2 (3dx) + u2 (3dx)
%
x
1f
2x 2f
3x 3f
4x 4f
%
%
5
6
7
%
+ u2 (3dx) + u2 (3dx) + u2 (3dx) + ...)
%
5x 5f
6x 6f
7x 7f
%
% -a +
b + 2c + 3d = 1
%
%
a +
b + 4c + 9d = 0
%
% -a +
b + 8c + 27d = 0
%
%
a +
b + 16c + 81d = 0
%
% Simultaneous solution for a, b, c, and d followed by the
solution of the preceding Taylor series, truncated after
Appendix C
495
the u
%
4x
% terms, for u1 gives the following five-point approximation
%
x
%
4
% u2 = (1/12dx)(-3u1 - 10u2 + 18u3 - 6u4 + u5) + O(dx )(2)
%
x
%
%
(3) Interior point i, i ne 2, n-1
%
%
2
3
% a(ui-2 = ui + ui (-2dx) + ui (-2dx) + ui (-2dx)
%
x
1f
2x
2f
3x
3f
%
%
4
5
6
%
+ ui (-2dx) + ui (-2dx) + ui (-2dx)+ ...)
%
4x
4f
5x
5f
6x
6f
%
%
2
3
% b(ui-1 = ui + ui ( -dx) + ui ( -dx) + ui ( -dx)
%
x
1f
2x
2f
3x
3f
%
%
4
5
6
%
+ ui ( -dx) + ui ( -dx) + ui ( -dx) + ...)
%
4x
4f
5x
5f
6x
6f
%
%
2
3
% c(ui+1 = ui + ui ( dx) + ui ( dx) + ui ( dx)
%
x
1f
2x
2f
3x
3f
%
%
4
5
6
%
+ ui ( dx) + ui ( dx) + ui ( dx) + ...)
%
4x
4f
5x
5f
6x
6f
%
%
2
3
% d(ui+2 = ui + ui ( 2dx) + ui ( 2dx) + ui ( 2dx)
%
x
1f
2x
2f
3x
3f
%
%
4
5
6
%
+ ui ( 2dx) + ui ( 2dx) + ui ( 2dx) + ...)
%
4x
4f
5x
5f
6x
6f
%
%
-2a b +
c + 2d = 1
%
%
4a +
b +
c + 4d = 0
%
%
-8a b +
c + 8d = 0
%
%
16a +
b +
c + 16d = 0
%
496
Appendix C
% Simultaneous solution for a, b, c, and d followed by the solu% tion of the preceding Taylor series, truncated after the u
%
4x
% terms, for u1 gives the following five-point approximation
%
x
%
4
% ui = (1/12dx)(ui-2 - 8ui-1 + 0ui + 8ui+1 - ui+2) + O(dx )(3)
%
x
%
%
(4) Interior point, i = n-1
%
%
2
3
% a(un-4 = un-1 + un-1 (-3dx) + un-1 (-3dx) + un-1 (-3dx)
%
x
1f
2x
2f
3x
3f
%
%
4
5
6
%
+ un-1 (-3dx) + un-1 (-3dx) + un-1 (-3dx) + ...
%
4x
4f
5x
5f
6x
6f
%
%
2
3
% b(un-3 = un-1 + un-1 (-2dx) + un-1 (-2dx) + un-1 (-2dx)
%
x
1f
2x
2f
3x
3f
%
%
4
5
6
%
+ un-1 (-2dx) + un-1 (-2dx) + un-1 (-2dx) + ...
%
4x
4f
5x
5f
6x
6f
%
%
2
3
% c(un-2 = un-1 + un-1 ( -dx) + un-1 (- -x) + un-1 (-dx)
%
x
1f
2x
2f
3x
3f
%
%
4
5
6
%
+ un-1 ( -dx) + un-1 ( -dx) + un-1 ( -dx) + ...
%
4x
4f
5x
5f
6x
6f
%
%
2
3
% d(un
= un-1 + un-1 ( dx) + un-1 ( dx) + un-1 ( dx)
%
x
1f
2x
2f
3x
3f
%
%
4
5
6
%
+ un-1 ( dx) + un-1 ( dx) + un-1 ( dx) + ...
%
4x
4f
5x
5f
6x
6f
%
% -3a - 2b c +
d = 1
%
%
9a + 4b +
c +
d = 0
%
% -27a - 8b c +
d = 0
%
% 81a + 16b +
c +
d = 0
%
Appendix C
497
% Simultaneous solution for a, b, c, and d followed by the solu% tion of the preceding Taylor series, truncated after the u
%
4x
% terms, for u1 gives the following five-point
approximation
%
x
%
4
% u
n-1 = (1/12dx)(-un-4 + 6un-3 - 18un-2 + 10un-1 + 3un) +
O(dx )
%
x
%
(4)
%
%
(5) Right end, point i = n
%
%
2
3
% a(un-4 = un + un (-4dx) + un (-4dx) + un (-4dx)
%
x
1f
2x
2f
3x
3f
%
%
4
5
6
%
+ un (-4dx) + un (-4dx) + un (-4dx) + ...)
%
4x
4f
5x
5f
6x
6f
%
%
2
3
% b(un-3 = un + un (-3dx) + un (-3dx) + un (-3dx)
%
x
1f
2x
2f
3x
3f
%
%
4
5
6
%
+ un (-3dx) + un (-3dx) + un (-3dx) + ...)
%
4x
4f
5x
5f
6x
6f
%
%
2
3
% c(un-2 = un + un (-2dx) + un (-2dx) + un (-2dx)
%
x
1f
2x
2f
3x
3f
%
%
4
5
6
%
+ un (-2dx) + un (-2dx) + un (-2dx) + ...)
%
4x
4f
5x
5f
6x
6f
%
%
2
3
% d(un-1 = un + un ( -dx) + un ( -dx) + un ( -dx)
%
x
1f
2x
2f
3x
3f
%
%
4
5
6
%
+ un ( -dx) + un ( -dx) + un ( -dx) + ...)
%
4x
4f
5x
5f
6x
6f
%
%
-4a - 3b - 2c d = 1
%
%
16a + 9b + 4c +
d = 0
%
% -64a - 27b - 8c d = 0
498
Appendix C
%
% 256a + 81b + 16c +
d = 0
%
% Simultaneous solution for a, b, c, and d followed by the solu% tion of the preceding Taylor series, truncated after the u
%
4x
% terms, for u1 gives the following five-point approximation
%
x
%
4
% un = (1/12dx)(3un-4 - 16un-3 + 36un-2 - 48un-1 + 25un) +
O(dx )
%
x
%
(5)
%
% The weighting coefficients for equations (1) to (5) can be
% summarized as
%
%
-25
48 -36
16
-3
%
%
-3 -10
18
-6
1
%
%
1/12
1
-8
0
8
-1
%
%
-1
6 -18
10
3
%
%
3 -16
36 -48
25
%
% which are the coefficients reported by Bickley for
n = 4,m =
% 1, p = 0, 1, 2, 3, 4 (Bickley, W. G., Formulae for
Numerical
% Differentiation, Math. Gaz., vol. 25, 1941. Note - the
Bickley
% coefficients have been divided by a common factor of two).
%
% Equations (1) to (5) can now be programmed to generate
the
% derivative u (x) of function u(x).
%
x
%
% Compute the spatial increment
dx=(xu-xl)/(n-1);
r4fdx=1./(12.*dx);
nm2=n-2;
%
% Equation (1) (note - the rhs of equations (1), (2), (3),(4)
% and (5) have been formatted so that the numerical
weighting
% coefficients can be more easily associated with the
Bickley
% matrix above)
499
Appendix C
ux( 1)=r4fdx*...
(
-25.*u( 1) +48.*u( 2)
-3.*u( 5));
%
% Equation (2)
ux( 2)=r4fdx*...
( -3.*u( 1) -10.*u( 2)
+1.*u( 5));
%
% Equation (3)
for i=3:nm2
ux( i)=r4fdx*...
(
+1.*u(i-2) -8.*u(i-1)
-1.*u(i+2));
end
%
% Equation (4)
ux(n-1)=r4fdx*...
( -1.*u(n-4) +6.*u(n-3)
+3.*u( n));
%
% Equation (5)
ux( n)=r4fdx*...
(
3.*u(n-4) -16.*u(n-3)
+25.*u( n));
-36.*u(
3) +16.*u(
4)
+18.*u(
3)
4)
+0.*u(
i)
-6.*u(
+8.*u(i+1)
-18.*u(n-2) +10.*u(n-1)
+36.*u(n-2) -48.*u(n-1)
This file is called in the main program as ndss==44 for use with ode15s.
%
%
File: ds044.m
function [uxx]=dss044(xl,xu,n,u,ux,nl,nu)
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
Function dss044 computes a fourth-order approximation of a
second-order derivative, with or without the normal
derivative
at the boundary.
Argument list
xl
L
eft value of the spatial independent variable
(input)
xu
R
ight value of the spatial independent variable
(input)
n
Number of spatial grid points, including the end
points (input)
u
O
ne-dimensional array of the dependent variable
to be
differentiated (input)
500
%
%
Appendix C
ux
O
ne-dimensional array of the first derivative
of u.
%
The end values of ux, ux(1), and ux(n), are used
in
%
N
eumann boundary conditions at x = xl and x =
xu,
%
depending on the arguments nl and nu (see the de%
scription of nl and nu below)
%
%
uxx
O
ne-dimensional array of the second derivative
of u
%
(output)
%
%
nl
I
nteger index for the type of boundary condition
at
%
x = xl (input). The allowable values are
%
%
1 - Dirichlet boundary condition at x = xl
%
(ux(1) is not used)
%
%
2 - Neumann boundary condition at x = xl
%
(ux(1) is used)
%
%
nu
I
nteger index for the type of boundary condition
at
%
x = xu (input). The allowable values are
%
%
1 - Dirichlet boundary condition at x = xu
%
(ux(n) is not used)
%
%
2 - Neumann boundary condition at x = xu
%
(ux(n) is used)
%
% The following derivation was completed by W. E. Schiesser,
Depts
% of CHE and Math, Lehigh University, Bethlehem, PA 18015,
USA, on
% December 15, 1986. Additional details are given in function
% dss042.
%
% ***********************************************************
%
% (1) uxx at the interior points 3, 4,..., n-2
%
% To develop a set of fourth-order correct differentiation
formulas
% for the second derivative uxx, we consider first the
interior
% grid points at which a symmetric formula can be used.
%
501
Appendix C
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
If we consider a formula of the form
a*u(i-2) + b*u(i-1) + e*u(i) + c*u(i+1) + d*u(i+2)
T
aylor series expansions of u(i-2), u(i-1), u(i+1), and
u(i+2)
can be substituted into this formula. We then consider the
l
inear albegraic equations relating a, b, c, and d which
will
retain certain terms, i.e., uxx, and drop others, e.g.,
uxxx,
uxxxx and uxxxxx.
Thus, for grid points 3, 4,..., n-2
To retain uxx
4*a + b + c +
4*d = 2
(1)
8*d = 0
(2)
16*a + b + c + 16*d = 0
(3)
To drop uxxx
-8*a - b + c +
To drop uxxxx
To drop uxxxxx
-32*a - b + c + 32*d = 0
(4)
E
quations (1) to (4) can be solved for a, b, c, and d.
If equation (1) is added to equation (2)
-4*a + 2*c + 12*d = 2
(5)
If equation (1) is subtracted from equation (3)
12*a + 12*d = -2
(6)
If equation (1) is added to equation (4)
-28*a + 2*c + 36*d = 2
E
quations (5) to (7) can be solved for a, c, and d.
equation
(5) is subtracted from equation (7), and the result
combined
with equation (6)
12*a + 12*d = -2
(7)
If
(6)
502
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
Appendix C
-24*a + 24*d = 0
(8)
Equations (6) and (8) can be solved for a and d. From (8), a
= d. From equation (6), a = -1/12 and d = -1/12. Then,
from
equation (5), c = 4/3, and from equation (1), b = 4/3.
The final differentiation formula is then obtained as
(-1/12)*u(i-2) +
(4/3)*u(i-1) +
(4/3)*u(i+1) + (-1/12)*u(i+2)
(
-1/12 + 4/3 - 1/12 + 4/3)*u(i) + uxx(i)*(dx**2) +
O(dx**6)
or
uxx(i) = (1/(12*dx**2))*(-1*u(i-2) + 16*u(i-1)
- 30*u(i) + 16*u(i+1) -
1*u(i+2)
(9)
+ O(dx**4)
Note that the ux term drops out, i.e., the basic equation is
-2*a - b + c + 2*d =
-2*(-1/12) - (4/3) + (4/3) + 2*(-1/12) = 0
quation (9) was obtained by dropping all terms in the
E
underlying
Taylor series up to and including the fifth derivative,
uxxxxx.
Thus, equation (9) is exact for polynomials up to and
including
fifth order. This can be checked by substituting the
functions
1, x, x**2, x**3, x**4 and x**5 in equation (9) and
computing the
corresponding derivatives for comparison with the known
second
derivatives. This is done for 1 merely by summing the
weighting
coefficients in equation (9), which should sum to
zero, i.e.,
-1 + 16 - 30 + 16 -1 = 0.
or the remaining functions, the algebra is rather
F
involved, but
Appendix C
%
503
t
hese functions can be checked numerically, i.e., numerical
values
% o
f x**2, x**3, x**4, and x**5 can be substituted in
equation (9)
% and the computed derivatives can be compared with the know
numeri% c
al second derivatives. This is not a proof of
correctness of
% e
quation (9), but would likely detect any errors in
equation (9).
%
% ***********************************************************
*******
%
% (2) uxx at the interior points i = 2 and n-1
%
% For grid point 2, we consider a formula of the form
%
%
a*u(i-1) + f*u(i) + b*u(i+1) + c*u(i+2) + d*u(i+3) +
e*u(i+4)
%
% T
aylor series expansions of u(i-1), u(i+1), u(i+2), u(i+3),
and
% u
(i+4) when substituted into this formula give linear
algebraic
% equations relating a, b, c, d, and e.
%
%
To drop ux
%
%
-a + b + 2*c + 3*d + 4*e = 0
(10)
%
%
To retain uxx
%
%
a + b + 4*c + 9*d + 16*e = 2
(11)
%
%
To drop uxxx
%
%
-a + b + 8*c + 27*d + 64*e = 0
(12)
%
%
To drop uxxxx
%
%
a + b + 16*c + 81*d + 256*e = 0
(13)
%
%
To drop uxxxxx
%
%
-a + b + 32*c + 243*d + 1024*e = 0
(14)
%
% E
quations (11), (12), (13), and (14) can be solved for a,
b, c, d, and e. If equation (10) is added to equation (11)
%
%
2*b + 6*c + 12*d +20*e = 2
(15)
504
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
Appendix C
If equation (10) is subtracted from equation (12)
6*c + 24*d + 60*e = 0
(16)
If equation (10) is added to equation (13)
2*b + 18*c + 84*d + 260*e = 0
(17)
If equation (10) is subtracted from equation (14)
30*c + 240*d + 1020*e = 0
(18)
Equations (15), (16), (17), and (18) can be solved for b, c, d
and e.
6*c + 24*d + 60*e = 0
(16)
If equation (15) is subtracted from equation (17)
12*c + 72*d + 240*e = -2
(19)
30*c + 240*d + 1020*e = 0
(18)
quations (16), (18), and (19) can be solved for c, d, and
E
e. If
two times equation (16) is subtracted from equation (19),
%
%
%
24*d + 120*e = -2
(20)
%
% If five times equation (16) is subtracted from
equation (18),
%
%
120*d + 720*e = 0
(21)
%
% Equations (20) and (21) can be solved for d and e.
From (21),
% e = (-1/6)*d. Substitution in equation (20) gives d = -1/2.
% thus, e = 1/12. From equation (16), c = 7/6. From
equation
% (15), b = -1/3. From equation (10), a = 5/6.
%
% The final differentiation formula is then obtained as
%
% (5/6)*u(i-1) + (-1/3)*u(i+1) + (7/6)*u(i+2) + (-1/2)*u(i+3)
%
% + (1/12)*u(i+4) = (5/6 - 1/3 + 7/6 - 1/2 + 1/12)*u(i)
%
% + uxx*(dx**2) + O(dx**6)
%
% or
Appendix C
505
%
% uxx(i) = (1/12*dx**2)*(10*u(i-1) - 15*u(i) - 4*u(i+1)
%
(22)
%
+ 14*u(i+2) - 6*u(i+3) + 1*u(i+4)) + O(dx**4)
%
% Equation (22) will be applied at i = 2 and n-1. thus
%
% uxx(2) = (1/12*dx**2)*(10*u(1) - 15*u(2) - 4*u(3)
%
(23)
%
+ 14*u(4) - 6*u(5) + 1*u(6)) + O(dx**4)
%
% uxx(n-1) = (1/12*dx**2)*(10*u(n) - 15*u(n-1) - 4*u(n-2)
%
(24)
%
+ 14*u(n-3) - 6*u(n-4) + 1*u(n-5)) + O(dx**4)
%
% ***********************************************************
*******
%
% (3) uxx at the boundary points 1 and n
%
% Finally, for grid point 1, an approximation with a
Neumann boundary condition of the form
%
%
a*u(i+1) + b*u(i+2) + c*u(i+3) + d*u(i+4) + e*ux(i) +
f*u(i)
%
% Will be used. the corresponding algebraic equations are
%
%
To drop ux
%
%
a + 2*b + 3*c + 4*d + e = 0
(25)
%
%
To retain uxx
%
%
a + 4*b + 9*c + 16*d = 2
(26)
%
%
To drop uxxx
%
%
a + 8*b + 27*c + 64*d = 0
(27)
%
%
To drop uxxxx
%
%
a + 16*b + 81*c + 256*d = 0
(28)
%
%
To drop uxxxxx
%
%
a + 32*b + 243*c + 1024*d = 0
(29)
%
% Equations (25) to (29) can be solved for a, b, c, d,
and e. If
%
506
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
Appendix C
Equation (26) is subtracted from Equations (27), (28), and (29),
4*b + 18*c + 48*d = -2
(30)
12*b + 72*c + 240*d = -2
(31)
28*b + 234*c + 1008*d = -2
(32)
Equations (30), (31), and (32) can be solved for b, c, and d
18*c + 96*d = 4
(33)
108*c + 672*d = 12
(34)
Equations (3) and (34) can be solved for c and d, c = 8/9, d =
-1/8.
From equation (30), b = -3.
a = 8. From
equation (25), e = -25/6.
From equation (26),
%
%
% The final differentiation formula is then obtained as
%
% 8*u(i+1) - 3*u(i+2) + (8/9)*u(i+3) - (1/8)*u(i+4)
%
% - (25/6)*ux(i)*dx
%
% = (8 - 3 + (8/9) - (1/8))*u(i) + uxx*(dx**2) + O(dx**6)
%
% or
%
% uxx(i) = (1/12*dx**2)*((-415/6)*u(i) + 96*u(i+1) - 36*u(i+2)
%
(35)
% + (32/3)*u(i+3) - (3/2)*u(i+4) - 50*ux(i)*dx) + O(dx**4)
%
% Equation (35) will be applied at i = 1 and i = n
%
% uxx(1) = (1/12*dx**2)*((-415/6)*u(1) + 96*u(2) - 36*u(3)
%
(36)
% + (32/3)*u(4) - (3/2)*u(5) - 50*ux(1)*dx) + O(dx**4)
%
% uxx(n) = (1/12*dx**2)*((-415/6)*u(n) + 96*u(n-1)
- 36*u(n-2)
%
(37)
% + (32/3)*u(n-3) - (3/2)*u(n-4) + 50*ux(n)*dx) + O(dx**4)
%
% Alternatively, for grid point 1, an approximation with a
Dirichlet
% boundary condition of the form
%
Appendix C
507
% a*u(i+1) + b*u(i+2) + c*u(i+3) + d*u(i+4) + e*u(i+5) +
f*u(i)
%
% can be used. The corresponding algebraic equations are
%
%
To drop ux
%
%
a + 2*b + 3*c + 4*d + 5*e = 0
(38)
%
%
To retain uxx
%
%
a + 4*b + 9*c + 16*d + 25*e = 2
(39)
%
%
To drop uxxx
%
%
a + 8*b + 27*c + 64*d + 125*e = 0
(40)
%
%
To drop uxxxx
%
%
a + 16*b + 81*c + 256*d + 625*e = 0
(41)
%
%
To drop uxxxxx
%
%
a + 32*b + 243*c + 1024*d + 3125*e = 0
(42)
%
% E
quations (38), (39), (40), (41), and (42) can be solved
for a, b, c, d, and e.
%
%
2*b + 6*c + 12*d + 20*e = 2
(43)
%
%
6*b + 24*c + 60*d + 120*e = 0
(44)
%
%
14*b + 78*c + 252*d + 620*e = 0
(45)
%
%
30*b + 240*c + 1020*d + 3120*e = 0
(46)
%
% E
quations (43), (44), (45), and (46) can be solved for b,
c, d and e
%
%
6*c + 24*d + 60*e = -6
(47)
%
%
36*c + 168*d + 480*e = -14
(48)
%
%
150*c + 840*d + 2820*e = -30
(49)
%
% ­
Equations (47), (48), and (49) can be solved for c, d,
and e
%
%
24*d + 120*e = 22
(50)
%
%
240*d + 1320*e = 120
(51)
508
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
Appendix C
rom equations (50) and (51), d = 61/12, e = -5/6. From
F
equation
(47), c = -13. From equation (43), b = 107/6. From
equation (38),
a = -77/6.
The final differentiation formula is then obtained as
-77/6)*u(i+1) + (107/6)*u(i+2) - 13*u(i+3) +
(
(61/12)*u(i+4)
- (5/6)*u(i+5) = (-77/6 + 107/6 - 13 +
61/12 - 5/6)*u(i) +
uxx(i)*(dx**2) + O(dx**6)
or
uxx(i) = (1/12*dx**2)*(45*u(i) - 154*u(i+1) + 214*u(i+2)
(52)
- 156*u(i+3) + 61*u(i+4) - 10*u(i+5)) + O(dx**4)
Equation (52) will be applied at i = 1 and i = n
uxx(1) = (1/12*dx**2)*(45*u(1) - 154*u(2) + 214*u(3)
(53)
- 156*u(4) + 61*u(5) - 10*u(6)) + O(dx**4)
uxx(n) = (1/12*dx**2)*(45*u(n) - 154*u(n-1) + 214*u(n-2)
(54)
-156*u(n-3) + 61*u(n-4) - 10*u(n-5)) + O(dx**4)
***********************************************************
Grid spacing
dx=(xu-xl)/(n-1);
1/(12*dx**2) for subsequent use
r12dxs=1./(12.0*dx^2);
uxx at the left boundary
Without ux (equation (53))
if nl==1
uxx(1)=r12dxs*...
(
45.0*u(1)...
-154.0*u(2)...
+214.0*u(3)...
-156.0*u(4)...
509
Appendix C
+61.0*u(5)...
-10.0*u(6));
%
%
%
%
%
%
%
%
%
%
%
%
%
%
With ux (equation (36))
elseif nl==2
uxx(1)=r12dxs*...
(-415.0/6.0*u(1)...
+96.0*u(2)...
-36.0*u(3)...
+32.0/3.0*u(4)...
-3.0/2.0*u(5)...
-50.0*ux(1)*dx);
end
uxx at the right boundary
Without ux (equation (54))
if nu==1
uxx(n)=r12dxs*...
(
45.0*u(n )...
-154.0*u(n-1)...
+214.0*u(n-2)...
-156.0*u(n-3)...
+61.0*u(n-4)...
-10.0*u(n-5));
With ux (equation (37))
elseif nu==2
uxx(n)=r12dxs*...
(-415.0/6.0*u(n )...
+96.0*u(n-1)...
-36.0*u(n-2)...
+32.0/3.0*u(n-3)...
-3.0/2.0*u(n-4)...
+50.0*ux(n )*dx);
end
uxx at the interior grid points
i = 2 (equation (23))
uxx(2)=r12dxs*...
(
10.0*u(1)...
-15.0*u(2)...
-4.0*u(3)...
+14.0*u(4)...
-6.0*u(5)...
+1.0*u(6));
i = n-1 (equation (24))
uxx(n-1)=r12dxs*...
510
Appendix C
(
%
%
10.0*u(n )...
-15.0*u(n-1)...
-4.0*u(n-2)...
+14.0*u(n-3)...
-6.0*u(n-4)...
+1.0*u(n-5));
i = 3, 4,..., n-2 (equation (9))
for i=3:n-2
uxx(i)=r12dxs*...
(
-1.0*u(i-2)...
+16.0*u(i-1)...
-30.0*u(i )...
+16.0*u(i+1)...
-1.0*u(i+2));
end
Appendix D: Programmed
Model of a Drug
Delivery System
EXAMPLE 9.11
This example shows the drug delivery system as modeled by Equations 9.120 through 9.127.
The following is a translation between the variables used in Example 9.9 and Figure D.1:
C1 ≡ u1,C 2 = u2, k1 = ku1,k2 = ku2, C1e = u1e ,C 2e = u2e ,R = r0
D1 = Du1 and D2 = Du2.
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
Dynamic analysis of drug delivery
The following equations model a polymer matrix in cylindrical
coordinates
u1 material balance
u1t = Du1*(u1rr + (1/r)u1r)
(1)
u2 material balance
u2t = Du2*(u2rr + (1/r)*u2r)
(2)
he variables and parameters for this model are (in cgs
T
units)
Water concentration
u1
(eq. (1))
Drug concentration
u2
(eq. (2))
Time
t
Radial position
r
Axial position
z
511
512
Appendix D
Du1
∂u1(r = z0, z, t)
∂r
= ku1(u1e – u1(r = r0, z, t))
Du1
∂u1(r, z = zL, t)
∂z
= ku1(u1e – u1(r, z = zL, t))
u1(r, z, t)
u2(r, z, t)
r0
r
z
∂u1(r, z = zL/2, t)
=0
∂z
∂u1(r = 0, z/t)
∂r
=0
zL
FIGURE D.1
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
Model of a drug delivery system
Polymer matrix radius
r0
1
Polymer matrix length
zL
2
Initial u1
u10
0.5
Initial u2
u20
1
External u1
u1e
1
External u2
u2e
0
u1 diffusivity
Du1
1.0e-06
u2 diffusivity
Du2
1.0e-06
u1 mass transfer coefficient
ku1
0.1
u2 mass transfer coefficient
ku2
0.1
The solution to this system, u1(r,z,t) (from eq. (1))
and u2(r,z,t) (from eq. (2)) is computed by ode15s for
the integration in t.
Clear previous files
clear all
clc
%
% Global area
%
% Global area
513
Appendix D
global
nr
r
u1
ncall
nz
r0
u2
dr
z
u1e
dz
zL
u2e
drs
Du1
ku1
dzs...
Du2...
ku2...
%
% Model parameters
u10=0.5; u20=1;
u1e=1; u2e=0;
r0=1; zL=2;
Du1=1.0e-06; Du2=1.0e-06;
ku1=1.0e-01; ku2=1.0e-01;
%
% Grid in axial direction
nz=11;
dz=zL/(2*(nz-1));
for i=1:nz
z(i)=zL/2+(i-1)*dz;
end
dzs=dz^2;
%
% Grid in radial direction
nr=11;
dr=r0/(nr-1);
for j=1:nr
r(j)=(j-1)*dr;
end
drs=dr^2;
%
% Independent variable for ODE integration
tf=2*3600*24;
tout=[0.0:2*900*24:tf]';
nout=5;
ncall=0;
%
% Initial condition
for i=1:nz
for j=1:nr
u1(i,j)=u10;
u2(i,j)=u20;
u0((i-1)*nr+j)=u1(i,j);
u0((i-1)*nr+j+nz*nr)=u2(i,j);
end
end
%
% ODE integration
reltol=1.0e-04; abstol=1.0e-04;
options=odeset('RelTol',reltol,'AbsTol',abstol);
mf=1;
if(mf==1)[t,u]=ode15s(@pde_1,tout,u0,options);end
if(mf==2)[t,u]=ode15s(@pde_2,tout,u0,options);end
if(mf==3)[t,u]=ode15s(@pde_3,tout,u0,options);end
514
Appendix D
if(mf==4)[t,u]=ode15s(@pde_4,tout,u0,options);end
%
% 1D to 2D matrices
for it=1:nout
for i=1:nz
for j=1:nr
u1(it,i,j)=u(it,(i-1)*nr+j);
u2(it,i,j)=u(it,(i-1)*nr+j+nz*nr);
end
end
end
%
% Display a heading and radial profiles
%
% z=zL/2
fprintf('\n nr = %2d
nz = %2d\n',nr,nz);
for it=1:nout
fprintf('\n t = %4.1f
z = %3.1f\n',t(it)/3600,z(1));
for j=1:nr
fprintf(...
' r = %4.2f
u1(r,z,t) = %6.3f
u2(r,z,t) =
%6.3f\n',...
r(j),u1(it,1,j),u2(it,1,j));
end
fprintf('\n ku2*(u2(r=r0,z=zL/2,t)-u2e) = %8.3e\n\n',...
3600*ku2*(u2(it,1,nr)-u2e));
end
fprintf('\n ncall = %5d\n',ncall);
%
% Parametric plots, radial profiles, z=zL/2
%
% 2D plots
figure(1);
subplot(2,2,1)
for j=1:nr u1plot(j)=u1(2,1,j); u2plot(j)=u2(2,1,j); end
plot(r,u1plot,'-o',r,u2plot,'-x'); axis([0 r0 0 1]);
title('u1,u2(r,z=zL/2,t=12hr),o-u1,x-u2');
xlabel('r'); ylabel('u1,u2(r,z=zL/2,t=12hr)')
subplot(2,2,2)
for j=1:nr u1plot(j)=u1(3,1,j); u2plot(j)=u2(3,1,j); end
plot(r,u1plot,'-o',r,u2plot,'-x'); axis([0 r0 0 1]);
title('u1,u2(r,z=zL/2,t=24hr),o-u1,x-u2');
xlabel('r'); ylabel('u1,u2(r,z=zL/2,t=24hr)')
subplot(2,2,3)
for j=1:nr u1plot(j)=u1(4,1,j); u2plot(j)=u2(4,1,j); end
plot(r,u1plot,'-o',r,u2plot,'-x'); axis([0 r0 0 1]);
title('u1,u2(r,z=zL/2,t=36hr),o-u1,x-u2');
xlabel('r'); ylabel('u1,u2(r,z=zL/2,t=36hr)')
subplot(2,2,4)
for j=1:nr u1plot(j)=u1(5,1,j); u2plot(j)=u2(5,1,j); end
plot(r,u1plot,'-o',r,u2plot,'-x'); axis([0 r0 0 1]);
Appendix D
title('u1,u2(r,z=zL/2,t=48hr),o-u1,x-u2');
xlabel('r'); ylabel('u1,u2(r,z=zL/2,t=48hr)')
%
% 3D plots
for it=1:nout
for j=1:nr u1surf(it,j)=u1(it,1,j); end
for j=1:nr u2surf(it,j)=u2(it,1,j); end
end
figure(2)
surf(r,t/(3600*24),u1surf);
xlabel('r (cm)'); ylabel('t (day)'); zlabel('u1(r,z=zL/2,
t)');
figure(3)
surf(r,t/(3600*24),u2surf);
view(-20,60)
xlabel('r (cm)'); ylabel('t (day)'); zlabel('u2(r,z=zL/2,
t)');
The following program is called by the main program listed above.
function ut=pde_1(t,u)
%
% Global area
global
nr
nz
dr
dz
drs
dzs...
r
r0
z
zL
Du1
Du2...
u1
u2
u1e
u2e
ku1
ku2...
ncall
%
% 1D to 2D matrices
for i=1:nz
for j=1:nr
ij=(i-1)*nr+j;
u1(i,j)=u(ij);
u2(i,j)=u(ij+nr*nz);
end
end
%
% Step through the grid points in r and z
for i=1:nz
for j=1:nr
%
%
(1/r)*u1r, (1/r)*u2r
if(j==1)
u1r(i,j)=2*(u1(i,j+1)-u1(i,j))/drs;
u2r(i,j)=2*(u2(i,j+1)-u2(i,j))/drs;
elseif(j==nr)
u1r(i,j)=(1/r(j))*(ku1/Du1)*(u1e-u1(i,j));
u2r(i,j)=(1/r(j))*(ku2/Du2)*(u2e-u2(i,j));
else
u1r(i,j)=(1/r(j))*(u1(i,j+1)-u1(i,j-1))/(2*dr);
u2r(i,j)=(1/r(j))*(u2(i,j+1)-u2(i,j-1))/(2*dr);
end
515
516
%
%
Appendix D
u1rr, u2rr
if(j==1)
u1rr(i,j)=2*(u1(i,j+1)-u1(i,j))/drs;
u2rr(i,j)=2*(u2(i,j+1)-u2(i,j))/drs;
elseif(j==nr)
u1f=u1(i,j-1)+2*dr*ku1/Du1*(u1e-u1(i,j));
u1rr(i,j)=(u1f-2*u1(i,j)+u1(i,j-1))/drs;
u2f=u2(i,j-1)+2*dr*ku2/Du2*(u2e-u2(i,j));
u2rr(i,j)=(u2f-2*u2(i,j)+u2(i,j-1))/drs;
else
u1rr(i,j)=(u1(i,j+1)-2*u1(i,j)+u1(i,j-1))/drs;
u2rr(i,j)=(u2(i,j+1)-2*u2(i,j)+u2(i,j-1))/drs;
end
%
%
u1zz, u2zz
if(i==1)
u1zz(i,j)=2*(u1(i+1,j)-u1(i,j))/dzs;
u2zz(i,j)=2*(u2(i+1,j)-u2(i,j))/dzs;
elseif(i==nz)
u1f=u1(i-1,j)+2*dz*ku1/Du1*(u1e-u1(i,j));
u1zz(i,j)=(u1f-2*u1(i,j)+u1(i-1,j))/dzs;
u2f=u2(i-1,j)+2*dz*ku2/Du2*(u2e-u2(i,j));
u2zz(i,j)=(u2f-2*u2(i,j)+u2(i-1,j))/dzs;
else
u1zz(i,j)=(u1(i+1,j)-2*u1(i,j)+u1(i-1,j))/dzs;
u2zz(i,j)=(u2(i+1,j)-2*u2(i,j)+u2(i-1,j))/dzs;
end
%
%
PDEs
u1t(i,j)=Du1*(u1rr(i,j)+u1r(i,j)+u1zz(i,j));
u2t(i,j)=Du2*(u2rr(i,j)+u2r(i,j)+u2zz(i,j));
end
end
%
% 2D to 1D matrices
for i=1:nz
for j=1:nr
ij=(i-1)*nr+j;
ut(ij)=u1t(i,j);
ut(ij+nr*nz)=u2t(i,j);
end
end
%
% Transpose and count
ut=ut';
ncall=ncall+1;
Appendix D
517
AN ALTERNATIVE PROGRAMMING APPROACH
In this alternative approach library routines are employed to implicitly generate
the finite differences as opposed to the explicit spatial derivatives generated in the
approach used above.
function ut=pde_2(t,u)
%
% Global area
global
nr
nz
dr
dz
drs
dzs...
r
r0
z
zL
Du1
Du2...
u1
u2
u1e
u2e
ku1
ku2...
ncall
%
% 1D to 2D matrices
for i=1:nz
for j=1:nr
ij=(i-1)*nr+j;
u1(i,j)=u(ij);
u2(i,j)=u(ij+nr*nz);
end
end
%
% Step through the grid points in r
for i=1:nz
u1_1d=u1(i,:);
u2_1d=u2(i,:);
%
%
u1r, u2r
u1r_1d=dss004(0,r0,nr,u1_1d);
u1r(i,:)=u1r_1d;
u1r(i,1)= 0.0;
u1r(i,nr)=(ku1/Du1)*(u1e-u1(i,nr));
u2r_1d=dss004(0,r0,nr,u2_1d);
u2r(i,:)=u2r_1d;
u2r(i,1)= 0;
u2r(i,nr)=(ku2/Du2)*(u2e-u2(i,nr));
%
%
u1rr, u2rr
u1r_1d( 1)=0;
u1r_1d(nr)=(ku1/Du1)*(u1e-u1_1d(nr));
nl=2; nu=2;
u1rr_1d=dss044(0,r0,nr,u1_1d,u1r_1d,nl,nu);
u1rr(i,:)=u1rr_1d;
u2r_1d( 1)=0;
u2r_1d(nr)=(ku2/Du2)*(u2e-u2_1d(nr));
nl=2; nu=2;
u2rr_1d=dss044(0,r0,nr,u2_1d,u2r_1d,nl,nu);
u2rr(i,:)=u2rr_1d;
%
%
(1/r)*u1r, (1/r)*u2r
518
Appendix D
for j=1:nr
if(j~=1)
u1r(i,j)=(1.0/r(j))*u1r(i,j);
u2r(i,j)=(1.0/r(j))*u2r(i,j);
elseif(j==1)
u1rr(i,j)=2.0*u1rr(i,j);
u2rr(i,j)=2.0*u2rr(i,j);
end
%
%
Next j
end
%
% Next i
end
%
% Step through the grid points in z
for j=1:nr
u1_1d=u1(:,j);
u2_1d=u2(:,j);
%
%
u1zz, u2zz
u1z_1d( 1)=0.0;
u1z_1d(nz)=(ku1/Du1)*(u1e-u1_1d(nz));
nl=2; nu=2;
u1zz_1d=dss044(zL/2,zL,nz,u1_1d,u1z_1d,nl,nu);
u1zz(:,j)=u1zz_1d;
u2z_1d( 1)=0.0;
u2z_1d(nz)=(ku2/Du2)*(u2e-u2_1d(nz));
nl=2; nu=2;
u2zz_1d=dss044(zL/2,zL,nz,u2_1d,u2z_1d,nl,nu);
u2zz(:,j)=u2zz_1d;
%
% Next j
end
%
% PDEs
for i=1:nz
for j=1:nr
u1t(i,j)=Du1*(u1rr(i,j)+u1r(i,j)+u1zz(i,j));
u2t(i,j)=Du2*(u2rr(i,j)+u2r(i,j)+u2zz(i,j));
end
end
%
% 2D to 1D matrices
for i=1:nz
for j=1:nr
ij=(i-1)*nr+j;
ut(ij)=u1t(i,j);
ut(ij+nr*nz)=u2t(i,j);
end
end
Appendix D
519
%
% Transpose and count
ut=ut';
ncall=ncall+1;
Supporting routines being called (www.cambridge.org/9781107022805): both
dss004 and dss044 are used to compute numerical derivatives of 1-dimension (1D)
arrays. However, in this problem u1, u 2 are 2-dimension (2D) arrays, which requires
a 2D to 1D mapping and the inverse in order to employ these library routines. This
is the essential difference between pde_1 and pde_2. More details on the process
used in dss004 and dss044 can be found in Partial Differential Equation Analysis in
Biomedical Engineering Case Studies with MATLAB® Shiesser, W. E. pp. 363–366.
%
%
File: dss004.m
function [ux]=dss004(xl,xu,n,u)
%
% Function dss004 computes the first derivative, u , of a
%
x
% v
ariable u over the spatial domain xl le x le xu from
classical
% five-point, fourth-order finite difference approximations
%
% Argument list
%
%
xl
Lower boundary value of x (input)
%
%
xu
Upper boundary value of x (input)
%
%
n
N
umber of grid points in the x domain
including the boundary points (input)
%
%
u
O
ne-dimensional array containing the values
of u at the n grid point points for which the
derivative is to be computed (input)
%
%
ux
One-dimensional array containing the numerical
%
v
alues of the derivatives of u at the n grid
points (output)
%
% The mathematical details of the following Taylor series (or
% polynomials) are given in routine dss002.
%
% Five-point formulas
%
%
(1) Left end, point i = 1
%
%
2
3
4
% a(u2 = u1 + u1 ( dx) + u1 ( dx) + u1 ( dx) + u1 ( dx)
%
x
1f
2x 2f
3x 3f
4x 4f
%
520
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
Appendix D
5
+ u1
( dx)
5x 5f
6
+ u1
( dx)
6x 6f
7
+ u1
( dx)
7x 7f
+ ...)
2
3
(2dx) + u1 (2dx) + u1 (2dx)
x
1f
2x 2f
3x 3f
b(u3 = u1 + u1
5
+ u1
(2dx)
5x 5f
6
+ u1
(2dx)
6x 6f
7
+ u1
(2dx)
7x 7f
+ ...)
2
3
(3dx) + u1 (3dx) + u1 (3dx)
x
1f
2x 2f
3x 3f
c(u4 = u1 + u1
5
+ u1
(3dx)
5x 5f
6
+ u1
(3dx)
6x 6f
(3dx)
7x 7f
+ ...)
2
3
(4dx) + u1 (4dx) + u1 (4dx)
x
1f
2x 2f
3x 3f
5
(4dx)
5x 5f
6
+ u1
(4dx)
6x 6f
4
(3dx)
4x 4f
+ u1
7
+ u1
d(u5 = u1 + u1
+ u1
4
(2dx)
4x 4f
+ u1
4
(4dx)
4x 4f
+ u1
7
+ u1
(4dx)
7x 7f
+ ...)
onstants a, b, c, and d are selected so that
C
the coefficients
of the u1 terms sum to one and the coefficients of the u1 ,
x
2x
u1
and u1
terms sum to zero
3x
4x
%
%
%
%
%
% a +
2b +
3c +
4d = 1
%
% a +
4b +
9c + 16d = 0
%
% a +
8b + 27c + 64d = 0
%
% a + 16b + 81c + 256d = 0
%
% Simultaneous solution for a, b, c, and d followed by the
solu% tion of the preceding Taylor series, truncated after the u
%
4x
% terms, for u1 gives the following five-point approximation
%
x
%
4
Appendix D
%
u
1 = (1/12dx)(-25u1 + 48u2 - 36u3 + 16u4 - 3u5) +
O(dx )
(1)
x
521
%
%
%
(2) Interior point, i = 2
%
%
2
3
4
% a(u1 = u2 + u2 (-dx) + u2 (-dx) + u2 (-dx) + u2 (-dx)
%
x
1f
2x 2f
3x 3f
4x 4f
%
%
5
6
7
%
+ u2 (-dx) + u2 (-dx) + u2 (-dx) + ...)
%
5x 5f
6x 6f
7x 7f
%
%
2
3
4
% b(u3 = u2 + u2 ( dx) + u2 ( dx) + u2 ( dx) + u2 ( dx)
%
x
1f
2x 2f
3x 3f
4x 4f
%
%
5
6
7
%
+ u2 ( dx) + u2 ( dx) + u2 ( dx) + ...)
%
5x 5f
6x 6f
7x 7f
%
%
2
3
4
% c(u4 = u2 + u2 (2dx) + u2 (2dx) + u2 (2dx) + u2 (2dx)
%
x
1f
2x 2f
3x 3f
4x 4f
%
%
5
6
7
%
+ u2 (2dx) + u2 (2dx) + u2 (2dx) + ...)
%
5x 5f
6x 6f
7x 7f
%
%
2
3
4
% d(u5 = u2 + u2 (3dx) + u2 (3dx) + u2 (3dx) + u2 (3dx)
%
x
1f
2x 2f
3x 3f
4x 4f
%
%
5
6
7
%
+ u2 (3dx) + u2 (3dx) + u2 (3dx) + ...)
%
5x 5f
6x 6f
7x 7f
%
% -a +
b + 2c + 3d = 1
%
%
a +
b + 4c + 9d = 0
%
% -a +
b + 8c + 27d = 0
%
%
a +
b + 16c + 81d = 0
%
% Simultaneous solution for a, b, c, and d followed by the solu% tion of the preceding Taylor series, truncated after the u
%
4x
% t
erms, for u1 gives the following five-point approximation
%
x
522
%
%
Appendix D
4
2 = (1/12dx)(-3u1 - 10u2 + 18u3 u
O(dx )
(2)
x
6u4 +
u5) +
%
%
%
(3) Interior point i, i ne 2, n-1
%
%
2
3
% a(ui-2 = ui + ui (-2dx) + ui (-2dx) + ui (-2dx)
%
x
1f
2x
2f
3x
3f
%
%
4
5
6
%
+ ui (-2dx) + ui (-2dx) + ui (-2dx) + ...)
%
4x
4f
5x
5f
6x
6f
%
%
2
3
% b(ui-1 = ui + ui ( -dx) + ui ( -dx) + ui ( -dx)
%
x
1f
2x
2f
3x
3f
%
%
4
5
6
%
+ ui ( -dx) + ui ( -dx) + ui ( -dx) + ...)
%
4x
4f
5x
5f
6x
6f
%
%
2
3
% c(ui+1 = ui + ui ( dx) + ui ( dx) + ui ( dx)
%
x
1f
2x
2f
3x
3f
%
%
4
5
6
%
+ ui ( dx) + ui ( dx) + ui ( dx) + ...)
%
4x
4f
5x
5f
6x
6f
%
%
2
3
% d(ui+2 = ui + ui ( 2dx) + ui ( 2dx) + ui ( 2dx)
%
x
1f
2x
2f
3x
3f
%
%
4
5
6
%
+ ui ( 2dx) + ui ( 2dx) + ui ( 2dx) + ...)
%
4x
4f
5x
5f
6x
6f
%
%
-2a b +
c + 2d = 1
%
%
4a +
b +
c + 4d = 0
%
%
-8a b +
c + 8d = 0
%
%
16a +
b +
c + 16d = 0
%
% Simultaneous solution for a, b, c, and d followed by the solu% tion of the preceding Taylor series, truncated after the u
%
4x
% terms, for u1 gives the following five-point approximation
523
Appendix D
%
%
%
%
%
%
%
%
%
x
4
u
i = (1/12dx)(ui-2 - 8ui-1 + 0ui + 8ui+1 - ui+2) +
O(dx )
(3)
x
(4)
Interior point, i = n-1
a
(un-4 = un-1 + un-1
un-1 (-3dx)
(-3dx)
+ un-1
2
(-3dx)
3
+
%
x
1f
2x
2f
3x
3f
%
%
4
5
6
%
+ un-1 (-3dx) + un-1 (-3dx) + un-1 (-3dx) + ...
%
4x
4f
5x
5f
6x
6f
%
%
2
3
% b(un-3 = un-1 + un-1 (-2dx) + un-1 (-2dx) + un-1 (-2dx)
%
x
1f
2x
2f
3x
3f
%
%
4
5
6
%
+ un-1 (-2dx) + un-1 (-2dx) + un-1 (-2dx) + ...
%
4x
4f
5x
5f
6x
6f
%
%
2
3
% c(un-2 = un-1 + un-1 ( -dx) + un-1 (- -x) + un-1 ( -dx)
%
x
1f
2x
2f
3x
3f
%
%
4
5
6
%
+ un-1 ( -dx) + un-1 ( -dx) + un-1 ( -dx) + ...
%
4x
4f
5x
5f
6x
6f
%
%
2
3
% d(un
= un-1 + un-1 ( dx) + un-1 ( dx) + un-1 ( dx)
%
x
1f
2x
2f
3x
3f
%
%
4
5
6
%
+ un-1 ( dx) + un-1 ( dx) + un-1 ( dx) + ...
%
4x
4f
5x
5f
6x
6f
%
% -3a - 2b c +
d = 1
%
%
9a + 4b +
c +
d = 0
%
% -27a - 8b c +
d = 0
%
% 81a + 16b +
c +
d = 0
%
% Simultaneous solution for a, b, c, and d followed by the solu% tion of the preceding Taylor series, truncated after the u
524
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
Appendix D
4x
erms, for u1 gives the following five-point
t
approximation
x
4
n-1 = (1/12dx)(-un-4 + 6un-3 - 18un-2 + 10un-1 + 3un) +
u
O(dx )
x
(4)
(5)
Right end, point i = n
2
a(un-4 = un + un (-4dx)
x
1f
+ un
(-4dx)
2x
2f
(-4dx)
3x
3f
4
+ un
3
+ un
5
(-4dx)
4x
4f
+ un
(-4dx)
5x
5f
b(un-3 = un + un (-3dx)
x
1f
+ un
6
+ un
(-4dx)
6x
6f
2
+ ...)
(-3dx)
2x
2f
(-3dx)
3x
3f
4
+ un
3
+ un
5
(-3dx)
4x
4f
+ un
(-3dx)
5x
5f
c(un-2 = un + un (-2dx)
x
1f
+ un
6
+ un
(-3dx)
6x
6f
2
+ ...)
(-2dx)
2x
2f
(-2dx)
3x
3f
4
+ un
3
+ un
5
(-2dx)
4x
4f
+ un
(-2dx)
5x
5f
d(un-1 = un + un ( -dx)
x
1f
+ un
6
+ un
(-2dx)
6x
6f
2
+ ...)
( -dx)
2x
2f
( -dx)
3x
3f
4
+ un
( -dx)
4x
4f
3
+ un
5
+ un
-4a -
3b -
2c -
d = 1
16a +
9b +
4c +
d = 0
-64a - 27b -
8c -
d = 0
256a + 81b + 16c +
d = 0
( -dx)
5x
5f
6
+ un
( -dx)
6x
6f
+ ...)
Appendix D
525
%
% Simultaneous solution for a, b, c, and d followed by the solu% tion of the preceding Taylor series, truncated after the u
%
4x
% terms, for u1 gives the following five-point approximation
%
x
%
4
% u
n = (1/12dx)(3un-4 - 16un-3 + 36un-2 - 48un-1 + 25un) +
O(dx )
%
x
%
(5)
%
% The weighting coefficients for equations (1) to (5) can be
% summarized as
%
%
-25
48 -36
16
-3
%
%
-3 -10
18
-6
1
%
%
1/12
1
-8
0
8
-1
%
%
-1
6 -18
10
3
%
%
3 -16
36 -48
25
%
% which are the coefficients reported by Bickley for
n = 4, m = 1,
% p
= 0, 1, 2, 3, 4 (Bickley, W. G., Formulae for Numerical
% D
ifferentiation, Math. Gaz., vol. 25, 1941. Note - the
Bickley
% coefficients have been divided by a common factor of two).
%
% E
quations (1) to (5) can now be programmed to generate
the derivative u (x) of function u(x).
%
x
%
% Compute the spatial increment
dx=(xu-xl)/(n-1);
r4fdx=1./(12.*dx);
% nm2=n-2;
% Equation (1) (note - the rhs of equations (1), (2), (3), (4)
% a
nd (5) have been formatted so that the numerical
weighting
% c
oefficients can be more easily associated with the
Bickley
% matrix above)
ux( 1)=r4fdx*...
(
-25.*u( 1) +48.*u( 2) -36.*u( 3) +16.*u( 4)
-3.*u( 5));
%
% Equation (2)
526
Appendix D
ux( 2)=r4fdx*...
(
-3.*u( 1) -10.*u(
+1.*u( 5));
%
%
%
%
%
%
2) +18.*u(
Equation (3)
for i=3:nm2
ux( i)=r4fdx*...
(
+1.*u(i-2) -8.*u(i-1)
-1.*u(i+2));
end
+0.*u(
3)
i)
-6.*u(
4)
+8.*u(i+1)
Equation (4)
ux(n-1)=r4fdx*...
(
-1.*u(n-4) +6.*u(n-3) -18.*u(n-2) +10.*u(n-1)
+3.*u( n));
Equation (5)
ux( n)=r4fdx*...
(
3.*u(n-4) -16.*u(n-3) +36.*u(n-2) -48.*u(n-1)
+25.*u( n));
And
%
%
File: dss044.m
function [uxx]=dss044(xl,xu,n,u,ux,nl,nu)
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
Function dss044 computes a fourth-order approximation of a
second-order derivative, with or without the normal
derivative
at the boundary.
Argument list
xl
L
eft value of the spatial independent variable
(input)
xu
R
ight value of the spatial independent variable
(input)
n
Number of spatial grid points, including the end
points (input)
u
O
ne-dimensional array of the dependent variable
to be differentiated (input)
ux
O
ne-dimensional array of the first derivative
of u.
T
he end values of ux, ux(1), and ux(n), are
used in
N
eumann boundary conditions at x = xl and
x = xu,
527
Appendix D
%
%
%
%
uxx
O
ne-dimensional array of the second derivative
of u (output)
%
%
nl
I
nteger index for the type of boundary
condition at
x = xl (input). The allowable values are
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
depending on the arguments nl and nu (see the description of nl and nu below)
1 - Dirichlet boundary condition at x = xl
(ux(1) is not used)
2 - Neumann boundary condition at x = xl
(ux(1) is used)
nu
I
nteger index for the type of boundary
condition at
x = xu (input). The allowable values are
1 - Dirichlet boundary condition at x = xu
(ux(n) is not used)
2 - Neumann boundary condition at x = xu
(ux(n) is used)
T
he following derivation was completed by W. E. Schiesser,
Depts of CHE and Math, Lehigh University, Bethlehem, PA
18015, USA, on December 15, 1986.
%
% ***********************************************************
*******
%
% (1) uxx at the interior points 3, 4,..., n-2
%
% T
o develop a set of fourth-order correct differentiation
formulas
% f
or the second derivative uxx, we consider first the
interior
% grid points at which a symmetric formula can be used.
%
% If we consider a formula of the form
%
%
a*u(i-2) + b*u(i-1) + e*u(i) + c*u(i+1) + d*u(i+2)
%
% T
aylor series expansions of u(i-2), u(i-1), u(i+1), and
u(i+2)
% c
an be substituted into this formula. We then consider
the
% l
inear albegraic equations relating a, b, c, and d which
will
528
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
Appendix D
etain certain terms, i.e., uxx, and drop others, e.g.,
r
uxxx,
uxxxx and uxxxxx.
Thus, for grid points 3, 4,..., n-2
To retain uxx
4*a + b + c +
4*d = 2
(1)
8*d = 0
(2)
16*a + b + c + 16*d = 0
(3)
To drop uxxx
-8*a - b + c +
To drop uxxxx
To drop uxxxxx
-32*a - b + c + 32*d = 0
(4)
Equations (1) to (4) can be solved for a, b, c, and d.
equation (1) is added to equation (2)
­
-4*a + 2*c + 12*d = 2
If
(5)
If equation (1) is subtracted from equation (3)
12*a + 12*d = -2
(6)
If equation (1) is added to equation (4)
-28*a + 2*c + 36*d = 2
quations (5) to (7) can be solved for a, c, and d.
E
equation
(5) is subtracted from equation (7), and the result
combined
with equation (6)
(7)
If
12*a + 12*d = -2
-24*a + 24*d = 0
quations (6) and (8) can be solved for a and d.
E
From (8), a
= d. From equation (6), a = -1/12 and d = -1/12. Then,
from
equation (5), c = 4/3, and from equation (1), b = 4/3.
(6)
(8)
529
Appendix D
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
The final differentiation formula is then obtained as
(-1/12)*u(i-2) +
(4/3)*u(i-1) +
(4/3)*u(i+1) + (-1/12)*u(i+2)
(-1/12 + 4/3 - 1/12 + 4/3)*u(i) + uxx(i)*(dx**2) +
O(dx**6)
or
uxx(i) = (1/(12*dx**2))*(-1*u(i-2) + 16*u(i-1)
- 30*u(i) + 16*u(i+1) -
1*u(i+2)
(9)
+ O(dx**4)
Note that the ux term drops out, i.e., the basic
equation is
-2*a - b + c + 2*d =
-2*(-1/12) - (4/3) + (4/3) + 2*(-1/12) = 0
E
quation (9) was obtained by dropping all terms in the
underlying
T
aylor series up to and including the fifth derivative,
uxxxxx.
T
hus, equation (9) is exact for polynomials up to and
including
f
ifth order. This can be checked by substituting the
functions
1
, x, x**2, x**3, x**4 and x**5 in equation (9) and
computing the
c
orresponding derivatives for comparison with the known
second
d
erivatives. This is done for 1 merely by summing the
weighting
c
oefficients in equation (9), which should sum to zero,
i.e.,
-1 + 16 - 30 + 16 -1 = 0.
F
or the remaining functions, the algebra is rather
involved, but
t
hese functions can be checked numerically, i.e., numerical
values
o
f x**2, x**3, x**4 and x**5 can be substituted in
equation (9)
and the computed derivatives can be compared with the know
n
umerical second derivatives. This is not a proof of
correctness of
530
%
Appendix D
quation (9), but would likely detect any errors in
e
equation (9).
%
% ***********************************************************
*******
%
% (2) uxx at the interior points i = 2 and n-1
%
% For grid point 2, we consider a formula of the form
%
%
a
*u(i-1) + f*u(i) + b*u(i+1) + c*u(i+2) + d*u(i+3) +
e*u(i+4)
%
% Taylor series expansions of u(i-1), u(i+1), u(i+2), u(i+3)
and
% u(i+4) when substituted into this formula give linear
algebraic
% equations relating a, b, c, d, and e.
%
%
To drop ux
%
%
-a + b + 2*c + 3*d + 4*e = 0
(10)
%
%
To retain uxx
%
%
a + b + 4*c + 9*d + 16*e = 2
(11)
%
%
To drop uxxx
%
%
-a + b + 8*c + 27*d + 64*e = 0
(12)
%
%
To drop uxxxx
%
%
a + b + 16*c + 81*d + 256*e = 0
(13)
%
%
To drop uxxxxx
%
%
-a + b + 32*c + 243*d + 1024*e = 0
(14)
%
% Equations (11), (12), (13), and (14) can be solved for a, b,
c, d, and e. If equation (10) is added to equation (11)
%
%
2*b + 6*c + 12*d +20*e = 2
(15)
%
% If equation (10) is subtracted from equation (12)
%
%
6*c + 24*d + 60*e = 0
(16)
%
% If equation (10) is added to equation (13)
%
Appendix D
531
%
2*b + 18*c + 84*d + 260*e = 0
(17)
%
% If equation (10) is subtracted from equation (14)
%
%
30*c + 240*d + 1020*e = 0
(18)
%
% Equations (15), (16), (17), and (18) can be solved for
b, c, d and e.
%
%
6*c + 24*d + 60*e = 0
(16)
%
% If equation (15) is subtracted from equation (17)
%
%
12*c + 72*d + 240*e = -2
(19)
%
%
30*c + 240*d + 1020*e = 0
(18)
%
% Equations (16), (18), and (19) can be solved for c, d, and
e. If
% two times equation (16) is subtracted from equation (19),
%
%
24*d + 120*e = -2
(20)
%
% If five times equation (16) is subtracted from equation
(18),
%
%
120*d + 720*e = 0
(21)
%
% E
quations (20) and (21) can be solved for d and e.
From (21),
% e = (-1/6)*d. Substitution in equation (20) gives d = -1/2.
% t
hus, e = 1/12. From equation (16), c = 7/6. From
equation
% (15), b = -1/3. From equation (10), a = 5/6.
%
% The final differentiation formula is then obtained as
%
% (5/6)*u(i-1) + (-1/3)*u(i+1) + (7/6)*u(i+2) + (-1/2)*u(i+3)
%
% + (1/12)*u(i+4) = (5/6 - 1/3 + 7/6 - 1/2 + 1/12)*u(i)
%
% + uxx*(dx**2) + O(dx**6)
%
% or
%
% uxx(i) = (1/12*dx**2)*(10*u(i-1) - 15*u(i) - 4*u(i+1)
%
(22)
%
+ 14*u(i+2) - 6*u(i+3) + 1*u(i+4)) + O(dx**4)
%
% Equation (22) will be applied at i = 2 and n-1. thus
532
Appendix D
%
% uxx(2) = (1/12*dx**2)*(10*u(1) - 15*u(2) - 4*u(3)
%
(23)
%
+ 14*u(4) - 6*u(5) + 1*u(6)) + O(dx**4)
%
% uxx(n-1) = (1/12*dx**2)*(10*u(n) - 15*u(n-1) - 4*u(n-2)
%
(24)
%
+ 14*u(n-3) - 6*u(n-4) + 1*u(n-5)) + O(dx**4)
%
% ***********************************************************
*******
%
% (3) uxx at the boundary points 1 and n
%
% Finally, for grid point 1, an approximation with a
Neumann boundary condition of the form
%
%
a
*u(i+1) + b*u(i+2) + c*u(i+3) + d*u(i+4) + e*ux(i) +
f*u(i)
%
% Will be used. the corresponding algebraic equations are
%
%
To drop ux
%
%
a + 2*b + 3*c + 4*d + e = 0
(25)
%
%
To retain uxx
%
%
a + 4*b + 9*c + 16*d = 2
(26)
%
%
To drop uxxx
%
%
a + 8*b + 27*c + 64*d = 0
(27)
%
%
To drop uxxxx
%
%
a + 16*b + 81*c + 256*d = 0
(28)
%
%
To drop uxxxxx
%
%
a + 32*b + 243*c + 1024*d = 0
(29)
%
% Equations (25) to (29) can be solved for a, b, c, d, and e.
If
%
% Equation (26) is subtracted from equations (27), (28),
and (29),
%
%
4*b + 18*c + 48*d = -2
(30)
%
%
12*b + 72*c + 240*d = -2
(31)
533
Appendix D
%
%
%
%
d
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
28*b + 234*c + 1008*d = -2
(32)
Equations (30), (31), and (32) can be solved for b, c, and
18*c + 96*d = 4
(33)
108*c + 672*d = 12
(34)
E
quations (3) and (34) can be solved for c and d,
c = 8/9, d = -1/8.
F
rom equation (30), b = -3. From equation (26), a = 8.
From equation (25), e = -25/6.
The final differentiation formula is then obtained as
8*u(i+1) - 3*u(i+2) + (8/9)*u(i+3) - (1/8)*u(i+4)
- (25/6)*ux(i)*dx
= (8 - 3 + (8/9) - (1/8))*u(i) + uxx*(dx**2) + O(dx**6)
or
u
xx(i) = (1/12*dx**2)*((-415/6)*u(i) + 96*u(i+1)
- 36*u(i+2)
%
(35)
% + (32/3)*u(i+3) - (3/2)*u(i+4) - 50*ux(i)*dx) + O(dx**4)
%
% Equation (35) will be applied at i = 1 and i = n
%
% uxx(1) = (1/12*dx**2)*((-415/6)*u(1) + 96*u(2) - 36*u(3)
%
(36)
% + (32/3)*u(4) - (3/2)*u(5) - 50*ux(1)*dx) + O(dx**4)
%
% uxx(n) = (1/12*dx**2)*((-415/6)*u(n) + 96*u(n-1)
- 36*u(n-2)
%
(37)
% + (32/3)*u(n-3) - (3/2)*u(n-4) + 50*ux(n)*dx) + O(dx**4)
%
% A
lternatively, for grid point 1, an approximation with a
Dirichlet
% boundary condition of the form
%
% a
*u(i+1) + b*u(i+2) + c*u(i+3) + d*u(i+4) + e*u(i+5) +
f*u(i)
%
% can be used. The corresponding algebraic equations are
%
534
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
Appendix D
To drop ux
a + 2*b + 3*c + 4*d + 5*e = 0
(38)
To retain uxx
a + 4*b + 9*c + 16*d + 25*e = 2
(39)
To drop uxxx
a + 8*b + 27*c + 64*d + 125*e = 0
(40)
To drop uxxxx
a + 16*b + 81*c + 256*d + 625*e = 0
(41)
To drop uxxxxx
a + 32*b + 243*c + 1024*d + 3125*e = 0
(42)
quations (38), (39), (40), (41), and (42) can be solved
E
for a, b, c, d, and e.
2*b + 6*c + 12*d + 20*e = 2
(43)
6*b + 24*c + 60*d + 120*e = 0
(44)
14*b + 78*c + 252*d + 620*e = 0
(45)
30*b + 240*c + 1020*d + 3120*e = 0
(46)
quations (43), (44), (45), and (46) can be solved for b,
E
c, d, and e
6*c + 24*d + 60*e = -6
(47)
36*c + 168*d + 480*e = -14
(48)
150*c + 840*d + 2820*e = -30
(49)
quations (47), (48), and (49) can be solved for c, d,
E
and e
24*d + 120*e = 22
(50)
240*d + 1320*e = 120
(51)
rom equations (50) and (51), d = 61/12, e = -5/6. From
F
equation
(47), c = -13. From equation (43), b = 107/6. From
equation (38),
Appendix D
%
%
%
%
%
535
a = -77/6.
The final differentiation formula is then obtained as
(
-77/6)*u(i+1) + (107/6)*u(i+2) - 13*u(i+3) +
(61/12)*u(i+4)
%
% - (5/6)*u(i+5) = (-77/6 + 107/6 - 13 + 61/12 - 5/6)*u(i) +
%
% uxx(i)*(dx**2) + O(dx**6)
%
% or
%
% uxx(i) = (1/12*dx**2)*(45*u(i) - 154*u(i+1) + 214*u(i+2)
%
(52)
%
- 156*u(i+3) + 61*u(i+4) - 10*u(i+5)) + O(dx**4)
%
% Equation (52) will be applied at i = 1 and i = n
%
% uxx(1) = (1/12*dx**2)*(45*u(1) - 154*u(2) + 214*u(3)
%
(53)
%
- 156*u(4) + 61*u(5) - 10*u(6)) + O(dx**4)
%
% uxx(n) = (1/12*dx**2)*(45*u(n) - 154*u(n-1) + 214*u(n-2)
%
(54)
%
-156*u(n-3) + 61*u(n-4) - 10*u(n-5)) + O(dx**4)
%
% ***********************************************************
*******
%
% Grid spacing
dx=(xu-xl)/(n-1);
%
% 1/(12*dx**2) for subsequent use
r12dxs=1./(12.0*dx^2);
%
% uxx at the left boundary
%
%
Without ux (equation (53))
if nl==1
uxx(1)=r12dxs*...
(
45.0*u(1)...
-154.0*u(2)...
+214.0*u(3)...
-156.0*u(4)...
+61.0*u(5)...
-10.0*u(6));
%
%
With ux (equation (36))
elseif nl==2
uxx(1)=r12dxs*...
536
Appendix D
(-415.0/6.0*u(1)...
+96.0*u(2)...
-36.0*u(3)...
+32.0/3.0*u(4)...
-3.0/2.0*u(5)...
-50.0*ux(1)*dx);
end
%
%
%
%
%
%
%
%
%
%
%
%
%
uxx at the right boundary
Without ux (equation (54))
if nu==1
uxx(n)=r12dxs*...
(
45.0*u(n )...
-154.0*u(n-1)...
+214.0*u(n-2)...
-156.0*u(n-3)...
+61.0*u(n-4)...
-10.0*u(n-5));
With ux (equation (37))
elseif nu==2
uxx(n)=r12dxs*...
(-415.0/6.0*u(n )...
+96.0*u(n-1)...
-36.0*u(n-2)...
+32.0/3.0*u(n-3)...
-3.0/2.0*u(n-4)...
+50.0*ux(n )*dx);
end
uxx at the interior grid points
i = 2 (equation (23))
uxx(2)=r12dxs*...
(
10.0*u(1)...
-15.0*u(2)...
-4.0*u(3)...
+14.0*u(4)...
-6.0*u(5)...
+1.0*u(6));
i = n-1 (equation (24))
uxx(n-1)=r12dxs*...
(
10.0*u(n )...
-15.0*u(n-1)...
-4.0*u(n-2)...
+14.0*u(n-3)...
-6.0*u(n-4)...
+1.0*u(n-5));
Appendix D
%
i = 3, 4,..., n-2 (equation (9))
for i=3:n-2
uxx(i)=r12dxs*...
(
-1.0*u(i-2)...
+16.0*u(i-1)...
-30.0*u(i )...
+16.0*u(i+1)...
-1.0*u(i+2));
end
537
This page intentionally left blank
This page intentionally left blank
ENGINEERING – CHEMICAL
Focusing on the application of mathematics to chemical engineering,
Applied Mathematical Methods for Chemical Engineers addresses the
setup and verification of mathematical models using experimental or other
independently derived data. The book provides an introduction to differential
equations common to chemical engineering, followed by examples of
first-order and linear second-order ordinary differential equations. Later
chapters examine Sturm–Liouville problems, Fourier series, integrals,
linear partial differential equations, regular perturbation, combination of
variables, and numerical methods emphasizing the method of lines with
MATLAB® programming examples.
Fully revised and updated, this Third Edition:
• Includes additional examples related to process control, Bessel Functions, and contemporary areas such as drug delivery
• Introduces examples of variable coefficient Sturm–Liouville problems both in the regular and singular types
• Demonstrates the use of Euler and modified Euler methods alongside the Runge–Kutta order-four method
• Inserts more depth on specific applications such as nonhomogeneous cases of separation of variables
• Adds a section on special types of matrices such as upper- and
lower-triangular matrices
• Presents a justification for Fourier–Bessel series in preference to a complicated proof
• Incorporates examples related to biomedical engineering applications
• Illustrates the use of the predictor-corrector method
• Expands the problem sets of numerous chapters
APPLIED
MATHEMATICAL
METHODS for
CHEMICAL
ENGINEERS
Third Edition
Applied Mathematical Methods for Chemical Engineers, Third Edition
uses worked examples to expose several mathematical methods that are
essential to solving real-world process engineering problems.
K15249
ISBN: 978-1-4665-5299-9
Norman W. Loney
90000
9 781466 552999
K15249_Cover_PubGr.indd All Pages
9/1/15 1:52 PM
Download