Make Your Own Function

In the previous activities we let Geogebra create our first function for us. This is a powerful way to build functions, but it's good to know a little bit about how to create them "by hand". In general, for simple data sets (like the one plotted below), humans can figure out what function matches the data, however for complex data sets, it's best to let a computer do it. For now though, let's take look at a really simple data set, and try to find the function that fits it.[br][br]Take a look at the dots plotted below. It seems that the 2nd coordinate of each point is "2 times the first coordinate minus 1". For example, (3,5) fits this rule, because 5 is equal to 3 times 2, minus 1. You should check the others as well. [br][br]In light of this observation, the function that fits the data can be described in plain English as:[br][br][code]the function f takes an input and multiplies it by 2, then it subtracts 1, then it returns the output[/code][br][br]If you think that description is clunky, you're not alone! That's why the algebraic code exists: to simplify and shorten the description of functions. For example, to create this function in Geogebra, just type this code snippet in: [br][code][br]f(x)=2x-1[/code]
Notice how f goes through all three points. The reason for this is that the points are all input/output pairs of the function. For example, [code](2,3)[/code] is an input/output pair because [code]f(2)=2*2-1=3[/code]. [br][i][br]Graphs of [u]all[/u] functions work this way. [br][/i][br]The graph of any function is a picture of the input/output pairs of the function. For most functions, small changes in the input result in small changes in the output, so the graph takes on the appearance of a line or a curve like above. But this isn't always the case. At the end of the book we'll take a look at a few functions that don't behave this way![br][br]Click ahead to see how your function works in a bit more detail.

Information: Make Your Own Function