辅导案例-MATH136

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
MATH136 Mathematics IB Semester 2 2019 Matlab Assignment
Due 10:00 pm Thursday 31 October 2019
Instructions for Students
Assignments can not be submitted after the deadline.
Students in Math136 are expected to be familiar with the contents of the Matlab Manual. Students are also
expected to be able to use the help browser in Matlab. These resources should be utilised before asking a
lecturer for assistance.
You will submit a single pdf document via electronic hand in. Please read the instructions on the ilearn page
carefully.
Your final pdf document should include:
1. A completed Algebra question sheet (one page).
2. A two page printout of your command window showing your working and answers for algebra questions
1, 2, 3 & 4
3. A one page printout containing the 3 subplots from algebra question 5.
4. A completed Calculus question sheet (one page).
5. A two page printout of your command window showing your working and answers for Calculus questions
1, 2, 3, 4, 5 & 6.
6. A one page printout containing the 3 subplots from calculus question 7.
Instructions for the command window printout.
1. Your command window printout should not contain any errors or additional commands. If you make an
error, use Clear Command Window (found by pressing the menu arrow in the top right-hand corner of the
Command Window) and repeat the correct commands using the arrow keys on your device’s keyboard.
2. To keep your printout to the required page limits, you will need to suppress unnecessary output using
semi-colons (see section 1.2.3 of the Matlab Manual). You need only display the answers for example
Algebra question 1(b) should be presented as a list of suppressed commands and only the final vector
answer for x should be displayed.
3. Print the contents of your Matlab Command Window and attach it to your assignment (by pressing the
menu arrow in the top right-hand corner of the Command Window and selecting ‘Print’).
Print out this page and write answers on the sheet where indicated.
Algebra
1. Consider the matrix
B =

1 1 1 1 1
1 2 3 4 5
1 3 6 10 15
1 4 10 20 35
1 5 15 35 65

(a) Using Matlab calculate det(B).
(b) Solve the system of equations below with LUP decomposition using Matlab. (See SGTA 5.)
x1 + x2 + x3 + x4 + x5 = 2
x1 + 2x2 + 3x3 + 4x4 + 5x5 = 3
x1 + 3x2 + 6x3 + 10x4 + 15x5 = 4
x1 + 4x2 + 10x3 + 20x4 + 35x5 = 1
x1 + 5x2 + 15x3 + 35x4 + 65x5 = 1
2. Consider the matrix A =
3 −1 17 −5 −1
6 −6 2

(a) Use Matlab to determine the characteristic polynomial of A. Write your polynomial in the box below.
(b) Using Matlab solve the characteristic equation.
(c) Using Matlab find a matrix P and a diagonal matrix D such that P−1AP = D.
(d) Using (c) and matlab determine A8.
3. Consider the matrix
C =

2 3 3 1
0 4 3 −3
2 −1 −1 −3
0 −4 −3 2

Form the augmented matrix [C|I], where I is the 4 × 4 identity matrix. Use Matlab to reduce [C|I] to
reduced row echelon form. Write C−1 in the box below.
4. Consider the matrix
A =

1 1 −1 −2
0 2 −2 −2
−1 3 0 7
0 4 1 11

(a) Use Matlab to determine the reduced row echelon form of A.
(b) If v1, v2, v3, v4 are the column vectors of the matrix A, use your result from (a) to obtain a basis
for the subspace of W = lin{v1,v2,v3,v4}. Write the basis in the box below.
Print your command window now!
Do not print this page.
In the next question you are going to create a six sided irregular polygon and apply linear transformations
to it. Before you begin, work through the example below.
Example:
To create a five sided irregular polygon we need a 6 × 2 matrix A, where the entries of each row of A
represents the (x, y) coordinate of a vertex of the polygon.
>> A = [1 − 1;−1 1; 1 2; 2 1; 2 0; 1 − 1];
Notice the first and last coordinate are the same, this is so we can close the polygon.
To create a picture of the polygon
>>p=polyshape(A);
>> plot(p,'FaceColor','green')
>> axis equal
To perform a linear transformation, such as say a dilation by a factor of 2 or a reflection in the y-axis
>>B=A*[2 0;0 2];
>>p1=polyshape(B);
>>C=A*[-1 0;0 1];
>>p2=polyshape(C);
5. (a) Create a six sided irregular polygon called p. Note: your polygon should be unique, do not use the
coordinates from the example above.
(b) Perform a rotation by an angle
pi
3
in a counterclockwise direction on p, to obtain a new polygon p1.
(Note: the rotation matrix given in lectures is used when transforming a matrix by pre-multiplying.
For transforming by post-multiplication use the transpose of the pre-multiplication rotation matrix.)
(c) Perform a reflection in the x-axis on p, to obtain a new polygon p2.
(d) Use the subplot command (see SGTA 10) to display the three plots of p, p1 and p2 on a single page.
Label your plots clearly.
Print out this page and write answers on the sheet where indicated.
Calculus
1. For this question use the int command.
(a) In Matlab determine an estimate for the integral
∫ 2
0
ex cos(x) dx using the trapezoidal rule with step
size 0.1. (See section 1.11.1 of the Matlab Manual).
(b) In Matlab (using the int command) determine the improper integral
∫ ∞
0
1√
x5 + 1
dx. Use the
‘double’ command to force a numeric answer.
(c) In Matlab (using the int command) try to determine the improper integral
∫ ∞
1
1
x
dx. Explain your
output.
(d) In Matlab (using the int command) try to determine the improper integral
∫ ∞
3
1
x+ ex
dx. Use the
comparison test for improper integrals to show that this integral converges.
Note: your findings from (d) indicate that Matlab can be unreliable when determining if an improper
integral converges or diverges.
2. In Matlab determine
(a) the degree 4 Taylor polynomial for f(x) = x2ex about x = 1.
(b) the degree 4 Maclaurin polynomial for f(x) = sinx cosx.
See page 23 of the Matlab Manual.
3. In Matlab determine the sum of the series
(i)
∞∑
n=0
(
3
7
)n
(ii)
∞∑
n=1
(−1)n
n!
x2n
(Section 1.9.1 in the Matlab Manual may be helpful in answering this question.)
4. Use Newton.m with x0 = −1 to find a solution of the equation x + 1 = arctanx. Use a tolerance on the
error of 10−7.
5. Consider the function f(x, y, w) =
1
2xyw − 13x7y3w , use the command
>> diff(f,w)
to differentiate partially with respect to w. (Don’t forget to use ‘syms’ for x, y and w.)
Now use Matlab to find fy(x, y, w).
6. Use surfcv.m to plot
x2 − 4y2 + z2 + 2x+ 8y + 4z + 5 = 0
using a meshgrid of the form [x,y,z] = meshgrid(-5:0.4:5, -5:0.4:5, -3:0.2:3).
(Do not print out your plot.) Identify the quadric surface, write your answer below.
Print your command window now!
Do not print this page.
7. (a) Plot four level curves for the surfaces below. Use a meshgrid(-2:0.05:2)
i. f(x, y) = 5− 2x2 − 5y2 for z = 1, 2, 3, 4
ii. f(x, y) = x sinh(−x2 − y2) for z = −2,−1, 0, 1, 2.
(b) Use a meshgrid(-1.2:0.05:1.2) and the plot3 command to plot the surface f(x, y) = x sinh (−x2 − y2).
Create a figure containing three subplots. Two subplots (for 7a(i), 7a(ii)) across the upper half of the
figure and a third subplot that spans the lower half of the figure (for 7b). You may need to refer to the
help browser to workout how to do this.
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468