disp('Solution of the two-tank mixing problem via dsolve') pause [x y] = dsolve('Dx = (-1/3)*x + (1/12)*y + 1','Dy = (1/3)*x + (-1/3)*y + 2 ','t') pause disp('Let K1 = -C1 + 2*C2 and K2 = C1 + C2/4 so that') disp('x = K1*(-1/2)*exp((-1/2)*t) + K2*(1/2)*exp((-1/6)*t') disp('y = K1*exp((-1/2)*t) + K2*exp((-1/6)*t) ') pause disp('Eigenvectors and eigenvalues via eig') pause A = [ -1/3 1/12; 1/3 -1/3] [u d] = eig(A) pause disp('First column of u is an eigenvector with d(1,1) an eigenvalue') pause disp('A times column one') A*u(:,1) pause disp('d(1,1) times column one') d(1,1)*u(:,1) pause disp('column one times k = 1/u(2,1)') u(:,1)/u(2,1) pause disp('Second column of u is an eigenvector with d(2,2) an eigenvalue') pause disp('A times column two') A*u(:,2) pause disp('d(2,2) times column two') d(2,2)*u(:,2) pause disp('column two times k = 1/u(2,2)') u(:,2)/u(2,2)