What is a model Some notations – Independent variables: • Time variable: t, n • Space variable: x in one dimension (1D), (x,y) in 2D or (x,y,z) in 3D – State variables or dependent variables: is a scalar or vector valued variables, generally a function of the independent variables • u(t): the total capital invested; w(t): total dividend to the shareholders • Parameters: The parameters are physical quantities that characterize the physical system to be modeled. These quantities can be defined either in a dimensional or in a dimensionless form and can be obtained either by direct measurements on the system itself or by comparisons between the predictions of the model and the behavior of the real system. • c: speed of light; g: gravitational acceleration; profit rate, …. What is a model A mathematical model is an equation, or a set of equations, whose solution provides the time-space evolution of the state variable, that is the physical behavior, in the frame work of the mathematical model, of the related physical system. The equation that defines the mathematical model can also be called the state equation The Process of Mathematical Modeling Problem identification: The questions to be answered must be clarified. The underlying mechanism at work in the physical situation must be identified as accurately as possible. Formulate the problem in words, and document the relevant data. Assumptions and physical laws: The must be analyzed to decide which factors are important and which factors are to be ignored so that realistic assumptions can be made. Model construction or selection: This is the translation of the problem into mathematical language which normally results in a collection of questions and/or inequalities after the variables has been identified. The ``word’’ problem is transformed into an abstract mathematical problem. The Process of Mathematical Modeling Model analysis, solution & reduction: The mathematical problem is solved so that the unknown variables are expressed in terms of known quantities, and/or it is analyzed to obtain information about parameters. In some cases, the model may need simplified. Model interpretation: The solution to the abstract mathematical problem must be compared to the original ``word’’ problem to see if it makes in the real-world situation. If not, go back to formulate more realistic assumptions, and construct a new model. Model validation, revision & modification: Check whether the solution agrees with the data of the real-world problem. If the correlation is unsatisfactory, return to the ``word’’ problem for a re-appraisal of the data and the assumptions. Modify or add assumptions and construct a new model. The Process of Mathematical Modeling Model Implementation: If the solution agrees with the data, then the model can be used to predict what will happen in the future, or conclusions can be drawn to help in future planning, etc. In the case of predictions care should be taken to determine the time interval in which the predictions are valid. Flow chart of the modelling process identification assumptions and physical laws construction or selection analysis, solution & reduction interpretation validation, revision & modification Implementation Model classification No unique classification Classification by the state variables – Discrete models vs continuous models – state variables depend space variables? – Dynamic model vs static models – state variables depend on time t ??? Classification by the type of state equation f (u; x, r , t ) 0 – Algebra model – – ODE models -- y f (t , y ) – PDE models --- t u ( x , t ) Lu Model classification Classification by structure of the state equation – Linear models vs nonlinear models Classification by parameters and stochasticity – Optimization and/or static models; dynamic models; probability models; …. Justify a model – Usually use good vs bad (or valid vs invalid) – No absolutely right vs wrong!!! – A model maybe good in some situations & bad otherwise!! Main focus Main focus: – How to convert real-world into mathematical models – Basic mathematical analysis techniques • Dimensionless, analytical solutions, steady states, stability, equilibrium, bifurcation, …. – Some basic numerical methods Not focus – Theory of ODE & PDE, general numerical methods Some basic knowledge – Calculus, linear algebra, basic physical laws Another example: World population World population time 1650 1800 1918-27 1960 1974 1987 1999 2010 2022 population 0.5 1 2 3 4 5 6 7 8 Questions: – What is the population in 2020?? – What is the population in 2050??? Malthus’s model Consider the time interval [t , t t ] N (t t ) N (t ) # of birth # of death+miration=b N t d N t H t /t N (t t ) N (t ) bN d N H t t 0 dN(t) (b d ) N (t ) H dt births number of births per unit time per unit population N deaths d number of deaths per unit time per unit population N b Malthus’s model Malthus’s assumption: – Unlimited resource & no migration – Birth rate and death rate are both constants The equation d N (t ) (b0 d 0 ) N (t ) : r0 N (t ), dt N (0) N 0 0 N(t)=N 0 e r0 t , t 0 t 0, Malthus’s model Phenomena – Population `explosion’: ``story of Prof. Yanchu Ma’’ b0 d0 r0 0 – Population distinction b0 d0 r0 0 N (t ) when t N (t ) 0 when t – No change b0 d0 r0 0 N (t ) N0 for any t World population time 1650 1800 1918-27 1960 1974 1987 1999 2010 2022 population 0.5 1 2 3 4 5 6 7 8 Malthus’s model Prediction for World population by Malthus’s model r0 t N(t)=N 0 e , t 0 For prediction, we need determine the parameters N0 & r0 with N (t 0) N0 Choose two data in the population & set year 1650 as t=0 – Time – Population 1650 (t=0) 1800 (t=150) 0.5 1 Determine the parameters N 0 0.5 &1 N (t 150) N 0 e r0t 0.5 e150 r0 r0 1 ln 2 0.0046 150 World population Prediction: N(t)=0.5 er0 t 0.5 e0.0046t , t 0 time 1650 1800 1918-27 1960 1974 1987 1999 2010 2022 population 0.5 1 2 3 4 5 6 7 8 prediction 0.5 1 1.73-1.80 2.09 2.23 2.37 2.51 2.64 2.79 Observations: – Under predictions & possible reasons: • Ways to determine parameters!! • Model errors, …….. Population of Singapore 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1,646.40 1,702.40 1,750.20 1,795.00 1,841.60 1,886.90 1,934.40 1,977.60 2,012.00 2,042.50 2,074.50 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 2,112.90 2,152.40 2,193.00 2,229.80 2,262.60 2,293.30 2,325.30 2,353.60 2,383.50 2,413.90 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 2,532.80 2,646.50 2,681.10 2,732.20 2,736.00 2,733.40 2,774.80 2,846.10 2,930.90 3,047.10 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 3,135.10 3,230.70 3,313.50 3,419.00 3,524.50 3,670.70 3,796.00 3,927.20 3,958.70 4,027.90 2001 2002 2003 2004 2005 2006 4,138.00 4,176.00 4,186.10 4,238.30 4,341.80 4,483.90 Malthus’s model prediction: case 1 Choose two data in the population – Time – Population 1960 (t0=0) 1970 (t1=10) 1646.40 2074.50 Determine the parameters N 0 1646.4 & 2074.5 N (t1 10) N 0 e r0t1 1646.4 e10 r0 r0 1 2074.5 ln 0.02311 10 1646.4 Prediction N(t)=1646.4 er0 t 1646.4 e0.02311t , t0 Singapore population Population vs Predicted Population 6,000.00 Population 4,000.00 3,000.00 Predicted Population 2,000.00 1,000.00 t,year 45 40 35 30 25 20 15 10 5 0.00 0 N(t) '000 5,000.00 Singapore population Percentage Error -10.00 -15.00 t,year 45 40 35 30 25 20 15 10 -5.00 5 0.00 0 N(t)'000 5.00 Percentage Error Prediction Predicted population from year 2007-2050 10000.00 Predicted population from year 2007-2050 5000.00 t,year 89 83 77 71 65 59 53 0.00 47 N(t) 15000.00 Malthus’s model prediction: case 2 Choose two data in the population – Time – Population 1960 (t0=0) 1980 (t1=20) 1646.40 2413.90 Determine the parameters N 0 1646.4 & 2413.9 N (t1 20) N 0 e r0t1 1646.4 e 20 r0 r0 1 2413.9 ln 0.019133 20 1646.4 Prediction N(t)=1646.4 er0 t 1646.4 e0.019133t , t 0 Singapore population Population vs Predicted Population Population 4,000.00 2,000.00 Predicted Population t,year 45 40 35 30 25 20 15 10 5 0.00 0 N(t)'000 6,000.00 Singapore population Percentage error 10.00 5.00 Percentage error t,year 42 36 30 24 18 12 -5.00 6 0.00 0 Error % 15.00 Prediction Predicted population in year 2007-2050 Predicted population in year 2007-2050 5000.00 t,year 89 83 77 71 65 59 53 0.00 47 N(t) 10000.00 Another example: mixing problem The physical mixing of two species – Chemical system – Biological system – Environmental engineering A solid material is dissolved in a fluid – Solid is referred as solute; Fluid is referred as solvent – mixture is referred as solution; e.g. salt is dissolved in water Consider a reservoir or container with inflow and outflow – Inflow: • solution flows into the container at rate qi (liter of solution /sec: L/s) • Concentrations of the solute (units of mass of solute per unit volume of solution): ci (kg of solute/ liter of solution: kg/L) Another example: mixing problem – Outflow: • solution flows out of the container at rate qe (liter of solution /sec: L/s) • Concentrations of the solute (units of mass of solute per unit volume of solution): ce c(t ) (kg of solute/ liter of solution: kg/L) – Solution in the container is kept thoroughly mixed by stirring: uniform mixing Question: – What is the amount of solute in the container? – What is the concentration of the solute in the container? Mathematical Model: – Variables: • t : time; x (t ) : amount of solute in the container • V(t): volume of solution in the container x(t ) • c(t ) V (t ) : concentration of the solute Another example: mixing problem – Physical law or first principle: mass conservation of solute mass change of solute solute flow into solute flow out of in the container the container the container – Let t be infinite small time step and consider time interval [t , t t ] – Change of solute in the time interval is: x : x(t t ) x(t ) solute flow into solute flow out of qi ci t qe ce (t ) t [qi ci qe c(t )] t – Change rate: x x(t t ) x(t ) x(t ) x(t ) : qi ci qe c(t ) qi ci qe qi ci qe t t V (t ) V0 (qi qe )t Another example: mining problem – Initial data: V0 : volume of solution in the container at t 0 x0 x(0) : amount of solute in the container at t 0 – Rate of change: t 0 x(t ) : dx x(t t ) x(t ) x(t ) x(t ) lim qi ci qe , t 0 t 0 dt t V0 (qi qe ) t – First order ODE for time evolution of solute: x(t ) qi ci qe x(0) x0 x(t ) , t 0 V0 (qi qe ) t Another example: mixing problem Solution: – A special case: ci 0, V0 0, x0 0, qi qe 0 • Simplified first order ODE x(t ) dx x(t ) qe , dt V0 • Divide both sides by x(t ) dx 1 qe x dt V0 • Integrate both sides over [0,t] x(0) x0 Another example: mixing problem t t t qe t qe t dx dt ln x(t ) ln x(0) ln x 0 dt qe x dt V0 V0 0 V0 0 0 t – Solution Amount of solute: x(t ) x(0) e qe t / V0 x0 e qe t /V0 , Concentration: c(t ) – Interpretation • • • • t 0 x(t ) x(t ) x0 qe t /V0 e c0 e qe t /V0 , V (t ) V0 V0 t 0 Amount of solute decays exponentially with time Concentration decays exponentially with time Decay rates are the same Long time behavior t : x(t ) 0 & c(t ) 0 Another example: mixing problem – Another special case: • Simplified first order ODE x(t ) ci 0, V0 0, x0 0, qi qe dx x(t ) qe , dt V0 (qi qe ) t • Divide both sides by x(t ) dx 1 qe x dt V0 (qi qe ) t • Integrate both sides over [0,t] x(0) x0 Another example: mixing problem t ln t t q x(t ) dx dt ln x(t ) ln x(0) dt qe e ln[V0 (qi qe )t ] x(0) x dt V0 (qi qe )t qi qe 0 0 0 qe q V (qi qe )t [ln(V0 (qi qe )t ) ln V0 ] e ln 0 qi qe qi qe V0 qe V0 V0 ln ln qi qe V0 (qi qe )t V ( q q ) t i e 0 qe qi qe – Solution V0 x(t ) x0 V ( q q ) t i e 0 qe qi qe , x(t ) x(t ) c(t ) , V (t ) V0 (qi qe )t t 0 Another example: mixing problem – Interpretation • When inflow is fast than outflow: qi qe – Amount of solute and concentration decay with time – Decay rates are different – Long time behavior t : x(t ) 0 & c(t ) 0 • When inflow is slower than outflow: qi qe qe qe qi V0 (qe qi )t x(t ) x(t ) x(t ) x0 , c(t ) , V0 V (t ) V0 (qe qi )t – Finite time empty: t* V0 /(qe qi ) V (t ) 0 – Amount of solute and concentration decay with time t t*: x(t ) 0 & c(t ) 0 t0 Another example: mixing problem – Another special case: ci 0, V0 0, x0 0, qi qe 0 • Simplified first order ODE dx x(t ) x(t ) qi ci qe , dt V0 x(0) x0 • Solution x(t ) ci V0 x0 ci V0 e qe t V0 x0 x(t ) c(t ) ci ( ci ) e V0 V0 qe t V0 ci (c0 ci ) e qe t V0 Another example: mixing problem – Interpretation • Long time behavior: t : x(t ) ci V0 & c(t ) ci • When initial concentration is dense: c0 ci – Amount of solute and concentration decay with time – Decay rates are the same – Dilute process • When initial concentration is dilute: c0 ci – Amount of solute and concentration increase with time – Increase rates are the same – Pollution process Another example: mining problem – First order ODE for time evolution of solute: x(t ) qi ci qe x(0) x0 – A special case: • • • • x(t ) , t 0 V0 (qi qe ) t ci 0, V0 0, x0 0, qi qe 0 Amount of solute decays exponentially with time Concentration decays exponentially with time Decay rates are the same Long time behavior t : x(t ) 0 & c(t ) 0 Another example: mining problem – Another special case: ci 0, V0 0, x0 0, qi qe • Amount of solute and concentration decay with time • Decay rates are different • Long time behavior t : x(t ) 0 & c(t ) 0 – Another special case: ci 0, V0 0, x0 0, qi qe 0 • Long time behavior: t : x(t ) ci V0 & c(t ) ci • When initial concentration is dense: c0 ci – Dilute process • When initial concentration is dilute: – Pollution process c0 ci Another example: mixing problem – General case: x(t ) qi ci qe x(t ) , t 0 V0 (qi qe ) t x(0) x0 – Analytical solution in explicit form & interpretation Non constant inflow and outflow rates: x(t ) qi (t ) ci (t ) qe (t ) x (t ) t , t0 V0 [ qi ( s ) qe ( s )]ds 0 x (0) x0 – Analytical solution in integral form & interpretation