18.303 Problem Set 4 Solutions Problem 1: (10+10) Adjoints in higher dimensions (a) To show that we have orthogonal modes with real frequencies, using the result from class for general “hyperbolic” equations, we just need to show that  is self-adjoint and negative-definite. In particular, for  = ρ1 ∇ · C∇, as in class we want an inner product that cancels the 1/ρ factor: ˆ hu, vi = ρūv . Ω ´ ‚ ´ Using the same integration-by-parts rule as in class Ω f ∇ · g = ∂Ω f g · ds − Ω g · ∇f, we then find: ˆ ‹ ˆ 1 hu, Âvi = ρ ū ∇ · C∇v ūC∇v · ds − C∇v · ∇ū |{z} | {z } = Ω ∂Ω Ω ρ g f ˆ ˆ ˆ = − (C∇v)T ∇u = − (∇v)T C T ∇u = − (∇v)T C∇u Ω ˆΩ ‹ ˆ Ω · ds + =− ∇ |{z} v ·C∇u vC∇u v · ∇ · C∇u | {z } = − Ω ∂Ω Ω = g f ˆ 1 ρ ∇ · C∇u · v = hÂu, vi, ρ Ω hence  is self-adjoint. Here, in the second line we have used the fact that a dot product of two vectors is really g · h = gT h in linear-algebra notation, which allows us to use the fact that C T = C = C̄. The boundary terms vanish because u and v are zero at the boundaries. Furthermore, negative-definiteness is obtained by inspection of the second line: ˆ hu, Âui = − (∇u)∗ C(∇u), Ω where ∗ is the conjugate-transpose. C is given to be positive-definite, so (∇u)∗ C(∇u) > 0 for ∇u 6= 0 by definition, but ∇u = 0 ⇐⇒ u = constant ⇐⇒ u = 0 by the boundary conditions, and hence hu, Âui < 0 for u 6= 0 and  is negative-definite as desired. (b) For example, the Dirichlet boundary condition u|∂Ω = 0 is sufficient. (Other possibilities include periodic boundary conditions, if Ω is a parellelogram, or Neumann-like boundary conditions n · ∇u|∂Ω = 0 and ∇ · u|∂Ω = 0, i.e. that the normal derivative of each component of u vanishes at the boundary along with the divergence of u.) To see this, consider ˆ ux ∇2 ux + uy ∇2 uy + u · ∇(∇ · u) . hu, Âvi = Ω 2 The first two ∇ are self-adjoint with Dirichlet boundaries by exactly the proof ´ ‚ ´ from class. The third term proceeds analogously, using the same Ω f ∇ · g = ∂Ω f g · ds − Ω g · ∇f rule: ˆ ‹ ˆ = u ·∇ (∇ · v) (∇ · v)u · ds − (∇ · |{z} v )∇ |{z} | {z } | {z· u} Ω ∂Ω Ω g f ‹ = − (∇· u)v · ds + ∂Ω ˆ g f ∇(∇ · u) · v, Ω where we have integrated by parts twice, and hence hu, ∇(∇ · v)i = h∇(∇ · u), vi as desired. 1 Problem 2: (5+5+10+5) Maxwell (a) Using the fact that ∇ · ∇ × F = 0 for any F (that is, the divergence of the curl is zero), we can take the divergence of both sides of ∇ × E = iωB to obtain 0 = iω∇ · B, which implies ∇ · B = 0 if ω 6= 0. For Ampere’s law ∇ × B = −iωεE + J, we similarly get ∇ · εE = 0 if J = 0 or ∇ · J = 0. More generally, conservation of charge implies ∂ρ ∂t = −iωρ = −∇ · J where ρ is the free charge density and J is the free current density.1 One then obtains ∇ · εE = ρ, which is the more general form of Gauss’s law in the presence of charge. (b) If we take the curl of both sides of ∇ × E = iωB and substitute Ampere’s law for ∇ × B, we immediately obtain ∇ × ∇ × E = ω 2 εE. Hence  = ε−1 ∇ × ∇× and λ = ω 2 . (c) We need to cancel the unsymmetrical-looking ε−1 ´ term in Â, much like in the examples in class, so we choose the inner product hF, Gi = Ω F∗ εG, where F∗ is conjugate-transpose. This is clearly an inner product as long as ε is real and > 0 (to ensure positivity). The key is then to use the standard vector identity ∇ · (F × G) = (∇ × F) · G − F · (∇ × G), which is essentially a version of the triple-product identity combined with the product rule, to integrate by parts. This gives us ˆ ˆ ˆ ¨ F · (∇ × G) = [(∇ × F) · G − ∇ · (F × G)] = (∇ × F) · G − (F × G) · dA, Ω Ω Ω ∂Ω and hence ∇× is a symmetric operator, under the usual unweighted inner product, as long as (F × G) · n̂ = 0 on the boundary ∂Ω. Applying this rule twice, we get: ˆ ˆ ∇ × ∇ × E · E0 = hÂE, E0 i hE, ÂE0 i = Ē · ∇ × ∇ × E0 = Ω Ω as long as the boundary terms vanish, which happens if Ē × (∇ × E0 ) ·n̂ = 0 and Ē0 × (∇ × E) · n̂ = 0 at the boundary. Subtituting Faraday’s law, this means that we need Ē×H0 and Ē0 ×H to be orthogonal to the normal vector n̂ at the boundary. There are a variety of boundary conditions that would make this true, for example: (i) If E is perpendicular to the boundary (i.e. E × n̂ = 0, i.e. E is parallel to n̂) then E × F will be perpendicular to n̂ for any F. (This turns out to be the boundary condition for a perfect electric conductor.) (ii) Similarly, if H is perpendicular to the boundary. (This turns out to be the boundary condition for a perfect “magnetic conductor.”) (iii) If you have a torus domain with periodic boundary conditions, the boundary terms cancel. ´ (d) If we integrate by parts only once above, we have hE, ÂEi = Ω |∇ × E|2 ≥ 0, hence  is positive semidefinite, λ = ω 2 is ≥ 0, and ω is real. We have oscillating solutions, i.e. electromagnetic waves! Problem 3: (5+5+5+5) See also the IJulia notebook posted with the solutions. (a) Setting the slopes to be zero at R1 and R2 simply gives 0 αJm (kr) + βYm0 (kr) = 0 1 This can be derived in a variety of ways. e.g. make an infinitesimal “box” that is dx × dy × dz, in which case one dx dy dz. quickly finds that the rate at which charge flows into the box is −dx dy dz ∇ · J, and this must equal ∂ρ ∂t 2 at the two radii, or E α β = 0 where E= 0 Jm (kR1 ) Ym0 (kR1 ) 0 Jm (kR2 ) Ym0 (kR2 ) . Hence, writing fm (k) = det E, we get 0 0 fm (k) = Jm (kR1 )Ym0 (kR2 ) − Jm (kR2 )Ym0 (kR1 ) . Given a k for which fm (k) = 0, then we can solve for the nullspace of E by arbitrarily choosing α a scaling such that α = 1 and solving for β from the first or second rows of E = 0: β β=− 0 0 Jm (kR1 ) Jm (kR2 ) = − . Ym0 (kR1 ) Ym0 (kR2 ) (b) Note that fm (k) for m > 0 has a divergence as k → 0, so we used the ylim command to rescale the vertical axis (otherwise it would be hard to read the plot!); see the solution IJulia notebook (c) We’ll use the Scilab newton function, similar to class, to find the roots, with initial guesses provided by our plot in the notebook. We find k1 ≈ 3.196578, k2 ≈ 6.31234951, and k3 ≈ 9.4444649. See the solutions notebook. (d) See the IJulia notebook. Using our k1 and k2 from part (c) and our α and β from part (a), ´R we find that R12 ru0,1 (r)u0,2 (r)dr ≈ 10−15 , which is zero up to roundoff errors. 3