Problem Set F Numbers 1 through five

# Problem Set F Numbers 1 through five - Problem Set F...

This preview shows pages 1–5. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Problem Set F Numbers 1,5,7 1. a) A = [2 -1;3 -2;]; [xi,R] = eig(sym(A)) Eigenvalue: 1 Eigenvector : [1, 1] Eigenvalue: -1 Eigenvector: [1/3, 1] General Solution: = + /- y c111et c21 31e t A2 = [1 -1; 5 -3]; [xi,R] = eig(sym(A2)) Eigenvalue: [-i -1] Eigenvector: [2/5 - i/5, 1] Eigenvalue:[i – 1] Eigenvector[i/5 + 2/5, 1] General Solution: u(t) = - ( + ( ) e t cost sin t ) A3 = [-3 5/2;-5/2 2]; [x3i R] = eig(sym(A3)) %finding a second eigenvector for A3 M = [-5/2 5/2; -5/2 5/2]; eta = M\x3i Eigenvalue:[-1/2] Eigenvector: [1,1] Eigenvalue: [-1/2] Eigenvector[-2/5, 0] General Solution: = - / + [- +- /- / ] y c111e 1 2t c2 11te 12t 2 50e 1 2t b) %Finding the general solution using dsolve ivp = 'Dx = 2*x -y, Dy =3*x - 2*y, x(0) = a, y(0) = b' ; [x y] = dsolve(ivp , 't' ) x = exp(t)*((3*a)/2 - b/2) - ((3*a)/2 - (3*b)/2)/(3*exp(t)) y = exp(t)*((3*a)/2 - b/2) - ((3*a)/2 - (3*b)/2)/exp(t) %graphing the solution curves given by dsolve xf = @(t,a,b)eval(vectorize(x)); %defining the functions for xf and yf yf = @(t,a,b)eval(vectorize(y)); figure; hold on t = -3:0.1:3; for a = -2:2 %the for loops, graph several trajectories using different sets of initial condititions for b = -2:2 plot(xf(t,a,b),yf(t,a,b)) end end hold off axis([-10 10 -10 10]) xlabel 'x' ylabel 'y' title 'graph of the ivp Dx = 2*x -y, Dy =3*x - 2*y, x(0) = a, y(0) = b' ;-10-8-6-4-2 2 4 6 8 10-10-8-6-4-2 2 4 6 8 10 x y graph of the ivp Dx = 2*x -y, Dy =3*x - 2*y, x(0) = a, y(0) = b From the graph the origin appears to be an unstable saddle point also the vector field shows the direction that t is increasing. ivp = 'Dx = 1*x -y, Dy =5*x -3*y, x(0) = a, y(0) = b' ; [x y] = dsolve(ivp , 't' ) x = - exp(t*(i - 1))*((5*a*i)/2 - b*(i + 1/2))*(i/5 + 2/5) - (((5*a*i)/2 - b*(i - 1/2))*(i/5 - 2/5))/exp(t*(i + 1)) y = ((5*a*i)/2 - b*(i - 1/2))/exp(t*(i + 1)) - exp(t*(i - 1))*((5*a*i)/2 - b*(i + 1/2)) %Graphing trajectories of the solution for varying initial conditions xf = @(t,a,b)eval(vectorize(x)); yf = @(t,a,b)eval(vectorize(y));...
View Full Document

## This note was uploaded on 06/28/2009 for the course MATH 246H taught by Professor Zheng during the Spring '08 term at Maryland.

### Page1 / 11

Problem Set F Numbers 1 through five - Problem Set F...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online