# University of Florida/Egm6341/s10.team3.aks/HW6

## (3) Evaluate the rest of the coefficient of matrix

Ref Lecture Notes p.35-3

### Problem Statement

Evaluate the remaining coefficient of Matrix by using degrees of Freedom

### Solution

We have

$Z(s)=\sum _{i=0}^{3}c_{i}s^{i}=\sum _{i=0}^{3}N_{i}(s)d_{i}$ such that

$d_{1}=Z_{i}$ $d_{2}={\dot {Z_{i}}}$ $d_{3}=Z_{i+1}$ $d_{4}={{\dot {Z}}_{i+1}}$ where

${\dot {Z}}={\frac {dZ}{dt}}={\frac {dZ}{ds}}{\frac {ds}{dt}}$ such that ${\frac {ds}{dt}}={\frac {1}{h}}$ We know the coefficient of matrix for first two rows from lecture notes p.35-3

${\begin{bmatrix}1&0&0&0\\0&1&0&0\end{bmatrix}}$ Using the equations above we have

$d_{3}=Z_{i+1}=Z(s=1)=c_{0}+c_{1}+c_{2}+c_{3}$ $d_{4}={\dot {Z}}_{i+1}={\frac {1}{h}}Z'(s=1)=c_{1}+2c_{2}+3c_{3}$ Putting the results in matrix form we obtain

${\begin{bmatrix}1&0&0&0\\0&1&0&0\\1&1&1&1\\0&1&2&3\end{bmatrix}}{\begin{Bmatrix}c_{0}\\c_{1}\\c_{2}\\c_{3}\end{Bmatrix}}={\begin{Bmatrix}Z_{i}\\Z'_{i}\\Z_{i+1}\\Z'_{i+1}\end{Bmatrix}}$ ## (4) Verify the inverse of matrix using Matlab

Ref Lecture Notes p.35-4

### Problem Statement

Find the inverse of given Matrix

A =

    1     0     0     0
0     1     0     0
1     1     1     1
0     1     2     3


### Solution



%Defining Matrix in Matlab%

>> A = [1 0 0 0 ; 0 1 0 0 ; 1 1 1 1 ; 0 1 2 3]

A =

1     0     0     0
0     1     0     0
1     1     1     1
0     1     2     3

%Taking Inverse of matrix%
>> B = inv (A)

B =

1     0     0     0
0     1     0     0
-3    -2     3    -1
2     1    -2     1


which is same as the one given on p.35-4

Hence Verified

## (5) Identify basis functions and plot them

Ref Lecture Notes p.35-4

### Problem Statement

Identify the basis functions

$N_{i}(s)$ where $i=1,2,3,4$ ### Solution

We have

$z(s)=\sum _{i=0}^{3}c^{i}s^{i}=\sum _{i=1}^{4}N_{i}(s)d_{i}$ Expanding above we obtain

$N_{1}d_{1}+N_{2}d_{2}+N_{3}d_{3}+N_{4}d_{4}=C_{0}s^{0}+C_{1}s^{1}+C_{2}s^{2}+C_{3}s^{3}$ $=C_{0}+C_{1}s^{1}+C_{2}s^{2}+C_{3}s^{3}$ $d_{1}=z_{i}=z(s=0)=C_{0}$ $d_{2}={\dot {z}}_{i}={\dot {z}}_{i}(s=0)=C_{1}$ $d_{3}=z_{i+1}=z_{i+1}(s=1)=C_{0}+C_{1}+C_{2}+C_{3}$ $d_{4}={\dot {z}}_{i+1}=C_{1}+2C_{2}+3C_{3}$ Inserting above values in first eq we obtain

$(N_{1}+N_{3})C_{0}+(N_{2}+N_{3}+N_{4})C_{1}+(N_{3}+2N_{4})C_{2}+(N_{3}+3N_{4})C_{3}=C_{0}+C_{1}s+C_{2}s^{2}+C_{3}s^{3}$ Comparing both LHS and RHS we obtain

$N_{1}+N_{3}=1$ $N_{2}+N_{3}+N_{4}=s$ $N_{3}+2N_{4}=s^{2}$ $N_{3}+3N_{4}=s^{3}$ Solving above we obtain basis functions

$N_{1}=1-3s^{2}+2s^{3}$ $N_{2}=s^{3}-2s^{2}+s$ $N_{3}=3s^{2}-2s^{3}$ Below is the plot of above basis functions

$N_{4}=s^{3}-s^{2}$ # (6) Show that $s=s(t)$ Ref Lecture Notes p.36-1

### Problem Statement

We have to show that s is the function of t (s = s(t) )

### Solution

We have (from p.35-1 eq (1))

$t(s)=(1-s)t_{i}+st_{i+1}$ $=t_{i}+s(t_{i+1}-t_{i})$ $but{\frac {ds}{dt}}={\frac {1}{h}}$ $or{\frac {dt}{ds}}=h$ so $t_{i+1}-t_{i}={\frac {t_{i+1}-t_{i}}{1-0}}=h$ $t(s)=t_{i}+hs$ $hs=t-t_{i}$ $s={\frac {(t-t_{i})}{h}}$ $s=s(t)$ Hence Proved