Professional Documents
Culture Documents
Ollscoil Na Héireann, Corcaigh: Page 1 of 7
Ollscoil Na Héireann, Corcaigh: Page 1 of 7
FIRST SCIENCE
APPLIED MATHEMATICS
Prof. I. D. Abrahams
Professor A. Pokrovskii
Dr. M. H. Quinlan
Mr. D. J. Cahalane
Instructions:
Answer three questions.
You must answer Question 1.
100 Marks
Page 1 of 7
Question 1. Answer 4 parts. [40 marks, equal marks for all parts.]
ü Part (a)
1.5
0.5
2 4 6 8 10
ü Part (b)
1
0.5
1 2 3 4 5 6
-0.5
-1
In an attempt to reproduce the graphic above, a Mathematica user evaluated the following the faulty input.
(i) Correct the second line of the input (by adding an appropriate function) and use your modified input to
produce the desired graphic.
(ii) What attribute of the Plot function is responsible for the original input not producing the desired graphic?
ü Part (c)
u@xD
Find the derivative of the quotient ÅÅÅÅ
ÅÅÅÅÅÅ and express the result as a single quotient to reproduce the familiar
v@xD
form of the "quotient rule" of differentiaion.
Page 2 of 7
ü Part (d)
-1
-2
ü Part (e)
(i) Find the cube roots of unity (i.e. the values of z that satisfy z3 = 1).
è!!!! è!!!!
91, − 12 − 2 3 , − 12 + 2 3 =.
(ii) Make use of the function ComplexExpand to give the answer in the form
ü Part (f)
x2 ê. Subscript → List
x2 ê. Subscript → somethingElse
evaluates to 2 x
Page 3 of 7
Question 2
This questions concerns finding and plotting the complex roots of an equation.
(i) Find the five values 8z1 , ..., z5 < of the complex variable z that solve the equation z5 - z - 5 = 0.
(ii) Express the list of roots 8z1 , ..., z5 < as a list of complex numbers in numerical form.
(iii) Use Table to create the list of five points 88x1 , y1 <, ..., 8x5 , y5 << where, for each point i, the values
8xi , yi < are the real and imaginary parts of the root zi , respectively.
(iv) Plot these points to produce a graphic similar to the following:
ImHzL
0.5
ReHzL
-1 -0.5 0.5 1 1.5
-0.5
-1
Page 4 of 7
ü Part (b) [15 marks]
We can consider the real and imaginary parts of the left hand side (LHS) of the equation, both of which must
evaluate to zero at the values of z which are roots.
−5 − x + x5 − 10 x3 y2 + 5 x y4
−y + 5 x4 y − 10 x2 y3 + y5
(i) Create a plot showing the values of z for which the real part of the LHS is equal to zero. (Suggestion: You
might wish to use, among others, the options Contours, ContourShading and PlotPoints.)
(ii) Similarly, create a graphic showing for which values of z the imaginary part of the LHS is equal to zero.
(iii) Combine these graphics with the graphic from Part (a) to produce a graphic similar to the following.
ImHzL
2
ReHzL
-2 -1 1 2
-1
-2
Page 5 of 7
Question 3
This question concerns random walks and iterative loops (Do and While).
Joe Soap, a college student, is endeavouring to walk from Speedy Ed's Nightclub to Billhilly's Chicken
Take-away. Being sligthly the worse for wear, at each attempt to take a step Joe either moves forward one
pace with 75% probability or moves back one pace with 25% probability.
(i) Seed the random generator to 10 and generate 300 steps of the walk described above. (Suggestion: For
each step, you could consider drawing at random from the list {1,1,1,-1}.)
(ii) Use ListPlot to illustrate the student's progress.
When Speedy Ed's Nightclub closes 250 students emerge, all of whom would like to dine at Billhilly's
Chicken Take-away. They are all in the same condition as Joe (i.e. at each attempt to take a step a student
either moves forward one pace with 75% probability or moves back one pace with 25% probability). The
Take-away is 100 paces from the Nightclub.
Page 6 of 7
Question 4
This question concerns obtaining and manipulating a numerical solution of a differentital equation.
(i) Use NDSolve to obtain a numerical solution of the following differential equation, subject to the given
initial conditions, which is valid for 0 § t § 25.
y@0D 1
5 , y @0D 1
5
The output from NDSolve in Part (a) is in the form of an interpolating function. We will now look more
closely at the interpolating function and extract the set of points at which NDSolve estimated values for the
solution.
(i) The list of values of t at which the solution was estimated is recorded in the first part of the third part of
the InterpolationFunction object. With the appropriate use of indexing, assign this list the alias
tValues.
(ii) Use ListPlot to plot the value of the numerical solution for each value of t in the list tValues.
(iii) How many steps did NDSolve take in generating this solution?
(iv) What were the minimum, maximum and mean step sizes?
Page 7 of 7