linear algebra questions (4 questions) REQUIRE MATLAB KNOWLEDGE, HANDSHAKES ONLY

profilepaniyu
lab2_assignment_2.docx

ENGR 231 – Linear Engineering Systems

Lab 2: In Class Assignment - Summer 2016

In this lab, you will compare the critical points and their stability for two closely related autonomous equations. In the second equation, the biggest root is made into a double root.

Tip: It’s easiest to enter this using:

syms y

f = (2/5)*y^6 - …

You can then write it as a vector and find the roots using:

poly = sym2poly(f)

roots(poly)

#

Autonomous Differential Equation

1

2

, where is defined in Eq 1.

Question 1: Using Matlab, find all the critical points (aka equilibrium values) for the first differential equation. Note the polynomial has not been factored for you, so you will need to find the roots first. Hint: help roots

Question 1: The critical points for DE #1 are:

-2,-0.5,0,0.5,2,3

List them in order from the smallest (–2) to the largest. Tip: They are all integers or half integers. Use sort.

Questions 2-3: Plot the phase plot for differential equation # 1. That will be versus y. Be sure it clearly shows all the roots as in the graph below. Then place a marker to locate each critical point. The first marker is shown below.

Fill the marker with green if the critical point is stable.

Fill the marker with red if the critical point is unstable.

Fill the marker with yellow if the critical point is semi-stable.

Replace this plot, with your phase plot showing an appropriate marker at every critical point.

Only one is shown below. You should show them all.

Tips: For the previous question, use the axis command to get a good view of all the roots.

Add a grid. Use hold on, before adding a marker at each critical point.

Here is a command for adding the leftmost marker showing several options.

plot(-2, 0, 'o', 'MarkerSize', 16, 'MarkerFaceColor', 'green', 'MarkerEdgeColor', 'blue')

Annotate the plot and all axes appropriately.

Questions 4-5: Overlay a 1D representation of the phase line. >>>> | <<<<

We need to determine where is positive and negative.

If , plot a black '>' along the axis at the point [y, 0].

If , plot a red '<' along the axis at the point [y, 0].

Here is part of a for loop to do that. Add another if statement to draw the red < symbols.

for y = -5: 0.1: 5

if f(y) > 0

plot(y, 0, 'k>')

end

end

Replace the plot below with your final plot. Yours will include the missing red triangles pointing to the left. Be sure it shows all the markers from the previous question too.

Questions 6 – 10: Redo all the previous steps, but now use differential equation #2. The only difference is that the RHS has been multiplied by a factor of so the biggest root is now a double root. Thus you do not need to find the roots. They have not changed, other than that one is now repeated.

TA will award five points as follows.

1. All the roots are clearly visible and axis has been used to get a good view of them.

2. Both axes are labelled and an appropriate title is shown.

3. There is a marker displayed for each root (aka critical point).

4. The markers are filled with the correct colors.

Red for unstable, green for stable and yellow for semi-stable.

5. A phase line similar to this has been added to the plot.

Paste your completed plot for equation 2 here. (5 points!)

When your lab is complete, be sure to submit it as a PDF by the due date – Thursday before 11:59PM.

You have one more day, to submit the lab (but with a small penalty), and then the window closes for good and your grade will be zero. Only one submission is allowed per student.

3