Chapter 4. Functions
OBJECTIVESWhen you have completed this chapter, you should be able to
|
The equations we have been solving in the last few chapters have contained only one variable. For example,
- x(x − 3) = x2 + 7
contains the single variable x.
But many situations involve two (or more) variables that are somehow related to each other. Look, for example, at Fig. 4-1, and suppose that you leave your campsite and walk a path up the hill. As you walk, both the horizontal distance x from your camp, and the vertical distance y above your camp, will change. You cannot change x without changing y, and vice versa (unless you jump into the air or dig a hole). The variables x and y are related.
In this chapter we study the relation between two variables and introduce the concept of a function. The idea of a function provides us with a different way of speaking about mathematical relationships. We could say, for example, that the formula for the area of a circle as a function of its radius is A = πr2.
Figure 4.1. FIGURE 4-1
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access