quot;. ### Interval Notation We can also use interval notation to express the domain of a function: - $(-\infty, \infty)$ reads "from negative infinity (excluded) to positive infinity (excluded)"; - $(-\infty, 5]$ reads "from negative infinity (excluded) to $5$ (included)"; - $(-\infty, 5)\cup(-\infty, 5)$ reads "from negative infinity (excluded) to $5$ (excluded)" AND "from 5 (excluded) to positive infinity (excluded)". $()$ are used to define exclusions, $[]$ to define inclusions, and $\cup$ to define unions. ### Common Pitfalls #### Square Roots One of the cases where we know to pay attention, because it affects the domain, is that of square roots and all other even roots such as $\sqrt[4]{x}$, $\sqrt[6]{x}$,... Inputs that would make the radicant (the expression under the root) be negative cannot be part of that function's domain. For instance, taking $\sqrt{5-4x}$, we know the radicant must be equal or superior to zero, such that $5-4x\geq 0$. Solving this inequality leaves us with $x \leq \frac{-5}{-4}$. Therefore the domain of our function is $D=\left\{x | x \leq \frac{5}{4} \right\}$. #### Denominators Denominators are another kind of troublemakers when it comes to determining the domain of a function. Inputs that would make the denominator equal zero cannot be part of that function's domain, since the whole fraction expression would resolve to $undefined$, i.e. not a real number, leading the output of the function to be $undefined$ as well. Taking for instance $f(x)=\frac{7x}{x-2}$, we see the denominator must satisfy the property of $x-2 \ne 0$. Solving the inequality leaves us with the domain $D=\left\{x | x \ne 2 \right\}$. ## Even & Odd Functions Functions can be even, odd or neither. Even functions satisfy the property that $f(-x)=f(x)$, like $x^2$, as $-1^2=1$. Odd functions satisfy $f(-x) = -f(x)$. For example, $f(x)=x^3$, as $f(−1)=(−1)^3=−1=−f(1)$. Many functions are neither, like $f(x)=x+1$, where $-f(x)\ne f(-x)$ and $f(-x)\ne f(x)$. Indeed, plugging in $-3$, we see that $-f(3) = -4 \ne -2 = f(-3)$, and that $f(-3) = -2 \ne 4 = f(3)$. Knowing a function is even or odd helps us visualize what its graph looks like. More precisely, it tells us what kind of symmetry the graph must have. Even functions have symmetry about the y-axis, while odd functions have symmetry about the origin. ## Evaluation Functions can be **evaluated**, meaning you can replace the independent variable with either a number or an expression. For a function $f(x)=x^2+2$, for instance, you can input the number $5$, which gives us $f(5)=5^2+2=27$, or input the expression $x+h$, so that $ f(x+h)=(x+h)^2+2=(x+h)\cdot(x+h)+2=x^2+h^2+2xh+2 $ Inputing another expression to a function is also called **function composition**. ^function-composition ## Piecewise Functions Piecewise functions are a special type of function that apply different expressions to input values depending on which part of the function's domain they fall into. For instance, $ f(x) = \begin{cases} x^3, & x < 1 \\ 3x-2, & x \geq 1 \end{cases} $ Upon evaluating $f(-1)$, we look at the right-hand side of the function. Since $-1 \lt 1$, we pick the expression $x^3$, leaving us with $f(-1) = -1$. Evaluating $f(7)$ gives us $f(7)=3\cdot7-2=19$. Note that while the domains of expressions of piecewise functions can never overlap, they are more often than not discontinuous. ## Operation of functions Functions can be subjected to operations, like any other expression. Let's define two functions, $f(x)= \frac{2x+3}{3x-2}$, and $g(x)=\frac{4x}{3x-2}$. We can for instance divide them, which takes the following form: $ (f/g)(x) =\frac{\frac{2x+3}{3x-2}}{\frac{4x}{3x-2}} =\frac{2x+3}{3x-2}\cdot\frac{3x-2}{4x} =\frac{2x+3}{4x} $ ⚠️ As for any function, the domain of the resulting function must satisfy the constraint of never allowing a denominator of $0$. But it is also the fact that **the domains of the original functions $f(x)$ and $g(x)$ must carry into the new domain**. Using domain notation, we can combine them to write the domain of $(f/g)(x)$ like so: $D: \left\{x | x \ne 0, x \ne \frac{2}{3}\right\}$. ## Slopes ### Average Rate of Change The average rate of change of a function over an interval describes the slope between two points on the graph of a function. This slope is that of the secant line passing through those two points. Given a function $f(x)$, and two points on its graph $(a,f(a))$ and $(b,f(b))$, the average rate of change is: $ \frac{f(b)-f(a)}{b-a} $ As the value of $b$ approaches $a$, the average rate of the function comes closer to the slope of the tangent at point $a$ until it functionally equals it as the difference between the two points becomes negligibly different. For instance, given a function $f(x)=x^2-2x$, and two input values $x=3$ and $x=5$, we calculate the average rate of change (or slope of the secant line between the two corresponding points) like so: $ \frac{f(5)-f(3)}{5-3} = \frac{(5^2-2\cdot5) - (3^2-2\cdot3)}{2} = \frac{15-3}{2} = \frac{12}{2} = 6 $ This method allows us to find the average slope of a graph over an interval. Interestingly, there will be one point on that interval where the instantaneous slope equals this average slope. As we make the two points closer and closer, the average slope becomes closer until equivalent to the tangent of the graph at that point. ### Difference Quotient To express the relationship between $\Delta y$ and $\Delta x$ in terms of $f(x)$, we can use the difference quotient of $f(x)$ given by the formula $ \frac{f(x+h)-f(x)}{h} $ where $h$, or $\Delta x$, represents the difference between $x$ and another sampled value along the $x$ axis. Essentially, we're subtracting $y$, or $f(x)$, from $y + \Delta y$, $\Delta y$ being the difference between $f(x+h)$ and $f(x)$, meaning $ \frac{f(x+h)-f(x)}{h} = \frac{\Delta y}{\Delta x} $ For instance, given a function $f(x) = x^2 + 1$, then, following the rules of [[Functions#^function-composition|function composition]], we can infer that $ f(x+h)=x^2+h^2+2xh+1 $ Therefore, $ \frac{f(x+h)-f(x)}{h} = \frac{x^2+h^2+2xh+1}{h} = h + 2x $ The difference quotient is therefore $h + 2x$. With the difference quotient, we are now able to compute the slope of a curve at any given point on the function graph as $h$ approaches $0$. To do so, we can substitute $h$ with $0$, meaning we're computing the slope at an *instant*. This slope gives us the direction in which we need to go to find the next point on the graph, which requires of us to think of a curve or a line as an infinite collection of points. I find the [[Cantor Set]] to be a good proxy to visually represent this idea. From our previous example, this gives us a slope of $2x$ at any given point (instant) on the graph. ### Difference between Average Rate of Change and Difference Quotient The average rate of change and the difference quotient are functionally equivalent. Let's prove it by comparing their respective formulas: $ \frac{f(b)-f(a)}{b-a} = \frac{f(x+h)-f(x)}{h} $ As $h$ represents the difference between the two input values $x$ and $x+h$, and as $b-a$ also gives us the difference between those two inputs on the left formula, we see that $b=x+h$ and $b-a=h$, therefore producing the exact same output and making the formulas interchangeable. The difference between them lies in the context where they're used: The average rate of change of a function focuses on finding the average slope of its graph over an interval, while the difference quotient is typically used in calculus to define the derivative of the function by replacing $h$ with $0$, thus making it possible to find the slope at an instant on the graph.