Skip to main content
\(\require{cancel}\newcommand{\half}{ \frac{1}{2} } \newcommand{\ds}{\displaystyle} \newcommand{\ts}{\textstyle} \newcommand{\es}{ {\varnothing}} \newcommand{\st}{ {\mbox{ s.t. }} } \newcommand{\pow}[1]{ \mathcal{P}\left(#1\right) } \newcommand{\set}[1]{ \left\{#1\right\} } \newcommand{\lin}{{\text{LIN}}} \newcommand{\quot}{{\text{QR}}} \newcommand{\simp}{{\text{SMP}}} \newcommand{\diff}[2]{ \frac{\mathrm{d}#1}{\mathrm{d}#2}} \newcommand{\bdiff}[2]{ \frac{\mathrm{d}}{\mathrm{d}#2} \left( #1 \right)} \newcommand{\ddiff}[3]{ \frac{\mathrm{d}^#1#2}{\mathrm{d}{#3}^#1}} \renewcommand{\neg}{ {\sim} } \newcommand{\limp}{ {\;\Rightarrow\;} } \newcommand{\nimp}{ {\;\not\Rightarrow\;} } \newcommand{\liff}{ {\;\Leftrightarrow\;} } \newcommand{\niff}{ {\;\not\Leftrightarrow\;} } \newcommand{\De}{\Delta} \newcommand{\bbbr}{\mathbb{R}} \newcommand{\arccsc}{\mathop{\mathrm{arccsc}}} \newcommand{\arcsec}{\mathop{\mathrm{arcsec}}} \newcommand{\arccot}{\mathop{\mathrm{arccot}}} \newcommand{\erf}{\mathop{\mathrm{erf}}} \newcommand{\smsum}{\mathop{{\ts \sum}}} \newcommand{\atp}[2]{ \genfrac{}{}{0in}{}{#1}{#2} } \newcommand{\YEaxis}[2]{\draw[help lines] (-#1,0)--(#1,0) node[right]{$x$};\draw[help lines] (0,-#2)--(0,#2) node[above]{$y$};} \newcommand{\YEaaxis}[4]{\draw[help lines] (-#1,0)--(#2,0) node[right]{$x$};\draw[help lines] (0,-#3)--(0,#4) node[above]{$y$};} \newcommand{\YEtaxis}[4]{\draw[help lines] (-#1,0)--(#2,0) node[right]{$t$};\draw[help lines] (0,-#3)--(0,#4) node[above]{$y$};} \newcommand{\YExcoord}[2]{\draw (#1,.2)--(#1,-.2) node[below]{$#2$};} \newcommand{\YEycoord}[2]{\draw (.2,#1)--(-.2,#1) node[left]{$#2$};} \renewcommand{\textcolor}[2]{\color{#1}{#2}} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section0.5Parsing formulas

Consider the formula

\begin{align*} f(x) &= \frac{1+x}{1+2x-x^2} \end{align*}

This is an example of a simple rational function — that is, the ratio of two polynomials. When we start to examine these functions later in the text, it is important that we are able to understand how to evaluate such functions at different values of \(x\text{.}\) For example

\begin{align*} f(5) &= \frac{1+5}{1+10-25} = \frac{6}{-14} = -\frac{3}{7} \end{align*}

More important, however, is that we understand how we decompose this function into simpler pieces. Since much of your calculus course will involve creating and studying complicated functions by building them up from simple pieces, it is important that you really understand this point.

Now to get there we will take a small excursion into what are called parse-trees. You already implicitly use these when you evaluate the function at a particular value of \(x\text{,}\) but our aim here is to formalise this process a little more.

We can express the steps used to evaluate the above formula as a tree-like diagram  1 . We can decompose this formula as the following tree-like diagram

<<SVG image is unavailable, or your browser cannot render it>>

Figure0.5.1A parse tree of the function \(\frac{1+x}{1+2x-x^2}\text{.}\)

Let us explain the pieces here.

  • The picture consists of boxes and arrows which are called “nodes” and “edges” respectively.
  • There are two types of boxes, those containing numbers and the variable \(x\text{,}\) and those containing arithmetic operations “\(+\)”,“\(-\)”, “\(\times\)” and “\(/\)”.
  • If we wish to represent the formula \(3+5\text{,}\) then we can draw this as the following cherry-like configuration

    <<SVG image is unavailable, or your browser cannot render it>>

    which tells us to take the numbers “\(3\)” and “\(5\)” and add them together to get \(8\text{.}\)

    <<SVG image is unavailable, or your browser cannot render it>>

    evaluates to

    <<SVG image is unavailable, or your browser cannot render it>>

  • By stringing such little “cherries” together we can describe more complicated formulas. For example, if we compute “\((3+5)\times 2\)”, we first compute “\((3+5)\)” and then multiply the result by 2. The corresponding diagrams are

<<SVG image is unavailable, or your browser cannot render it>>

evaluates to

<<SVG image is unavailable, or your browser cannot render it>>

evaluates to

<<SVG image is unavailable, or your browser cannot render it>>

The tree we drew in Figure 0.5.1 above representing our formula has \(x\) in some of the boxes, and so when we want to compute the function at a particular value of \(x\) — say at \(x=5\) — then we replace those “\(x\)”s in the tree by that value and then compute back up the tree. See the example below

Start

<<SVG image is unavailable, or your browser cannot render it>>

\(\mapsto\)

<<SVG image is unavailable, or your browser cannot render it>>

\(\mapsto\)

<<SVG image is unavailable, or your browser cannot render it>>

\(\mapsto\)

<<SVG image is unavailable, or your browser cannot render it>>

\(\mapsto\)

<<SVG image is unavailable, or your browser cannot render it>>

and we are done.

This is not the only parse tree associated with the formula for \(f(x)\text{;}\) we could also decompose it as

<<SVG image is unavailable, or your browser cannot render it>>

We are able to do this because when we compute the denominator \(1+2x-x^2\text{,}\) we can compute it as

\begin{align*} 1+2x-x^2 &= \text{ either } (1+2x)-x^2 \text{ or } = 1 + (2x-x^2). \end{align*}

Both  2  are correct because addition is “associative”. Namely

\begin{align*} a+b+c &= (a+b)+c = a+(b+c). \end{align*}

Multiplication is also associative:

\begin{align*} a \times b \times c &= (a \times b) \times c = a \times (b \times c). \end{align*}

It is highly unlikely that you will ever need to explicitly construct such a tree for any problem in the remainder of the text. The main point of introducing these objects and working through a few examples is to realise that all the functions that we will examine are constructed from simpler pieces. In particular we have constructed all the above examples from simple “building blocks”

  • constants — fixed numbers like \(1, \pi\) and so forth
  • variables — usually \(x\) or \(t\text{,}\) but sometimes other symbols
  • standard functions — like trigonometric functions (sine, cosine and tangent), exponentials and logarithms.

These simple building blocks are combined using arithmetic

  • addition and subtraction — \(a + b\) and \(a-b\)
  • multiplication and division — \(a \cdot b\) and \(\frac{a}{b}\)
  • raising to a power — \(a^n\)
  • composition — given two functions \(f(x)\) and \(g(x)\) we form a new function \(f(g(x))\) by evaluating \(y=g(x)\) and then evaluating \(f(y) = f(g(x))\text{.}\)

During the rest of the course when we learn how to compute limits and derivatives, our computations require us to understand the way we construct functions as we have just described.

That is, in order to compute the derivative  3  of a function we have to see how to construct the function from these building blocks (i.e. the constants, variables and standard functions) using arithmetic operations. We will then construct the derivative by following these same steps. There will be simple rules for finding the derivatives of the simpler pieces and then rules for putting them together following the arithmetic used to construct the function.