Google Classroom
GeoGebraGeoGebra Classroom

Domain of a Function

In the previous section we discussed how mathematical models are sketches of the natural world. While we can never "get over" on this fundamental fact and make a mathematical model that is reality, that doesn't mean we can't learn a few tools for improving our sketches. To that end, we're going to study the concept of the domain of a function, which offers one way of improving functional models such as the ones you created earlier in this book. For instance, in the previous section we talked about how our model of the height of a projectile from the start and the end of the book really shouldn't extend to the left of the y-axis, or below the x-axis. The concept of a domain will help us amend this. Similarly, when we studied absolute maximums and minimums on a closed interval, we were restricting the function to a certain domain. Definition: The domain of a function is a restriction of the possible inputs of the function. So in the last applet in Falling Stuff on Earth, the domain of s(x) should be only those x values that are greater than 0 and less than the x-coordinate of SPLAT! You can specify domain in Geogebra by using an if( conditional statement. For instance, you can restrict s(x)=-4.9x^2+297.85x+616.06 to those x values greater than 0 and less than 62.79 with the following code: If(0 < x < 62.79, -4.9x^2 + 297.85x + 616.06) Try it out below.
The best way to think of this code is as you should think about any function: as a computer program (you can go back and review this way of thinking about functions here and here).
  • On the left, s(x) is giving the function the name s.
  • On the right is the code for how the function works
  • In the code on the right, the "if(" is computer programming construct called a conditional. 
The way if( conditionals work is that if the statement before the first comma is true, then the computer will do whatever is instructed after the comma. So in our case, if x is greater than 0 and less than 62.79, then the if command will plot -4.9x^2+297.85x+616.06. As you can see in the applet, this has the effect of plotting only the desired portion of s(x) which is above the x-axis and right of the y-axis. You can read more about the if( conditional in Geogebra in the Geogebra manual. If you ever want to restrict a function, for example f(x)=x^2 to a domain, just use an if( conditional as we did above. You may remember a similar concept from your earlier math classes called the range. We won't be discussing range in this book. I'm on a crusade against that topic. The correct concepts of range and codomain show up in advanced math classes, but the simplification of just the range has no place in an introductory calculus course.