Question: PROBLEM 2 In this problem, we will explore a simple way to model oscillatory motion. The model in this problem could be used to approximate

PROBLEM 2 In this problem, we will explore a
PROBLEM 2 In this problem, we will explore a simple way to model oscillatory motion. The model in this problem could be used to approximate the motion of a sky scraper , a swinging pendulum , or a start orbiting a supermassive black hole. (We will fully derive this method later in the course. For those of you interested in looking ahead, this problem implements the backward Euler method to solve a linear differential equation.) Let the position of an object at time t be given by x(t) 2 (Mt), y(t)); a column vector where the rst entry is the :::coordinate (abscissa) and the second entry is the ycoordinate (ordinate). The object's motion is (approximately) governed by the following numerical discretization: Ax l 1) 2 x05), where A = 1 I, (II: 1:01} For instance, if you knew the position of the object at time 0 (i.e., if you knew x(0)) then you could calculate the position at time 1 by solving the linear system Ax(1) = x(0). You could then calculate the position of the object at time 2 by solving the system Ax(2) = x(1). For this problem, assume that o = 0.002, a) = 0.06, and x(0) = (1, 1) (a column vector). (1) Find the location of the object at times 0, 1, 2, ..., 1000. Save the mcoordinates of the object at each time in a 1 x 1001 row vector named A6. Save the ycoordinates of the object at each time in a 1 x 1001 row vector named M. (2) The distance from the object to the origin is given by d(t) = W. Find d(t) at times 0, 1,2, ..., 1000 and save these values in a 1 x 1001 mw vector named A8. (3) Find the rst time when the distance from the object to the origin is less than 0.06. Save the resulting time in a variable named A9 and the exact distance in a variable named A10. PROBLEM 3 There are many mathematical applications where we want to rotate objects about an axis in R3 (three dimensional space). For example, when controlling an aircraft, rotations about different axes are known as yarn, pitch and roll. Imagine that an object is at position x = (1:, y, z) (a column vector representing the 3:, y, and z coordinates). To rotate this vector counterclockwise by an angle 6' about the yaxis, you can multiply x by the matrix cos 6 0 sin Rm) : 0 1 0 sind 0 cosB In other words, b 2 19(6):: is the rotated vector of x. (1) Write a function that takes 19 as an argument and returns the matrix 53(9). Use this mction to calculate HUI/8) and save this matrix in a variable named A11. (2) Suppose we have the vector x = (w/10,2.1,e). Rotate this vector about the yaxis by an angle of lay f 3. Save the resulting 3 x 1 vector in a variable named A12. (3) Suppose that we have a vector b = (1.4, vr / 10, 2.8) (a column vector), which was obtained by rotating another vector x about the yaxis by an angle of w/Ei. Find the vector x by solving the appropriate 3 x 3 matrix equation. Save the resulting 3 x 1 vector in a variable named A13. (4) Find the inverse matrix of R(3rr/4) (using inv in MATLAB or scipy.1inalg .inv in python). Save your answer in a variable named A14. (While we don't want to use inverse to solve matrix equations, there are times when we will need to just calculate the inverse.) (5) This is an application where inverse matrices are used quite often, but it is still a bad idea to actually use the inverse command. But can we gure out an easier way to do it? The inverse of a rotation is just another rotation. That is, R(9)-1 = R(w), where q" is a dilferent angle. Find the angle if; such that R(3rr/4)-1 = R(r,b). Save this answer in a variable named A15. (This does not require any code, just some geometric reasoning. If you rotate a vector by an angle 6', what would you have to do to rotate the vector back to where it started\"? The answer is not unique, because adding any multiple of 2w to an angle gives the same rotation matrix. Your answer should be between ?r and rr.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!