MHF4U1 - Culminating Assignment 1

Connecting advanced functions to real life

Mark Mekhail

scroll down to begin

01
Polynomial & Rational Functions

Rational Functions & Asymptotes

In plain termsA rational function is one polynomial divided by another. The key features are the asymptotes, which are lines the graph approaches but never touches. A vertical asymptote happens at an input the function can't take, because the denominator becomes zero there. A horizontal asymptote is a value the output gets closer and closer to as $x$ goes toward infinity, without ever reaching it. Comparing degrees tells me which case I'm in: bottom-heavy means the asymptote is $y = 0$, equal degrees means it's the ratio of the leading coefficients, and a heavier top means there's no horizontal asymptote at all. Though, if the top degree exceeds the bottom by exactly 1, there's a slant asymptote instead, a slanted line I can find by polynomial long division.

Why it was meaningfulThese were the first graphs where I could figure out everything before drawing anything. The zeros of the denominator tell me where the function breaks, comparing the degrees gives me the horizontal asymptote, and a sign chart tells me where each branch sits. Once I had all of that worked out, the sketch was basically already done before I touched the paper.

In the worldThis shows up wherever a value closes in on a limit it can't cross. The effective speed of a download climbs toward your connection's top speed as files get bigger, but the fixed startup cost keeps it just under. Average cost works the same way. Spreading a fixed cost over more units pushes the price per unit down toward the cost of the materials alone, and never below it. In each case the horizontal asymptote is that limit, approached but never reached.

My Example

Downloading a file takes a fixed bit of latency to get started, plus the time to actually move the data. On a 100 Mbps connection, assuming a fixed startup latency of 5 seconds before any data transfer begins, the effective speed for a file of size $s$ comes out to $e(s) = \dfrac{100s}{s + 5}$, since effective speed is the data divided by the total time.

Since the degrees of the numerator and denominator are equal, the horizontal asymptote is the ratio of the leading coefficients, which gives $\frac{100}{1} = 100$. So the effective speed climbs toward the full 100 Mbps as files get bigger, but never quite reaches it, because the startup latency always costs a little.

At $s = 5$, $e(5) = \frac{500}{10} = 50$ Mbps, only half the line speed, which is why a small file can feel slow even on a fast connection. Bigger files spread that fixed latency over more data, so they get closer to the full 100. The overhead matters less the more there is to download.

∴ effective speed approaches 100 Mbps but never reaches it, so small files pay most for latency
live graph loads here
fig. 1 - effective speed e(s) climbing toward the dashed 100 Mbps ceiling (Live Desmos)
02
Exponential & Logarithmic Functions

Logarithms

In plain termsA logarithm is the inverse of an exponent. Instead of asking what $10^{4.7}$ is, it asks what power 10 needs to be raised to in order to get a certain number. Since $b^x = a$ is the same statement as $\log_b(a) = x$, I can convert between the two forms depending on which one is easier to work with. In practice, most calculators only have $\log_{10}$ and $\ln$, so the change-of-base formula $\log_b(a) = \frac{\log a}{\log b}$ is what makes any other base computable. It's what turns $\log_2(1024)$ into something a calculator can actually evaluate. It also tells me where logs break: an exponential with a positive base is always positive, so no exponent produces 0 or a negative number, which is why $\log 0$ and logs of negatives are undefined.

Why it was meaningfulWhen I first saw logarithms, they felt a bit confusing, but once I understood that a log is just the inverse of an exponent, it connected back to the inverse functions I had already learned, and it made a lot more sense. It also became one of my main tools, because whenever a variable is stuck in an exponent, I can take the log of both sides and bring it down to where I can actually solve for it.

In the worldLogarithms show up anywhere growth is exponential and the question is how long, or how many steps. In finance, savings grow quickly once interest starts compounding, and debt can pile up just as fast, so figuring out how long money takes to double means undoing an exponent with a log. Games do the same thing with their levelling systems, and I've played games where the XP curve scales exactly like this.

My Example

A binary search finds a name in a sorted list of 1,024 entries by checking the middle entry and discarding half the list each time, so after $k$ checks there are $\frac{1024}{2^k}$ entries left. The search is done when one remains:

$\dfrac{1024}{2^k} = 1 \;\Rightarrow\; 2^k = 1024 \;\Rightarrow\; k = \dfrac{\log 1024}{\log 2} = 10$

So 1,024 entries take at most 10 checks, and a million only takes $\frac{6}{\log 2} \approx 19.9$, which rounds up to 20 because a partial check is still a check. The step count grows very slowly even when the list gets huge. The same log-of-both-sides move works on game progression curves: if reaching level $n$ costs $100(1.15)^n$ XP, the first level costing over 10,000 XP solves $1.15^n = 100$, which gives $n = \frac{2}{\log 1.15} \approx 32.95$, so level 33.

∴ 10 checks for 1,024 entries, yet only 20 for a million
live graph loads here
fig. 2 - y = log₂(x): doubling the list adds just one step (Live Desmos)
03
Trigonometric Functions

Sinusoidal Modeling

In plain termsA sinusoidal function is a sine or cosine wave that repeats forever. Four values control its shape: the amplitude (how tall the wave is), the period (how long one full cycle takes), the phase shift (where it starts), and the vertical shift (the midline it varies around). The $\frac{2\pi}{P}$ that gives the frequency constant comes directly from the unit circle, so one full period is one full rotation, which is $2\pi$ radians. This means dividing by $P$ scales that to the right speed. With those four values, I can model anything that rises and falls on a regular cycle.

Why it was meaningfulWhat made this click was seeing that a wave is just the unit circle unrolled over time. The sine value is the same $y$-coordinate I was tracking around the circle for the whole unit, and once the angle keeps going past $2\pi$, that coordinate traces out a wave. From there, the graph wasn't really something new, and the transformations were essentially the same rules I already knew from earlier units.

In the worldAnything that repeats on a regular cycle can be modeled with a sine or cosine. Tides rise and fall on a roughly twelve-hour cycle, the hours of daylight swing up and down across the year, and a pure musicals note is just a sine wave in air pressure. In computing, daily traffic to a website often follows a rather similar pattern, peaking in the afternoon and dropping overnight, which is typically the pattern you'd model to plan server capacity with things like autoscaling.

My Example

A website's traffic peaks at 900 requests per second at 2 PM and bottoms out at 100 req/s at 2 AM, with $t$ in hours after midnight. The amplitude is $A = \frac{900-100}{2} = 400$, the midline is $D = \frac{900+100}{2} = 500$, and a period of 24 hours gives $b = \frac{\pi}{12}$. Since the peak is at $t = 14$ and a cosine wave starts at its maximum, I can centre a cosine there instead of hunting for a sine phase shift:

$R(t) = 400\cos\!\left(\tfrac{\pi}{12}(t-14)\right) + 500$

The servers need to autoscale once traffic passes 700 req/s, so I set $R(t) = 700$ and solve: $\cos\!\left(\tfrac{\pi}{12}(t-14)\right) = 0.5$, which gives $\tfrac{\pi}{12}(t-14) = \pm\tfrac{\pi}{3}$, so $t = 14 \pm 4$.

∴ above 700 req/s from 10 AM to 6 PM - the autoscale window
live graph loads here
fig. 3 - R(t) crossing y = 700 at t = 10 and t = 18 (Live Desmos)
04
Characteristics of Functions

Composite Functions

In plain termsA composite function feeds one function into another. In $f(g(x))$, I work from the inside out: evaluate $g$ at $x$ first, take what it returns, and use that as the input for $f$. The order matters, since $f(g(x))$ usually isn't the same as $g(f(x))$. The domain of the composition is also restricted to $x$-values where $g(x)$ falls within $f$'s domain. If $f$ can't accept what $g$ outputs, those inputs are excluded entirely.

Why it was meaningfulThis is the concept that connected most directly to programming for me. $f(g(x))$ works the same way as a nested function call in code, where the inner function runs first, returns a value, and that value gets passed into the outer function. The notation is different, but the idea is the same, and it felt like something I've already done in programming .

In the worldCompositions show up any time one quantity depends on another that depends on a third. Uploading a photo can be broken into a chain like that. The compressed file size depends on the compression setting, and the upload time depends on the file size, so upload time as a function of the compression setting is a composition of the two. Change the setting and a new size flows through into a new time.

My Example

A program ingests $g(t) = 50t + 100$ records after $t$ minutes, and processing $n$ records takes $f(n) = 0.2n + 5$ seconds. Composing them:

$f(g(t)) = 0.2(50t + 100) + 5 = 10t + 25$ seconds

To verify, at $t = 10$ the program has $g(10) = 600$ records, and $f(600) = 0.2(600) + 5 = 125$ seconds, which matches $10(10) + 25 = 125$. The domain works out too: $f$ accepts any real number, so everything $g$ outputs is a valid input, and there are no restrictions.

∴ one composed function replaces the two-step lookup
live graph loads here
fig. 4 - the composite f(g(t)) = 10t + 25 alongside g(t) (dashed), with the verified point (10, 125) (Live Desmos)
05
Reflection

Looking Back

How has my understanding of functions evolved?

I think at the start of this course, a function was basically a formula that I plugged numbers into. Now I can better see a function as a relationship between an input and an output, and the equation is just one way of writing that relationship down. The bigger change was in how I learn. Instead of memorizing rules, I started trying my best to continue deriving them, like building the special triangles from the Pythagorean theorem or getting the trig identities from the unit circle. The trig unit was where I felt like I learned that the best. I stopped trying to memorize things and just drew something like a triangle from scratch. When I build something myself, I can actually confirm and see where it's coming from, and if I ever forget it, I can rebuild it instead of being completely stuck.

Which concept will be most useful beyond school?

Composite functions, because they map directly onto programming. Every program you write is functions feeding into other functions, where one returns a value and the next one uses it. $f(g(x))$ is the same pattern written mathematically, so going into computer science, this is the concept I'll be using constantly without even thinking about it. Logarithms are a close second, since $\log n$ is a big part of how algorithm efficiency gets measured.

How do the units connect?

The four units are less separate than they look. The horizontal asymptote is a limit. The log is what you use when a variable's stuck in an exponent. Sinusoidal parameters are just transformations and the same rules as every other unit, applied to a wave. And composition shows up underneath most of the real examples in this portfolio anyway. They seemed like four separate topics, but as I started them, progressing, I noticed a lot of the same patterns being used, which helped me a lot in terms of building my overall understanding.