<p><a href="https://www.prepswift.com/quizzes/quiz/prepswift-functions-1" target="_blank">Functions 1 Exercise</a></p><p>For our introduction in <span style="color:#27ae60;">Functions I</span>, I recommend thinking of a function as a machine that takes an INPUT and then spits out an OUTPUT. Functions are equations denoted by the $f(x)$ symbol. Let's make sure we understand all of the terminology with an example.</p>
<p>$$f(x) = x^2 +1$$</p>
<p>The input is what's between the parentheses. In this case, the input is simply $x$. </p>
<p>The output is $f(x)$, which is also equal to $x^2+1$, so both of these can be considered the output. Let's recap:</p>
<ul>
<li>INPUT: $x$</li>
<li>OUTPUT: <span style="color:#e74c3c;">Either</span> $f(x)$ <span style="color:#e74c3c;">or</span> $x^2+1$.</li>
</ul>
<p>So let's imagine we start inputting values into our function machine, say $x=3$. We then get...</p>
<p>$$f(3)=3^2 +1 = 10$$</p>
<p>So we have $f(3) = 10$. In other words, when the input is $3$, the output, $f(3)$, is $10$.</p>
<p><strong><span style="color:#8e44ad;">Another Thing to Keep in Mind</span></strong></p>
<p>You can set one function equal to another. For example...</p>
<p>$$f(x) = f(x+1)$$</p>
<p>What exactly is this saying? It's saying that the output of the left side of the equation, $f(x)$ is equal to the output of right side of the equation, $f(x+1)$, even when we add $1$ to the input. Remember the input is what's inside the parentheses. So let's translate...</p>
<p>Even when we add $1$ to the input, the output remains the same. So if $f(3) = 7$, we also know that $f(4)=7$. And $f(5)$..and $f(6)$...you get the idea.</p>