Class 9
Between Class Sessions - Prep for Day 9
Please spend around 2 hours working between class sessions, focusing on the tasks below. Use any extra time to complete KnewtonAlta assignments and/or work on Project tasks.
Pick something from your prep today that you can share with your group in class. It might be something new that you learned. It might be questions you have that are still unanswered, or a question along with what helped you eventually answer it. It might be something tricky that you solved. It might be a review topic that helped you remember something. It might be a conversation you had with AI that was helpful. You will have a chance to share this with your peers during class. Come ready to articulate your thinking and questions.
Preparation
(1) Logarithm Introduction and Practice
Watch these video from mathispower4u.
(2) Function “Fairy Tales”
The local elvish population is modeled by the function \(P(x;a,b) = ax+b\), where \(x\) is the number of years since 2000.
- Letting \(a=2\) and \(b=30\), we have \(P(x) = 2x+30\). Plot this function and tell the story given by this model.
- How many elves does this model say were alive in 2020?
You can use the code below to help you tackle this problem.
p <- function(x,a=2,b=30){a*x+b}
x <- seq(-4,200,0.1)
plot(x,p(x),type='l',ylim=c(0,500))
abline(h=0,col='gray')
abline(v=0,col='gray')
p(20)Regular Reminders
Skill Practice (KA Homework)
Continue working on the following assignments.
- 1 – Definition of Logarithm
- 1 – Evaluate Exponential and Logarithmic Functions
- 1 – Properties of Logarithms
Applied Practice (Project Work)
- Prepare for Project 1 Task 3
- Read the Project 1 Task 3 instructions
- Watch the video example of visually fitting f2. The link for this video is also in the Project 1 (Task 3) Instructions.
During Class
Brain Gains
- The local elvish population is modeled by the function \(P(x;a,b) = ax+b\), where \(x\) is the number of years since 2000 (this means the domain is \(x \geq 0\)).
Letting \(a=5\) and \(b=10\), we have \(P(x) = 5x+10\). Plot this function and tell the story given by this model. How many elves does this model say were alive in 2020?
Solution
The population started at 10 elves in 2000, and grows by 5 each year to reach 110 in 2020. Note that the domain of this problem specifically prevents me from letting \(x\) be negative (the “since 2000” comment), so we don’t have to worry about interpreting something like \(x=-20\) which could mean there are -10 elves in 1980.
The code below graphs the function.
p <- function(x,a=2,b=30){a*x+b}
x <- seq(-4,200,0.1)
plot(x,p(x,5,10),type='l',ylim=c(0,500))
abline(h=0,col='gray')
abline(v=0,col='gray')
p(20,5,10)Solve for \(x\) in each of the following.
-
\(2^x=8\)
-
\(2^x = \frac{1}{16}\)
\(2^x = 17\)
\(e^x = 1\)
\(e^x = 2\)
Solutions
Because \(2^3=8\), we know \(x=3\).
Because \(2^{-4}=\frac{1}{16}\), we know \(x=-4\).
This one isn’t guessable. We know \(2^4=16\) and \(2^5=32\), so we know \(4<x<5\). How do we get the solution? This is what logarithms are for. We’ll discuss a guessing approach in class, and then define logarithms as the way to tell the computer to preform this guessing approach. We can rewrite the exponential form \(2^x = 17\) in the log form \(x = \log_2(17)\), which is the solution.
Anything nonzero, raised to the zero, is 1, so the solution is \(x=0\).
Rewriting in log form gives us \(\log_e(2)=x\). We use \(\ln\) as shorthand for \(\log_e\).
In general, we rewrite \(a^\text{input} = \text{output}\) in log form as \(\log_a\text{output} = \text{input}\). Exponential and logarithmic functions are inverses of each other. They undo what the other function did, which is why the inputs and outputs swap spots.
Most computer languages use \(\exp(x)\) for \(e^x\) and \(\log(x)\) for \(\log_e(x)\). When using \(\exp\) and \(\log\), we can remember the rewriting rule as \[y = \exp(x) \quad \text{means} \quad x = \log(y)\] Notice that when the inputs and outputs swap, the function changes from \(\exp\) to \(\log\) or vice versa.
Definitions and Reminders
Definition: Exponential Function (OpenStax Textbook)
An exponential function is of the form \(b^x\) where \(b>0\) and \(b \neq 1\).
Note: An exponential function is not an algebraic function.
Key Characteristics of Exponential Function
- Domain is all real numbers
- Range is positive real numbers
- When \(b > 1\) the function is increasing on its entire domain.
- As \(x\) decreases (approaches negative infinity) the output gets close to zero.
- As \(x\) increases the output increases without bound.
- These functions are concave up. (We will learn the precise meaning of concavity later this semester.)
- When \(0< b < 1\) the function is decreasing on its entire domain.
- As \(x\) decreases (approaches negative infinity) the output grows without bound.
- As \(x\) increases the output gets close to zero.
- These functions are concave up. (We will learn the precise meaning of concavity later this semester.)
Properties of Exponents
If \(a > 0\), \(b >0\), and \(m\) and \(n\) are any real number, then
- \(a^m \cdot a^n = a^{m+n}\)
- \(\frac{a^m}{a^n} = a^{m-n}\)
- \((a^m)^n = a^{mn}\)
- \(\frac{1}{a^n} = a^{-n}\)
- \(\sqrt[n]{a} = a^{1/n}\)
- \(\sqrt[n]{a^m} = a^{m/n}\)
- \(a^m \cdot b^m = (a \cdot b)^m\)
- \(\frac{a^m}{b^m} = \left(\frac{a}{b}\right)^m\)
Definition: Logarithm (OpenStax Textbook)
A logarithm base \(b\) of a positive number satisfies the following definition.
For \(x>0\), \(b>0\), and \(b \neq 1\), \(y = \log_b(x)\) is equivalent to \(b^y = x\)
- We read \(\log_b(x)\) as, “the log base \(b\) of \(x\)” or “the logarithm with base \(b\) of \(x\)”.
- The logarithm is the exponent that \(b\) must be raised to get \(x\).
- When we evaluate \(\log_b(x)\) we answer the question, “To what exponent must \(b\) be raised to in order to get \(x\)?”
The key idea is that we can rewrite any logarithm in exponential form, as \[\huge{y = \log_b(x) \Leftrightarrow b^y = x}\]
Definition: Logarithmic Function
A logarithmic function is of the form \(\log_b(x)\) where \(b>0\) and \(b \neq 1\).
Note: A logarithmic function is not an algebraic function.
Key Characteristics of Logarithmic Function
- Domain is positive real numbers
- Range is all real numbers
- When \(b > 1\) the function is increasing on its entire domain.
- As \(x\) gets close to zero from the right the output approaches negative infinity.
- As \(x\) increases the output increases without bound.
- These functions are concave down.
- When \(0< b < 1\) the function is decreasing on its entire domain.
- As \(x\) gets close to zero from the right the output grows without bound (approaches infinity).
- As \(x\) increases the output approaches negative infinity.
- These functions are concave up.
Properties of Logarithms
If \(a>0\), \(b > 0\), \(c > 0\), \(b \neq 1\), and \(n\) is any real number, then
- \(\log_b b^x = x\) and \(b^{\log_b x} = x\) (inverse property)
- Special Cases
- \(\log_b b = \log_b b^1 = 1\)
- \(\log_b 1 = \log_b b^0 = 0\)
- Special Cases
- \(\log_b(ac) = \log_b(a) + \log_b(c)\) (product property)
- \(\log_b\left(\frac{a}{c}\right) = \log_b(a) - \log_b(c)\) (quotient property)
- \(\log_b(a^n) = n\log_b(a)\) (power property)
Logs turn multiplication into addition!
Example
Consider:
\[\begin{align*} \prod_{i=1}^3 2 &= 2 \cdot 2 \cdot 2 \\ &= 2^3 \\ &= 8 \end{align*}\]
Notice that multiplying the same base means adding exponents: \(2^1 \cdot 2^1 \cdot 2^1 = 2^{1+1+1} = 2^3\).
Now apply a log to that same product:
\[\begin{align*} \log_2(2 \cdot 2 \cdot 2) &= \log_2(2) + \log_2(2) + \log_2(2) \\ &= 1 + 1 + 1 \\ &= 3 \end{align*}\]
The log of the product becomes a sum of logs — and each \(\log_2(2) = 1\) recovers the exponent. The sum \(1+1+1=3\) matches \(\log_2(8) = 3\).
Notice that adding the logs is the same operation as adding the exponents:
\[\begin{align*} 2^1 \cdot 2^1 \cdot 2^1 &= 2^{1+1+1} \\ \log_2(2) + \log_2(2) + \log_2(2) &= 1+1+1 \end{align*}\]
In the first row we add exponents to combine powers. In the second row, \(\log_2\) reads the exponent out of each factor — so adding the logs is just adding those exponents directly.
This works because \(b^x\) and \(\log_b\) are inverses:
\[b^x = \# \quad \longleftrightarrow \quad \log_b(\#) = x\]
- \(b\) → base of the log
- \(\#\) → goes inside the argument (what \(b^x\) equals)
- \(x\) → what the log returns
So \(2^1 = 2\) means \(\log_2(2) = 1\) — the argument is \(2\) (the result), not the exponent \(1\).
\[2^x = 8 \quad \Rightarrow \quad x = \log_2(8) = 3\]
Group Meeting
Start by giving each person a moment to share what they chose to prepare for class. Help each other address any questions. When each person has had a chance to share, move on the other activities.
Activity - Practice with Logarithms
Go to the Additional Resources module in our Canvas course. Click on the Review Center. Open the Unit 1 - Functions (Review). Complete 2-5 problems from each of the objectives listed below.
- Relate Logarithms and Exponent (in other words use the definition of logarithm) ->Complete at least one problem from each of the following sub-objectives.
- Convert from logarithmic to exponential form
- Convert from exponential to logarithmic form
- Evaluate Logarithmic Expressions ->Complete at least one problem from each of the following sub-objectives.
- Evaluate logarithms with positive integer solutions
- Evaluate logarithms with negative integer solutions
- Basic Properties of Logarithms ->Complete at least one problem from each of the following sub-objectives.
- Understand the basic properties of logarithms
- Use the product rule for logarithms
- Use the quotient rule for logarithms
- Use the power rule for logarithms
Activity - Logs with \(\prod\) and \(\sum\) notation
Rewrite the following expressions using log properties.
- \(\ln \left(\prod_{m=1}^7(mx + 1)\right)\)
- \(\ln \left(\prod_{i=1}^5((y_i - 3)^2) \right)\)
- \(\ln \left(\prod_{i=1}^n((ax_i+b-y_i)^2) \right)\)
Solution
The log of a product is the sum of the logs.
- \(\ln \left(\prod_{m=1}^7(mx + 1)\right) = \sum_{m=1}^7 \ln(mx + 1)\)
- \(\ln \left(\prod_{i=1}^5((y_i - 3)^2) \right) = \sum_{i=1}^5 \ln((y_i-3)^2) = 2\sum_{i=1}^5 \ln(y_i - 3)\)
- \(\ln \left(\prod_{i=1}^n((ax_i+b-y_i)^2) \right) = \sum_{i=1}^n \ln((ax_i+b-y_i)^2) = 2\sum_{i=1}^n \ln(ax_i+b-y_i)\)
Logs turn multiplication into addition!
Activity - Transformations of Exponential Functions
Consider the general form \(Q(x;a,c,h,k) = af(c(x-h))+k\) for a transformation of a function \(f(u)\).
- Identify \(a\), \(c\), \(h\), and \(k\) and describe the transformations on \(f\) to obtain \(Q\) for each function below. Then state the domain and range of \(Q\). Finish by graphing \(Q\).
- \(Q(x) = 4 \cdot 2^x\) where \(f(u) = 2^u\)
- \(Q(x) = (\frac{1}{2})^x - 2\) where \(f(u) = (\frac{1}{2})^u\)
- \(Q(x) = \frac{1}{2}3^{x-1}\) where \(f(u) = 3^u\)
- \(Q(x) = 2^{3-x}+5\) where \(f(u) = 2^u\)
Use this code to define the functions above.
fun.1 <- function(x){ 4*2^x }
fun.2 <- function(x){ (1/2)^x - 2 }
fun.3 <- function(x){ (1/2)*3^(x-1) }
fun.4a <- function(x){ 2^(3-x)+5 }
fun.4b <- function(x){ (1/2)^(x-3)+5 }Use (and adapt) this code to plot the functions above.
x <- seq(-5,5,0.1)
y <- fun.1(x)
par(mar=c(2.5,2.5,1,0.25))
plot(x,y,type="l",ylim=c(-10,30))
abline(h=0,col='gray',lty=3)
abline(v=0,col='gray',lty=3)Source: Class.9 on byuimath.com