MathLab Problem Set 3-1
MathLab Problem Set 3-1
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.
• 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
1
Mathematics Club IITM
MathLab: Problem Set 3
Navin, KK, Achintya — 21 June 2024
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 ]
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).
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
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
Final Expected Answer: The solution to the differential equation given above using Fourier
series methods.
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
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.
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
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:
• 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:
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.
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:
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 )