Skip to main content
Contents Index
Dark Mode Prev Up Next
\(\usepackage{siunitx}
\newcommand{\lrp}[1]{\left(#1\right)}
\newcommand{\lrb}[1]{\left[#1\right]}
\newcommand{\lrbrace}[1]{\left\lbrace#1\right\rbrace}
\newcommand{\abs}[1]{\left|#1\right|}
\newcommand{\dint}{\displaystyle\int}
\newcommand{\defint}[2]{\dint^{#2}_{#1}}
\newcommand{\dlim}[2]{\displaystyle\lim_{#1\rightarrow #2}\,}
\newcommand{\dydx}{\dfrac{dy}{dx}}
\newcommand{\ddx}{\tfrac{d}{dx}}
\newcommand{\dddx}{\dfrac{d}{dx}}
\newcommand{\ifsol}[1]{\ifprintanswers{#1}\fi}
\newcommand{\Nat}{\mathbb{N}}
\newcommand{\Whole}{\mathbb{W}}
\newcommand{\Int}{\mathbb{Z}}
\newcommand{\Rat}{\mathbb{Q}}
\newcommand{\Real}{\mathbb{R}}
\newcommand{\Complex}{\mathbb{C}}
\DeclareMathOperator\arcsinh{arcsinh}
\DeclareMathOperator\arccosh{arccosh}
\DeclareMathOperator\arctanh{arctanh}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\newcommand{\sfrac}[2]{{#1}/{#2}}
\)
Section 9.4 Operations on Functions
Once one or more functions are assigned, we can use commands on those functions for various options, such as plotting them.
\begin{equation*}
\displaystyle f\, := \,x\mapsto 2\,{x}^{3}
\end{equation*}
Multiple functions can be combined through composition to create new expressions.
\begin{equation*}
\displaystyle g\, := \,t\mapsto t+1
\end{equation*}
\begin{equation*}
\displaystyle 2\, \left( t+1 \right) ^{3}
\end{equation*}
\begin{equation*}
\displaystyle 2\,{t}^{3}+6\,{t}^{2}+6\,t+2
\end{equation*}
Example 9.1 . Average Rate of Change of a Function over an Interval.
In this example, we will find the average rate of change of the function
\(f(x) = -2x^3 + 25x^2 + 15\) over the interval
\([2,7]\text{.}\) We begin by defining the function:
> f(x) := -2*x^3 + 25*x^2 + 15;
\begin{equation*}
\displaystyle f\, := \,x\mapsto -2\,{x}^{3}+25\,{x}^{2}+15
\end{equation*}
Once the function is defined, we can calculate the average rate of change over an interval \([a,b]\) by using the formula
\begin{equation*}
\frac{f(b)-f(a)}{b-a}\text{.}
\end{equation*}
In this case, we let \(a=2\) and \(b=7\text{:}\)
\begin{equation*}
\displaystyle 91
\end{equation*}
The average rate of change over the interval
\([2,7]\) is
\(91\text{.}\) The units of this rate would be given in (units of
\(y\) )/(units of
\(x\) ).
Example 9.2 . Plotting Transformations of Functions.
> g(x) := 2*sin(Pi*x); plot( g(x), x=0..4, y=-4..4 );
> plot( [g(x), 0.5*g(x)], x=0..4, y=-4..4);
> plot( [ g(x), abs(g(x)) ], x=0..4, y=-4..4);