0% found this document useful (0 votes)
30 views

Mathematical Modeling and Simulation Introduction for Scientists and Engineers second edition Kai Velten - The full ebook version is just one click away

The document provides information about the book 'Mathematical Modeling and Simulation: Introduction for Scientists and Engineers, Second Edition' by Kai Velten, including download links and suggested related ebooks. It outlines the book's content, which covers principles of mathematical modeling, phenomenological models, and mechanistic models, among other topics. The book is intended for scientists and engineers and is available in digital format with various ISBNs listed.

Uploaded by

iqasugul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Mathematical Modeling and Simulation Introduction for Scientists and Engineers second edition Kai Velten - The full ebook version is just one click away

The document provides information about the book 'Mathematical Modeling and Simulation: Introduction for Scientists and Engineers, Second Edition' by Kai Velten, including download links and suggested related ebooks. It outlines the book's content, which covers principles of mathematical modeling, phenomenological models, and mechanistic models, among other topics. The book is intended for scientists and engineers and is available in digital format with various ISBNs listed.

Uploaded by

iqasugul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 63

Visit https://ebookultra.

com to download the full version and


explore more ebooks

Mathematical Modeling and Simulation


Introduction for Scientists and Engineers second
edition Kai Velten

_____ Click the link below to download _____


https://ebookultra.com/download/mathematical-modeling-
and-simulation-introduction-for-scientists-and-
engineers-second-edition-kai-velten/

Explore and download more ebooks at ebookultra.com


Here are some suggested products you might be interested in.
Click the link to download

Fiber Optic Sensors An Introduction for Engineers and


Scientists Second Edition Eric Udd

https://ebookultra.com/download/fiber-optic-sensors-an-introduction-
for-engineers-and-scientists-second-edition-eric-udd/

Introduction to Probability and Statistics for Engineers


and Scientists Third Edition Sheldon M. Ross

https://ebookultra.com/download/introduction-to-probability-and-
statistics-for-engineers-and-scientists-third-edition-sheldon-m-ross/

Fiber Optic Sensors An Introduction for Engineers and


Scientists third edition Eric Udd

https://ebookultra.com/download/fiber-optic-sensors-an-introduction-
for-engineers-and-scientists-third-edition-eric-udd/

Applied Mathematical Methods for Chemical Engineers Second


Edition Loney

https://ebookultra.com/download/applied-mathematical-methods-for-
chemical-engineers-second-edition-loney/
Nonlinear Ordinary Differential Equations An Introduction
for Scientists and Engineers 4th Edition Dominic Jordan

https://ebookultra.com/download/nonlinear-ordinary-differential-
equations-an-introduction-for-scientists-and-engineers-4th-edition-
dominic-jordan/

Electronics and Communications for Scientists and


Engineers 1st Edition Martin Plonus

https://ebookultra.com/download/electronics-and-communications-for-
scientists-and-engineers-1st-edition-martin-plonus/

Introduction to Human Factors and Ergonomics for Engineers


Second Edition Landry

https://ebookultra.com/download/introduction-to-human-factors-and-
ergonomics-for-engineers-second-edition-landry/

Essential MATLAB for Scientists and Engineers 2nd Edition


Brian Hahn

https://ebookultra.com/download/essential-matlab-for-scientists-and-
engineers-2nd-edition-brian-hahn/

Essential MATLAB for Engineers and Scientists 3rd Edition


Brian Hahn

https://ebookultra.com/download/essential-matlab-for-engineers-and-
scientists-3rd-edition-brian-hahn/
Mathematical Modeling and Simulation Introduction for
Scientists and Engineers second edition Kai Velten Digital
Instant Download
Author(s): Kai Velten, Dominik M. Schmidt, Katrin Kahlen
ISBN(s): 9783527414147, 3527414142
Edition: 2
File Details: PDF, 12.24 MB
Year: 2024
Language: english
Mathematical Modeling and Simulation
Mathematical Modeling and Simulation

Introduction for Scientists and Engineers

Kai Velten
Dominik M. Schmidt
Katrin Kahlen

Second Edition
The Authors All books published by WILEY-VCH are carefully
produced. Nevertheless, authors, editors, and publisher
Prof. Dr. Kai Velten do not warrant the information contained in these
Hochschule Geisenheim books, including this book, to be free of errors. Readers
Von-Lade-Straße 1 are advised to keep in mind that statements, data,
Geisenheim illustrations, procedural details or other items may
Germany inadvertently be inaccurate.
65366
Library of Congress Card No.: applied for
Dr. Dominik M. Schmidt
Hochschule Geisenheim British Library Cataloguing-in-Publication Data
Von-Lade-Straße 1 A catalogue record for this book is available from the
Geisenheim British Library.
Germany
65366 Bibliographic information published by the
Deutsche Nationalbibliothek The Deutsche
Prof. Dr. Katrin Kahlen Nationalbibliothek lists this publication in the
Hochschule Geisenheim Deutsche Nationalbibliografie; detailed bibliographic
Von-Lade-Straße 1 data are available on the Internet at
Geisenheim <http://dnb.d-nb.de>.
Germany
65366 © 2024 WILEY-VCH GmbH, Boschstraße 12, 69469
Weinheim, Germany
Cover: Simulated virtual Riesling
vineyard (Section 5.3.2) and simulated All rights reserved, including rights for text and data
wine fermation flow pattern. mining and training of artificial technologies or similar
(Section 4.13 and Velten, K., & Schmidt, technologies (including those of translation into other
D., (2016). Numerical simulation of languages). No part of this book may be reproduced in
bubble flow homogenization in any form – by photoprinting, microfilm, or any other
industrial scale wine fermentations. means – nor transmitted or translated into a machine
Food and Bioproducts Processing, 100, language without written permission from the
102–117.) publishers. Registered names, trademarks, etc. used in
this book, even when not specifically marked as such,
are not to be considered unprotected by law.

Print ISBN: 978-3-527-41414-7


ePDF ISBN: 978-3-527-83939-1
ePub ISBN: 978-3-527-83940-7
oBook ISBN: 978-3-527-84960-4

Typesetting: Straive, Chennai, India


v

Contents

Preface xv

1 Principles of Mathematical Modeling 1


1.1 A Complex World Needs Models 1
1.2 Systems, Models, Simulations 3
1.2.1 Teleological Nature of Modeling and Simulation 3
1.2.2 Modeling and Simulation Scheme 4
1.2.3 Simulation 6
1.2.4 System 6
1.2.5 Conceptual and Physical Models 7
1.3 Mathematics as a Natural Modeling Language 8
1.3.1 Input–Output Systems 8
1.3.2 General Form of Experimental Data 9
1.3.3 Distinguished Role of Numerical Data 9
1.4 Definition of Mathematical Models 10
1.5 Examples and Some More Definitions 11
1.5.1 State Variables and System Parameters 13
1.5.2 Using Computer Algebra Software 15
1.5.3 The Problem-Solving Scheme 17
1.5.4 Strategies to Set Up Simple Models 18
1.5.4.1 Mixture Problem 21
1.5.4.2 Tank Labeling Problem 24
1.5.4.3 Financial Mathematics 26
1.5.5 Linear Programming 28
1.5.6 Modeling a Black Box System 30
1.6 Even More Definitions 32
1.6.1 Phenomenological and Mechanistic Models 32
1.6.2 Stationary and Instationary Models 35
1.6.3 Distributed and Lumped Models 36
1.7 Classification of Mathematical Models 36
1.7.1 From Black to White Box Models 37
1.7.2 SQM Space Classification: S Axis 38
1.7.3 SQM Space Classification: Q Axis 39
vi Contents

1.7.4 SQM Space Classification: M Axis 40


1.8 Everything Looks Like a Nail? 41

2 Phenomenological Models 44
2.1 Elementary Statistics 45
2.1.1 Descriptive Statistics 45
2.1.1.1 Using Calc or Excel 46
2.1.1.2 Using R in RStudio 48
2.1.1.3 Roadmap for a First Analysis 49
2.1.1.3.1 Read Example Data 49
2.1.1.3.2 Levels (Scales) of Measurement 49
2.1.1.3.3 One-Dimensional Data 49
2.1.1.3.4 Frequency Analysis 49
2.1.1.3.5 Measures of Location 49
2.1.1.3.6 Measures of Spread 50
2.1.1.3.7 Higher-Dimensional Data 51
2.1.1.3.8 Contingency Tables 51
2.1.1.3.9 Scatter Plots (2D, 3D, and ∞D) 51
2.1.1.3.10 Correlation Analysis 51
2.1.1.3.11 Regression Analysis 52
2.1.1.3.12 Go on with Your Tour! 52
2.1.2 Random Processes and Probability 52
2.1.2.1 Random Variables 53
2.1.2.2 Probability 53
2.1.2.3 Densities and Distributions 55
2.1.2.4 The Uniform Distribution 56
2.1.2.5 The Normal Distribution 57
2.1.2.6 Expected Value and Standard Deviation 58
2.1.2.7 More on Distributions 59
2.1.2.8 Quantiles and Confidence Intervals 60
2.1.3 Inferential Statistics 62
2.1.3.1 Is Crop A’s Yield Really Higher? 62
2.1.3.2 Structure of a Hypothesis Test 62
2.1.3.3 The t-test 63
2.1.3.4 Testing Normality 64
2.1.3.5 Type I/II Errors, Power, and Effect Size 65
2.1.3.6 Testing Regression Parameters 67
2.1.3.7 Analysis of Variance 67
2.2 Linear Regression 69
2.2.1 The Linear Regression Problem 70
2.2.2 Solution Using Software 71
2.2.3 The Coefficient of Determination 74
2.2.4 Interpretation of the Regression Coefficients 75
2.2.5 Checking Assumptions 76
2.2.6 Nonlinear Linear Regression 76
Contents vii

2.3 Multiple Linear Regression 79


2.3.1 The Multiple Linear Regression Problem 79
2.3.2 Solution Using Software 80
2.3.3 Cross-Validation 84
2.4 Nonlinear Regression 87
2.4.1 The Nonlinear Regression Problem 87
2.4.2 Solution Using Software 87
2.4.3 Multiple Nonlinear Regression 91
2.4.4 Implicit and Vector-Valued Problems 93
2.5 Smoothing Splines 94
2.6 Neural Networks 97
2.6.1 General Idea 97
2.6.2 Feed-Forward Neural Networks 98
2.6.3 Solution Using Software 100
2.6.4 Interpretation of the Results 102
2.6.5 Generalization and Overfitting 104
2.6.6 Several Inputs Example 106
2.7 Big Data Analysis 109
2.7.1 From Data to Knowledge 109
2.7.2 Artificial Data 110
2.7.3 Influencing Factors and Interactions for z1 111
2.7.4 Influencing Factors and Interactions for z2 and z3 112
2.7.5 Dimensional Reduction and Classification 114
2.7.5.1 Principal Component Analysis, Factor Analysis, and
Correspondence Analysis 114
2.7.5.2 Classification 117
2.7.6 Conclusions 119
2.8 Signal Processing 119
2.8.1 Example, Idea, and Useful R Packages 119
2.8.2 Time-Series Classification Using tsfresh, Python and R 121
2.9 Design of Experiments 124
2.9.1 Completely Randomized Design 125
2.9.2 Randomized Complete Block Design 127
2.9.3 Latin Square Design 128
2.9.4 Factorial Designs 130
2.9.5 Optimal Sample Size 132
2.9.6 DOE Workflow 133
2.9.7 Optimal Designs 135
2.10 Other Phenomenological Modeling Approaches 138
2.10.1 Soft Computing 139
2.10.1.1 Fuzzy Model of a Washing Machine 140
2.10.2 Discrete Event Simulation 140

3 Mechanistic Models I: ODEs 142


3.1 Distinguished Role of Differential Equations 142
3.2 Introductory Examples 143
viii Contents

3.2.1 Archaeology Analogy 143


3.2.2 Body Temperature 144
3.2.2.1 Phenomenological Model 144
3.2.2.2 Application 146
3.2.3 Alarm Clock 146
3.2.3.1 Need for a Mechanistic Model 147
3.2.3.2 Applying the Modeling and Simulation Scheme 148
3.2.3.3 Setting Up the Equations 149
3.2.3.4 Comparing Model and Data 150
3.2.3.5 Validation Fails – What Now? 151
3.2.3.6 A Different Way to Explain the Temperature Memory 152
3.2.3.7 Limitations of the Model 153
3.3 General Idea of ODE’s 154
3.3.1 Intrinsic Meaning of pi 154
3.3.2 ex Solves an ODE 154
3.3.3 Infinitely Many Degrees of Freedom 155
3.3.4 Intrinsic Meaning of the Exponential Function 156
3.3.5 ODEs as a Function Generator 157
3.4 Setting Up ODE Models 158
3.4.1 Body Temperature Example 158
3.4.1.1 Formulation of an ODE Model 158
3.4.1.2 ODE Reveals the Mechanism 159
3.4.1.3 ODE’s Connect Data and Theory 160
3.4.1.4 Three Ways to Set Up ODEs 161
3.4.2 Alarm Clock Example 161
3.4.2.1 A System of Two ODEs 162
3.4.2.2 Parameter Values Based on A Priori Information 163
3.4.2.3 Result of a Hand-Fit 163
3.4.2.4 A Look into the Black Box 164
3.5 Some Theory You Should Know 165
3.5.1 Basic Concepts 165
3.5.2 First-Order ODEs 167
3.5.3 Autonomous, Implicit, and Explicit ODEs 168
3.5.4 The Initial Value Problem 168
3.5.5 Boundary Value Problems 169
3.5.6 Example of Nonuniqueness 170
3.5.7 ODE Systems 171
3.5.8 Linear Versus Nonlinear 173
3.6 Solution of ODE’s: Overview 174
3.6.1 Toward the Limits of Your Patience 174
3.6.2 Closed Form Versus Numerical Solutions 175
3.7 Closed Form Solutions 176
3.7.1 Right-Hand Side Independent of the Independent Variable 176
3.7.1.1 General and Particular Solutions 176
3.7.1.2 Solution by Integration 177
Contents ix

3.7.1.3 Using Computer Algebra Software 178


3.7.1.4 Imposing Initial Conditions 179
3.7.2 Separation of Variables 181
3.7.2.1 Application to the Body Temperature Model 183
3.7.2.2 Solution Using Maxima and Mathematica 183
3.7.3 Variation of Constants 185
3.7.3.1 Application to the Body Temperature Model 186
3.7.3.2 Using Computer Algebra Software 187
3.7.3.3 Application to the Alarm Clock Model 188
3.7.3.4 Interpretation of the Result 189
3.7.4 Dust Particles in the ODE Universe 190
3.8 Numerical Solutions 192
3.8.1 Algorithms 192
3.8.1.1 The Euler Method 193
3.8.1.2 Example Application 194
3.8.1.3 Order of Convergence 195
3.8.1.4 Stiffness 196
3.8.2 Solving ODE’s Using Maxima 197
3.8.2.1 Heuristic Error Control 198
3.8.2.2 ODE Systems 199
3.8.3 Solving ODEs Using R and lsoda 201
3.8.3.1 Local Error Control in lsoda 203
3.8.3.2 Effect of the Local Error Tolerances 203
3.8.3.3 A Rule of Thumb to Set the Tolerances 204
3.8.3.4 Example Applications 205
3.9 Fitting ODE’s to Data 208
3.9.1 Parameter Estimation in the Alarm Clock Model 208
3.9.1.1 Estimating Two Parameters 210
3.9.1.2 Estimating Initial Values 211
3.9.1.3 Sensitivity of the Parameter Estimates 213
3.9.2 The General Parameter Estimation Problem 213
3.9.2.1 One State Variable Characterized by Data 214
3.9.2.2 Several State Variables Characterized by Data 215
3.9.3 Indirect Measurements Using Parameter Estimation 216
3.10 More Examples 216
3.10.1 Predator–Prey Interaction 216
3.10.1.1 Lotka–Volterra Model 217
3.10.1.2 General Dynamical Behavior 218
3.10.1.3 Nondimensionalization 219
3.10.1.4 Phase Plane Plots 220
3.10.2 Wine Fermentation 222
3.10.2.1 Setting Up a Mathematical Model 222
3.10.2.2 Yeast 223
3.10.2.3 Ethanol and Sugar 225
3.10.2.4 Nitrogen 226
3.10.2.5 Using a Hand-Fit to Estimate N 0 227
x Contents

3.10.2.6 Parameter Estimation 228


3.10.2.7 Problems with Nonautonomous Models 230
3.10.2.8 Converting Data into a Function 231
3.10.2.9 Using Weighting Factors 232
3.10.3 Pharmacokinetics 232
3.10.4 Plant Growth 234

4 Mechanistic Models II: PDEs 237


4.1 Introduction 237
4.1.1 Limitations of ODE Models 237
4.1.2 Overview: Strange Animals, Sounds, and Smells 238
4.1.3 Two Problems You Should Be Able to Solve 239
4.2 The Heat Equation 241
4.2.1 Fourier’s Law 241
4.2.2 Conservation of Energy 242
4.2.3 Heat Equation = Fourier’s Law + Energy Conservation 243
4.2.4 Heat Equation in Multidimensions 244
4.2.5 Anisotropic Case 245
4.2.6 Understanding Off-diagonal Conductivities 246
4.3 Some Theory You Should Know 247
4.3.1 Partial Differential Equations 247
4.3.1.1 First-Order PDEs 248
4.3.1.2 Second-Order PDEs 249
4.3.1.3 Linear Versus Nonlinear 249
4.3.1.4 Elliptic, Parabolic, and Hyperbolic Equations 250
4.3.2 Initial and Boundary Conditions 252
4.3.2.1 Well Posedness 252
4.3.2.2 A Rule of Thumb 252
4.3.2.3 Dirichlet and Neumann Conditions 253
4.3.3 Symmetry and Dimensionality 254
4.3.3.1 1D Example 255
4.3.3.2 2D Example 256
4.3.3.3 3D Example 256
4.3.3.4 Rotational Symmetry 257
4.3.3.5 Mirror Symmetry 258
4.3.3.6 Symmetry and Periodic Boundary Conditions 258
4.4 Closed-Form Solutions 259
4.4.1 Problem 1 259
4.4.2 Separation of Variables 260
4.4.3 A Particular Solution for Validation 261
4.5 Numerical Solution of PDEs 262
4.6 The Finite Difference Method 263
4.6.1 Replacing Derivatives with Finite Differences 263
4.6.2 Formulating an Algorithm 264
4.6.3 Implementation in R 265
4.6.4 Error and Stability Issues 266
Contents xi

4.6.5 Explicit and Implicit Schemes 266


4.6.6 Computing Electrostatic Potentials 267
4.6.7 Iterative Methods for the Linear Equations 268
4.6.8 Billions of Unknowns 269
4.7 The Finite Element Method 269
4.7.1 Weak Formulation of PDEs 270
4.7.2 Approximation of the Weak Formulation 272
4.7.3 Appropriate Choice of the Basis Functions 273
4.7.4 Generalization to Multidimensions 274
4.7.5 Summary of the Main Steps 274
4.8 The Finite Volume Method 276
4.8.1 Weak Formulations of Conservation Equations 276
4.8.2 Discretization 277
4.8.3 Evaluation of the Fluxes 279
4.8.4 A Simple 1D Finite Volume Method 279
4.8.5 Error and Stability Issues 282
4.8.6 Notes on the Finite Volume Method 282
4.9 Software Packages to Solve PDEs 283
4.10 A Sample Session on the Numerical Solution of Thermal Conduction 285
4.10.1 Geometry Definition Step 286
4.10.1.1 Organization of the GUI 286
4.10.1.2 Constructing the Geometrical Primitives 287
4.10.1.3 Excising the Sphere 288
4.10.1.4 Defining the Boundaries 289
4.10.2 OpenFOAM Terminal 290
4.10.3 Mesh Generation Step 291
4.10.3.1 Blockmesh 292
4.10.3.2 Surface Features 294
4.10.3.3 SnappyHexMesh 295
4.10.4 Case Definition Step 299
4.10.4.1 Transport Properties 299
4.10.4.2 Boundary and Initial Conditions 300
4.10.4.3 Solution Settings 301
4.10.5 Solving the Problem 306
4.10.6 Postprocessing 308
4.10.7 Excursus: Mesh Visualization 312
4.10.8 Excursus: Steady-State Time Discretization with the SIMPLE
Algorithm 313
4.10.9 List of Terminal Commands 315
4.11 A Look Beyond the Heat Equation 316
4.11.1 Diffusion and Convection 317
4.11.2 Flow in Porous Media 318
4.11.2.1 Impregnation Processes 319
4.11.2.2 Two-Phase Flow in Porous Media 321
4.11.2.3 Water Retention and Relative Permeability 321
xii Contents

4.11.2.4 Asparagus Drip Irrigation 322


4.11.2.5 Multiphase Flow and Poroelasticity 323
4.11.3 Structural Mechanics 323
4.11.3.1 Linear Static Elasticity 324
4.11.3.2 Example: Eye Tonometry 326
4.12 Computational Fluid Dynamics (CFD) 328
4.12.1 Navier–Stokes Equations 329
4.12.2 Coupled Problems 330
4.13 Numerical Solutions of Example Flow Problems 331
4.13.1 Single-Phase Flow 332
4.13.1.1 Backward-Facing Step Problem 332
4.13.1.2 Creating the Geometry in FreeCAD 333
4.13.1.3 CfdOF Workbench and Mesh Generation 335
4.13.1.4 Physics Model 340
4.13.1.5 Solution Process 341
4.13.1.6 Postprocessing 342
4.13.1.6.1 Streamlines 342
4.13.1.6.2 Line Integral Convolution 343
4.13.1.6.3 Plot Over Line and Data Export 343
4.13.2 Two-Phase Flow 345
4.13.2.1 Problem Description 346
4.13.2.2 Creating and Exporting the Geometry in Salome 346
4.13.2.3 Geometry Import and Boundary Definition 347
4.13.2.4 Physics Model and Phase Definitions 347
4.13.2.5 Mesh Generation 348
4.13.2.6 Solution Process 348
4.13.2.7 Postprocessing 350
4.14 Other Mechanistic Modeling Approaches 352
4.14.1 Difference Equations 352
4.14.2 Cellular Automata 353
4.14.3 Optimal Control Problems 354
4.14.4 Differential-Algebraic Problems 356
4.14.5 Inverse Problems 356

5 Virtualization 358
5.1 Introduction 358
5.2 Virtual Plants 359
5.2.1 Static Models Using 3D-Digitization 360
5.2.1.1 Deriving Geometric Characteristics 362
5.2.1.2 Shape Models for Plant Organs 362
5.2.1.3 Allometric, Growth, and Response Functions 363
5.2.2 Dynamic Models Using Lindenmayer Systems 365
5.2.3 Functional–Structural Plant Models 370
5.3 Examples of Advanced Applications 371
5.3.1 Greenhouse Cucumber 371
5.3.1.1 Light Distribution Within Cucumber Canopies 372
Contents xiii

5.3.1.2 Photosynthesis and its Limitations 374


5.3.1.3 Salt Effects 378
5.3.1.4 How to Predict Responses of Plant Architecture to Changing
Light Environments 379
5.3.1.5 How to Predict Fruit Growth, While Accounting for Changing
Plant Architectures 384
5.3.2 Virtual Riesling Vineyard 386
5.3.2.1 Introduction to the Model Virtual Riesling and Simulation
Studies on Vineyard Level 387
5.3.2.2 Learning from Historical Temperature Data 389
5.3.2.3 How to Predict Effects of Leaf Removal on Light Absorption in
a Vineyard 390
5.3.2.4 Toward Predicting Sunburn of Grapevine Berries 391
5.3.2.5 Toward Better Understanding How CO2 Enrichment Impacts
the Growth of Grapevine 392

6 Crashcourses and Book Software 395


6.1 Crashcourse R 395
6.1.1 Preliminaries 395
6.1.1.1 Installation 395
6.1.1.2 Book Software and Course Data 396
6.1.2 Basic Workflow 396
6.1.2.1 Working Directory 396
6.1.2.2 Console Mode 396
6.1.2.3 Programming Mode 397
6.1.2.4 Documentation Mode 397
6.1.2.5 Preprocessing and Analysis of Spreadsheet Data 399
6.1.2.6 Tidyverse and Recommended Default Packages 400
6.1.2.7 Help and Documentation 401
6.1.3 Knowledge Database 401
6.1.3.1 Working Environments 401
6.1.3.1.1 RStudio 401
6.1.3.1.2 RStudio Project Workflow 402
6.1.3.1.3 Alternatives 403
6.1.3.2 Data 403
6.1.3.2.1 Import and Export 403
6.1.3.2.2 Variables 404
6.1.3.2.3 Vectors, Matrices, and Arrays 405
6.1.3.2.4 data.frames 406
6.1.3.2.5 Tibbles 407
6.1.3.2.6 Data Types 408
6.1.3.2.7 Data Operations Using dplyr and forcats 409
6.1.3.2.8 Dates and Times 411
6.1.3.2.9 Logical Data 412
6.1.3.2.10 Lists 413
6.1.3.3 Plots 413
xiv Contents

6.1.3.3.1 Base R 413


6.1.3.3.2 Colors 415
6.1.3.3.3 The Grammar of Graphics: ggplot2 416
6.1.3.3.4 plotly and rgl 420
6.1.3.4 Programming 421
6.1.3.4.1 Basics 421
6.1.3.4.2 Functions 421
6.1.3.4.3 Conditional Operations 422
6.1.3.4.4 Repeated Operations 422
6.1.3.4.5 Piping 423
6.1.3.4.6 Text (character, string) Operations 424
6.1.3.4.7 Quarto/Markdown 426
6.1.3.4.8 Booksoftware Packages 426
6.2 Crashcourse Maxima 426
6.2.1 Code Examples in the Book Software 426
6.2.2 Software, Documentation, and Interfaces 427
6.2.3 Basics 427
6.2.4 Equations 429
6.2.5 Functions, Derivatives, Integrals 429
6.2.6 Plots 430
6.2.7 Differential Equations 431
6.2.8 Complex Programs and Mixed Topics 431
6.3 CrashCrashcourse Python (and all the rest) 433
6.4 Book Software and GmLinux 434

References 435
Index 455
xv

The purpose of computing is insight, not numbers.


R.W. Hamming [1]

Preface

“Everyone is an artist” was the central message of the famous twentieth-century artist
Joseph Beuys. “Everyone models and simulates” is the central message of this book.
Mathematical modeling and simulation is a fundamental method in engineering and
science, and it is absolutely valid to say that everybody uses it (even those of us who are
not aware of doing so). The question is not whether to use this method or not, but rather
how to use it effectively.
This completely revised and substantially extended second edition answers the most
important questions in the field of modeling: What is a mathematical model? What types of
models exist? Which model is appropriate for a particular problem? What are simulation,
parameter estimation, and validation? What kind of mathematical problems appear,
and how can these be efficiently solved using professional, free-of-charge open-source
software? The book addresses undergraduates and practitioners alike. Although only basic
knowledge of calculus and linear algebra is required, the most important mathematical
structures are discussed in sufficient detail, ranging from statistical models to partial
differential equations and accompanied by examples from biology, ecology, economics,
and medicine and agricultural, chemical, electrical, mechanical, and process engineering.
Since the 2009 edition of this book, increasing computer power led to a rapid development
in the field of virtualization. This is closely related with mathematical modeling, and we
decided to devote a new chapter on this important subject, along with new sections on big
data analysis, smoothing splines, financial mathematics, the finite volume method, sample
sessions demonstrating the numerical solution of partial differential equations (PDEs)
using OpenFOAM, a Python-based example on time series classification, crash courses
on the data analysis software R and the computer algebra system Maxima, and a crash
course on Python. The crashcourses refer to a great number of useful code examples and
templates in the book software (see below), following a unique concise paragraph-based
design that allows references like “please read §15, §101-112” in university courses.
The book relies exclusively on free-of-charge open-source software. Comprehensive book
software can be obtained at https://www.hs-geisenheim.de/mms/ and provides templates
for typical modeling tasks in thousands of code lines. The book software includes
GmLinux, an operating system specifically designed for this book with preconfigured and
ready-to-use installations of OpenFOAM, Salome, FreeCAD/CfdOF workbench, ParaView,
R, Maxima/wxMaxima, Python, RStudio, Quarto/Markdown, and other free-of-charge
open-source software used in the book.
xvi Preface

While our approach applies software to solve most of the mathematical problems,
it nevertheless attempts to put the reader mathematically on firm ground as much as
possible. Trapdoors and problems that may arise in the modeling process, in the numerical
treatment of the models, or in their interpretation are indicated, and the reader is referred
to the literature whenever necessary.
The book is organized as follows: Chapter 1 explains the principles of mathematical
modeling and simulation, providing definitions and illustrative examples of the important
concepts as well as an overview of the main types of mathematical models. After the
discussion of data-based phenomenological models in Chapter 2, the two most important
classes of mechanistic models are introduced in Chapter 3 (ordinary differential equations)
and Chapter 4 (partial differential equations). Chapter 5 on virtualization explains how
the methods presented in the previous chapters can be used to construct and study virtual
systems, followed by Chapter 6 with the aforementioned crash courses and details on the
book software.
The book is dedicated to our parents; to Birgid, Julia, Theresa, Benedikt, Lukas, Axel, and
Ulf (Kai Velten); to Louise, Carlotta, and Cornelius (Dominik M. Schmidt); and to Roman
and Till (Katrin Kahlen). We would like to thank our colleagues at Hochschule Geisenheim
University, Germany, and our research partners from all around the world for many years
of inspiring collaboration and exchange of ideas. Special thanks are due to Christopher
Bahr for his contributions to the Virtual Riesling model and for the simulation results used
for the cover of this book.

Geisenheim, December 2023 Kai Velten


Dominik M. Schmidt
Katrin Kahlen
1

Principles of Mathematical Modeling

We begin this introduction to mathematical modeling and simulation with an explanation


of basic concepts and ideas, which includes definitions of terms such as system, model,
simulation, and mathematical model, reflections on the objectives of mathematical mod-
eling and simulation, characteristics of “good” mathematical models, and a classification
of mathematical models. You may skip this chapter at first reading if you are just interested
in a hands-on application of specific methods explained in the later chapters of the book,
such as regression or neural network methods (Chapter 2), differential equations (DEs)
(in Chapters 3 and 4), or virtual plants (Chapter 5). Any professional in this field, how-
ever, should of course know about the principles of mathematical modeling and simulation.
It was emphasized in the preface that everybody uses mathematical models – “even those
of us who are not aware of doing so”. You will agree that it is a good idea to have an idea of
what one is doing…
Our starting point is the complexity of the problems treated in science and engineer-
ing. As will be explained in Section 1.1, the difficulty of problems treated in science and
engineering typically originates from the complexity of the systems under consideration,
and models provide an adequate tool to break up this complexity and make a problem
tractable. After giving general definitions of the terms system, model, and simulation in
Section 1.2, we move on toward mathematical models in Section 1.3, where it is explained
that mathematics is the natural modeling language in science and engineering. Mathe-
matical models themselves are defined in Section 1.4, followed by a number of example
applications and definitions in Sections 1.5 and 1.6. This includes the important distinc-
tion between phenomenological and mechanistic models, which has been used as the main
organization principle of this book (see Section 1.6.1 and Chapters 2–5). The chapter ends
with a classification of mathematical models and Golomb’s famous “Don’ts of mathematical
modeling” in Sections 1.7 and 1.8.

1.1 A Complex World Needs Models


Generally speaking, engineers and scientists try to understand, develop, or optimize
“systems”. Here, “system” refers to the object of interest, which can be a part of nature
(such as a plant cell, an atom, a galaxy, etc.) or an artificial technological system (see
Definition 1.2.3). Principally, everybody deals with systems in their everyday life in a way
similar to the approach of engineers or scientists. For example, consider the problem of
Mathematical Modeling and Simulation: Introduction for
Kai Velten, Dominik M. Schmidt, and Katrin Kahlen.
© 2024 WILEY-VCH GmbH. Published 2024 by WILEY-VCH
2 1 Principles of Mathematical Modeling

a table that is unstable due to an uneven floor. This is a technical system, and everybody
knows what must be done to solve the problem: we just have to put suitable pieces of
cardboard under the table legs. Each of us solves an abundant number of problems relating
to simple technological systems of this kind during our lifetime. Beyond this, there are a
great number of really difficult technical problems that can only be solved by engineers.
Characteristic of these more demanding problems is a high complexity of the technical
system. We would simply need no engineers if we did not have to deal with complex
technical systems such as computer processors, engines, and so on. Similarly, we would
not need scientists if processes such as the photosynthesis of plants could be understood
as simply as an unstable table. The reason why we have scientists and engineers, virtually
their right to exist, is the complexity of nature and the complexity of technological systems.

Note 1.1.1 (The complexity challenge) It is the genuine task of scientists and
engineers to deal with complex systems, and to be effective in their work, they most
notably need specific methods to deal with complexity.

The general strategy used by engineers or scientists to break up the complexity of their
systems is the same strategy that we all use in our everyday life when we are dealing with
complex systems: simplification. The idea is just this: if something is complex, make it
simpler. Consider an everyday life problem related to a complex system: A car that refuses
to start. In this situation, everyone knows that a look at the battery and fuel levels will
solve the problem in most cases. Everyone will do this automatically, but to understand the
problem-solving strategy behind this, let us think of an alternative scenario. Assume some-
one is in this situation for the first time. Assume that “someone” was told how to drive a
car, that they have used the car for some time, and now they are for the first time in a sit-
uation in which the car does not start. Of course, we also assume that there is no help for
miles around! Then, looking under the hood for the first time, our “someone” will realize
that the car, which seems simple as long as it works well, is quite a complex system. They
will spend a lot of time until they eventually solve the problem, even if we admit that our
“someone” is an engineer. The reason why each of us will solve this problem much faster
than this “someone” is of course the simple fact that this situation is not new to us. We have
experienced this situation before, and from our previous experience we know what is to be
done. Conceptually, one can say that we have a simplified picture of the car in our mind
similar to Figure 1.1. In the moment when we realize that our car does not start, we do
not think of the car as the complex system that it really is, that is, we do not think of this
conglomerate of valves, pistons, and all the kind of stuff that can be found under the hood;

Tank Battery

Figure 1.1 Car as a real system and as a model.


1.2 Systems, Models, Simulations 3

rather, we have this simplified picture of the car in our mind. We know that this simplified
picture is appropriate in this given situation, and it guides us to look at the battery and fuel
levels and then solve the problem within a short time.
This is exactly the strategy used by engineers or scientists when they deal with complex
systems. When an engineer, for example, wants to reduce the fuel consumption of an
engine, they will not consider that engine in its entire complexity. Rather, they will use
simplified descriptions of that engine, focusing on the machine parts that affect fuel
consumption. Similarly, a scientist who wants to understand the process of photosynthesis
will use simplified descriptions of a plant focusing on very specific processes within a single
plant cell. Anyone who wants to understand complex systems or solve problems related to
complex systems needs to apply appropriate simplified descriptions of the system under
consideration. This means that anyone who is concerned with complex systems needs
models, since simplified descriptions of a system are models of that system by definition.

Note 1.1.2 (Role of models) To break up the complexity of a system under consider-
ation, engineers and scientists use simplified descriptions of that system (i.e. models).

1.2 Systems, Models, Simulations

In 1965, Minsky gave the following general definition of a model [2, 3]:

Definition 1.2.1 (Model) To an observer B, an object A∗ is a model of an object A to


the extent that B can use A∗ to answer questions that interest him about A.

Note 1.2.1 (Formal definitions) Note that Definition 1.2.1 is a formal definition in
the sense that it operates with terms such as object or observer that are not defined in a
strict axiomatic sense similar to the terms used in the definitions of standard mathemat-
ical theory. The same remark applies to several other definitions in this book, including
the definition of the term mathematical model in Section 1.4. Definitions of this kind
are justified for practical reasons, since they allow us to talk about the formally defined
terms in a concise way. An example is Definition 2.6.2 in Section 2.6.5, a concise formal
definition of the term overfitting, which uses several of the previous formal definitions.

The application of Definition 1.2.1 to the car example is obvious – we just have to iden-
tify B with the car driver, A with the car itself, and A∗ with the simplified tank/battery
description of the car in Figure 1.1.

1.2.1 Teleological Nature of Modeling and Simulation


An important aspect of the above definition is the fact that it includes the purpose of a
model, namely, that the model helps us to answer questions and solve problems. This is
important because particularly beginners in the field of modeling tend to believe that a
good model is one that mimics the part of reality that it pertains to as closely as possible.
4 1 Principles of Mathematical Modeling

But as was explained in the previous section, modeling and simulation aim at simplification,
rather than at a useless production of complex copies of a complex reality, and hence, the
contrary is true.

Note 1.2.2 (The best model) The best model is the simplest model that still serves
its purpose, that is, which is still complex enough to help us understand a system and to
solve problems. Seen in terms of a simple model, the complexity of a complex system will
no longer obstruct our view, and we will virtually be able to look through the complexity
of the system at the heart of things.

The entire procedure of modeling and simulation is governed by its purpose of problem-
solving – otherwise, it would be a mere l’art pour l’art. As [4] puts it, “modeling and simu-
lation are always goal-driven, that is, we should know the purpose of our potential model
before we sit down to create it”. It is hence natural to define fundamental concepts such
as the term model with a special emphasis on the purpose-oriented or teleological nature
of modeling and simulation. (Note that teleology is a philosophical discipline dealing with
aims and purposes, and the term teleology itself originates from the Greek word telos, which
means end or purpose [5].) Similar teleological definitions of other fundamental terms, such
as system, simulation, and mathematical model, are given below.

1.2.2 Modeling and Simulation Scheme


Conceptually, the investigation of complex systems using models can be divided into the
following steps:

Note 1.2.3 (Modeling and simulation scheme)


Definitions
● Definition of a problem that is to be solved or of a question that is to be answered

● Definition of a system, that is, a part of reality that pertains to this problem or question

Systems Analysis
● Identification of parts of the system that are relevant for the problem or question
Modeling
● Development of a model of the system based on the results of the system analysis step
Simulation
● Application of the model to the problem or question
● Derivation of a strategy to solve the problem or answer the question
Validation
● Does the strategy derived in the simulation step solve the problem or answer the ques-
tion for the real system?

The application of this scheme to the examples discussed above is obvious: in the car
example, the problem is that the car does not start and the car itself is the system. This
is the “definitions” step of the above scheme. The “systems analysis” step identifies the
1.2 Systems, Models, Simulations 5

battery and fuel levels as the relevant parts of the system, as explained above. Then, in
the “modeling” step of the scheme, a model consisting of a battery and a tank such as
in Figure 1.1 is developed. The application of this model to the given problem in the
“simulation” step of the scheme then leads to the strategy “check battery and fuel level”.
This strategy can then be applied to the real car in the “validation” step. If it works, that
is, if the car really starts after refilling its battery or tank, we say that the model is valid or
validated. If not, we probably need a mechanic who will then look at other parts of the car,
that is, who will apply more complex models of the car until the problem is solved.
In a real modeling and simulation project, the systems analysis step of the above scheme
can be very time-consuming. It will usually involve a thorough evaluation of the literature.
In many cases, the literature evaluation will show that similar investigations have been
performed in the past, and one should of course try to profit from the experiences made
by others that are described in the literature. Beyond this, the system analysis step usu-
ally involves a lot of discussions and meetings that bring together people from different
disciplines who can answer your questions regarding the system. These discussions will
usually show that new data are needed for a better understanding of the system and for the
validation of the models in the validation step of the above scheme. Hence, the definition
of an experimental program is also another typical part of the systems analysis step.
The modeling step will also involve the identification of appropriate software that can
solve the equations of the mathematical model. In many cases, it will be possible to use
standard software such as the software tools discussed in the next chapters. Beyond this,
it may be necessary to write your own software in cases where the mathematical model
involves nonstandard equations. An example of this case is the modeling of the press section
of paper machines, which involves highly convection-dominated diffusion equations that
cannot be treated by standard software with sufficient precision and hence needs specifi-
cally tailored numerical software [6].
In the validation step, the model results will be compared with experimental data. These
data may come from the literature or from experiments that have been specifically designed
to validate the model. Usually, a model is required to fit the data not only quantitatively
but also qualitatively, in the sense that it reproduces the general shape of the data as
closely as possible. See Section 3.2.3.4 for an example of a qualitative misfit between a
model and data. But, of course, even a model that perfectly fits the data quantitatively and
qualitatively may fail the validation step of the above scheme if it cannot be used to solve
the problem that is to be solved, which is the most important criterion for a successful
validation.
The modeling and simulation scheme (Note 1.2.3) focuses on the essential steps of mod-
eling and simulation, giving a rather simplified picture of what really happens in a concrete
modeling and simulation project. For different fields of application, you may find a num-
ber of more sophisticated descriptions of the modeling and simulation process in books
such as [7–10]. An important thing that you should note is that a real modeling and sim-
ulation project will very rarely go straight through the steps of the above scheme; rather,
there will be a lot of interaction between the individual steps of the scheme. For example,
if the validation step fails, this will bring you back to one of the earlier steps in a loop-like
structure: you may then improve your model formulation, reanalyze the system, or even
redefine your problem formulation (if your original problem formulation turns out to be
unrealistic).
6 1 Principles of Mathematical Modeling

Note 1.2.4 (Start with simple models!) To find the best model in the sense of
Note 1.2.2, start with the simplest possible model and then generate a sequence
of increasingly complex model formulations until the last model in the sequence passes
the validation step.

1.2.3 Simulation
So far we have given a definition of the term model only. The above modeling and simulation
schemes involve other terms, such as system and simulation, which we may view as being
implicitly defined by their role in the above scheme. Can this be made more precise? In the
literature, you will find a number of different definitions, for example, of the term simula-
tion. These differences can be explained by different interests of the authors. For example,
in a book with a focus on the so-called discrete event simulation, which emphasizes the
development of a system over time, simulation is defined as “the imitation of the operation
of a real-world process or system over time” [7]. In general terms, simulation can be defined
as follows:

Definition 1.2.2 (Simulation) Simulation is the application of a model with the


objective to derive strategies that help solve a problem or answer a question pertaining
to a system.

Note that the term simulation originates from the Latin word “simulare”, which means
“to pretend”: in a simulation, the model pretends to be the real system. A similar definition
has been given by Fritzson [8] who defined simulation as “an experiment performed on
a model”. Beyond this, the above definition is a teleological (purpose-oriented) definition
similar to Definition 1.2.1, that is, this definition again emphasizes the fact that simula-
tion is always used to achieve some goal. Although Fritzson’s definition is more general,
the above definition reflects the real use of simulation in science and engineering more
closely.

1.2.4 System
Regarding the term system, you will again find a number of different definitions in the
literature, and again some of the differences between these definitions can be explained by
the different interests of their authors. For example, [11] defines a system as “a collection
of entities, for example, people or machines, that act and interact together toward the
accomplishment of some logical end”. According to [12], a system is “a collection of objects
and relations between objects”. In the context of mathematical models, we believe it makes
sense to think of a “system” in very general terms. Any kind of object can serve as a system
here if we have a question relating to that object and if this question can be answered using
mathematics. Our view of systems is similar to a definition that has been given by [13]
(see also the discussion of this definition in [4]): “A system is whatever is distinguished
as a system”. [4] gave another definition of a “system” very close to our view of systems
here: “A system is a potential source of data”. This definition emphasizes the fact that
1.2 Systems, Models, Simulations 7

a system can be of scientific interest only if there is some communication between the
system and the outside world, as will be discussed below in Section 1.3.1. A definition
that includes the teleological principle discussed above has been given by Fritzson [8]
as follows:

Definition 1.2.3 (System) A system is an object or a collection of objects whose prop-


erties we want to study.

1.2.5 Conceptual and Physical Models


The model used in the car example is something that exists in our minds only. We can
write it down on paper in a few sentences and/or sketches, but it does not have any
physical reality. Models of this kind are called conceptual models [12]. Conceptual models
are used by each of us to solve everyday problems such as the car that refuses to start.
As K.R. Popper puts it, “all life is problem-solving”, and conceptual models provide us with
an important tool to solve our everyday problems [14]. They are also applied by engineers
or scientists to simple problems or questions similar to the car example. If their problem or
question is complex enough, however, they rely on experiments, and this leads us to other
types of models. To see this, let us use the modeling and simulation scheme (Note 1.2.3)
to describe a possible procedure followed by an engineer who wants to reduce the fuel
consumption of an engine: In this case, the problem is the reduction of fuel consumption,
and the system is the engine. Assume that the systems analysis leads the engineer to the
conclusion that the fuel injection pump needs to be optimized. Typically, the engineer will
then create some experimental setting where they can study the details of the fuel injection
process.
Such an experimental setting is then a model in the sense that it will typically be a very
simplified version of that engine, that is, it will typically involve only a few parts of the
engine that are closely connected with the fuel injection process. In contrast to a concep-
tual model, however, it is not only an idea in our mind but also a real part of the physical
world, and this is why models of this kind are called physical models [12]. The engineer will
then use the physical model of the fuel injection process to derive strategies – for example,
a new construction of the fuel injection pump – to reduce the engine’s fuel consumption,
which is the simulation step of the above modeling and simulation scheme. Afterward,
in the validation step of the scheme, the potential of these new constructions to reduce
fuel consumption will be tested in the engine itself, that is, in the real system. Physical
models are applied by scientists in a similar way. For example, let us think of a scientist
who wants to understand the photosynthesis process in plants. Similar to an engineer, the
scientist will set up a simplified experimental setting – which might be some container
with a plant cell culture – in which they can easily observe and measure the important
variables, such as CO2 , water, light, and so on. For the same reasons as above, anything
like this is a physical model. As before, any conclusion drawn from such a physical model
corresponds to the simulation step of the above scheme, and the conclusions need to be
validated by data obtained from the real system, that is, data obtained from real plants in
this case.
8 1 Principles of Mathematical Modeling

Input 1 Output 1
Input 2 Output 2
Input 3 Output 3
Input System Output .
.
.
Input n Output n

(a) (b)

Figure 1.2 (a) Communication of a system with the outside world. (b) General form of an
experimental dataset.

1.3 Mathematics as a Natural Modeling Language

1.3.1 Input–Output Systems


Any system that is investigated in science or engineering must be observable in the sense
that it produces some kind of output that can be measured (a system that would not sat-
isfy this minimum requirement would have to be treated by theologians rather than by
scientists or engineers). Note that this observability condition can also be satisfied by sys-
tems where nothing can be measured directly, such as black holes, which produce measur-
able gravitational effects in their surroundings. Most systems investigated in engineering
or science also accept some kind of input data, which can then be studied in relation to
the output of the system (Figure 1.2a). For example, a scientist who wants to understand
photosynthesis will probably construct experiments where the carbohydrate production of
a plant is measured at various levels of light, CO2 , water supply, and so on. In this case,
the plant cell is the system; the light, CO2 , and water levels are the input quantities; and
the measured carbohydrate production is the output quantity. Or, an engineer who wants
to optimize a fuel injection pump will probably change the construction of that pump in
various ways and then measure the fuel consumption resulting from these modified con-
structions. In this case, the fuel injection pump is the system, the construction parameters
changed by the engineer are the input parameters, and the resulting fuel consumption is
the output quantity.

Note 1.3.1 (Input–output systems) Scientists or engineers investigate “input–


output systems”, which transform given input parameters into output parameters.

Note that there are of course situations where scientists are looking at the system
itself and not at its input–output relations, for example, when a botanist just wants to
describe and classify the anatomy of a newly discovered plant. Typically, however, such
purely descriptive studies raise questions about the way in which the system works, and
this is when input–output relations come into play. Engineers, on the other hand, are
always concerned with input–output relations since they are concerned with technology.
The Encyclopedia Britannica defines technology as “the application of scientific knowledge
to the practical aims of human life”. These “practical aims” will usually be expressible
in terms of a system output, and the tuning of system input toward optimized system
output is precisely what engineers typically do, and what is in fact the genuine task of
engineering.
1.3 Mathematics as a Natural Modeling Language 9

1.3.2 General Form of Experimental Data


The experimental procedure described above is used very generally in engineering and in
the (empirical) sciences to understand, develop, or optimize systems. It is useful to think of
it as a means to explore black boxes. At the beginning of an experimental study, the system
under investigation is similar to such a “black box” in the sense that there is some uncer-
tainty about the processes that happen inside the system when the input is transformed into
the output. In an extreme case, the experimenter may know only that “something” hap-
pens inside the system that transforms input into output, that is, the system may be really
a black box. Typically, however, the experimenter will have some hypotheses about the
internal processes that they want to prove or disprove in the course of their study. That
is, experimenters typically are concerned with systems as gray boxes, which are located
somewhere between black and white boxes (more details in Section 1.5).
Depending on the hypothesis that the experimenter wants to investigate, they confront
the system with appropriate input quantities, hoping that the outputs produced by the
system will help prove or disprove their hypothesis. This is similar to a question-and-answer
game: the experimenter poses questions to the system, which is the input, and the sys-
tem answers to these questions in terms of measurable output quantities. The result is
a dataset of the general form shown in Figure 1.2b. In rare cases, particularly if one is
concerned with very simple systems, the internal processes of the system may already be
evident from the dataset itself. Typically, however, this experimental question-and-answer
game is similar to the questioning of an oracle: we know there is some information about the
system in the dataset, but it depends on the application of appropriate ideas and methods
if one wants to uncover the information content of the data and, so to speak, shed some
light into the black box.

1.3.3 Distinguished Role of Numerical Data


Now what is an appropriate method for the analysis of experimental datasets? To answer
this question, it is important to note that in most cases experimental data are numbers and
can be quantified. The input and output data of Figure 1.2b will typically consist of columns
of numbers. Hence, it is natural to think of a system in mathematical terms. In fact, a system
can be naturally seen as a mathematical function that maps given input quantities x into
output quantities y = f (x) (Figure 1.2a). This means that if one wants to understand the
internal mechanics of a system “black box”, that is, if one wants to understand the pro-
cesses inside the real system that transform input into output, a natural thing to do is to
translate all these processes into mathematical operations. If this is done, one arrives at a
simplified representation of the real system in mathematical terms. Now remember that a
simplified description of a real system (along with a problem we want to solve) is a model
by definition (Definition 1.2.1). The representation of a real system in mathematical terms
is thus a mathematical model of that system.

Note 1.3.2 (Naturalness of mathematical models) Input–output systems usually


generate numerical (or quantifiable) data that can be described naturally in mathemat-
ical terms.
10 1 Principles of Mathematical Modeling

This simple idea, that is, the mapping of the internal mechanics of real systems into
mathematical operations, has proved to be extremely fruitful to the understanding, opti-
mization, or development of systems in science and engineering. The tremendous success
of this idea can only be explained by the naturalness of this approach – mathematical
modeling is simply the best and most natural thing one can do if one is concerned
with scientific or engineering problems. Looking back at Figure 1.2a, it is evident that
mathematical structures emanate from the very heart of science and engineering. Anyone
concerned with systems and their input–output relations is also concerned with math-
ematical problems – regardless of their preferences and regardless of whether they treat
the system appropriately using mathematical models or not. The success of their work,
however, depends very much on the appropriate use of mathematical models.

1.4 Definition of Mathematical Models


To understand mathematical models, let us start with a general definition. Many different
definitions of mathematical models can be found in the literature. The differences between
these definitions can usually be explained by the different scientific interests of their
authors. For example, Bellomo and Preziosi [15] define a mathematical model to be a set
of equations that can be used to compute the time–space evolution of a physical system.
Although this definition suffices for the problems treated by Bellomo and Preziosi, it is
obvious that it excludes a great number of mathematical models. For example, many
economic or sociological problems cannot be treated in a time–space framework or based
on equations alone. Thus, a more general definition of mathematical models is needed if
one wants to cover all kinds of mathematical models used in science and engineering. Let
us start with the following attempt of a definition:

A mathematical model is a set of mathematical statements M = {Σ1 , Σ2 , … , Σn }.

Certainly, this definition covers all kinds of mathematical models used in science and
engineering as required. But there is a problem with this definition. For example, a simple
mathematical statement such as f (x) = ex would be a mathematical model in the sense of
this definition. In the sense of Minsky’s definition of a model (Definition 1.2.1), however,
such a statement is not a model as long as it lacks any connection with some system and with
a question we have relating to that system. The above attempt of a definition is incomplete
since it pertains to the word “mathematical” of “mathematical model” only, without any
reference to purposes or goals. Following the philosophy of the teleological definitions of
the terms model, simulation, and system in Section 1.2, let us define instead:

Definition 1.4.1 (Mathematical model) A mathematical model is a triplet (S, Q, M)


where S is a system, Q is a question relating to S, and M is a set of mathematical state-
ments M = {Σ1 , Σ2 , … , Σn } which can be used to answer Q.

Note that this is again a formal definition in the sense of Note 1.2.1 in Section 1.2. Again, it
is justified by the mere fact that it helps us to understand the nature of mathematical models
1.5 Examples and Some More Definitions 11

and that it allows us to talk about mathematical models in a concise way. A similar defini-
tion was given by Bender [16]: “A mathematical model is an abstract, simplified, math-
ematical construct related to a part of reality and created for a particular purpose”. Note
that Definition 1.4.1 is not restricted to physical systems. It covers psychological models as
well that may deal with essentially metaphysical quantities, such as thoughts, intentions,
feelings, and so on. Even mathematics itself is covered by the above definition. Suppose, for
example, that S is the set of natural numbers and our question Q relating to S is whether
there are infinitely many prime numbers or not. Then, a set (S, Q, M) is a mathematical
model in the sense of Definition 1.4.1 if M contains the statement “There are infinitely many
prime numbers” along with other statements which prove this statement. In this sense, the
entire mathematical theory can be viewed as a collection of mathematical models.
The notation (S, Q, M) in Definition 1.4.1 emphasizes the chronological order in which
the constituents of a mathematical model usually appear. Typically, a system is given first,
then there is a question regarding that system, and only then a mathematical model is
developed. Each of the constituents of the triplet (S, Q, M) is an indispensable part of the
whole. Regarding M, this is obvious, but S and Q are important as well. Without S, we
would not be able to formulate a question Q; without a question Q, there would be vir-
tually “nothing to do” for the mathematical model; and without S and Q, the remaining
M would be no more than “l’art pour l’art”. The formula f (x) = ex , for example, is such a
purely mathematical “l’art pour l’art” statement as long as we do not connect it with a sys-
tem and a question. It becomes a mathematical model only when we define a system S and
a question Q relating to it. For example, viewed as an expression of the exponential growth
period of plants (Section 3.10.4), f (x) = ex is a mathematical model which can be used to
answer questions regarding plant growth. One can say it is a genuine property of mathe-
matical models to be more than “l’art pour l’art”, and this is exactly the intention behind
the notation (S, Q, M) in Definition 2.3.1. Note that the definition of mathematical models
by Bellomo and Preziosi [15] discussed above appears as a special case of Definition 1.4.1 if
we restrict S to physical systems, M to equations, and only allow questions Q, which refer
to the space–time evolution of S.

Note 1.4.1 (More than “l’art pour l’art”) The system and the question relating to
the system are indispensable parts of a mathematical model. It is a genuine property of
mathematical models to be more than mathematical “l’art pour l’art”.

Let us look at another famous example that shows the importance of Q. Suppose we
want to predict the behavior of some mechanical system S. Then the appropriate mathe-
matical model depends on the problem we want to solve, that is, on the question Q. If Q is
asking for the behavior of S at moderate velocities, classical (Newtonian) mechanics can be
used, that is, M = {equations of Newtonian mechanics}. If, on the other hand, Q is asking for
the behavior of S at velocities close to the speed of light, then we have to set M = {equations
of relativistic mechanics} instead.

1.5 Examples and Some More Definitions


Generally speaking, one can say we are concerned with mathematical models in the sense
of Definition 1.4.1 whenever we perform computations in our everyday life, or whenever
12 1 Principles of Mathematical Modeling

we apply the mathematics we have learned in schools and universities. Since everybody
computes in their everyday life, everybody uses mathematical models, and this is why it
was valid to say that “everyone models and simulates” in the preface of this book. Let us
look at a few examples of mathematical models now, which will lead us to the definitions
of some further important concepts.

Note 1.5.1 (Everyone models and simulates) Mathematical models in the sense of
Definition 1.4.1 appear whenever we perform computations in our everyday life.

Suppose we want to know the mean age of some group


x (m)
of people. Then, we apply a mathematical model (S, Q, M),
1m 5 where S is that group of people, Q asks for their mean age,
∑n
and M is the mean value formula x = ( i=1 xi )∕n. Or, suppose
we want to know the mass X of some substance in the cylin-
drical tank of Figure 1.3, given a constant concentration c of
the substance in that tank. Then, a multiplication of the tank
volume with c gives the mass X of the substance, that is,
0 X = 5𝜋 c (1.1)
This means we apply a model (S, Q, M), where S is the tank,
Figure 1.3 Tank problem. Q asks for the mass of the substance, and M is Equation 1.1.
An example involving more than simple algebraic operations
is obtained if we assume that the concentration c in the tank in Figure 1.3 depends on the
height coordinate, x. In that case, Equation 1.1 turns into
5
X =𝜋⋅ c(x) dx (1.2)
∫0
This involves an integral, that is, we have entered the realms of calculus now.

Note 1.5.2 (Notational convention) Variables such as X and c in Equation 1.1,


which are used without further specification, are always assumed to be real numbers,
and functions such as c(x) in Equation 1.2 are always assumed to be real functions with
suitable ranges and domains of definition (such as c ∶ [0,5] → ℝ+ in the above example)
unless otherwise stated.

In many mathematical models (S, Q, M) involving calculus, the question Q asks for the
optimization of some quantity. Suppose, for example, we want to minimize the material
consumption of a cylindrical tin having a volume of 1 l. In this case,
M = {𝜋 r 2 h = 1, A = 2𝜋 r 2 + 2𝜋 rh → min } (1.3)
can be used to solve the problem. Denoting by r and h the radius and height of the tin,
the first statement in Equation 1.3 expresses the fact that the tin volume is 1 l. The second
statement requires the surface area of the tin to be minimal, which is equivalent to a min-
imization of the metal used to build the tin. The mathematical Problem 3 can be solved if
one inserts the first equation of 1.3 into the second equation of 1.3, which leads to
2
A(r) = 2𝜋 r 2 + → min (1.4)
r
1.5 Examples and Some More Definitions 13

This can then be treated using standard calculus (A′ (r) = 0, etc.), and the optimal tin
geometry obtained in this way is

1
r= 3 ≈ 0.54 dm (1.5)
2𝜋

3 4
h= ≈ 1.08 dm (1.6)
𝜋

1.5.1 State Variables and System Parameters


Several general observations can be made by referring to the examples in the last section.
As discussed in Section 1.1 above, the main benefit of the modeling procedure lies in the
fact that the complexity of the original system is reduced. This can be nicely seen in the
last example. Of course, each of us knows that a cylindrical tin can be described very easily
based on its radius r and its height h. This means everyone of us automatically applies the
correct mathematical model, and hence, similar to the car problem discussed in Section 1.1,
everybody automatically believes that the system in the tin problem is a simple thing. But
if we do not apply this model to the tin, it becomes a complex system. Imagine a Martian or
some other extraterrestrial being who has never seen a cylinder before. Suppose we say to
this Martian: “Look, here you have some sheets of metal and a sample tin filled with water.
Make a tin of the same shape which can hold that amount of water, and use as little metal
as possible”. Then this Martian will – at least initially – see the original complexity of the
problem. If they are smart, which we assume, they will note that infinitely many possible
tin geometries are involved here. They will realize that an infinite set of (x, y) coordinates
would be required to describe the sample tin based on its set of coordinates. They will realize
that infinitely many measurements or, equivalently, algebraic operations would be required
to obtain the material consumption based on the surface area of the sample tin (assuming
that they did not learn about transcendental numbers such as 𝜋 in their Martian school …).
From this original (“Martian”) point of view, we thus see that the system S of the tin
example is quite complex, in fact an infinite-dimensional system. And we see the power
of the mathematical modeling procedure, which reduces those infinite dimensions to only
two, since the mathematical solution of the above problem involves only two parameters: r
and h (or, equivalently, r and A). Originally, the system “tin” in the above example was an
infinite-dimensional thing not only with respect to its set of coordinates or the other aspects
mentioned above but also with respect to many other aspects that have been neglected in
the mathematical model since they are unimportant for the solution of the problem, for
example, the thickness of the metal sheets or its material, color, hardness, roughness, and
so on. All the information that was contained in the original system S = “tin” is reduced
to a description of the system as a mere Sr = {r, h} in terms of the mathematical model.
Here, we have used the notation Sr to indicate that Sr is not the original system, which we
denote S, but rather the description of S in terms of the mathematical model, which we call
the “reduced system”. The index “r” indicates that the information content of the original
system S is reduced as we go from S to Sr .

Note 1.5.3 (A main benefit) The reduction of the information content of complex
systems in terms of reduced systems (Definition 1.5.2) is one of the main benefits of math-
ematical models.
14 1 Principles of Mathematical Modeling

A formal definition of the reduced system Sr can be given in two steps as follows:

Definition 1.5.1 (State variables) Let (S, Q, M) be a mathematical model. Mathe-


matical quantities s1 , s2 , … , sn which describe the state of the system S in terms of M
and which are required to answer Q are called the state variables of (S, Q, M).

Definition 1.5.2 (Reduced system and system parameters) Let s1 , s2 , … , sn


be the state variables of a mathematical model (S, Q, M). Let p1 , p2 , … , pm be math-
ematical quantities (numbers, variables, functions) that describe properties of the
system S in terms of M, and which are needed to compute the state variables. Then
Sr = {p1 , p2 , … , pm } is the reduced system and p1 , p2 , … , pm are the system parameters
of (S, Q, M).

This means that the state variables describe the system properties we are really interested
in, while the system parameters describe the system properties needed to obtain the state
variables mathematically. Although we finally need the state variables to answer Q, the
information needed to answer Q is already in the system parameters, that is, in the reduced
system Sr . Using Sr , this information is expressed in terms of the state variables by means
of mathematical operations, and this is then the final basis to answer Q. For example, in
the tank problem above we were interested in the mass of the substance; hence, in this
example we have one state variable, that is, n = 1 and s1 = X. To obtain s1 , we used the
concentration c; hence, we have one system parameter in that example, that is, m = 1 and
p1 = c. The reduced system in this case is Sr = {c}. By definition, the reduced system con-
tains all the information about the system that we need to get the state variable, that is, to
answer Q. In the tin example, we needed the surface area of the tin to answer Q, that is, in
that case, we had again one state variable s1 = A. On the other hand, two system parame-
ters p1 = r and p2 = h were needed to obtain s1 , that is, in this case, the reduced system is
Sr = {r, h}.
Let us look at another example. In Section 3.10.4 below, a plant growth model will be dis-
cussed, which is intended to predict the time evolution of the overall biomass of a plant. To
achieve this, none of the complex details of the system “plant” will be considered except for
its growth rate. This means the complex system S = “plant” is reduced to a single param-
eter in this model: the growth rate r of the plant. In the above notation, this means we
have Sr = {r} (Figure 1.4). It is not necessary to be a botanist to understand how dramatic
this information reduction really is: everything except for the growth rate is neglected,
including all kinds of macroscopic and microscopic substructures of the plant, its roots,

Figure 1.4 (a) Potted plant. (b) The same potted plant
written as a reduced system.

Sr = {r }

(a) (b)
1.5 Examples and Some More Definitions 15

its stem, its leaves, as well as its cell structure, all the details of the processes that happen
inside the cells, and so on. From the point of view of such a brutally simplified model, it
makes no difference whether it is really concerned with the complex system “plant” (see
also Sections 5.2 and 5.3 for more details), with some shapeless green pulp of biomass that
might be obtained after sending the plant through a shredder, or even with entirely other
systems, such as a bacteria culture or a balloon that is being inflated.
All that counts from the point of view of this model is that a growth rate can be assigned
to the system under consideration. Naturally, botanists do not really like this brutal kind of
model, which virtually sends their beloved ones through a shredder. Anyone who presents
such a model at a botanists’ conference should be prepared to hear a number of questions
beginning with “Why does your model disregard…”. At this point we already know how to
answer this kind of question: we know that according to Definition 1.4.1, a mathematical
model is a triplet (S, Q, M) consisting of a system S, a question Q, and a set of mathematical
statements M, and that the details of the system S that are represented in M depend on
the question Q that is to be answered by the model. In this case, Q was asking for the time
development of the plant biomass, and this can be sufficiently answered based on a model
that represents the system S = “plant” as Sr = {r}. Generally one can say that the reduced
system of a well-formulated mathematical model will consist of no more than exactly those
properties of the original system that are important to answer the question Q that is being
investigated.

Note 1.5.4 (Importance of experiments) Typically, the properties (parameters)


of the reduced system are those, which need experimental characterization. In this
way, the modeling procedure guides the experiments, and instead of making the
experimenter superfluous (a frequent misunderstanding), it helps to avoid superfluous
experiments.

1.5.2 Using Computer Algebra Software


Coming back to the “1 l tin” model, Equation 1.4, it will now be demonstrated how the
mathematical problem behind this example can be efficiently solved using computer
algebra. In this book, we use the open-source computer algebra software Maxima, cf. the
Crashcourse Maxima in Section 6.2. Listing 1.1 provides a Maxima-based solution of the
tin problem.

Listing 1.1 Solution of the tin problem, Equation 1.4 (cf. book software Code Tin.mac).
1: A(r):=2*%pi*rˆ2+2/r;
2: define(A1(r),diff(A(r),r));
3: define(A2(r),diff(A1(r),r));
4: res:solve(A1(r)=0);
5: res[3],numer;
6: A2(r),res[3],numer;
7: A2(r)>0,res[3],pred;
8: solve(%pi*rˆ2*h=1,h),res[3],numer;
9: mms_real(e):= block ([rsol: []],for r in ratsimp(rectform(e)) do (
10: if freeof(%i,r) then rsol: cons(r,rsol)),rsol)$
11: mms_real(res);
16 1 Principles of Mathematical Modeling

2
(%o1) A (r) := 2πr 2 +
r

2
(%o2) A1 (r) := 4πr –
r2

4
(%o3) A2(r) := + 4π
r3

√ 3 %i – 1 √ 3 %i + 1 1
r= ,r=– ,r=
(%o4)
24/3 π1/3 24/3 π1/3 21/3 π1/3

(%o5) r = 0.5419260701392891
(%o6) 37.69911184307752
(%o7) true
(%o8) [h = 1.083852140278577]

1
(%o10) r=
21/3 π1/3
_

Figure 1.5 Result of Listing 1.1 in wxMaxima.

Lines 1–3 of the code define the function given in Equation 1.4 (denoted A(r)) and its
first and second derivatives (denoted A1(r) and A2(r)). Cf. §20 ff in the Crashcourse
Maxima for an explanation of function and derivative commands. The function A(r) and
its derivatives computed in lines 1–3 appear in the lines labeled (%o1)-(%o3) of the
wxMaxima output shown in Figure 1.5.
Line 4 of Listing 1.1 solves equation A′ (r) = 0 as required by standard calculus for the
optimization of A (cf. §15 of the Crashcourse Maxima for more information on the solve
command). The result appears in the line labeled (%o4) of Figure 1.5 as a list of three
solutions. As can be seen, the first two solutions involve the imaginary number denoted %i
in Maxima. These solutions are thus complex numbers and irrelevant for the tin problem.
The third solution is the correct, real-valued solution of the problem.
Line 5 of Listing 1.1 refers to the solution list that has been assigned to the variable res
in line 4, takes the third solution using notation res[3], and applies Maxima’s numer
option to enforce the decimal number format appearing in output line (%o5) of Figure 1.5
(cf. §12 of the Crashcourse regarding options in Maxima). This corresponds to the solution
reported above in Equation 1.5 as r = 0.54
In the standard optimization procedure of calculus, the second derivative is used to
decide whether r = 0.54 … is a maximum or minimum. This is done in line 6, which inserts
the third solution res[3] into the second derivative and writes the result in numerical for-
mat, cf. the output line labeled (%o6) of Figure 1.5. The resulting value A′′ (0.54 …) ≈ 37.7
is positive, and hence r = 0.54 … dm minimizes the material usage as required. Line 7
checks the validity of A′′ (0.54 …) > 0 using Maxima’s pred option (cf. §39 in the Crash-
course Maxima), which yields true in output line (%o7) (cf. Figure 1.5), confirming
again that r = 0.54 … dm is a minimum.
1.5 Examples and Some More Definitions 17

Line 8 of Listing 1.1 uses the solution res[3] to compute tin height h using the first
equation of Model 1.3, which gives h ≈ 1.08 dm corresponding to Equation 1.6, cf. output
(%o8) in Figure 1.5. Finally, lines 9–11 demonstrate how real values can be automatically
extracted from solution lists. Lines 9 and 10 define a function mms_real extracting real
values from lists using a for loop construction (cf. §40 ff. in the Crashcourse Maxima).
Line 11 applies this command to the solution list res obtained in line 4, giving the real
solution discussed above (cf. output (%o10) in Figure 1.5).

1.5.3 The Problem-Solving Scheme


In this example – and similarly in many other cases – one can clearly distinguish between
the formulation of a mathematical model on the one hand and the solution of the resulting
mathematical problem on the other hand, which can be done with appropriate software.
A number of examples will show this below. This means that it is not necessary to
be a professional mathematician if one wants to work with mathematical models. Of
course, it is useful to have mathematical expertise. Mathematical expertise is particularly
important if one wants to solve more advanced problems or if one wants to make sure
that the results obtained with mathematical software are really solutions of the original
problem and not numerical artifacts. As we will see below, the latter point is of particular
importance in the solution of partial differential equations (PDEs). However, people with
insufficient mathematical expertise may of course just ask a mathematician. Typically,
mathematical modeling projects will have an inter-disciplinary character. The important
point that we should note here is the fact that the formulation of mathematical models
can also be done by nonmathematicians. Above all, the people formulating the models
should be experts regarding the system under consideration. This book is intended to
provide particularly nonmathematicians with enough knowledge about the mathematical
aspects of modeling such that they can deal at least with simple mathematical models on
their own.

Note 1.5.5 (Role of software) Typically, the formulation of a mathematical model is


clearly separated from the solution of the mathematical problems implied by the model.
The latter (“the hard work”) can be done by software in many cases. People working
with mathematical models hence do not need to be professional mathematicians.

The tin example shows another important advantage of mathematical modeling. After
the tin problem was formulated mathematically (Equation 1.4), the powerful and well-
established mathematical methods of calculus became applicable. Using the appropriate
software (see Listing 1.1), the problem could then be solved with little effort. Without the
mathematical model for this problem, on the other hand, an experimental solution of this
problem would have taken much more time. In a similar way, many other problems in sci-
ence and engineering can be solved effectively using mathematics. From the point of view
of science and engineering, mathematics can be seen as a big resource of powerful meth-
ods and instruments that can be used to solve problems, and it is the role of mathematical
models to make these methods and instruments applicable to originally nonmathemati-
cal problems. Figure 1.6 visualizes this process. The starting point is a real-world system
S together with a question Q relating to S. A mathematical model (S, Q, M) then opens up
18 1 Principles of Mathematical Modeling

System S Figure 1.6 Problem-solving scheme.


Answer A
Question Q
Real world
Mathematical model (S,Q,M)
Mathematics
Mathematical
Answer A*
problem M

the way into the “mathematical universe”, where the problem can be solved using power-
ful mathematical methods. This leads to a problem solution in mathematical terms (A★ ),
which is then translated into an answer A to the original question Q in the last step.

Note 1.5.6 (Mathematical models as door opener) Translating originally non-


mathematical problems into the language of mathematics, mathematical models
virtually serve as a door opener toward the “mathematical universe” where powerful
mathematical methods become applicable to originally nonmathematical problems.

As the figure shows, the mathematical model virtually controls the “problem-solving
traffic” between the real and mathematical worlds, and hence, its natural position is located
exactly at the borderline between these worlds. The role of mathematics in Figure 1.6 can
be described like a subway train: since it would be a too long and hard way to go from the
system S and question Q to the desired answer A in the real world, smart problem solvers
go into the “mathematical underground”, where powerful mathematical methods provide
fast trains toward the problem solution.

1.5.4 Strategies to Set Up Simple Models


In many cases, a simple three-step procedure can be used to set up a mathematical model.
Consider the following:

Problem 1:
Which volumes of fluids A and B should be mixed to obtain 150 l of a fluid C that contains
70 g l−1 of a substance if A and B contain 50 and 80 g l−1 , respectively?

For this simple problem, many of us will immediately write down the correct equations:

x + y = 150 (1.7)

50x + 80y = 70 ⋅ 150 (1.8)

where x [l ] and y [l ] are the unknown volumes of the fluids A and B. For more complex
problems, however, it is good to have a systematic procedure to set up the equations. A well-
proven procedure that works for a great number of problems can be described as follows:
1.5 Examples and Some More Definitions 19

Note 1.5.7 (Three steps to setup a model)


● Step 1. Determine the number of unknowns, that is, the number of quantities that
must be determined in the problem. In many problem formulations, you just have to
read the last sentence where the question is asked.
● Step 2. Give precise definitions of the unknowns, including units. It is a practical expe-
rience that this should not be lumped with step 1.
● Step 3. Read the problem formulation sentence by sentence, translate this information
into mathematical statements, which involve the unknowns defined in step 2.

Let us apply this to Problem 1 above. In step 1 and step 2, we would ascertain that Problem 1
asks for two unknowns, which can be defined as
● x: volume of fluid A in the mixture [ l]
● y: volume of fluid B in the mixture [ l]
These steps are important because they tell us about the unknowns that can be used in
the equations. As long as the unknowns are unknown to us, it will be hard to write down
meaningful equations in step 3. Indeed, it is a frequent beginner’s mistake in mathematical
modeling to write down equations, which involve unknowns that are not sufficiently well
defined. People often just pick up symbols that appear in the problem formulation – such
as A, B, C in problem 1 above – and then write down equations like
50A + 80B = 70 (1.9)
This equation is indeed almost correct, but it is hard to check its correctness as long as
we lack any precise definitions of the unknowns. The intrinsic problem with equations
such as Equation 1.9 lies in the fact that A, B, C are already defined in the problem formu-
lation. There, they refer to the names of the fluids, although they are (implicitly) used to
express the volumes of the fluids in Equation 1.9. Thus, let us now write down the same
equation using the unknowns x and y defined above:
50x + 80y = 70 (1.10)
Now the definitions of x and y can be used to check this equation. What we see here
is that on the left-hand side of Equation 1.10, the unit is (grams), which results from the
multiplication of 50 g l−1 with x [l]. On the right-hand side of Equation 1.10, however, the
unit is grams per liter. So we have different units on the different sides of the equation,
which proves that this is a wrong equation. At the same time, a comparison of the units
may help us to get an idea of what must be done to obtain a correct equation. In this case,
it is obvious that a multiplication of the right-hand side of Equation 1.10 with some quan-
tity expressed in liters would solve the unit problem. The only quantity of this kind in the
problem formulation is the 150 l volume, which is required as the volume of the mixture,
and multiplying the 70 in Equation 1.10 with 150 indeed solves the problem in this case.

Note 1.5.8 (Check the units!) Always check that the units on both sides of your
equations are the same. Try to “repair” any differences that you may find using appro-
priate data of your problem.
20 1 Principles of Mathematical Modeling

A major problem in step 3 is to identify those statements in the problem formulation


that correspond to mathematical statements, such as equations, inequalities, and so on.
The following note can be taken as a general guideline for this:

Note 1.5.9 (Where are the equations?) The statements of the problem formulation
that can be translated into mathematical statements, such as equations, inequalities,
and so on, are characterized by the fact that they impose restrictions on the values of the
unknowns.

Let us analyze some of the statements in Problem 1 above in the light of this strategy:

● Statement 1. 150 l of fluid C is required.


● Statement 2. Fluid A contains 50 g l−1 of the substance.
● Statement 3. Fluid B contains 80 g l−1 of the substance.
● Statement 4. Fluid C contains 70 g l−1 of the substance.

Obviously, statement 1 is a restriction on the values of x and y, which translates immedi-


ately into the equation:

x + y = 150 (1.11)

Statement 2 and statement 3, on the other hand, impose no restriction on the unknowns.
Arbitrary values of x and y are compatible with the fact that fluids A and B contain 50 and
80 g l−1 of the substance, respectively. Statement 4, however, does impose a restriction on
x and y. For example, given a value of x, a concentration of 70 g l−1 in fluid C can be real-
ized only for one particular value of y. Mathematically, statement 4 can be expressed by
Equation 1.8 above. You may be able to write down this equation immediately. If you have
problems to do this, you may follow a heuristic (i.e. not 100% mathematical) procedure,
where you try to start as close to the statement in the problem formulation as possible. In
this case, we could begin with expressing statement 4 as

{Concentration of substance in fluid C} = 70 (1.12)

Then, you would use the definition of a concentration as follows:


{Mass of substance in fluid C}
= 70 (1.13)
{Volume of the mixture}
The next step would be to ascertain two things:

● The mass of the substance in fluid C comes from fluids A and B.


● The volume of the mixture is 150 l.

This leads to
{Mass of substance in fluid A} + {Mass of substance in fluid B}
= 70 (1.14)
150
The masses of the substance in A and B can be easily derived using the concentrations
given in Problem 1 above:
50x + 80y
= 70 (1.15)
150
1.5 Examples and Some More Definitions 21

This is Equation 1.8 again. The heuristic procedure that we have used here to derive this
equation is particularly useful if you are concerned with more complex problems where it
is difficult to write down an equation like Equation 1.8 just based on intuition (and where
it is dangerous to do this since your intuition can be misleading). Hence, we generally
recommend the following:

Note 1.5.10 (Heuristic procedure to set up mathematical statements) If you


want to translate a statement in a problem formulation into a mathematical state-
ment, such as an equation or inequality, begin by mimicking the statement in the
problem formulation as closely as possible. Your initial formulation may involve
nonmathematical statements similar to Equation 1.12 above. Try then to replace all
nonmathematical statements with expressions involving the unknowns.

Note that what we have described here corresponds to the systems analysis and model-
ing steps of the modeling and simulation scheme in Note 1.2.3. Equations 1.7 and 1.8 can
be easily solved (by hand and …) on the computer using Maxima’s solve command as
was described in Section 1.5.2 above. In this case, the Maxima command (cf. §15 in the
Crashcourse Maxima in Section 6.2)
solve([x+y=150,50*x+80*y=70*150]);

yields the following result:


[[x=50,y=100]]

As can be seen, the result is written in a nested list structure (lists are written in the form
“[a, b, c,…]” in Maxima): the inner list [x = 50, y = 100] gives the values of
the unknowns of the solution computed by Maxima, while the outer list brackets are nec-
essary to treat situations where the solution is nonunique (see the example in Section 1.5.2
above).

1.5.4.1 Mixture Problem


Since Problem 1 in the last section was rather easy to solve and the various recommenda-
tions made there may thus seem unnecessary at least with respect to this particular problem,
let us now see how a more complex problem is solved using these ideas:

Problem 2:
Suppose the fluids A, B, C, and D contain the substances S1 , S2 , and S3 according to the
following table (concentrations in grams per liter):

A B C D

S1 2.5 8.2 6.4 12.7


S2 3.2 15.1 13.2 0.4
S3 1.1 0.9 2.2 3.1

What is the concentration of S3 in a mixture of these fluids that contains 75% (percent
by volume) of fluids A and B and 4 and 5 g l−1 of the substances S1 and S2 , respectively?
22 1 Principles of Mathematical Modeling

Referring to step 1 and step 2 of the three-step procedure described in Note 1.5.7, it is
obvious that we have only one unknown here, which can be defined as follows:

● x: concentration of S3 in the mixture (grams per liter)

Now step 3 requires us to write down mathematical statements involving x. According


to Note 1.5.9, we need to look for statements in the above problem formulation that impose
a restriction on the unknown x. Three statements of this kind can be identified:

● Statement 1. 75% of the mixture consists of A and B.


● Statement 2. The mixture contains 4 g l−1 of S1 .
● Statement 3. The mixture contains 5 g l−1 of S2 .

Each of these statements excludes a great number of possible mixtures and thus imposes
a restriction on x. Beginning with statement 1, it is obvious that this statement cannot be
formulated in terms of x. We are here in a situation where a number of auxiliary variables
are needed to translate the problem formulation into mathematics.

Note 1.5.11 (Auxiliary variables) In some cases, the translation of a problem into
mathematics may require the introduction of auxiliary variables. These variables are
“auxiliary” in the sense that they help us to determine the unknowns. Usually, the prob-
lem formulation will provide enough information such that the auxiliary variables and
the unknowns can be determined (i.e. the auxiliary variables will just increase the size
of the system of equations).

In this case, we obviously need the following auxiliary variables:

● a: percent (by volume) of fluid A in the mixture


● b: percent (by volume) of fluid B in the mixture
● c: percent (by volume) of fluid C in the mixture
● d: percent (by volume) of fluid D in the mixture

Now statement 1 can be easily expressed as

a + b = 0.75 (1.16)

Similar to above, statement 2 and statement 3 can be formulated as

{Concentration of S1 in the mixture} = 4 (1.17)

and

{Concentration of S2 in the mixture} = 5 (1.18)

Based on the information provided in the above table (and again following a similar
procedure as in the previous section), these equations translate to

2.5a + 8.2b + 6.4c + 12.7d = 4 (1.19)

and

3.2a + 15.1b + 13.2c + 0.4d = 5 (1.20)


1.5 Examples and Some More Definitions 23

Since x is the concentration of S3 in the mixture, a similar argumentation shows


1.1a + 0.9b + 2.2c + 3.1d = x (1.21)
So far we have the four Equations 1.16, 1.19, 1.20, and 1.21 for the five unknowns x, a,
b, c, and d, that is, we need one more equation. In this case, the missing equation is given
implicitly by the definition of a, b, c, and d. These variables express percent values, and
hence, we have
a+b+c+d=1 (1.22)
Altogether, we have now obtained the following system of linear equations:
a + b = 0.75 (1.23)

2.5a + 8.2b + 6.4c + 12.7d = 4 (1.24)

3.2a + 15.1b + 13.2c + 0.4d = 5 (1.25)

1.1a + 0.9b + 2.2c + 3.1d = x (1.26)

a+b+c+d=1 (1.27)
Again, this system of equations can be solved similar to above using Maxima. In the
Maxima program Mix1.mac in the book software (see Section 6.4), the problem is solved
using the following code:

Listing 1.2 Code Mix1.mac (cf. book software, Section 6.4).


1: res:solve([
2: a+b=0.75
3: ,2.5*a+8.2*b+6.4*c+12.7*d=4
4: ,3.2*a+15.1*b+13.2*c+0.4*d=5
5: ,1.1*a+0.9*b+2.2*c+3.1*d=x
6: ,a+b+c+d=1
7: ]);
8: res,numer;

which yields the following result in Maxima:


[[ ]]
141 437 1365 1783 77 14 485
x= ,d = ,c = ,b = ,a = (1.28)
98 620 19 724 9862 4931 19 724
[[x = 1.43 … , d = 0.069 … , c = 0.18 … , b = 0.015 … , a = 0.73 …]] (1.29)
As can be seen, the equation system (1.23–1.27) corresponds to lines 2–6 of the above code
and these lines of code are embedded into Maxima’s solve command similar to the dis-
cussion in Section 1.5.4 above. The only new thing is that the result of the solve command
is stored in a variable named res in line 1 of Listing 1.2. This variable is then used in
line 8 of the code to produce a decimal result using Maxima’s numer command. This is
why the Maxima output above consists of two parts: Output 1.28 is the immediate output
of the solve command, and as you can see above, the solution is expressed in terms of
fractions. Although this is the most precise way to express the solution, one may prefer
24 1 Principles of Mathematical Modeling

5000 l B
α
4000 l r

r−h
3000 l E
x
2000 l A C
h
1000 l D L

(a) (b)

Figure 1.7 (a) Tank front side with volume labels. (b) Unknowns and auxiliary variables of the tank
labeling problem.

decimal numbers in practice. To achieve this, the numer command is applied in line 8 of
Listing 1.2 and yields output 1.29, using the Maxima’s option notation explained in §12 of
the Crashcourse Maxima (cf. Section 6.2). So we can finally say that the solution of Problem
2 is x ≈ 1.43 g l−1 , which is the approximate concentration of S3 in the mixture.

1.5.4.2 Tank Labeling Problem


When fluids are stored in horizontal, cylindrical tanks similar to the one shown in
Figure 1.7b, one typically wants to have labels on the front side of the tank as shown in
Figure 1.7a. In practice, this problem is often solved “experimentally”, that is, by filling the
tank with well-defined fluid volumes and then setting the labels at the position of the fluid
surface that can be seen from outside. This procedure may of course be inapplicable in
situations where the fluid surface cannot be seen from outside. More important, however,
is the cost argument: this experimental procedure is expensive in terms of time (working
time of the people who are performing the experiment) and material (e.g. the water that is
wasted during the experiment). It is much cheaper here to apply the mathematical model
that will be developed below. Unfortunately, the situation in this example – where the
problem could be solved cheaply and efficiently using mathematical models and open-
source software, but where expensive experimental procedures or, in some cases, expensive
commercial software solutions are used – is still rather the rule than the exception in many
fields.
Let us start with the development of an appropriate mathematical model. Let h (decime-
ters) be the height of a label at the front side of the tank as indicated in Figure 1.7b, and let
V(h) (cubic decimeters) be the filling volume of the tank that corresponds to h. If we want
to determine the label height for some filling volume Vf , then the following equation must
be solved for h:

V(h) = Vf (1.30)

Referring to Figure 1.7b, V(h) can be expressed as

V(h) = ACD ⋅ L (1.31)

where ACD (square decimeters) corresponds to the surface at the front side of the tank that
is enclosed by the line segments AC, CD, and DA. ACD can be expressed as

ACD = ABCD − ABC (1.32)


1.5 Examples and Some More Definitions 25

where the circular segment ABCD is


2𝛼 2
ABCD = 𝜋 r = 𝛼r 2 (1.33)
2𝜋
In the last equation, 𝛼 is expressed in radians (which makes sense here since the prob-
lem is solved based on Maxima below, which uses radians in its trigonometric functions).
The surface of the triangle ABC is
ABC = x(r − h) (1.34)
where

x= r 2 − (r − h)2 (1.35)
due to the theorem of Pythagoras. Using the last five equations and
( )
r−h
𝛼 = cos−1 (1.36)
r
in Equation 1.30 yields
( ) √
r−h 2
L ⋅ cos−1 r − L r 2 − (r − h)2 (r − h) = Vf (1.37)
r
Unlike the equations treated in the last sections, this is now a transcendental equation
that cannot be solved in closed form using Maxima’s solve command as before. To solve
Equation 1.37, numerical methods such as the bisection method or Newton’s method must
be applied [17]. In Maxima, the find_root command can be applied as follows:

Listing 1.3 Code Label.mac (cf. book software, Section 6.4).


1: V:10000$ L:20$
2: r:sqrt(V/%pi/L);
3: for i:1 thru 4 do (
4: res:find_root(
5: L*acos((r-h)/r)*rˆ2-L*sqrt(rˆ2-(r-h)ˆ2)*(r-h)=i*1000
6: ,h,0,r),
7: print("Label for V=",i*1000,"l:",res,"dm")
8: )$

This code solves the tank labeling problem by assuming a 10 000-l tank of length L = 2 m
based on Equation 1.37. Equation 1.37 appears in line 5 of the code, with its right-hand
side replaced by i*1000, which successively generates 1000, 2000, 3000, and 4000 as the
right-hand side of the equation due to the for command applied in line 3, so the problem
is solved for 1000, 2000, 3000, and 4000 l of filling volume in a single run of the code. What
the for …thru …do command in line 3 precisely does is this: it first sets i = 1 and then
executes the entire code between the brackets in lines 3 and 8, which solves the problem
for Vf = 1000 l; then, it sets i = 2 and executes the entire code between the brackets in lines
2 and 8 again, which solves the problem for Vf = 2000, and so on until the same has been
done for i = 4 (the upper limit given by “thru” in line 1). More information on the for-
loop construction can be found in §40 ff. of the Crashcourse Maxima (cf. Section 6.2).
Note that the arguments of the find_root command are in lines 5 and 6, between the
brackets in lines 4 and 6. Its first argument is the equation that is to be solved (line 5) fol-
lowed by three more arguments in line 6: the variable to be solved for (h in this case) and
26 1 Principles of Mathematical Modeling

upper and lower limits for the interval in which the numerical algorithm is expected to
look for a solution of the equation (0 and r in this case). Usually, reasonable values for
these limits can be derived from the application – in this case, it is obvious that h > 0, and it
is likewise obvious that we will have h = r for 5000-l filling volume since a 10 000-l tank is
assumed, which means that we will have h < r for filling volumes below 5000 l. The print
command prints the result to the computer screen. Note how text, numbers, and variables
(such as the variable res that contains the result of the find_root command, see line 4)
can be mixed in this command. Since the print command is a part of the for …thru
… do environment, it is invoked four times and generates the following result:
Label for V = 1000 1: 3.948086422946864 dm
Label for V = 2000 1: 6.410499677168014 dm
Label for V = 3000 1: 8.582542383270068 dm
Label for V = 4000 1: 10.62571600771833 dm

More information on find_root can be found in §18 ff. of the Crashcourse Maxima
(cf. Section 6.2).

1.5.4.3 Financial Mathematics


Sometimes, even simple mathematical models may lead to surprisingly complex solutions
that can be treated efficiently using computer algebra. Suppose we want to finance a
machine value P after four years using the capital K and an additional capital G expected
after one year. Mathematically, the following equation can be used to compute the interest
rate i from the given values K, G, and P:
K(1 + i)4 + G(1 + i)3 = P (1.38)
This is too complex for hand computation, so we use the following Maxima command:
(%i1) erg:solve(K*(1+i)ˆ4+G*(1+i)ˆ3=P,i)$ erg;
Since Equation 1.38 is of 4th order, this gives four very complex solutions in the list erg,
which are suppressed here since this would fill several book pages (execute the above code
in wxMaxima to see the formulas). To decide which of the four solutions is the right one,
we apply a heuristic procedure and write a few more lines in Maxima:
(%i2) erg[1],K:1,G:1,P:3,numer;
(%o2) i = - 2.658098067372152
(%i3) erg[2],K:1,G:1,P:3,numer;
(%o3) i = 0.1222909134350642
(%i4) erg[3],K:1,G:1,P:3,numer;
(%o4) i = - 1.248311578607314 %i - 1.232096423031456
(%i5) erg[4],K:1,G:1,P:3,numer;
(%o5) i = 1.248311578607314 %i - 1.232096423031456
Here, sample values K = 1, G = 1, and P = 3 are inserted into the four solutions
erg[1]–erg[4] and the results are negative for erg[1] and complex for erg[3] and erg [4]
since
√ the last two solutions involve the imaginary unit %i (which may be written as
−1 depending on the output settings of your Maxima installation). Only erg[2] can be
interpreted as an interest rate of about 12% as required. Figure 1.8 shows the complexity of
this solution (result of erg[2]; in Maxima).
Figure 1.8 Solution erg[2] of the financing problem.
Another Random Scribd Document
with Unrelated Content
THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the


free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree
to abide by all the terms of this agreement, you must cease
using and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only


be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project Gutenberg™
works in compliance with the terms of this agreement for
keeping the Project Gutenberg™ name associated with the
work. You can easily comply with the terms of this agreement
by keeping this work in the same format with its attached full
Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.

1.E. Unless you have removed all references to Project


Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Gutenberg” appears, or with which the phrase “Project
Gutenberg” is associated) is accessed, displayed, performed,
viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the United


States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it
away or re-use it under the terms of the Project Gutenberg
License included with this eBook or online at
www.gutenberg.org. If you are not located in the United
States, you will have to check the laws of the country where
you are located before using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is


derived from texts not protected by U.S. copyright law (does not
contain a notice indicating that it is posted with permission of
the copyright holder), the work can be copied and distributed to
anyone in the United States without paying any fees or charges.
If you are redistributing or providing access to a work with the
phrase “Project Gutenberg” associated with or appearing on the
work, you must comply either with the requirements of
paragraphs 1.E.1 through 1.E.7 or obtain permission for the use
of the work and the Project Gutenberg™ trademark as set forth
in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is


posted with the permission of the copyright holder, your use and
distribution must comply with both paragraphs 1.E.1 through
1.E.7 and any additional terms imposed by the copyright holder.
Additional terms will be linked to the Project Gutenberg™
License for all works posted with the permission of the copyright
holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files
containing a part of this work or any other work associated with
Project Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute


this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return or
destroy all copies of the works possessed in a physical medium
and discontinue all use of and all access to other copies of
Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project


Gutenberg™ electronic work or group of works on different
terms than are set forth in this agreement, you must obtain
permission in writing from the Project Gutenberg Literary
Archive Foundation, the manager of the Project Gutenberg™
trademark. Contact the Foundation as set forth in Section 3
below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on,
transcribe and proofread works not protected by U.S. copyright
law in creating the Project Gutenberg™ collection. Despite these
efforts, Project Gutenberg™ electronic works, and the medium
on which they may be stored, may contain “Defects,” such as,
but not limited to, incomplete, inaccurate or corrupt data,
transcription errors, a copyright or other intellectual property
infringement, a defective or damaged disk or other medium, a
computer virus, or computer codes that damage or cannot be
read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except


for the “Right of Replacement or Refund” described in
paragraph 1.F.3, the Project Gutenberg Literary Archive
Foundation, the owner of the Project Gutenberg™ trademark,
and any other party distributing a Project Gutenberg™ electronic
work under this agreement, disclaim all liability to you for
damages, costs and expenses, including legal fees. YOU AGREE
THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT
LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT
EXCEPT THOSE PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE
THAT THE FOUNDATION, THE TRADEMARK OWNER, AND ANY
DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE
TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL,
PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE
NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of
receiving it, you can receive a refund of the money (if any) you
paid for it by sending a written explanation to the person you
received the work from. If you received the work on a physical
medium, you must return the medium with your written
explanation. The person or entity that provided you with the
defective work may elect to provide a replacement copy in lieu
of a refund. If you received the work electronically, the person
or entity providing it to you may choose to give you a second
opportunity to receive the work electronically in lieu of a refund.
If the second copy is also defective, you may demand a refund
in writing without further opportunities to fix the problem.

1.F.4. Except for the limited right of replacement or refund set


forth in paragraph 1.F.3, this work is provided to you ‘AS-IS’,
WITH NO OTHER WARRANTIES OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of
damages. If any disclaimer or limitation set forth in this
agreement violates the law of the state applicable to this
agreement, the agreement shall be interpreted to make the
maximum disclaimer or limitation permitted by the applicable
state law. The invalidity or unenforceability of any provision of
this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the


Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and
distribution of Project Gutenberg™ electronic works, harmless
from all liability, costs and expenses, including legal fees, that
arise directly or indirectly from any of the following which you
do or cause to occur: (a) distribution of this or any Project
Gutenberg™ work, (b) alteration, modification, or additions or
deletions to any Project Gutenberg™ work, and (c) any Defect
you cause.

Section 2. Information about the Mission


of Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new
computers. It exists because of the efforts of hundreds of
volunteers and donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project
Gutenberg™’s goals and ensuring that the Project Gutenberg™
collection will remain freely available for generations to come. In
2001, the Project Gutenberg Literary Archive Foundation was
created to provide a secure and permanent future for Project
Gutenberg™ and future generations. To learn more about the
Project Gutenberg Literary Archive Foundation and how your
efforts and donations can help, see Sections 3 and 4 and the
Foundation information page at www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-
profit 501(c)(3) educational corporation organized under the
laws of the state of Mississippi and granted tax exempt status
by the Internal Revenue Service. The Foundation’s EIN or
federal tax identification number is 64-6221541. Contributions
to the Project Gutenberg Literary Archive Foundation are tax
deductible to the full extent permitted by U.S. federal laws and
your state’s laws.

The Foundation’s business office is located at 809 North 1500


West, Salt Lake City, UT 84116, (801) 596-1887. Email contact
links and up to date contact information can be found at the
Foundation’s website and official page at
www.gutenberg.org/contact
Section 4. Information about Donations to
the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission
of increasing the number of public domain and licensed works
that can be freely distributed in machine-readable form
accessible by the widest array of equipment including outdated
equipment. Many small donations ($1 to $5,000) are particularly
important to maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws


regulating charities and charitable donations in all 50 states of
the United States. Compliance requirements are not uniform
and it takes a considerable effort, much paperwork and many
fees to meet and keep up with these requirements. We do not
solicit donations in locations where we have not received written
confirmation of compliance. To SEND DONATIONS or determine
the status of compliance for any particular state visit
www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states


where we have not met the solicitation requirements, we know
of no prohibition against accepting unsolicited donations from
donors in such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot


make any statements concerning tax treatment of donations
received from outside the United States. U.S. laws alone swamp
our small staff.

Please check the Project Gutenberg web pages for current


donation methods and addresses. Donations are accepted in a
number of other ways including checks, online payments and
credit card donations. To donate, please visit:
www.gutenberg.org/donate.

Section 5. General Information About


Project Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could
be freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose
network of volunteer support.

Project Gutenberg™ eBooks are often created from several


printed editions, all of which are confirmed as not protected by
copyright in the U.S. unless a copyright notice is included. Thus,
we do not necessarily keep eBooks in compliance with any
particular paper edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg
Literary Archive Foundation, how to help produce our new
eBooks, and how to subscribe to our email newsletter to hear
about new eBooks.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookultra.com

You might also like