18.085 Fall 2013

Homework

Homework: [From 2013]

#9 (Due: Tuesday, Dec. 3)

#8 (Due: Tuesday, Nov. 21)

#7 (Due: Tuesday, Nov. 12)

#6 (Due: Tuesday, Oct. 29)

  1. Explain in 5-10 lines the difference between cubic finite elements and cubic splines.
  2. To solve \[-\frac{d}{dx} (c(x) \frac{du}{dx}) = f(x)\] by the cubic finite elements $\phi^d$ and $\phi^s$ , what integrals are needed to form the stiffness matrix $K$ and load vector $F$? NOT NECESSARY TO COMPUTE -- just answers like this for the four submatrices $K^{dd}$ and $K^{ds}$ and $K^{sd}$ and $K^{ss}$ of $K$: $K^{dd}$ has integrals like \[\int c(x) (\frac{d}{dx} \phi^d_i)(\frac{d}{dx} \phi^d_j) dx\] Which $i$ and $j$ give integrals that are sure to be zero?
  3. With $h=1/3$ compute the stiffness matrix $K$ and load vector $F$ to solve \[-u''(x) = 1 \; , \qquad u(0) = 0, \; u'(1) = 0\] using 2 hats and 1 half-hat and 3 parabolic bubbles from page 251: So $K$ is 6 by 6. SOLVE $KU = F$ by MATLAB.
  4. Solutions

#5 (Due: Thursday, Oct. 10)

#4 (Due: Thursday, Oct. 3)

  1. 2.4: 1, 3, 7 (deferred)
  2. MATLAB (deferred):
    • In the middle of p 155 is a fast construction of K= A'A when A is the incidence matrix for a square grid of nodes: B=toeplitz([2 -1 zeros(1,N-2)]); B(1,1)=1; B(N,N)=1; K=kron(B, eye(N)) + kron(eye(N),B). For N=3 then N=5, assign voltages to two corners: u(1,1)=1, u(N,N)=0, and solve for all the other voltages. Ku=(bring that voltage u(1,1) to the right side)
    • How much current flows out of node 1,1 and must reach node N,N? All unit resistances so C = I
    • Open question How does the answer change with N
    1. A network has N=4 nodes around a clock and 1 node at the center. 4 edges go around the clock and 4 in to the center. The 12:00 node has voltage 1, the 6:00 node has voltage 0. Edges around the clock have c=1, edges to the center have c=2. Set up and solve the network eqns with m=8 and n=5// and find the total current into the bottom 6:00 node.
    2. Change to N=12 nodes around the clock: n=13 and m=24.
    3. Change to N=60 nodes around the clock: n=61 and m=120.
    1. For a 3D cubic grid with N^3 interior nodes and n=(N+2)^3 total nodes, describe the nxn singular matrix A'A and diag(A'A) for A=incidence matrix of this grid. What is the shape of A ? What is a typical inside row of A'A? Describe the boundary rows.
    2. For N=2 create the reduced invertible 8x8 matrix K when all boundary values are ZERO. Display the pattern of nonzeros by spy(K). Invert K. Produce eig(K). Solve K*v=ones(8). Display v.
  3. Solutions (MATLAB)

#3 (Due: Thursday, Sept. 26th)

#2 (Due: Thursday, Sept. 19th)

#1 (Due: Thursday, Sept. 12th)