18.085 Fall 2013
Homework
Homework: [From 2013]
#9 (Due: Tuesday, Dec. 3)
- 4.3: 16, 17, 18, 20
- 4.4: 2, 8, 9
- 4.5: 1, 2, 10, 11, 12, 14, 21, 23
- Solutions
#8 (Due: Tuesday, Nov. 21)
- 4.1: 1 (b and c), 3, 6, 13
- 4.2: 1, 3
- 4.3: 2, 6, 8, 11
- The function f(x) = x is odd on the interval - pi to pi. Graph its Fourier sine series up to sin 10 x and then up to sin 20 x.
- What is the maximum error (distance from f(x) = x) ?
- How far from pi are the maximum errors for those graphs ? How could those distances be approximately related to 10 and 20 ?
- Find the sum of squares of the sine coefficients. Connect the total to the energy in the original function x.
- Find the error at x = pi/2 in both graphs and predict how fast this goes to zero for the sum stopping at sin 30 x.
- Solutions
#7 (Due: Tuesday, Nov. 12)
- 3.3: 6, 7, 8, 27
- 3.4: 6, 18, 20
- 3.5: 1, 5
- 3.6: 5, 6, 9, 11, 18
- Solutions
Note: for 3.6 #5 and #6 use Persson's FEM code -- not distmesh --which should be stored in math.mit.edu/cse (many codes there). It is also printed in the book (and may be on the website)
#6 (Due: Tuesday, Oct. 29)
- 3.1: 5, 9, 12, 14, 17
- Explain in 5-10 lines the difference between cubic finite elements and cubic splines.
- 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?
- 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.
- Solutions
#5 (Due: Thursday, Oct. 10)
- 2.7: 1, 2, 5, 7, 9, 11
- Solutions
#4 (Due: Thursday, Oct. 3)
- 2.4: 1, 3, 7 (deferred)
- 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
- 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.
- Change to N=12 nodes around the clock: n=13 and m=24.
- Change to N=60 nodes around the clock: n=61 and m=120.
- 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.
- 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.
- Solutions (MATLAB)
#3 (Due: Thursday, Sept. 26th)
- 2.1: 1, 4, 7
- 2.3: 1, 7, 8, 18, 24
- Solutions
#2 (Due: Thursday, Sept. 19th)
- Matlab problems are short.
- 1.3: Matlab 3 and 11, 17 .
- 1.4: 2, 6, 7, 12
- 1.5: 1,2, Matlab 3
- 1.6: 9, 12, 20
- Solutions
#1 (Due: Thursday, Sept. 12th)
- Section 1.1: Problems 1, 2, 15, 27
- Section 1.2: Problems 1, 2, 6, 9
- MATLAB Section 1.1: 3, 5
- Section 1.2: 19.
- Solutions