# Functions in general

Did your bill of the mobile phone shock you? Were you surprised of your taxes? In many real-life [br]situations there is a dependency on quantities: the time of your calls, your annual salary etc. In mathematics, these [color=#0000ff]dependencies are called functions[/color]. [br][br]Usually, the function is described as [i]f[/i]([i]x[/i]), where [i]f[/i] is the name of a function and [i]x[/i] is the variable. In the example above, the function could be called mobile and the variables would the time of your calls ([i]t[/i]) and number of the SMS sent ([i]n[/i]).[br][br][color=#0000ff][u]Example 1.[/u][/color] One Finnish mobile phone operator promised: the monthly price of our SIM is only 0.66 euro and the calls are 0.069 euro/min and one SMS is 0.069 euro. Define the function to describe the amount of the monthly payment.[br][br]You have to pay 0.66 euro every month although you do not call anybody or send any SMS. The time of your calls during one month is [i]t[/i] and the number of the SMS sent is [i]n[/i]. If the name of your function is [i]mobile[/i], then [br][br] ﻿$\Large mobile(t,n)=0.66+0.069t+0.069n,$[br] [br]where the constant 0.66 is the compulsory monthly payment. There are two variables in this example [br]that is very normal in real-life situations. [br][br][br][color=#0000ff]The domain is set of permissible values for variables[/color]. The domain is often restricted, for example, by zeros of the denominator or by the values which make result inside the square root negative. Polynomial functions, sine and cosine functions are known to be defined in $\Large\cal R.$[br][br][color=#0000ff]The range is set of values for a given domain[/color]. Defining the range is not always easy and may require lots of work. [color=#0000ff]For functions, it is always a single output for a single input[/color].[br][br][u][color=#0000ff]Example 2[/color].[/u] Which of the following are graphs of functions?[br] [br]
[br][color=#0000ff][u]Example 3.[/u][/color] For a salesperson, it is paid a fixed salary of 1500 euros in a month and also a provision based on sales in a year as follows:[br][br][list][*]10 percent for sales exceeding 100 000 euros[/*][*]15 percent for sales exceeding 200 000 euros[/*][/list][br][br]Mathematically: Annual salary of the salesperson is a function of annual sales. Let us define: [i]x[/i] = annual sales. Now, the function describing the annual salary is got from the above information:[br] [br] [br] ﻿$\Large f(x)=\begin{cases}18000,&\text{ if } x\leq 100000\\[br]18000+10\% \cdot (x-100000),&\text{ if } 100000 < x\leq 200000\\[br]28000+15\%\cdot(x-200000),&\text{ if } x\geq 200000\\\end{cases}$[br][br]Function [i]f[/i] is called a piecewise defined linear function and it is usual in taxation, social security, et cetera.[br]