School of Science
family name given names
MATH2161 Assessment 2 Semester 1, 2021
EXTREMELY IMPORTANT: All working must be shown with clarity, and ideas should be presented in
a logical ordered way. This can affect your scores.
1. Making cocktails with the Z-transform:
The very famous Fibonacci sequence goes like this: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89
The magical and mystical ‘golden ratio’ φ = XXXXXXXXXXis the limiting value of the ratio
between two terms in the sequence eg., 5534 = XXXXXXXXXX,
55 = XXXXXXXXXX
The Fibonacci sequence is generated by the following difference-equation:
y(k + 2) = y(k XXXXXXXXXXy(k) k = 0, 1, 2, ... (1)
with y(0) = 0, y(1) = 1 as initial conditions. Here each term in the sequence is the sum of the two
previous. Thus y(2) = y(1) + y(0), y(3) = y(2) + y(1), y(4) = y(3) + y(2) etc.
Given that you know the difference equation that generates the Fibonacci sequence, use Z-transforms
to calculate y(k) and φ, as set out in the following steps.
(a) Using the difference-equation above, show that the Z-transform Y (z) of the Fibonacci sequence
Y (z) = z
z2 − z − 1
(b) Show that Y (z) can be equivalently written as:
Y (z) = z(z − α)(z − β)
where α = φ = 1+
2 = XXXXXXXXXX, known as the golden ratio, and β = 1− φ.
[Hint: Factorize z2− z− 1 by hypothetically letting z2− z− 1 = 0 and then finding the α and
β you need so that z2− z− 1 = (z−α)(z−β) = 0. That is you use the ’formula’ to find roots
of z2 − z − 1 = 0.]
(c) Find the partial fraction decomposition for
Y (z) = 1(z − α)(z − β) =
z − α
z − β
That is, show that A = 1/
5, and find B.
(d) Use the inverse Z-transform to find an exact expression for y(k), namely
y(k) = φ
− (1− φ)
(e) Find the first five terms in the sequence from the solution you found above for y(k) in (d) and
show that it conforms to the solution expected of the difference equation Eqn.1.
y(k) ≈ φ
for large k
(g) Hence show
y(k + 1)
y(k) ≈ φ
(h) Why is the golden ratio considered magical or mystical? Relate this to physical quantities such
as the size of the pyramids, the Mona Lisa, pine cones, door frames, cocktails (see attached),
and other pleasing structural ratios etc.
(i) Why might it be incorrect to refer to the numbers 0,1,1,2,3,5, XXXXXXXXXXas the Fibonacci series?
(a=3, b=2, c=3, d=3, e=2, f=2, g=2, h=2, i=1. Total =20 marks)
2. Fourier Transform
A beaker of water of temperature y(t) at time t is cooling to room temperature. To keep things
simple and without loss of generality, we will suppose room temperatute is 0 degrees centigrade.
The temperature of the water y(t) satisfies Newton’s Law of cooling which states:
= −ky(t) + x(t)
To make things simple, we will choose k = 2 but it could be kept more general if you
Here x(t) are external temperature fluctuations that impact the cooling process of the beaker. One
wonders how these fluctuations influence the cooling process. We want to study the frequency
response of this system to the forcing fluctuations x(t).
(a) Denote Y (ω) and X(ω) as the Fourier transforms of y(t) and x(t) respectively.
By taking Fourier transforms of the above equation, and giving working, show that Y (ω) is of
Y (ω) = a
Find a,b, and c.
(b) For a general input, the frequency response of the system is given by H(ω) = Y (ω)
X(ω) . Find
(c) How does one obtain H(ω) in practice? [This is not an assessment question!] One has to
examine the system for all different frequency inputs ω. It might be possible to test one
frequency ω0 after another and thus sweep ω to obtain a picture of H(ω) for all ω.
A neater solution requires only pulsing the system with a large impulse that can be modelled
by the delta function x(t) = δ(t). This will give us the so called impulse response H(ω) (or
frequency response) to a delta signal.
Why do this? Recall that the Fourier Transform of x(t) = δ(t) is F(δ(t)) = X(ω) = 1. This
means that the impulse x(t) = δ(t) has energy for any and all frequency components ω. So a
single pulse x(t) = δ(t) will automatically yield the spectrum Y (ω) = H(ω)X(ω) = H(ω) for
all ω .
Now that you have calculated H(ω) for the beaker system, separate it into its real and imagi-
nary components i.e., in the form H(ω) = a+jb. Find alegebraic expressions for the magnitude
|H(ω)| and phase φ(ω) for this system.
(d) Sketch a graph of |H(ω)| as a function of ω.
(e) Provide a careful interpretation of this graph. What does it mean in terms of the input
fluctuations x(t) (eg., an x(t) that is dominated by high frequencies as compared to an x(t)
that is just a low frequency oscillation).
(f) Suppose the input x(t) = e−tu(t). Find Y (ω).
(g) Take the inverse Fourier transform of Y (ω) and find y(t). Sketch y(t).
(h) What is the solution of the above differential equation for cooling when x(t) = 0. Sketch
this solution on the same axes as above and compare with your last plot. Explain what you
(a=2, b=1, c=4, d=1, e=2, f=4, g=4, h=2. Total =20 marks)
3. Without using tables (i.e., from first principles) find the Fourier transform of:
y(t) = e−tu(t+ 1) + e−3tu(t− 3)
Notice the negative sign now in the exponential here.
Hint: You can use the fact that for large t, the limit of e(−a+jω)t → 0 for a > 0 (7
4. Find the inverse Fourier transform of Y (ω) = δ(ω − 3). [Hint: Use a shift theorem]
Can you give some intuitive interpretation to your solution y(t)? (7 marks)
5. Find the inverse Z-transform of Y (z) = z
z2 − 5z + 6.
XXXXXXXXXX = 60 marks)
FREE DAILY NEWSLETTER
This Philly bartender invented a new way to
They’re called Fibonacci cocktails, and the process involves math.
Aug. 24, 2017, 9:00 a.m.
The fastest way to dispel the notion that art and math don’t mix is to toss back a drink by Friday
Saturday Sunday head bartender Paul MacDonald.
It’s not the booze going to your head that’ll fuzz the lines between disciplines. It’s the 29-year-old
Bethlehem native, who is without a doubt a visual artist — see his impressively gorgeous
Instagram account (https://www.instagram.com/express_and_discard/), with 13.8k followers —
and has come up with a novel way to create new cocktails using math. Speci�cally, the Fibonacci
The series of numbers, which mathematicians discovered nearly a millennium ago, shows up often
in nature — seeds on a sun�ower follow its pattern, for example, as do scales on a pineapple — and
also in art. Ratios created by its visually pleasing spiral have been spotted in everything from the
Mona Lisa to the Last Supper.
But this might be the �rst time the Fibonacci sequence has made its mark behind the bar.
Ingredients for a cocktail at Friday Saturday Sunday DANYA HENNINGER / BILLY PENN
Friday Saturday Sunday
Relying on trusted mathematical ratios to help ensure balance in cocktails isn’t a new thing. Drink
makers have fallen back on standard proportions for decades. When looking for fresh
combinations that please the palate, MacDonald explained, bartenders will often swap out one or
more elements while still mixing the ingredients in the same proportions.
The most classic formula is approximately 2:1:1 — two parts liquor, one part sour and one part
sweet — and is used in everything from a whiskey sour to a mojito. Other common ratios are the 2:1
of a Martinez or the 1:1:1:1 four equal parts that go into a Last Word.
“There are �ve or six different specs that make up the cocktail canon,” MacDonald said.
And now there’s another.
View More on Instagram
For his Fibonacci cocktails, MacDonald uses �ve ingredients combined in the ratio of the �rst �ve
numbers in the famous sequence — 1:1:2:3:5. In keeping with the mathematical series, each
number is the sum of the two prior to it. Speci�cally, MacDonald uses ¼ oz of ingredient A, ¼ oz of
B, ½ oz of C, ¾ oz of D and 1¼ oz of E. The measurements add up to 3 oz, which is a standard
“Prior to [Paul], I’d never heard of a bartender leaning on a integer sequence to build drinks,”
offered local booze expert Drew Lazor, who is a regular contributor to Punch Drink
(http://punchdrink.com/about/) and has a book called Session Cocktails
coming out May 2018. “But the association makes sense as good cocktails are all about balance,
and the Fibonacci numbers provide a visualization of an end product where each ingredient builds
logically upon the elements that precede it.
“This progression occurs almost magically in nature, so why wouldn’t it work in a cocktail context,
Magic, indeed. Like 13th century Italian mathematician Leonardo of Pisa, who is credited
introducing the series to European society and who became known as “Fibonacci,” MacDonald
stumbled on the sequence by accident.
MacDonald has a deft hand DANYA HENNINGER / BILLY PENN
Entirely self-taught, he got into bartending on a whim, when he was looking around for a job after
college and was hired at Bethlehem’s Bookstore Speakeasy in 2010. He picked up knowledge on
the job, and was adept enough to score a position at now-closed Farmers Cabinet in Philly. He
moved on to Society Hill Society (also now gone), and then to a.bar in Rittenhouse. It was there
that inspiration struck.
“We were working on drinks with �ve different forti�ed wines,” MacDonald remembered, “and I
had the idea that it would be cool to make a drink in which each of those �ve �avors came through
— where you could taste each of these things in succession.”
He’s been working on it ever since, and took the concept with him when Chad and Hanna Williams
asked him to come lead the spirits program at Friday Saturday Sunday last year. In the drink called
Fibonacci in Autumn, which will show up on the Fri Sat Sun menu soon, the �ve ingredients are, in
Billy Penn is a project of WHYY (https://whyy.org/)
Copyright © 2021 Billy Penn (https://whyy.org/)
order, Cocchi Americano, Cappelletti Aperitivo, Laird’s 100 Apple Brandy, Green Chartreuse and
Amaro Nardini — and it works as promised. The disparate parts come together in a sip that
changes �avor and sharpness as you swallow.
MacDonald is trying to carefully avoid selling his mathematical discovery as a gimmick, but he
does credit it with making him more creative.
“If a bartender like Paul can achieve results he’s happy with by tinkering with the works of an
ancient thinker,” Lazor said, “then more power to him.” He added, “I just hope he doesn’t ask me to
do any math in my head after I’ve already started drinking.”
MacDonald holds his newest Fibonacci cocktail DANYA HENNINGER / BILLY PENN