Unformatted text preview:

CPS 101 Introduction to Computational ScienceWensheng ShenDepartment of Computational ScienceSUNY BrockportA function is one kind of mathematical expression, which tells how one thing depends on others. In mathematical applications, functions are often representations of real phenomena or events, or models. Obtaining functions to act as a model is the key to understand physical, natural, and social science phenomena. Functions can be explicit or implicit.Functions can be given by formulas, tables, and graphs.Chapter 8: Functions8.1 Functions given by formulasIn mathematics, a formula is a concise way of expressing general relationships between quantities in terms of symbols.Functions of one variableIf your job pays $9.00 per hour, then the money M (in dollars) you can make depends on the number of hours h that you work. The relationship is given be a simple formula:Money = 9 × Hours workedM = 9h (dollars)The formula shows how the money M depends on the number of hours h. We say that M is a function of h, where h is an independent variable. The more general form is M=M(h) or M=M(t)Functions of several variablesYou grocery bill G may depend on then number of apples you buy (a), the number of sodas you buy (s), the number of frozen pizzas (p). If apples cost 60 cents each, sodas cost 50 cents each, and pizzas cost $3.25 each, then we can express G=G(a,s,p) asGrocery bill = cost of apple + cost of sodas + cost of pizzasG = 0.6a + 0.5s + 3.25p (dollar).A grocery bill Use functional notation to show the cost of buying 4 apples, 2 sodas, and 3 pizzas, and then calculate itG(4,2,3) = 0.6×4 + 0.5×2 + 3.25×3= 13.15 (dollars)Explain the meaning of G(2,6,1)The value of G when a=2, s=6, and p=1. the grocery bill for 2 apples, 6 sodas and 1 pizza.Calculate the value of G(2,6,1)G(2,6,1) = 0.6×2 + 0.5×6 + 3.25×1 = 7.45 (dollars)Borrowing money When you borrow money to buy a home or a car, you pay off the loan in monthly payments. If you borrow P dollars at a monthly interest rate of r and wish to pay off the note in t months, then your monthly payment M=M(P,r,t) in dollars can be calculated as1)1()1(−++=ttrrrPMExplain the meaning of M(7800, 0.0067, 48): the monthly payment on a $7800 loan at a monthly interest rate of 0.67% for 48 months. M(7800, 0.0067, 48) = (7800×0.0067×1.006748)/(1.006748– 1) = $190.57Suppose you borrow $5000 to buy a car and wish to pay it off over 3 years. The monthly interest is 0.58%. Use function notation to show your monthly payment and then calculate its value. M(5000, 0.0058, 36) = (5000×0.0058×1.005836)/(1.005836– 1) = $154.298.2 Functions given by tablesFunctions were used in the form of tables of values long before the idea of using formulas. Functions given in tables leave gaps and are incomplete, so they appear less useful than functions given by formulas. However, tables often clearly show trends that are not easily noticed from formulas, and in many cases tables of values are much easier to obtain than is a formula. Tabling a function is a common way to express functions when data is gathered by sampling.Reading tables of values The population of the United States (N) depends on the date (d),i.e., N=N(d) is a function of d. A table was taken from the 1995 edition of the Statistical Abstract of the United States. It shows the population in millions each decade from 1950 to 1990. 249.40227.23203.98179.98151.87N=population in millions19901980197019601950d=yearTo get the population in 1980, we look at the column corresponding to d = 1980 and read N = 227.23 million people. N(1980) = 227.23Filling gaps by averagingFunctions given by tables of values have their limitations: they always leave gaps. We can fill these gaps by averaging. Example: the population in the United States in 1975 N(1975)61.2152)1980()1970()1975( =+=NNNThe actual population in the US in 1975 is 215.47 million. The averaging strategy works very well in this particular case. But the estimated number is not the only solution, we may use weighted average, or do data fitting, and then do the estimation.Average rates of changeOur goal is to get the best estimate for the US population in 1972. It does not make sense to average the population in 1970 and 1980. We can do this by finding the average rates of change. From 1970 to 1980, the population has increased from 203.98 million to 227.23 million. There is an increase of 227.23-203.98 = 23.25 million in ten years. The population increase each year is 23.25/10 = 2.325 million.Population in 1972 = population in 1970 + two years of growth = 203.98+2*2.325 = 208.63 (million)A skydiver During the period of a skydiver’s free fall, he is pulled downward by gravity but his velocity is retarded by air resistance, which increases as velocity increases. 176176175.81751711470Velocity v6050403020100Time tQuestion: (1) what is the rate of change in each 10-second interval(2) to find the velocity at t = 33 seconds?(3) What is the velocity at t=70 seconds?8.3 Functions given by graphs The idea of picturing a function as a graph is credited to Nicole Oresme in 14thcentury. In his study, he represented the velocity of an object using two dimensions, a base line representing time, and a perpendicular line whose length representing the velocity at each instant. He said, the velocity cannot be known any better, more clearly, or more easily than by such mental images and relations to figures.  A picture is worth a thousand words. One of the best features of a graph is that it provides an overall view of a function which makes it easy to deduce important properties.What is the best time to sell and buy Microsoft stocks from Aug. 28, 2006 to Aug 28. 2007?What is the maximum amount of money you can make if you buy and sell 1000 shares on July 28?Example: driving down a straight roadYou leave home at noon and drive your car down a straight road for a visit to a friend’s house. Your distance D (in miles) from home as a function of time t (in hours) since noon is shown in the graph. 1. During what time period are you at your friend’s house?2. Over what time period is the graph decreasing? What does this portion of the graph represent? 3. At what value of t is the graph rising most steeply? 4. At what time do you go back home?distance from home0204060801001201400 1 2 3 4 5 6 7 8t=time in hours since noond=distance from home in milesAnswers:How to convert a graph


View Full Document

BROCKPORT CPS 101 - Chapter 8: Functions

Download Chapter 8: Functions
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Chapter 8: Functions and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Chapter 8: Functions 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?