The Gradient and Level Sets

Total Page:16

File Type:pdf, Size:1020Kb

The Gradient and Level Sets The Gradient and Level Sets 1. Let f(x; y) = x2 + y2. (a) Find the gradient rf. Solution. rf(x; y) = h2x; 2yi. (b) Pick your favorite positive number k, and let C be the curve f(x; y) = k. Draw the curve on the axes below. Now pick a point (a; b) on the curve C. What is the vector rf(a; b)? Draw the vector rf(a; b) with its tail at the point (a; b). What relationship does the vector have to the curve? Solution. The curve f(x; y) = k is a circle in the xy-plane centered at the origin. The vector rf(a; b) is equal to h2a; 2bi, and this vector is perpendicular to the circle (no matter what value of k you picked and what point (a; b) you picked). (c) Let ~r(t) be any parameterization of your curve C. What is f(~r(t))? What happens if you use the d Chain Rule to find dt f(~r(t))? Use this to explain your observation from (b). Solution. f(~r(t)) is always equal to k, since ~r(t) parameterizes the curve C, and the curve C is exactly the set of points where f(x; y) = k. d d d Since f(~r(t)) = k for all t, dt f(~r(t)) = dt k = 0. By the Chain Rule, we know that dt f(~r(t)) is also equal to rf(~r(t)) · ~r0(t), so the gradient rf(~r(t)) is always perpendicular to r~0(t). Recall that r~0(t) gives the direction of the tangent vector, so rf is always perpendicular to the tangent vector. 2. Here is the level set diagram (contour map) of a function f(x; y). The value of f(x; y) on each level set is labeled. For each of the three points (a; b) marked in the picture, draw a vector showing the direction of rf(a; b). (Don't worry about the magnitude of rf(a; b).) 1 1 4 3 2 0 Solution. Let's look at the upper right point. We know that rf(a; b) is perpendicular to the curve at (a; b), but there are still two possible directions: 1 4 3 2 0 To determine which is correct, we use the definition of rf(a; b): it is defined to be hfx(a; b); fy(a; b)i. We can tell from the original picture that fx(a; b) > 0 (see the worksheet \Partial Derivatives" for more explanation), so the vector rf(a; b) must point to the right. Using the same reasoning for the other two points, we get the following vectors: 1 4 3 2 0 p 3. Let S be the cylinder x2 + y2 = 4. Find the plane tangent to S at the point (1; 3; 5). 2 p Solution. If we let f(x; y; z) = x2 + y2, then S is the level set f(x; y; z) = 4. Therefore, rf(1; 3; 5) will be a normal vector for the tangent plane we want. p p p rf = h2x; 2y; 0i, so rf(1; 3; 5) = h2; 2 3; 0i. Since (1; 3; 5) is a point on the tangent plane, the p p p p tangent plane has equation h2; 2 3; 0i · hx − 1; y − 3; z − 5i = 0, or 2(x − 1) + 2 3(y − 3) = 0 . Note that this is exactly the same problem as #1 from the worksheet \Tangent Planes and Linear Approximation"; this solution, however, is simpler than the one we came up with before. π 4. Let S be the surface z = y sin x. Find the plane tangent to S at the point 6 ; 2; 1 . π Solution. If we let f(x; y; z) = y sin x−z, then S is the level set f(x; y; z) = 0. Therefore, rf 6 ; 2; 1 will be a normal vector for the tangent plane we want. p rf = hy cos x; sin x; −1i, so rf π ; 2; 1 = 3; 1 ; −1 . Since π ; 2; 1 is a point on the tangent plane, p6 2 6 p 1 π π 1 the tangent plane has equation 3; 2 ; −1 · x − 6 ; y − 2; z − 1 = 0, or 3 x − 6 + 2 (y − 2) − (z − 1) = 0 . Note that this is exactly the same problem as #2 from the worksheet \Tangent Planes and Linear Approximation"; this solution, however, is simpler than the one we came up with before. 5. Suppose that 3x + 4y − 5z = −4 is the plane tangent to the graph of f(x; y) at the point (1; 2; 3). (a) Find rf(1; 2). Solution. We are told that 3x + 4y − 5z = −4 is the plane tangent to the surface z = f(x; y) at the point (1; 2; 3). Let's think about how we normally find the tangent plane to a graph. We could use the result of #3 from the worksheet \Tangent Planes and Linear Approximation", or we could simply express the graph as a level surface. Let's take the second approach. To find the plane tangent to z = f(x; y) at the point (1; 2; 3), let's write g(x; y; z) = f(x; y) − z. Then, the surface z = f(x; y) can also be described as the level set g(x; y; z) = 0. Therefore, rg(1; 2; 3) must be a normal vector for the tangent plane. From the equation we are given from the tangent plane, we can see that h3; 4; −5i is also a normal vector for the tangent plane. Therefore, we know that rg(1; 2; 3) must be parallel to h3; 4; −5i; in other words, rg(1; 2; 3) must be a scalar multiple of h3; 4; −5i. Of course, we're interested in rf = hfx; fyi, and we had defined g in terms of f, so let's try to write rg in terms of f. Since g(x; y; z) = f(x; y) − z, rg = hfx; fy; −1i, and rg(1; 2; 3) = hfx(1; 2); fy(1; 2); −1i. So, we can conclude that hfx(1; 2); fy(1; 2); −1i is a scalar multiple of h3; 4; −5i. What scalar? 1 Well, looking at the last component of each vector, we can see that the scalar must be 5 ; that 1 3 4 is, hfx(1; 2); fy(1; 2); −1i = 5 h3; 4; −5i. So, fx(1; 2) = 5 and fy(1; 2) = 5 , which means that 3 4 rf(1; 2) = ; . 5 5 (b) Use linear approximation to approximate f(1:1; 1:9). Solution. Now that we know fx(1; 2) and fy(1; 2), we can write down the linearization L(x; y) of f(x; y) at (1; 2).(1) However, there is an even simpler way to do this problem. Remember (1) 3 4 It is L(x; y) = f(1; 2) + fx(1; 2)(x − 1) + fy(1; 2)(y − 2) = 3 + 5 (x − 1) + 5 (y − 2). 3 that the graph of L(x; y) was exactly the tangent plane to f at (1; 2). So, z = L(x; y) is the 3 4 4 3 4 4 same as 3x + 4y − 5z = −4, or z = 5 x + 5 y + 5 . That is, L(x; y) = 5 x + 5 y + 5 . So, 3 4 4 f(1:1; 1:9) ≈ L(1:1; 1:9) = 5 (1:1) + 5 (1:9) + 5 = 2:98 . 4.
Recommended publications
  • Glossary Physics (I-Introduction)
    1 Glossary Physics (I-introduction) - Efficiency: The percent of the work put into a machine that is converted into useful work output; = work done / energy used [-]. = eta In machines: The work output of any machine cannot exceed the work input (<=100%); in an ideal machine, where no energy is transformed into heat: work(input) = work(output), =100%. Energy: The property of a system that enables it to do work. Conservation o. E.: Energy cannot be created or destroyed; it may be transformed from one form into another, but the total amount of energy never changes. Equilibrium: The state of an object when not acted upon by a net force or net torque; an object in equilibrium may be at rest or moving at uniform velocity - not accelerating. Mechanical E.: The state of an object or system of objects for which any impressed forces cancels to zero and no acceleration occurs. Dynamic E.: Object is moving without experiencing acceleration. Static E.: Object is at rest.F Force: The influence that can cause an object to be accelerated or retarded; is always in the direction of the net force, hence a vector quantity; the four elementary forces are: Electromagnetic F.: Is an attraction or repulsion G, gravit. const.6.672E-11[Nm2/kg2] between electric charges: d, distance [m] 2 2 2 2 F = 1/(40) (q1q2/d ) [(CC/m )(Nm /C )] = [N] m,M, mass [kg] Gravitational F.: Is a mutual attraction between all masses: q, charge [As] [C] 2 2 2 2 F = GmM/d [Nm /kg kg 1/m ] = [N] 0, dielectric constant Strong F.: (nuclear force) Acts within the nuclei of atoms: 8.854E-12 [C2/Nm2] [F/m] 2 2 2 2 2 F = 1/(40) (e /d ) [(CC/m )(Nm /C )] = [N] , 3.14 [-] Weak F.: Manifests itself in special reactions among elementary e, 1.60210 E-19 [As] [C] particles, such as the reaction that occur in radioactive decay.
    [Show full text]
  • Math 327 Final Summary 20 February 2015 1. Manifold A
    Math 327 Final Summary 20 February 2015 1. Manifold A subset M ⊂ Rn is Cr a manifold of dimension k if for any point p 2 M, there is an open set U ⊂ Rk and a Cr function φ : U ! Rn, such that (1) φ is injective and φ(U) ⊂ M is an open subset of M containing p; (2) φ−1 : φ(U) ! U is continuous; (3) D φ(x) has rank k for every x 2 U. Such a pair (U; φ) is called a chart of M. An atlas for M is a collection of charts f(Ui; φi)gi2I such that [ φi(Ui) = M i2I −1 (that is the images of φi cover M). (In some texts, like Spivak, the pair (φ(U); φ ) is called a chart or a coordinate system.) We shall mostly study C1 manifolds since they avoid any difficulty arising from the degree of differen- tiability. We shall also use the word smooth to mean C1. If we have an explicit atlas for a manifold then it becomes quite easy to deal with the manifold. Otherwise one can use the following theorem to find examples of manifolds. Theorem 1 (Regular value theorem). Let U ⊂ Rn be open and f : U ! Rk be a Cr function. Let a 2 Rk and −1 Ma = fx 2 U j f(x) = ag = f (a): The value a is called a regular value of f if f is a submersion on Ma; that is for any x 2 Ma, D f(x) has r rank k.
    [Show full text]
  • A Level-Set Method for Convex Optimization with a 2 Feasible Solution Path
    1 A LEVEL-SET METHOD FOR CONVEX OPTIMIZATION WITH A 2 FEASIBLE SOLUTION PATH 3 QIHANG LIN∗, SELVAPRABU NADARAJAHy , AND NEGAR SOHEILIz 4 Abstract. Large-scale constrained convex optimization problems arise in several application 5 domains. First-order methods are good candidates to tackle such problems due to their low iteration 6 complexity and memory requirement. The level-set framework extends the applicability of first-order 7 methods to tackle problems with complicated convex objectives and constraint sets. Current methods 8 based on this framework either rely on the solution of challenging subproblems or do not guarantee a 9 feasible solution, especially if the procedure is terminated before convergence. We develop a level-set 10 method that finds an -relative optimal and feasible solution to a constrained convex optimization 11 problem with a fairly general objective function and set of constraints, maintains a feasible solution 12 at each iteration, and only relies on calls to first-order oracles. We establish the iteration complexity 13 of our approach, also accounting for the smoothness and strong convexity of the objective function 14 and constraints when these properties hold. The dependence of our complexity on is similar to 15 the analogous dependence in the unconstrained setting, which is not known to be true for level-set 16 methods in the literature. Nevertheless, ensuring feasibility is not free. The iteration complexity of 17 our method depends on a condition number, while existing level-set methods that do not guarantee 18 feasibility can avoid such dependence. We numerically validate the usefulness of ensuring a feasible 19 solution path by comparing our approach with an existing level set method on a Neyman-Pearson classification problem.20 21 Key words.
    [Show full text]
  • Full Text.Pdf
    [version: January 7, 2014] Ann. Sc. Norm. Super. Pisa Cl. Sci. (5) vol. 12 (2013), no. 4, 863{902 DOI 10.2422/2036-2145.201107 006 Structure of level sets and Sard-type properties of Lipschitz maps Giovanni Alberti, Stefano Bianchini, Gianluca Crippa 2 d d−1 Abstract. We consider certain properties of maps of class C from R to R that are strictly related to Sard's theorem, and show that some of them can be extended to Lipschitz maps, while others still require some additional regularity. We also give examples showing that, in term of regularity, our results are optimal. Keywords: Lipschitz maps, level sets, critical set, Sard's theorem, weak Sard property, distri- butional divergence. MSC (2010): 26B35, 26B10, 26B05, 49Q15, 58C25. 1. Introduction In this paper we study three problems which are strictly interconnected and ultimately related to Sard's theorem: structure of the level sets of maps from d d−1 2 R to R , weak Sard property of functions from R to R, and locality of the divergence operator. Some of the questions we consider originated from a PDE problem studied in the companion paper [1]; they are however interesting in their own right, and this paper is in fact largely independent of [1]. d d−1 2 Structure of level sets. In case of maps f : R ! R of class C , Sard's theorem (see [17], [12, Chapter 3, Theorem 1.3])1 states that the set of critical values of f, namely the image according to f of the critical set S := x : rank(rf(x)) < d − 1 ; (1.1) has (Lebesgue) measure zero.
    [Show full text]
  • Surface Regularized Geometry Estimation from a Single Image
    SURGE: Surface Regularized Geometry Estimation from a Single Image Peng Wang1 Xiaohui Shen2 Bryan Russell2 Scott Cohen2 Brian Price2 Alan Yuille3 1University of California, Los Angeles 2Adobe Research 3Johns Hopkins University Abstract This paper introduces an approach to regularize 2.5D surface normal and depth predictions at each pixel given a single input image. The approach infers and reasons about the underlying 3D planar surfaces depicted in the image to snap predicted normals and depths to inferred planar surfaces, all while maintaining fine detail within objects. Our approach comprises two components: (i) a four- stream convolutional neural network (CNN) where depths, surface normals, and likelihoods of planar region and planar boundary are predicted at each pixel, followed by (ii) a dense conditional random field (DCRF) that integrates the four predictions such that the normals and depths are compatible with each other and regularized by the planar region and planar boundary information. The DCRF is formulated such that gradients can be passed to the surface normal and depth CNNs via backpropagation. In addition, we propose new planar-wise metrics to evaluate geometry consistency within planar surfaces, which are more tightly related to dependent 3D editing applications. We show that our regularization yields a 30% relative improvement in planar consistency on the NYU v2 dataset [24]. 1 Introduction Recent efforts to estimate the 2.5D layout of a depicted scene from a single image, such as per-pixel depths and surface normals, have yielded high-quality outputs respecting both the global scene layout and fine object detail [2, 6, 7, 29]. Upon closer inspection, however, the predicted depths and normals may fail to be consistent with the underlying surface geometry.
    [Show full text]
  • CS 468 (Spring 2013) — Discrete Differential Geometry 1 the Unit Normal Vector of a Surface. 2 Surface Area
    CS 468 (Spring 2013) | Discrete Differential Geometry Lecture 7 Student Notes: The Second Fundamental Form Lecturer: Adrian Butscher; Scribe: Soohark Chung 1 The unit normal vector of a surface. Figure 1: Normal vector of level set. • The normal line is a geometric feature. The normal direction is not (think of a non-orientable surfaces such as a mobius strip). If possible, you want to pick normal directions that are consistent globally. For example, for a manifold, you can pick normal directions pointing out. • Locally, you can find a normal direction using tangent vectors (though you can't extend this globally). • Normal vector of a parametrized surface: E1 × E2 If TpS = spanfE1;E2g then N := kE1 × E2k This is just the cross product of two tangent vectors normalized by it's length. Because you take the cross product of two vectors, it is orthogonal to the tangent plane. You can see that your choice of tangent vectors and their order determines the direction of the normal vector. • Normal vector of a level set: > [DFp] N := ? TpS kDFpk This is because the gradient at any point is perpendicular to the level set. This makes sense intuitively if you remember that the gradient is the "direction of the greatest increase" and that the value of the level set function stays constant along the surface. Of course, you also have to normalize it to be unit length. 2 Surface Area. • We want to be able to take the integral of the surface. One approach to the problem may be to inegrate a parametrized surface in the parameter domain.
    [Show full text]
  • Curl, Divergence and Laplacian
    Curl, Divergence and Laplacian What to know: 1. The definition of curl and it two properties, that is, theorem 1, and be able to predict qualitatively how the curl of a vector field behaves from a picture. 2. The definition of divergence and it two properties, that is, if div F~ 6= 0 then F~ can't be written as the curl of another field, and be able to tell a vector field of clearly nonzero,positive or negative divergence from the picture. 3. Know the definition of the Laplace operator 4. Know what kind of objects those operator take as input and what they give as output. The curl operator Let's look at two plots of vector fields: Figure 1: The vector field Figure 2: The vector field h−y; x; 0i: h1; 1; 0i We can observe that the second one looks like it is rotating around the z axis. We'd like to be able to predict this kind of behavior without having to look at a picture. We also promised to find a criterion that checks whether a vector field is conservative in R3. Both of those goals are accomplished using a tool called the curl operator, even though neither of those two properties is exactly obvious from the definition we'll give. Definition 1. Let F~ = hP; Q; Ri be a vector field in R3, where P , Q and R are continuously differentiable. We define the curl operator: @R @Q @P @R @Q @P curl F~ = − ~i + − ~j + − ~k: (1) @y @z @z @x @x @y Remarks: 1.
    [Show full text]
  • Multidisciplinary Design Project Engineering Dictionary Version 0.0.2
    Multidisciplinary Design Project Engineering Dictionary Version 0.0.2 February 15, 2006 . DRAFT Cambridge-MIT Institute Multidisciplinary Design Project This Dictionary/Glossary of Engineering terms has been compiled to compliment the work developed as part of the Multi-disciplinary Design Project (MDP), which is a programme to develop teaching material and kits to aid the running of mechtronics projects in Universities and Schools. The project is being carried out with support from the Cambridge-MIT Institute undergraduate teaching programe. For more information about the project please visit the MDP website at http://www-mdp.eng.cam.ac.uk or contact Dr. Peter Long Prof. Alex Slocum Cambridge University Engineering Department Massachusetts Institute of Technology Trumpington Street, 77 Massachusetts Ave. Cambridge. Cambridge MA 02139-4307 CB2 1PZ. USA e-mail: [email protected] e-mail: [email protected] tel: +44 (0) 1223 332779 tel: +1 617 253 0012 For information about the CMI initiative please see Cambridge-MIT Institute website :- http://www.cambridge-mit.org CMI CMI, University of Cambridge Massachusetts Institute of Technology 10 Miller’s Yard, 77 Massachusetts Ave. Mill Lane, Cambridge MA 02139-4307 Cambridge. CB2 1RQ. USA tel: +44 (0) 1223 327207 tel. +1 617 253 7732 fax: +44 (0) 1223 765891 fax. +1 617 258 8539 . DRAFT 2 CMI-MDP Programme 1 Introduction This dictionary/glossary has not been developed as a definative work but as a useful reference book for engi- neering students to search when looking for the meaning of a word/phrase. It has been compiled from a number of existing glossaries together with a number of local additions.
    [Show full text]
  • An Improved Level Set Algorithm Based on Prior Information for Left Ventricular MRI Segmentation
    electronics Article An Improved Level Set Algorithm Based on Prior Information for Left Ventricular MRI Segmentation Lei Xu * , Yuhao Zhang , Haima Yang and Xuedian Zhang School of Optical-Electrical and Computer Engineering, University of Shanghai for Science and Technology, Shanghai 200093, China; [email protected] (Y.Z.); [email protected] (H.Y.); [email protected] (X.Z.) * Correspondence: [email protected] Abstract: This paper proposes a new level set algorithm for left ventricular segmentation based on prior information. First, the improved U-Net network is used for coarse segmentation to obtain pixel-level prior position information. Then, the segmentation result is used as the initial contour of level set for fine segmentation. In the process of curve evolution, based on the shape of the left ventricle, we improve the energy function of the level set and add shape constraints to solve the “burr” and “sag” problems during curve evolution. The proposed algorithm was successfully evaluated on the MICCAI 2009: the mean dice score of the epicardium and endocardium are 92.95% and 94.43%. It is proved that the improved level set algorithm obtains better segmentation results than the original algorithm. Keywords: left ventricular segmentation; prior information; level set algorithm; shape constraints Citation: Xu, L.; Zhang, Y.; Yang, H.; Zhang, X. An Improved Level Set Algorithm Based on Prior 1. Introduction Information for Left Ventricular MRI Uremic cardiomyopathy is the most common complication also the cause of death with Segmentation. Electronics 2021, 10, chronic kidney disease and left ventricular hypertrophy is the most significant pathological 707.
    [Show full text]
  • 5.7 Level Sets and the Fast Marching Method
    �c 2006 Gilbert Strang 5.7 Level Sets and the Fast Marching Method The level sets of f(x; y) are the sets on which the function is constant. For example f(x; y) = x2 + y2 is constant on circles around the origin. Geometrically, a level plane z = constant will cut through the surface z = f(x; y) on a level set. One attractive feature of working with level sets is that their topology can change (pieces of the level set can separate or come together) just by changing the constant. Starting from one level set, the signed distance function d(x; y) is especially important. It gives the distance to the level set, and also the sign: typically d > 0 outside and d < 0 inside. For the unit circle, d = r − 1 = px2 + y2 − 1 will be the signed distance function. In the mesh generation algorithm of Section 2. , it was convenient to describe the region by its distance function d(x; y). A fundamental fact of calculus: The gradient of f(x; y) is perpendicular to its level sets. Reason: In the tangent direction t to the level set, f(x; y) is not changing and (grad f) · t is zero. So grad f is in the normal direction. For the function x2 + y2, the gradient (2x; 2y) points outward from the circular level sets. The gradient of d(x; y) = px2 + y2 − 1 points the same way, and it has a special property: The gradient of a distance function is a unit vector. It is the unit normal n(x; y) to the level sets.
    [Show full text]
  • Level Set Methods for Finding Critical Points of Mountain Pass Type
    Nonlinear Analysis 74 (2011) 4058–4082 Contents lists available at ScienceDirect Nonlinear Analysis journal homepage: www.elsevier.com/locate/na Level set methods for finding critical points of mountain pass type Adrian S. Lewis a, C.H. Jeffrey Pang b,∗ a School of Operations Research and Information Engineering, Cornell University, Ithaca, NY 14853, United States b Massachusetts Institute of Technology, Department of Mathematics, 2-334, 77 Massachusetts Avenue, Cambridge MA 02139-4307, United States article info a b s t r a c t Article history: Computing mountain passes is a standard way of finding critical points. We describe a Received 24 June 2009 numerical method for finding critical points that is convergent in the nonsmooth case and Accepted 23 March 2011 locally superlinearly convergent in the smooth finite dimensional case. We apply these Communicated by Ravi Agarwal techniques to describe a strategy for addressing the Wilkinson problem of calculating the distance from a matrix to a closest matrix with repeated eigenvalues. Finally, we relate Keywords: critical points of mountain pass type to nonsmooth and metric critical point theory. Mountain pass ' 2011 Elsevier Ltd. All rights reserved. Nonsmooth critical points Superlinear convergence Metric critical point theory Wilkinson distance 1. Introduction Computing mountain passes is an important problem in computational chemistry and in the study of nonlinear partial differential equations. We begin with the following definition. Definition 1.1. Let X be a topological space, and consider a; b 2 X. For a function f V X ! R, define a mountain pass p∗ 2 Γ .a; b/ to be a minimizer of the problem inf sup f ◦ p.t/: p2Γ .a;b/ 0≤t≤1 Here, Γ .a; b/ is the set of continuous paths p VT0; 1U! X such that p.0/ D a and p.1/ D b.
    [Show full text]
  • A Toolbox of Level Set Methods
    A Toolbox of Level Set Methods version 1.0 UBC CS TR-2004-09 Ian M. Mitchell Department of Computer Science University of British Columbia [email protected] http://www.cs.ubc.ca/∼mitchell July 1, 2004 Abstract This document describes a toolbox of level set methods for solving time-dependent Hamilton-Jacobi partial differential equations (PDEs) in the Matlab programming en- vironment. Level set methods are often used for simulation of dynamic implicit surfaces in graphics, fluid and combustion simulation, image processing, and computer vision. Hamilton-Jacobi and related PDEs arise in fields such as control, robotics, differential games, dynamic programming, mesh generation, stochastic differential equations, finan- cial mathematics, and verification. The algorithms in the toolbox can be used in any number of dimensions, although computational cost and visualization difficulty make dimensions four and higher a challenge. All source code for the toolbox is provided as plain text in the Matlab m-file programming language. The toolbox is designed to allow quick and easy experimentation with level set methods, although it is not by itself a level set tutorial and so should be used in combination with the existing literature. 1 Copyright This Toolbox of Level Set Methods, its source, and its documentation are Copyright c 2004 by Ian M. Mitchell. Use of or creating copies of all or part of this work is subject to the following licensing agreement. This license is derived from the ACM Software Copyright and License Agreement (1998), which may be found at: http://www.acm.org/pubs/copyright policy/softwareCRnotice.html License The Toolbox of Level Set Methods, its source and its documentation (hereafter, Software) is copyrighted by Ian M.
    [Show full text]