advertisement

18.303 Midterm Solutions, Fall 2012 Problem 1: Adjoints and operators (20 points) (a) Integrating by parts, and using the fact that u0 (L) = αu(L), have Z Z L Z L L 00 0 L 0 0 0 0 ūv = ūv |0 − u v = ūv − u v 0 + hu, Âvi = u00 v 0 0 0 L 0 (0) + u0 (0)v(0) u(0)v = u(L)v 0 (L) − u0 (L)v(L) − + hÂu, vi i h ( ( ((( (u(L)v(L) (− = α u(L)v(L) + hÂu, vi (((( = hÂu, vi, hence Â = Â∗ . (b) For it to have decaying solutions, as in class we want Â to be negative definite (or negative semidefinite, if we allow the solutions to decay to a nonzero asymptote). Hence, we need hu, Âui < 0 (or ≤ 0) for u 6= 0. As in class, we look at the middle step above where we have integrated by parts once: Z L 0 L u0 u0 hu, Âui = ūu |0 − 0 2 Z = α |u(L)| − L 2 |u0 (x)| dx 0 This is ≤ 0 if α ≤ 0. It would = 0 if u0 = 0 and αu(L) = 0. However, u0 = 0 implies u(x) = constant, but since u(0) = 0 the only constant it can be is 0. Hence, hu, Âui < 0 for u 6= 0 for any α ≤ 0 . Problem 2: Finite differences (20 points) Let m = M + 1 correspond to the x = L boundary, in which case we set uM +1 = 0 similar to class. The discrete form of the left boundary condition will be something like u1 − u0 =⇒ u0 = u1 − ∆x. ∆x There is some subtlety about where to place the left boundary. If we want this boundary condition to be imposed with −u0 second-order accuracy, we need u1∆x to be a center-difference approximation, in which case we should make x = 0 L correspond to m = 0.5. This means that (M + 1 − 0.5)∆x = L, or ∆x = . [However, I didn’t specify that M + 0.5 second-order accuracy was required, so it is acceptable if you make, e.g., m = 0 correspond to x = 0 similar to class, in which case we have a first-order forward difference approximation for u0 (0) and you will get ∆x = L/(M + 1). I do expect you to specify ∆x.] m +um−1 Then, applying u00m ≈ um+1 −2u for m = 1, 2, . . . , M will give us the same matrix as usual except that we ∆x2 need to be careful with the first and last rows, where: u0 (0) = 1 ≈ u2 − 2u1 + u0 u2 − u1 1 , = − ∆x2 ∆x2 ∆x − 2uM + uM −1 uM+1 u00M = . ∆x2 In particular, the 1/∆x term in the u001 equation needs to be moved to the right-hand side of Âu − cu = term just gives us a diagonal term −cm um . Writing this all out in matrix form, we obtain: u001 = Au = b where −1 1 1 A= ∆x2 1 −2 .. . 1 .. . 1 .. . −2 1 − 1 −2 1 c1 c2 .. . cM −1 cM ∂u ∂t . The −cu and 1 0 .. . 1 b= ∆x 0 0 . Notice that, much like in class, the nonzero boundary condition adds a source term to the right-hand-side, and the source term looks much like a (discretized) delta function since it has height 1/∆x and “width” ∆x (one “pixel”) Problem 3: Green-ish functions (20 points) (a) As in class, for x 6= y we have u00 = 0, or u is a straight line. Since it has to go through zero at the endpoints, we have ( αx x<y u(x) = β(x − L) x > y for some constants α and β to be determined. The first derivative, in the distribution sense, gives ( α u (x) = [β(y − L) − αy] δ(x − y) + β 0 x<y , x>y where we have picked up a δ function from the discontinuity at y. The second derivative, in the distribution sense, then gives u00 (x) = [β(y − L) − αy] δ 0 (x − y) + (β − α)δ(x − y), where the derivative of δ gave us δ 0 and the discontinuity β − α gave us another δ. Comparing to −u00 (x) = δ 0 (x − y), we immediately obtain the equations β = α, 1 . L Note that since y ∈ [0, L], the denominator in α is never zero and so α is always finite. Hence, we obtain the regular distribution ( x<y 1 x u(x) = , L x−L x>y α(y − L) − αy = −1 =⇒ α = which is discontinuous but has continuous slope. (b) Similar to the Green’s functions in class, we can do this by superposition: Z u(x) = − L D(x, y)f (y)dy , 0 since Z Âu = − L Z [AD(x, y)] f (y)dy = 0 L [−δ 0 (x − y)]f (y)dy = −δ 0 (x − y){f (y)} = f 0 (y). 0 2