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

MathLab ProblemSet 2

Uploaded by

adbrosstpro13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

MathLab ProblemSet 2

Uploaded by

adbrosstpro13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

MathLab: Problem Set 2

Mathematics Club IITM


Aditi Vaidya and Pranjal Varshney
19 June 2024

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 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 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 a 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 21 June 2024, 10:30 a.m.

• Feel free to reach out to us for doubts! Contact information of the problem-set creators:
– Aditi Vaidya - +91 95451 49055
– Pranjal Varshney - +91 77806 61602

Problem 1: A Spin to Euler’s Method


We’ve walked you through Euler’s method in the session. We even saw some slight modifications to
Euler’s method. Make a few of your own changes to Euler’s method, list them and examine their
errors by making substitutions in Taylor’s series. Write a few points of analysis about this new
method. Remember that it doesn’t have to be a better method, it must simply be different.

Final Expected Submission: Description of your new variant of Euler’s method, error
analysis of your method and a few points analysing other features of your method.

1
Mathematics Club IITM
MathLab: Problem Set 2
Aditi Vaidya and Pranjal Varshney — 19 June 2024

Problem 2: A New Approximation


The species of MathLand (some of which descended to Earth to conduct MathLab) are far too
evolved, they believe that straight lines are elementary and outdated! They prefer neater splines to
make approximations. Unfortunately they don’t have any computational wisdom and are stuck!
They need an algorithm that will help them integrate a function. Can you be their saviour and
help them write the code to do so?

Hint: Be creative and try something new or Think Simpsons!

If you’re developing your own method write out all the approximations and assumptions clearly,
Remember: Taylor is always your friend and the approach always carries more importance than
the final answer.

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

• Your own new algorithm for approximating integrals OR Simpson’s method for calculating a
definite integral.

• Tests out your algorithm on some integral (for example x2 dx or any integral of your choice
R2
0
for that matter) and see if your integrator is working.

Note:

1. You are free to use any example function which has to be integrated in your code to demonstrate
that your integrator works.

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

2
Mathematics Club IITM
MathLab: Problem Set 2
Aditi Vaidya and Pranjal Varshney — 19 June 2024

Problem 3: Satisfying Curiosity Numerically


Pranjal is playing with a string. He ties the ends of it between x = 0 and x = L. Let u(x, t)
represent the displacement of a point at a distance x at time t of the vibrating string. Pranjal is
curious to know what the displacement of a point on the string is, at some time. Can you help him
find out?

It has been found out that u satisfies the equation

∂2u 2
2∂ u
= c
∂t2 ∂x2

It’s given that c = 1, L = 1, and the initial condition is u(x, 0) = 2x(1 − x) (that is the displacement
of each point x when t = 0). The string is released from rest at t = 0.

Plot the displacement (u) vs. time (t) graph of the points on the string at T = 1 second, by writing
a code on GNU Octave or MATLAB. Use dx = 0.1 units and dt = 0.1 seconds.

Submit your code and the plot you get.

3
Mathematics Club IITM
MathLab: Problem Set 2
Aditi Vaidya and Pranjal Varshney — 19 June 2024

Hint 1: Use the Method of Differences that has been taught to you in Part 2 of Session 2 to get an
equation.

Hint 2: Its given that the string is released from rest, hence ∂u
∂t = 0 at t = 0. Use Central difference
approximation to get an equation.

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

• Solves the given problem using numerical methods in accordance with the given parameters.

• Plots the u vs. t graph as asked in the question.

and the plot that is generated by your script.

Note:
If you are submitting your code and plot via Google Drive links make sure to enable access for all,
so that we will be able to access your submission.

You might also like