ROCK OUT! Best place to sit during battle of the bands! BRIEF ABSTRACT This is a straight forward homework assignment for students of max/min problems of functions of two variables. Here, we seek to minimize noise as a function of your position relative to (noisy) bands. GENERAL INFORMATION FileName: ROCKOUT Full title: ROCK OUT! Best place to sit during battle of the bands! Last Update: 6/4/96 Developer: Dave Horn, Rogers High School, 8466 W. Pahs Road, Michigan City IN 46360 USA. Contact: Aaron Klebanoff, Department of Mathematics, Rose-Hulman Institute of Technology, Terre Haute IN 47803 USA. Phone: 812-877-8151. Email: Klebanoff@rose-hulman.edu. FAX: 812-877-3198. Support: The production of this material is supported by the National Science Foundation under Division of Undergraduate Education grant DUE-9352849: Development Site for Complex, Technology-Based Problems in Calculus with Applications in Science and Engineering and the Arvin Foundation of Columbus IN. STATEMENT OF PROBLEM GENERAL PRINCIPLE which will prove helpful in this problem: Sound intensity varies inversely as the square of the distance from the source. 1. At an outdoor concert, two bands set up 2000 feet from each other. Initially, the Twisted Turtles play at the same volume as Hogroast. Verify that it is least noisy at the midpoint of the line segment between the bands. 2. Hogroast cranks it up! They turn up their equipment until they are playing twice as loud as the Twisted Turtles. Now find the point on minimal noise on the segments connecting the bands. 3. Just as you finished the previous problem, a third band, Gauss and Euler, showed up. They set up 2000 feet from each of the other bands, so that the three bands are at the vertices of an equilateral triangle. Hearing the noise from Hogroast, Gauss and Euler set up their equipment to match their volume. Afraid of being drowned out, the Turtles also increase their volume to match the other two bands. Find the point in the interior of the triangle that is the quietest. 4. Gauss and Euler double their volume. Twisted Turtles keep blowing fuses, so they cut theirs in half. Now the noise intensity is in a ratio of 1:2:4. Find the point in the interior of the triangle that is the quietest. KEYWORDS Optimization, contour plot, inverse square variation, music. TEACHER NOTES ISSUES RELATED TO THE PROBLEM This problem takes an optimization problem common in single variable calculus and extends it to a mutivariate problem. It is easy to make sense of what the problem is asking, but the answer is not obvious. It also examines the notion of locating values of independent variables which produce the same output. Graphically, these can be viewed in the single variable problem via the horizontal line test. In the multivariate case, Mathematica's ContourPlot and Plot3D commands help to analyze the situation. Prerequisites Max/min problems for functions of more than one variable. Time allotment - time management Expectations Future payoffs Extensions Vary the ratio of band volumes, arrange them in other triangular patterns besides equilateral. For example, location the bands at the vertices of a right triangle could prove interesting. The code provided can be easily modified to study these situations. However, be warned that for many of these, it may not be easy to find a unique solution, even with Mathematica. Introduce YAB (Yet Another Band). Alter the geometry, e.g. not an equilateral triangle. Ask where the loudest spot is in a given seating region, after all some concert attendees say, "If you do not hear the music ringing in your ears the next morning, you did not really attend the concert!" References and Sources POSSIBLE SOLUTION(S) Solution to Problem 1 A coordinate axis helps. Place the Twisted Turtles at 0 and Hogroast at 2000. Call the quietest point x. Then you are x units from one band and (2000 - x) units from the other. Sound intensity varies inversely as the square of the distance from the source. The actual value of k has no bearing on the solution. It is the RELATIVE values of the sound produced which has significance. k = 1000 was chosen as a convenient value to get decent graphs. k = 1000; d = 2000; turtlenoise[x_] = k/x^2; hognoise[x_] = k/(d-x)^2; totalnoise[x_] = turtlenoise[x]+hognoise[x]; Plot[totalnoise[x],{x,500,1500},PlotRange->{0,.005}]; This result strongly hints that the quietest point is halfway between the bands. We can verify this by setting the derivative of the total noise function to zero and solving. Solve[totalnoise'[x]==0,x] 2000 - 2000 I Sqrt[3] {{x -> 1000}, {x -> ---------------------}, 2 2000 + 2000 I Sqrt[3] {x -> ---------------------}} 2 Only the first of these is real. The quietest point is midway between the bands. Solution to Problem 2 Use the same coordinate system. In the following code, note the new factor of 2 in the numerator of hognoise. Examination of the graph shows the point of minimal sound intensity occurs around 900 feet from the Twisted Turtles. A more precise answer can be found by setting the derivative of the total noise function to zero and solving. turtlenoise[x_] = k/x^2; hognoise[x_] = 2 k/(d-x)^2; totalnoise[x_] = turtlenoise[x]+hognoise[x]; Plot[totalnoise[x],{x,500,1500},PlotRange->{0,.006}]; The quietest point is around 900 feet from the Twisted Turtles. Using the derivative provides a better answer. Solve[totalnoise'[x]==0,x]//N {{x -> 884.987}, {x -> 557.507 + 1643.9 I}, {x -> 557.507 - 1643.9 I}} The quietest point is 885 feet from the Twisted Turtles. Solution to Problem 3 Again, a coordinate system help. This time, instead of number line, the Cartesian Plane is needed. Put the Turtles at the origin. Put Hogroast at (2000, 0). Then some quick geometry locates G&E at (1000, 1000 Sqrt[3]). We offer up a graphic image of the region in which we can choose to locate. Region = Graphics[{Thickness[.02], Line[{{0,0},{2000,0}}], Line[{{0,0},{1000, 1000 Sqrt[3]}}], Line[{{2000,0},{1000, 1000 Sqrt[3]}}]}] -Graphics- Show[Region] Call the quietest point (x,y), where 0 < = x < = 2000 and 0 < = y < = 1000 Sqrt[3]. Then the noise perceived at (x, y) from each band, respectively, is turtlenoise[x_,y_]=k/(x^2+y^2); hognoise[x_,y_]=( k)/((d-x)^2+y^2); genoise[x_,y_]=( k)/((d Sqrt[3]/2-y)^2+((d/2)-x)^2); and the total noise perceived at (x, y) is the sum of these three. totalnoise[x_,y_] = turtlenoise[x,y] + hognoise[x,y] + genoise[x,y]; We will take advantage of Mathematica to analyze this messy function. First, a contour plot of the function shows the regions of loudest noise in white, and the quieter regions in progressively darker shades. cplot3 = ContourPlot[totalnoise[x,y],{x,1,1999}, {y,1,1000 Sqrt[3]-1}, DisplayFunction -> Identity]; Show[cplot3, Region, DisplayFunction -> $DisplayFunction] What a nice picture! The white spots represent the regions of greatest noise intensity, and they are located near the bands. This makes sense. As the regions get progressively darker, they represent lower sound intensities. Our quietest point is located in the dark region centered near (1000, 600). The dark regions in the upper corners of the plot should be ignored because they are not in the specified triangle. We will focus on the dark region. ContourPlot[totalnoise[x,y],{x,800,1200},{y,250,750}]; This result is consistent with our estimate of (1000, 600). We can get a more precise answer quickly by taking partial derivatives with respect to x and y, setting each to zero, and solving simultaneously. dx[x_,y_] = D[totalnoise[x,y],x]; dy[x_,y_] = D[totalnoise[x,y],y]; sol=FindRoot[{dx[x,y] == 0,dy[x,y] == 0}, {x,1000},{y,600}] {x -> 1000., y -> 578.574} This point is the centroid of the triangle. This result is analogous to getting the midpoint in the answer to problem 1. Solution to Problem 4 Now the bands' volumes are unequal, but in a ration of 1:2:4. Note the 2 and 4 in the numerators of hognoise and genoise. turtlenoise[x_,y_] = k/(x^2+y^2); hognoise[x_,y_] = (2 k)/((d-x)^2+y^2); genoise[x_,y_] = (4 k)/((d Sqrt[3]/2-y)^2+((d/2)-x)^2); and the total noise perceived at (x, y) is the sum of these three. totalnoise[x_,y_] = turtlenoise[x,y] + hognoise[x,y] + genoise[x,y]; The following code produces a contour plot. cplot4 = ContourPlot[totalnoise[x,y],{x,1,1999}, {y,1,1000 Sqrt[3]-1}]; Show[cplot4,Region] The dark region in the upper right hand corner, disjoint from the larger dark region, should be disregarded because it is not in the triangular region determined by the bands. Similarly, the part of the big dark region that is in the extreme upper left hand region may be disregarded. The following code redraws the contour plot on the part of the dark region that is reasonable. ContourPlot[totalnoise[x,y],{x,400,1150},{y,0,750 }] This result is very promising. It shows the quietest region is centered around the point (900,50). Another plot focuses us in even better. ContourPlot[totalnoise[x,y],{x,750,1050},{y,0,150 }] Successive focusing indicates the quietest point is located near (879,0). The changes in volume have forced the optimal point to the edge of the triangle, as far as possible from the loudest band. Additionally, the optimal point has moved sightly closer to the quietest band than it was in the two band problem. It would be nice to quantify the answer by using the partial derivative method used in problem 3. However, this method fails because Mathematica gravitates toward answers that lie outside the triangle. Indeed, if permitted we would find the quietest place to sit is at distance infinity from the bands!!! However, we are doing a constrained optimization problem. The point must lie inside the triangle or on the boundary. In terms of our coordinate system, this means both x and y must be non-negative. The answer appears to be on the x-axis, so we can solve the problem in one dimension by setting y = 0. dx[x_,y_] = D[totalnoise[x,y],x]/.{y->0}; sol=FindRoot[{dx[x,y] == 0}, {x,1000}] {x -> 878.921} The quietest point is located at approximately (879, 0). It is interesting to see that this is close to, but not the same as the answer from problem 2. The loudest band has forced the quietest spot all the way down to the x-axis, but has also forced it a little closed to the quietest band. ISSUES IN SOLUTION In problems 3 and 4, two extreme cases have been examined. Problem 3 put the quietest point in the exact center of the triangle. Problem 4 put the quietest point (within our feasible region of constraint) on the edge of the triangle. If two bands have the same volume, expect the optimal point to lie on the perpendicular bisector of the segment connecting them.