Develop a script to generate the same computations and plots as in Sec. 21.8, but for the
Question:
Develop a script to generate the same computations and plots as in Sec. 21.8, but for the following functions (for x = –3 to 3 and y = –3 to 3):
(a) f(x, y) = e−(x2 + y2) and
(b) f(x, y) = xe−(x2 + y2).
Transcribed Image Text:
21.8 CASE STUDY VISUALIZING FIELDS Background. Beyond the determination of derivatives in one dimension, the gradient function is also quite useful for determining partial derivatives in two or more dimensions. In particular, it can be used in conjunction with other MATLAB functions to produce vi- sualizations of vector fields. To understand how this is done, we can return to our discussion of partial derivatives at the end of Sec. 21.1.1. Recall that we used mountain elevation as an example of a two- dimensional function. We can represent such a function mathematically as z=f(x,y) where z = elevation, x = distance measured along the east-west axis, and y = distance measured along the north-south axis. For this example, the partial derivatives provide the slopes in the directions of the axes. However, if you were mountain climbing, you would probably be much more interested in determining the direction of the maximum slope. If we think of the two partial derivatives as component vectors, the answer is provided very neatly by of Vf=i+ where Vf is referred to as the gradient of f. This vector, which represents the steepest slope. has a magnitude and a direction 0=tan where 0 = the angle measured counterclockwise from the x axis. Now suppose that we generate a grid of points in the x-y plane and used the foregoing equations to draw the gradient vector at each point. The result would be a field of arrows indicating the steepest route to the peak from any point. Conversely, if we plotted the nega- tive of the gradient, it would indicate how a ball would travel as it rolled downhill from any point. Such graphical representations are so useful that MATLAB has a special function, called quiver, to create such plots. A simple representation of its syntax is quiver (x, y,u,v) where x and y are matrices containing the position coordinates and u and v are matrices containing the partial derivatives. The following example demonstrates the use of quiver to visualize a field. Employ the gradient function to determine to partial derivatives for the following two- dimensional function: f(x,y)=y-x-21²-2xy-y²
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 85% (7 reviews)
Answered By
Zablon Gicharu
I am an educator who possesses the requisite skills and knowledge due to interacting with students for an extended period. I provide solutions to various problems in step-by-step explanations, a well-thought approach and an understandable breakdown. My goal is to impart more straightforward methodologies and understanding to students for more remarkable achievements.
5.00+
4+ Reviews
10+ Question Solved
Related Book For
Applied Numerical Methods With MATLAB For Engineers And Scientists
ISBN: 9781259027437
3rd Edition
Authors: Steven C. Chapra
Question Posted:
Students also viewed these Mathematics questions
-
Develop a script to generate the same computations and plots as in Sec. 21.8, but for the MATLAB peaks function over ranges of both x and y from 3 to 3. 21.8 CASE STUDY VISUALIZING FIELDS Background....
-
Based on Example 3.6, develop a script to produce an animation of a bouncing ball where 0 = 5 m/s and 0 = 50. To do this, you must be able to predict exactly when the ball hits the ground. At this...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
NIU Company's budgeted sales and direct materials purchases are as follows: NIU's sales are 40% cash and 60% credit. It collects credit sales 10% in the month of sale, 50% in the month following...
-
Copperfield Mining Company owns two mines, each of which produces three grades of orehigh, medium, and low. The company has a contract to supply a smelting company with at least 12 tons of high-grade...
-
Publicity agents for the Detroit Felines announce the signing of a phenomenal new quarterback, Archie Parabola. They say that the contract is worth $1,000,000 and will be paid in 20 installments of...
-
Have you ever caught someone elses emotions? If so, how could you have utilized self-awareness and self-control to protect yourself from taking on the negative emotions of others? (p. 56)
-
Assuming that all the primary authority applies to the issues raised by the facts of the client's case, list the authority in the hierarchical order of its value as precedent; that is, authority with...
-
Fingen's 19-year, $1000 par value bonds pay 11 percent interest annually. The market price of the bonds is $1060 and the market's required yield to maturity on a comparable-risk bond is 9 percent....
-
Swifty corporation completed the following merchandising transaction in the month of May. At the beginning of May, the ledger of Swifty Corporation showed Cash of $5,000 and common Stock of $ 5,000....
-
How do the production and sales volume of a new product need to compare to its break-even point to make it worthwhile to introduce the product?
-
Repeat the the same simulations as in Section 22.6 for the Lorenz equations but generate the solutions with the midpoint method. 22.6 CASE STUDY An example of a simple nonlinear model based on...
-
A National Vital Statistics Report (www.cdc.gov/nchs/) indicated that nearly 290,000 black Americans died in 2011, compared with just over 2 million white Americans. Below are histograms displaying...
-
1- What is the chairman of the Texas State Board of Education's primary occupation? 2- Why are the decisions the Texas State Board of Education make about their high school science standards so...
-
SECTION 7 KEEPING ENTIRE STRUCTURES IN EQUILIBRIUM ASSIGNMENT #2 1. Find the reactions at A and C. A 2. Find the reactions at A and C. 60.0 kN B 3.00 9.00 4.00 6.00 5.00 kN 3.00 B 1.00 2.00 10.0 kN...
-
The year-end financial statements of Python Tax Services are provided below. Service revenue Expenses: Salaries Utilities Insurance Supplies Net income PYTHORT TAX SERVICES Income Statement $ 68,500...
-
a. Calculate the volume of the solid of revolution created by rotating the curve y=2+4 exp(-5 x) about the x-axis, for x between 2 and 4. Volume: b. The equation of a circle of radius r, centered at...
-
The simply supported timber beam of Figure 1 is made-up by gluing together three 300 mm by 150 mm planks as shown. The beam has to carry a uniformly distributed vertically downward load of 8 kN/m for...
-
Refer to the International Conference on Social Robotics (Vol. 6414, 2010) study of the trend in the design of social robots, Exercise 2.5 Recall that in a random sample of 106 social (or service)...
-
At Glass Company, materials are added at the beginning of the process and conversion costs are added uniformly. Work in process, beginning: Number of units Transferred - in costs Direct materials...
-
Write equations for the darkened nodes in the grid in Figure. Note that all units are cgs. The convection coefficient is h c = 0.015 cal/(cm 2 C s) and the thickness of the plate is 1.5 cm. k = 0.7...
-
Apply the control volume approach to develop the equation for node (0, j) in Figure.
-
Derive an equation like Eq. (29.26) for the case where is greater than 45 for Figure.
-
Describe how the following affect the valuation of PPE. a) Cash Discounts b) Deferred Payment Contracts
-
Lou Barlow, a divisional manager for Sage Company, has an opportunity to manufacture and sell one of two new products for a five - year period. His annual pay raises are determined by his division s...
-
Consider a 5 year debt with a 15% coupon rate paid semi-annually, redeemable at Php1,000 par. The bond is selling at 90%. The flotation cost is Php50 per bind. The firm's tax bracket is 30%.
Study smarter with the SolutionInn App