Mathematical Modeling ---using Algebraic Functions Algebraic functions serve as the bones for any mathematical model..A set of interconnected functions helps build the skeleton or structure of a mathematical model.Here we describe a few common functions and their specific uses with practical examples. What are functions any way? You may not recall from your high school math… well, math algebraic functions are one to one correspondence or relationships between variables. Take a simple case: sales depend on price ,in most cases , as follows: Sales S = a – b x Price Or S = a – b P -------equation (1) Here we say that for any given price,we have a number for sales---right..this is one-to one relationship …written as : S = f ( P) We can have a chain of such functions: Suppose you write: revenue R = sales x price = S x P We have another function : R = f ( S, P) Here, revenue is related to both sales and price, but since sales and price are already related by equation (1), We can write : R = g (P) another function of P In other words: R = S x P = (a – b p) P Expanding we have : Revenue R = ap – b P.P ---equation (2) You see how we have formed a chain of functions, interlocked to yield powerful model for revenue…. As we produce more to meet the demand or sales S, the cost of production may decrease: Cost per unit C= e – f S Expenditure for S units = E = S .C = S (e – f S) What is profit? Profit P = Revenue – Expenditure = R – E Thus we can expand the model with further reasoning. Non-linear relations Something more interesting here. Equation (1) was a linear equation---that is a straight line equation---You plot S in the Y axis and P in the X axis….You get a straight line---the simplest function there is. But the revenue equation is not so simple:it is not linear, but quadratic.We say that it is non-linear.There is a non-linear term of p squared. Most models will have non-linear functions which portray better the real world… But don’t get discouraged…Linear functions ,simple straight line graphs ,are still useful and widely used.But one caveat: use the linear, straight line relations over a short range of X values.We can handle non-linear relations by a series of straight lines over short intervals of X.
1
Quadratic functions and saturation effects Consider this example. In general ,we would expect sales to increase with increasing advertising expence. Or S = a + b E where s is the sales and E is the ad expence or cost. But ,if you keep increasing the ad expence,a stage may be reached that this expense does not result in increasing sales or revenue..the increase in sales is not proportional or straight line any more…there is ‘diminishing returns’ for this expense.To account for this ,a kind of ‘saturation effect’, we add a negative square term in expense; This new ,improved model is written as follows: S = a + bE – c E.E Note the negative sign for the third term…It decreases the sales with increase expense or E… a sort of corrective factor. For most models ,this equation would be adequate. I give another example…Suppose a car is moving at a speed V.S uppose the driver applies a brake….,The car comes to a stop after running for a distance D. D is called the ‘stopping distance’. Now, it is common to suppose that D will increase with higher speeds or D=a+bV But experience /observations tell us that D may be more for higher speeds; engineers model this with this equation: D = a + bV + c V.V Again , for low speeds, the model with linear term only [ D = a + b V] may be adequate. But not for higher speeds..the term c.V.V adds considerable distance . You see that the third term with square of the variable can be with positive or negative sign.These terms introduce ‘deviations from straight line relationship.” Power Laws Another important function to use is the power law relationships. Take an example: In most mass-production systems, higher the production quantity or batch size, lesser the cost of production per unit. This is a kind of ‘size effect’…in fact modern industry and large markets thrive on this relationship: Production cost C = A ( Q ) ^ n
----Equation (3)
Here Q, the quantity produced is raised to the power of n. ‘n’ is called the exponent. For many manufacturing processes,[particularly chemical/pharma/metallurgical industries] n = 0.8 or 0.9. Note that if n= 1, cost increases with quantity….But mass-production or large sale production results in slight reduction in cost with increasing quantity.
2
If you make bread in a small bakery, say about 1000 loaves per day, the production cost per loaf may be $1.0. A large , highly mechanized bakery can produce 100000 loaves per day , the cost of each loaf will be about 80 cents or less. {There could be many reasons for this—larger,more efficient machines,less labour,buying raw materials at lower cost,lower transportation cost per piece… but in these models we do not enquire into such details…we model with overall numbers] Such power laws are useful in modeling. [What is more , we find the constants A and n in the equation by a simple graphical method: Taking logarithms both sides, log C = log A + n log Q. If you plot log C versus log Q [ a log-log plot , it is called ] you will get a straight line; Y = a + b X where the slope b gives n and the intercept a gives log A or A. A log-log plot also will give the picture whether power law is suitable for modeling.!] Without a graphical method, you can take two sets of values for C and Q, say C1 for Q1 and C3 for Q2 and then solve for A and n. Exponential Growth or Decay Engineers and scientists use these all the time that it has been most common modeling function. Let us see a business example…You recall the compound-interest formula: Amount A = P (1+r ) ^ n Where P is the principal amount and r is the rate of increasing in a time period and n is the number of time periods. Now if whatever the value of r, if n is pretty large, we can write: A = P exp(rt) ---------equation (4) The rapid growth of bacteria, rabbits, mobile phone users, population growths are usually modeled with exponential function. If r is negative , we get rapid decay –as in radioactive decay in physics class---. Lots of work use this relationship. Modified Exponential—limited growth In many growth processes and business, the growth eventually stops or the growth rate becomes zero…that is ,in the exponential equation. P= A exp(rt) where r is the rate and time t, the rate is taken as constant over time t. But r may be decreasing slowly. This situation we model with a modified exponential form : P = A [ 1 – exp ( -kt)] As t increases, the term exp(-kt) decreases to zero and P reaches the value of A, the limiting or saturation value.
3
Logistic Function This is perhaps the most widely used function for modeling the growth and saturation or decline of any industry or a new market. Consider any new market ,like the mobile phone market now.Initially the growth rate will be small,----until many people come to know and try out the new thing and initial problems/doubts are removed in their minds.This is called an ‘incubation period’.. After that , the market shoots up,the growth rate increase rapidly. Then the growth rate reaches a maximum. Soon enough, the growth rate starts decreasing and a stage is reached when the growth rate is so small that it is almost zero.The saturation value for the product or # of users remain constant theeafter. { a new market,a new innovative product starts its growth curve.!] This ‘pattern’ is observed for most product industries.A new growth curve may start for another competing or better product or new innovation. This pattern is modeled using the “Logistic function”.The corresponding curve is called logistic curve or sigmoidal curve as it resembles the Greek letter ‘Sigma’. This function is also a modified form of exponential function. Let us denote the market number of users or number of product units sold as Y. As a function of time t : Y = 1 / ( 1 + b.exp(-kt)) This is the simplest form of Logistic function. We can always multiply this with a number N, which gives the saturation value. To understand this function, let us note that after along time, exp(-kt) goes to zero. Then the denominator becomes 1.So Y = 1 .This is the saturation value. When does the value of Y becomes one half. Y = ½ then the denominator = 2 Or b .exp(-kt) = 1 Or exp( -kt) = 1/b Solving we will get the time t* when Y reaches 0.5 or half way mark in the life cycle. Note that it can be shown that t* represents a critical time value. At t*,the growth rate is maximum; after that , the growth rate starts decreasing and goes to nearly zero.This point t* is called the ‘inflection point’ when the slope of y versus t curve reaches a maximum. How do we use the model? We can find out when t* or maximum growth rate occurs and also a time when the market saturates to 90% or 95% of its total value- set Y= 0.9 and solve for t to know when 90% saturation occurs. Please note that the modeling is not completed till we find the values of b and k. From initial points , we can reasonably fit the curve to get these values. This is what modelers and business analysts are paid to do.!
4
This logistic function is also used extensively in biology, to study the growth of a population ,say fish in a lake.In early 20th century, cell biologists used similar equations for the growth of cancer cells too. Logarithmic function When we model processes which are slow and takes a long time, we can use logarithmic function to contract the time axis. For instance if you are using a biological fermentation processes which takes years to ‘mature’, then the yield of resulting product as a function of time could be written as : Yield Y = a + b t where t is the time. The graph is condensed ,so to say , by writng: Y = a + b log t The yield may increase only 10% as we increase the time by ten times. Therefore many slow-growth process is modeled with log functions. How the models are created with repeated use of these functions? The functions given in this article are working tools in the tool box of modelers. Most models will involve using similar functions in different situations or domain of application. To illustrate, take the model equation for stopping distance : D = a + b v + cv.v Where v is the speed at braking or touch down on the runway for aircraft. Pilots always face the tricky problem of stopping the aircraft within the length of the runway after touch down.Quite a few accidents have occurred because the pilot overrun the runway.! This equation is quite useful for modeling the stopping distance, after the brakes are applied. But note that the constants a,b and c will vary for different situations: like the mass of the aircraft, the surfacing of the runway, the prevailing wind in the airport near the ground. To consider one factor: Aeroengineers have worked out possible values for a,b and c , for runway conditions–smooth, runway rough or worn out,and most important, runway covered with a thin layer of snow or runway with thick layer of snow. Thus the model gets complicated, but the structure is simple enough.! General Observation: Here I have detailed several most common functions which are the common tools in the tool box of modelers.There are more complex functions and also statistical distributions used in this field. The constants in these functions are to be determined by collecting data,then curve fitting and may be ,using statistical methods to find ‘the best fit’…These are techniques beyond the scope of this basic, first-level article. Let me add one more observation. Experience, however , proves the wisdom of keeping the equations simple, if you want lot of people to use them. Further use
5
of simple functions would help you to modify them as time and data keeps changing. { Note : The author has spent nearly two decades in modeling aircraft systems for defense and is glad to present this article for wider dissemination of the modeling approaches.]
6