0% found this document useful (0 votes)
17 views

MathLab Problem Set 3-1

Uploaded by

Sukanya Paul
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

MathLab Problem Set 3-1

Uploaded by

Sukanya Paul
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

MathLab: Problem Set 3

Mathematics Club IITM


Navin, KK, Achintya
21 June 2024

For those with 7/10 attendance in the Forms, we will grant you attendance and qualify
you in the attendance criteria required for the certificate, provided you solve AT LEAST
2 OUT OF THE 3 BONUS QUESTIONS correctly in addition to the rest of the
assignment. The bonus questions are completely optional for those with at least 8/10
attendance but is mandatory for those with 7/10 in order to obtain a certificate.

Instructions
• This problem set consists of 3 sections and you need to solve all 3 sections to complete
this course.

• You are supposed to write your answers and upload it in the submission link given. You can
submit a scanned copy of handwritten answers, submit a typed document or a handwritten
document on a tablet. Anything works as long as it is legible and clear!

• This assignment requires you to write code, generate plots and submit the same. You
are advised to submit the code and the plots by attaching them in your submission
document directly. If that is not possible then please upload your code and plots to your
Google Drive / GitHub and add the links to those files in your submission. Make sure to
give us access to those files.

• Try to answer all the questions in a clear and readable manner and mention all your assump-
tions/reasons explicitly.

• It is fine even if you aren’t able to solve the question completely after your best attempt. But
show us your working or thought-process and the attempts that you have made in order
to clear the course.

• The deadline for submission is 24 June 2024, 11:59 p.m.

• Feel free to reach out to us for doubts! Contact information of the problem-set creators:
– Achintya Raghavan - +91 96068 52240
– Karthik Kashyap - +91 80739 78167
– Navin Kumar - +91 90287 70420

Section 1 Section 2 Section 3 Appendix

1
Mathematics Club IITM
MathLab: Problem Set 3
Navin, KK, Achintya — 21 June 2024

§1 The Basics of Manipulation


This section contains simple conceptual-level questions which test your understanding of the topic
and prepare you for the upcoming sections. Show your working in each question.

1. ex and a constant were walking down the street one day. While ex continued walking, oh dear
the constant ran away. What operator in the path would cause the constant much dismay?
Find the solutions y(x) to the following differential equations given the boundary conditions:
d2 y dy
a) 2 2
+5 − 3y = 0
dx dx
[ y(2) = e−2 + e12 and y(16) = e−30 + e5 ]

Final Expected Answer: y(6)

d2 y dy √
b) 2 2
+5 − 3y = 15 2eix
dx dx
[ Assume only the forced part of the solution as discussed in the presentation i.e. system
is at rest in the beginning ]

Final Expected Answer: The magnitude of the solution (Since the solution will be
complex)


d2 y dy √
c)
kix
X
2
− 2 − 5y = 25 13k 2 e 2
dx dx
k=−∞

[ Assume only the forced part of the solution as discussed in the presentation i.e. system
is at rest in the beginning ]

Final Expected Answer: The magnitude of the coefficient of the k = 2 term in the
solution series.

2. Why did the function f go see a Fourier therapist? Because it wanted to break down its complex
personality into a series of sines and cosines!
Consider the function:
f (x) = x, −π ≤ x < π

Here f has a period of 2π, that is f (x + 2π) = f (x). Find the Fourier series corresponding to
f (x).

A tiny plot of the periodic function f (x)

Final Expected Answer: If the coefficients of the series are an , bn , then find the value of
a2 + b2 .

2
Mathematics Club IITM
MathLab: Problem Set 3
Navin, KK, Achintya — 21 June 2024

§2 The Hunt for Harmonics


§2.1 A janky spring
You are expected to use the Fourier series to solve this problem. Doing so requires that you have
knowledge of both the exponential and trigonometric series. However, in order to help you out, we
have provided the relevant conversion formulae to convert a given Fourier trigonometric series to
an exponential series and vice versa in the appendix. We highly encourage you work them out for
yourselves.

Achintya remembers learning about an interesting function called the ramp function r(t) in his
signal processing class. He remembers his teacher defining it as:

t t≥0
r(t) =
0 otherwise

On his class quiz, he comes across this differential equation when he attempts to model an old,
rusty and stiff spring that is being slowly but steadily pulled by an insanely strong ant. However
since he missed half of his math classes, he has no idea how to solve it. Can you help him?

d3 x d2 x dx
5 + 3 +6 + 2x = r(t)
dt3 dt2 dt

The insanely strong ant

Final Expected Answer: The solution to the differential equation given above using Fourier
series methods.

Bonus Question 1: A recovering Ant [For those with 7/10 attendance]:

Consider the function f (t) = |t|. Can you relate it somehow to the ramp function? Now
use that knowledge to solve the above question but with the driving force replaced by |t| instead of
the ramp function.

NOTE: For those who have already met the attendance criteria, there is absolutely NO
need to submit this bonus question. But I still ask you to try this out. Including it in your solution
will make my day.

3
Mathematics Club IITM
MathLab: Problem Set 3
Navin, KK, Achintya — 21 June 2024

§2.2 Hmm, integrals


The integral 1
is something that you would have encountered a lot in your high school
R
1+x2 dx
calculus and some of you might even scream tan in verse ex plus sea (yes, live with it) the moment
that you see this fairly innocent integral.

But if I were to task you to find 1


you would be walking into integration-by-parts
R
(1+x2 )2 dx
and partial-fractions war-zone territory. Let us not ponder over that mess now!

A spooky figure made using 1


1+x2 and 1
(1+x2 )2

If I were to simplify things a bit, and ask you to find the value of the definite integral
Z ∞
1
dx
−∞ (1 + x2 )2

what would your approach be? There is a really elegant way to compute this integral using the
concepts that were taught in the third session. Try to recall them and compute the value of this
definite integral.

Hint: Think of a function whose Fourier transform is 1


1+x2 or in other terms finding the
inverse Fourier transform of 1
1+x2 might be helpful to you

Final Expected Answer: The value of the definite integral computed using
R∞ 1
−∞ (1+x2 )2
dx
the concepts taught in the third session.

4
Mathematics Club IITM
MathLab: Problem Set 3
Navin, KK, Achintya — 21 June 2024

§3 A Tale of Musical Mismanagement


Welcome to the clumsy life of Navin!

This morning Navin was assigned the work of recording an orchestral performance that was being
performed by the coordinators of the Mathematics Club. He was asked to record each instrument
in a different channel, so that the audio can be equalized easily later on by our Music Directors -
KK and Achintya. Unfortunately, Navin being the clumsy person that he is accidentally ended up
recording all of the instruments as a single audio file.

The Music directors want to tone down (decrease the volume of) the snare drums by 25%. The
snare drums used by the Mathematics Club produce sounds in the frequency range of 150Hz
to 250Hz. Assume that no other musical instruments produce sounds in this audio range.
Luckily, he has you to help him! Navin hoping that you listened to his presentation attentively is
asking you to write a program in MATLAB or GNU Octave which fulfills the directors’ request and
saves his job!

Final Expected Submission: A script written in MATLAB or GNU Octave that performs the
following:

• Reads an audio file named "i_hope_i_don't_lose_my_job.wav" using the function audioread


as an array along with the sample-rate of the audio

• Uses Fourier Transform methods to perform the request of reducing the volume of the drums
by 25% in the audio data

• Writes the newly generated audio data using the function audiowrite to an audio file named
"thankyou_for_saving_my_job.wav"

Note:

1. The functions audioread, audiowrite have been documented here: 1, 2, 3.


Feel free to reach out to us in case you don’t understand how these functions work!

2. If you are submitting your code via a Google Drive / GitHub link make sure to enable access
for all, so that we will be able to access your submission.

5
Mathematics Club IITM
MathLab: Problem Set 3
Navin, KK, Achintya — 21 June 2024

Bonus Question 2: Thinking in the Time Domain [For those with 7/10 attendance]:

NOTE: For those who have already met the attendance criteria, you DO NOT need to
submit this! You will be eligible for the certificate even if you don’t attempt this question. This is
just a bonus question. I will be very happy if you attempt this question, and that is a good thing!

Can you think of a way to perform the same task of changing the contribution of some
frequencies in a given function of time f (t) without analysing the function in the frequency-domain
using a Fourier Transform, instead working entirely in the time-domain. You can use the same
example as the above question or use any example that you like.

Explain your algorithm.

Bonus Question 3: A more sophisticated Filter [For those with 7/10 attendance]:

NOTE: For those who have already met the attendance criteria, you DO NOT need to
submit this! You will be eligible for the certificate even if you don’t attempt this question. This is
just a bonus question. I will be very happy if you attempt this question, and that is a good thing!

Repeat Problem 3 (A Tale of Musical Mismanagement) but instead of toning down the
amplitude of all frequencies in 150Hz to 250Hz by 25%, you have to tone down the frequencies:

• 150Hz to 175Hz by 20%,

• frequencies 176Hz to 225Hz by 25%,

• and frequencies 226Hz to 250Hz by 15%.

Follow the same instructions as given in Problem 3.

Happy Solving!

Appendix

Let the exponential series be of the form Ak eikω0 t and the trigonometric series be of the form
X

k=−∞
∞ ∞
a0 X
bk sin(ω0 t). Then, it can be shown that:
X
+ ak cos(ω0 t) +
2
k=1 k=1

• ak = Ak + A−k

• bk = i(Ak − A−k )

Note that k ∈ Z, k ≥ 0 or put simply k ranges from 0 (inclusive) to ∞ in integers.

You might also like