Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

need to solve this in matlab The band matrix A shown below can be used to estima

ID: 2962564 • Letter: N

Question

need to solve this in matlab

The band matrix A shown below can be used to estimate the unsteady conduction of heat in a rod when the temperatures at points p1,..p4 on the rod change with time. The constant C in the matrix depends on the physical nature of the rod, the distance Ax between the points on the rod, and the length of time At between successive temperature measurements. Suppose that for k=0,1,... a vector tk in R4 lists the temperatures at time kAt. If the two ends of the rod are maintained at 0degree, then the temperature vectors satisfy the equation Atk+i=tk Find the LU factorization of A when C= 1. A matrix such as A with three nonzero diagonals is called a tri diagonal matrix. You should get L and U factors which are bi diagonal matrices. Hint: Use the command lu. What type of matrices are L and U ? For A, L, U as above, compute delta A, delta L and delta i/, where A=LU. What is the general fact illustrated by the computations at point c ? Suppose C=1 and to=(10,15,15,10)1. Use the LU factorization of A to find the temperature distributions for k=l,..., 20. What do you expect it will happen when (or equivalently k rightarrow oo)? Explain your reasoning. Hint: Given that you solve repeatedly the equation Atk+i=tk,you may want to use a for loop to automate the computations.

Explanation / Answer

clear;

clc;

syms c;


A= [1+2*c -c 0 0

-c (1+2*c) -c 0

0 -c (1+2*c) -c

0 0 -c (1+2*c)];


B= subs(A,1);

[L,U]=lu(B);


x=sprintf('determinant of A is %d ',double(det(B)));

disp(x);

x=sprintf('determinant of L is %d ',double(det(L)));

disp(x);

x=sprintf('determinant of U is %d ',double(det(U)));

disp(x);



%it is given that At(k+1)=t(k)---------------

t(1,:)=[10 15 15 10];


for i=2:20

result= double(inv(L))*t(1,:)';

t(i,:)=result;

end



%--------------------------------------------

% when the value of k tends to infinity, the value of t stabilizes and thus it doesn't changes