text:
# Basic Mapping

## Introduction

In this Chapter, we will explore a range of mapping and geovisualization options. We start with a review of common thematic map classifications and the way these are implemented in GeoDa. We next focus on different statistical maps, in particular maps that are designed to highight extreme values or outliers. We also illustrate maps for categorical variables (unique value maps), and their extension to multiple categories in the form of co-location maps. We close with a review of some special approaches to geovisualization, i.e., conditional maps, the cartogram and map animation.

Even though there is substantial mapping functionality in GeoDa, it is worth noting that it is not a cartographic software. The main objective is to use the maps as part of a framework of dynamic graphics, to interact with the data as part of the exploration process. As a result, maps in GeoDa do not have some standard cartographic features, such as a directional arrow, or a scale bar. However, any map can be saved as an image file for further manipulation in specialized graphics software.

### Objectives

• Create commonly used thematic and statistical maps

• Manipulate the map by zooming, panning, and selection

• Add a background layer (base map) to a thematic map

• Save the map as an image

• Save map classifications as a categorical variable

• Create custom intervals

• Identify outliers using the box map and standard deviation map

• Create a map for a categorical variable

• Examine multivariate co-location patterns with a co-location map

• Assess variable interaction effects using a conditional map

• Construct and interpret a cartogram

• Visually explore patterns using map animation

• Use the project file in GeoDa

#### GeoDa functions covered

• Map > Quantile Map
• select number of categories
• Map > Natural Breaks Map
• select number of categories
• Map > Equal Intervals Map
• select number of categories
• Map toolbar options
• Map selection
• select all observations in a legend category
• Map options
• Change current map type
• Save Categories
• Save the map as an image
• Change the look of a map
• Make map outlines invisible
• Map > Percentile Map
• Map > Box Map
• Set hinges as 1.5 or 3.0
• Map > Standard Deviation Map
• Map > Unique Values Map
• Map > Co-location Map
• Map > Create New Custom
• Category Editor
• applying a custom classification to a map
• applying a custom classification to a histogram
• File > Save Project
• saving a custom classification in the project file
• Map > Conditional Map
• adjusting the breaks for the conditioning variables
• Map > Cartogram
• improving the cartogram fit
• Map > Map Movie
• setting animation controls

### Preliminaries

We will illustrate the various operations by means of the data set with demographic and socio-economic information for 55 New York City sub-boroughs that comes built-in with GeoDa. It is also contained in the GeoDa Center data set collection.

• nyc: socio-economic data for 55 New York City sub-boroughs

Since the data set is built-in, there is no real need to download the sample data, although it is useful in order to preserve any changes.

## Thematic Maps – Overview

We start by closing any current project and load the NYC sub-borough data set from the Sample Data tab in the Connect to Data Source dialog. One click on the NYC Data icon brings up the green themeless map, shown in Figure 1. Alternatively, we can load the downloaded nyc.shp file.

To see the different mapping options, we select Map from the menu, or click on the Maps and Rates icon in the toolbar, shown in Figure 2.

The selection brings up the list of map types that can be created in GeoDa, as given in Figure 3.

We ignore the Rates-Calculated Maps item for now, which will be considered in the next Chapter. Among the other map types, there are four where an additional choice is required (the right pointing arrow) consisting of the number of intervals to be specified (choose the number from a drop down list). All the other options have pre-specified settings.

Common map classifications include the Quantile Map, Natural Breaks Map, and Equal Intervals Map. Specialized classifications that are designed to bring out extreme values include the Percentile Map, Box Map (with two options for the hinge), and the Standard Deviation Map. The Unique Values Map does not involve a classification algorithm, since it uses the integer values of a categorical variable itself as the map categories. The Co-location Map is an extension of this principle to multiple categorical variables. Finally, Custom Breaks allows for the use of customized classifications by means of the Category Editor.

We consider each in turn.

### Common map classifications

#### Quantile map

A quantile map is based on sorted values for a variable that are then grouped into bins that each have the same number of observations, the so-called quantiles. The number of bins corresponds to the particular quantile, e.g., five bins for a quintile map, or four bins for a quartile map, two of the most commonly used categories.

To illustrate this functionality, we select Quantile Map > 4 from the list of options shown in Figure 4 to create a quartile map (four categories).

In the variable selection dialog that follows, illustrated in Figure 5 , we select rent2008, for the median rent in 2008.

This brings up the quartile map, shown in Figure 6, with four categories in the legend, each matching a quartile in the data. The values in parentheses give the number of observations in each category.

Upon closer examination, something doesn’t seem to be quite right. With 55 total observations, we should expect roughly 14 (55/4 = 13.75) observations in each group. But the first group only has 7, and the third group has 19!

This illustrates a common problem with quantile maps whenever ties are present. If we open up the Table (click on the table icon if it is not open) and sort on the variable rent2008 (click on the field name), we see in Figure 7 where the problem lies.

Ignoring the zero entries for now (those are a potential problem in their own right), we see that observations starting in row 8 up to row 21 all have a value of 1000. The cut-off for the first quartile is at 14, highlighted in yellow in the graph. In a non-spatial analysis, this is not an issue, the first quartile value is given as 1000. But in a map, the observations are locations that need to be assigned to a group (with a separate color). Other than an arbitrary assignment, there is no way to classify observations with a rent of 1000 in either category 1 or category 2. To deal with these ties, GeoDa moves all the observations with a value of 1000 to the second category. As a result, even though the value of the first quartile is given as 1000 in the map legend, only those observations with rents less than 1000 are included in the first quartile category. As we see from the table, there are seven such observations.

Any time there are ties in the ranking of observations that align with the values for the breakpoints, the classification in a quantile map will be problematic and result in categories with an unequal number of observations.

#### Natural breaks map

A natural breaks map uses a nonlinear algorithm to group observations such that the within-group homogeneity is maximized, following the pathbreaking work of Fisher (1958) and Jenks (1977). In essence, this is a clustering algorithm in one dimension to determine the break points that yield groups with the largest internal similarity.

To create such a map with four categories, we select Natural Breaks Map > 4 from the list of options and again choose rent2008 as the variable, in the same way as for the quantile map. This yields a natural breaks map, shown in Figure 8.

In comparison to the quartile map, the natural breaks criterion is better at grouping the extreme observations. The three observations with zero values make up the first category, whereas the five high rent areas in Manhattan make up the top category. Note also that in contrast to the quantile maps, the number of observations in each category can be highly unequal.

#### Equal intervals map

An equal intervals map uses the same principle as a histogram to organize the observations into categories that divide the range of the variable into equal interval bins. This contrasts with the quantile map, where the number of observations in each bin is equal, but the range for each bin is not. For the equal interval classification, the value range between the lower and upper bound in each bin is constant across bins, but the number of observations in each bin is typically not equal.

Using Equal Intervals Map > 4 and rent2008 for the variable provides the result illustrated in Figure 9.

As in the case of natural breaks, the equal interval approach can yield categories with highly unequal numbers of observations. In our example, the three zero observations again get grouped in the first category, but the second range (from 725 to 1450) contains the bulk of the spatial units (42).

To illustrate the similarity with the histogram, we select Explore > Histogram for rent2008 and set the Choose Intervals option to 4. Also, set View > Display Statistics. The resulting histogram in Figure 10 has the exact same ranges for each interval as the equal intervals map. The number of observations in each category is the same as well. The values for the number of observations in the descriptive statistics below the graph match the values given in parentheses in the map legend.

Finally, we illustrate the equivalence between the two graphs by selecting a category in the map legend. To accomplish this, we click on the rectangle in the map legend associated with the chosen category. In the right-hand panel of Figure 11, this is shown for the highest category (the dark brown rectangle in the legend). This selects the corresponding observations in the map, and, through linking, in the histogram as well (left-hand panel in Figure 11). As expected, the selected bins match completely.

### Map options

Once a map is created, there are two types of options available. One set pertains directly to the manipulation of the map and is implemented by means of the icons on the map toolbar. The second set of options is triggered by right clicking on the map window, which invokes the options dialog shown in Figure 12.

The top item (Change Current Map Type) brings up the same list with map types as invoked by clicking on the Map icon on the main toolbar. Selecting a different map type from a current map in this fashion precludes the need to choose a variable, but it also overwrites the current map.

We consider the various features in further detail below, except for the rates functions (Rates and Save Rates), and operations related to the spatial weights (Connectivity), which are covered in later chapters. Also, we skip the items in the fourth group of options (Shape Center etc.), which were introduced earlier in the Data Wrangling chapter.

#### The map toolbar

The map toolbar contains ten icons that facilitate selection and viewing of the map, as shown in Figure 13.

From left to right, the icons allow the following actions:

• Select, to select one or more (using shift click) observations, or an observation region when using a selection shape (the default is a rectangle); this is the default operation and works in the same fashion as selection on any graph in GeoDa

• Invert Select, switches to the complement of the current selection (same functionality as Table > Invert Selection)

• Add Map Layer, add another layer to the map window, discussed in Data Wrangling (2)

• Map Layer Settings, multiple map layer interface, discussed in Data Wrangling (2)

• Zoom In, zooms in on the map by drawing a rectangle for the new map extent

• Zoom Out, zooms out of the map by repeatedly clicking on the map

• Pan, implements panning by dragging the map in any given direction with the pointer

• Full Extent, returns the map to its default full extent

• Base Map, allows the map to be superimposed onto a base layer that contains roads and other realistic geographic features

• Refresh the image (in case something went wrong)

These functions are mostly standard and self-explanatory, except for the base map, to which we turn next.

#### Map base layer (base map)

The choropleth maps created by GeoDa are abstractions and lack context. To provide some context, a base layer can be added behind the map. The base layer is similar to a Google map, and contains roads, rivers and lakes, and other recognizable geographic features. Currently, GeoDa supports a number of base layers from several sources. The various options are listed in a dialog that is activated after clicking on the Base Map icon in the map toolbar, as shown in Figure 14. The default setting is No Basemap.

For each provider, different types of base layers are available. For example, for Carto, this is Carto Light and Carto Dark, as well as these types without labels. For ESRI, the options are WorldStreetMap, WorldTopoMap, WorldTerrain and Ocean.

For example, the default map created by selecting Carto Light (as in Figure 14) is illustrated in Figure 15 for the natural breaks map of the rent data. Note that, in practice, it may be necessary to adjust the zoom level to get a satisfactory framing of the map and the base layer.2

The relative transparency of the base layer versus the choropleth map can be adjusted by means of the Change Map Transparency option. This provides a slider bar to change the transparency of the base layer (a smaller value gives more importance to the choropleth map relative to the base layer). In the example shown in Figure 16, we have moved the slider from its starting value of 0.69 over to 0.10, in order to make the map itself more pronounced.

The outcome is illustrated in Figure 17.

Other base layers can take on quite a different look. For example, in Figure 18, the HERE > Day option is illustrated for the same natural breaks map.

The HERE base map support is provided under a generic account for all GeoDa users. This account has general usage restrictions, so users may want to set up their own accounts for the HERE platform. This can be accomplished by means of the Basemap Configuration option.3

Finally, in a pinch, it may be necessary to use the Clean Basemap Cache option when things go wrong.

#### Saving the classification as a categorical variable

The classification associated with a given map can be added to the data table as a new categorical variable by means of the Save Categories option. This brings up a variable selection dialog in which we can specify the name for the new variable (the default is CATEGORIES). In our example, we use natbreak, as in Figure 19.

Upon selecting OK, a new field is added to the data table, as shown in Figure 20.4 The categories are labeled from low to high, starting with the value 1. The resulting categorical variable can be used as input into a Unique Values Map or a Co-location Map (see below).

Note that there is no metadata associated with this new variable. As a result, all information is lost on the variable in question, the ranges from which the categories were derived, the type of legend (e.g., sequential, diverging), or, for that matter, the type of classification itself (unless those characteristics are somehow reflected in the variable name).

#### Saving the map as an image

The first option at the bottom of the list provide a way to Save Selection, as outlined in the Data Wrangling chapter. Also, we can Copy Image to Clipboard, and Save Image As. The latter is a useful way to create an image file that can then be further manipulated in graphic software.

This option brings up a dialog that allows for some limited customization of the alignment of the different map parts, shown in Figure 21. The legend box can be moved around and resized, or not shown at all. Also, the image dimensions can be set precisely and the resolution specified (in dpi - the default is 300).

The resulting map image can be saved as three different formats: png (the default), bmp, and SVG. For example, using Save Image As for the natural breaks map in our example yields the png image shown in Figure 22.

#### Other map options

The remainig three options pertain to the look of the map view. Show Status Bar is on by default, which means that the number of observations, the number of selected observations, etc., will be displayed on the status bar. The Selection Shape is set by default to Rectangle, with the other two options as Circle and Line. This allows for the selection of observations on the map that lie within the specified shape, as drawn by the pointer. As we have seen earlier, through the process of linking, any selection is instantaneously identified in all other views as well.

Finally, the Color options determine how the map is displayed. By default, the polygon outlines (i.e., in our example, the boundaries of the sub-borough neighborhoods) are shown, with Outlines Visible checked, as in Figure 23.

By unchecking this option, the outlines disappear. This is particularly helpful when the map contains many small areas that will tend to be dominated by their boundary lines. In our example in Figure 24, this results in an impression of larger regions, because many adjoining sub-boroughs ended up in the same category of the natural breaks classification.

One further option is to Show Map Boundary, only available with Outlines Visible turned off. This option is particularly useful when only a few polygons are colored in a map with many observations, for example, in the local cluster maps we will consider in a later chapter. Turning off the outlines in such an instance makes the polygons floating in white space. With the Show Map Boundary option turned on, the initial outline of the map is retained.

The Background Color determines the background against which the map is drawn. In most instances, the default of white is the best choice.

## Extreme Value Maps

Extreme value maps are variations of common choropleth maps where the classification is designed to highlight extreme values at the lower and upper end of the scale, with the goal of identifying outliers. These maps were developed in the spirit of spatializing EDA, i.e., adding spatial features to commonly used approaches in non-spatial EDA (Anselin 1994).

GeoDa currently supports three such map types in the Map menu: a percentile map, a box map, and a standard deviation map. These are briefly described below. Only their distinctive features are highlighted, since they share all the same options with the other choropleth map types.

### Percentile map

The percentile map is a variant of a quantile map that would start off with 100 categories. However, rather than having these 100 categories, the map classification is reduced to six ranges, the lowest 1%, 1-10%, 10-50%, 50-90%, 90-99% and the top 1%. This is shown in Figure 25 for the rent2008 variable. We select Map > Percentile Map from the map menu or the map toolbar icon and choose the variable to create the map.

Note how the extreme values are much better highlighted, especially at the upper end of the distribution. The classification also illustrates some common problems with this type of map. First of all, since there are fewer than 100 observations, in a strict sense there is no 1% of the distribution. This is handled (arbitrarily) by rounding, so that the highest category has one observation, but the lowest does not have any.

In addition, since the values are sorted from low to high to determine the cut points, there can be an issue with ties. As we have seen, this is a generic problem for all quantile maps. As pointed out, GeoDa handles ties by moving observations to the next highest category. For example, when there are a lot of observations with zero values (e.g., in the crime rate map for the U.S. counties), the lowest percentile can easily end up without observations, since all the zeros will be moved to the next category.

### Box map

A box map (Anselin 1994) is the mapping counterpart of the idea behind a box plot. The point of departure is again a quantile map, more specifically, a quartile map. But the four categories are extended to six bins, to separately identify the lower and upper outliers. The definition of outliers is a function of a multiple of the inter-quartile range (IQR), the difference between the values for the 75 and 25 percentile. As we will see in a later chapter in our discussion of the box plot, we use two options for these cut-off values, or hinges, 1.5 and 3.0. The box map uses the same convention.

For example, we invoke this map using Map > Box Map (Hinge=1.5) from the menu or the map icon on the toolbar. After selecting rent2008 as the variable, the map shown in Figure 26 is created.

Compared to the quartile map in Figure 6, the box map in Figure 26 separates the three lower outliers (the observations with zero values) from the other four observations in the first quartile. They are depicted in dark blue. Similarly, it separates the six outliers in Manhattan from the eight other observations in the upper quartile. The upper outliers are colored dark red.

To illustrate the correspondence between the box plot and the box map, we put the two side by side (Explore > Box Plot) in Figure 27. In the right-hand panel, we select the upper outliers in the box plot. Only the matching six outlier locations in the box map are highlighted. Note that the outliers in the box plot do not provide any information on the fact that these locations are also adjoining in space. This the spatial perspective that the box map adds to the data exploration.

From the current map, we can switch the box map between the hinge criterion of 1.5 and 3.0 by opening the options menu (right click on the map) and selecting Change Current Map Type > Box Map (Hinge = 3.0). Alternatively, we can also open a new map window from the main menu or map toolbar icon and select Box Map (Hinge=3.0) as the option. The resulting box map, shown in Figure 28, no longer has lower outliers and has only five upper outliers (compared to six for the 1.5 hinge).

The box map is the preferred method to quickly and efficiently identify outliers and broad spatial patterns in a data set.

### Standard deviation map

The third type of extreme values map is a standard deviation map. In some way, this is a parametric counterpart to the box map, in that the standard deviation is used as the criterion to identify outliers, instead of the inter-quartile range.

In a standard deviation map, the variable under consideration is transformed to standard deviational units (with mean 0 and standard deviation 1). This is equivalent to the z-standardization we have seen before.

The number of categories in the classification depends on the range of values, i.e., how many standard deviational units cover the range from lowest to highest. It is also quite common that some categories do not contain any observations (as in the example in Figure 29).

We continue with the variable rent2008 and bring up a standard deviation map by means of Map > Standard Deviation Map from the main menu or from the map toolbar icon.

In the map in Figure 29, there are five neighborhoods with median rent more than two standard deviations above the mean, and three with a median rent less than two standard deviations below the mean. Both sets would be labeled outliers in standard statistical practice. Also, note how the second lowest category does not contain any observations (so the corresponding color is not present in the map).

## Mapping Categorical Variables

So far, our maps have pertained to continuous variables, with a clear order from low to high. GeoDa also contains some functionality to map categorical variables, for which the numerical values are distinct, but not necessarily meaningful in and of themselves. Most importantly, the numerical values typically do not imply any ordering of the categories. The two relevant functions in GeoDa are the unique value map, for a single variable, and the co-location map, where the categories for multiple variables are compared.

### Unique Value map

To illustrate the categorical map, we first create a box map (with hinge 1.5) for each of the variables kids2000 (the percentage households with kids under 18) and pubast00 (the percentage households receiving public assistance). In each of these maps, we save the categories (Save Categories in the options menu), respectively as kidscat and asstcat. The category labels go from 1 to 6, but not all categories necessarily have observations. For example, the map for public assistance does not have either lower (label 1) or higher (label 6), outliers, only observations for 2–5. For the kids map, we have categories 1–5.

At this point, we ignore the meaning of the categories and create a categorical map for the classifications in the box map for the kidscat variable by means of Map > Unique Value Map from the main menu or from the map toolbar icon. This yields the map shown in Figure 30.

The categorical map has values in the legend from 1 to 5, but unlike for the box map from which they originated, they do not imply any ordering. This is also reflected in the colors, which are generated from the ColorBrewer categorical map palette.

It is also possible to change the colors for the categories. This is carried out by dragging the legend label up or down (the category value to the right, not the rectangle on the left). In the example in Figure 31, we drag the label 5 (associated with the rosy color) up to the next level, where the color is green and the label is 4.

As soon as we release the label, shown in Figure 32, it becomes 4 again. This emphasizes that the label in and of itself is meaningless in terms of value.

As a result of the switch in labels, all observations that used to be colored rosy (or, labeled 5) in Figure 30 are now colored dark green (and, labeled 4), and vice versa, as illustrated in Figure 33.

It is important to keep in mind that in a categorical map, the labels have no meaning other than to distinguish between categories. So, whether we label the same group as 5 or 4 is irrelevant, only the grouping matters. Furthermore, the values in the legend are represented as integers for convenience, but they could just as well have been A, B, C, etc., or other descriptors. This is a fundamental difference between the categorical maps and the other choropleth map types.

### Co-location map

The idea behind a co-location map is the extension of the unique value map concept to a multivariate context. In essence, it is the implementation of ideas related to the principles of map overlay or map algebra applied to categorical maps.5

In a co-location map, the labels for different categorical variables are compared and the matches identified on the map. It is up to the user to ensure that the categories across variables are meaningful, since the co-location is based on the variables having the same code. For example, this is useful when comparing the extent to which the quartiles across different variables occur at the same locations. Or, as we will see later, whether significant patterns of local spatial autocorrelation match across several variables. But it is also very easy to generate nonsensical results, for example, when the labels are not comparable.

The co-location map is invoked as Map > Co-location Map from the main menu or from the map toolbar icon. This brings up a dialog, shown in Figure 34, that allows for the selection of the different categorical variables in the top panel. If there are matches between the codes for the variables, these are displayed at the bottom, with the labels and a proposed color scheme.

In our example, we select kidscat and asstcat as the two categories we want to compare. Four labels match between the two variables, and their values and a proposed color theme are listed in the bottom panel of Figure 34.

The proposed color scheme is Unique Values by default. But in this example, that is not the appropriate shading, since we are comparing the classifications between two box maps (or, equivalently, box plots). The Select color scheme drop down list provides a set of pre-coded color schemes for a range of likely comparisons between categories. For our example, we select Box Map, as shown in Figure 35.

This changes the proposed color scheme in the bottom panel of Figure 34 to match the palette for a box map, as in Figure 36. Note that since only four categories had any matches, only four of the six available colors are being used.

Clicking on the OK button brings up the co-location map, shown in Figure 37.

In our example in Figure 37, 25 of the 55 sub-boroughs have observations in matching categories for the two variables. The 30 that do not are shaded light grey. The matching observations are shaded in the color of the box map category to which they belong. We find that 10 (out of the 14) neighborhoods belong to the upper quartile (> 75%, but not outliers) for both variables, suggesting an association. In contrast to assessing a bivariate relationship by means of a scatter plot (see the chapter on EDA), the co-location map can be applied to categorical variables. It can also easily be extended to more than two variables.

## Custom Classifications

In addition to the range of pre-defined classifications available for choropleth maps in GeoDa, it is also possible to create a custom classification. This is often useful when substantive concerns dictate the cut points, rather than data driven criteria. For example, this may be appropriate when specific income categories are specified for certain government programs.

A custom classification may also be useful when comparing the spatial distribution of a variable over time. All included pre-defined classifications are relative and would be re-computed for each time period. For example, when mapping crime rates over time, in an era of declining rates, the observations in the upper quartile in a later period may have crime rates that correspond to a much lower category in an earlier period. This would not be apparent using the pre-defined approaches, but could be visualized by setting the same break points for each time period.

The Category Editor in GeoDa is a complex tool that allows for the creation of a fully customized classification scheme. It is invoked from the map options menu, as Change Current Map Type > Custom Breaks > Create New Custom, as shown in Figure 38.

Alternatively, the category editor can also be invoked directly by selecting the corresponding icon from the toolbar, immediately to the left of the histogram icon, shown in Figure 39.

### Category editor

#### Default setup

There are slight differences between the category editor dialog, depending on whether it is invoked from the toolbar, or as an option from an existing map. The main difference is that in the latter case, the associated map will be updated as a new classification is being developed. When invoked from the toolbar, this is not the case. We illustrate the map option in what follows.

For example, in Figure 40, the Create New Custom option is invoked from a box map for the kids2000 variable. The dialog requests a name for the new category and shows a five classification histogram with the corresponding box map colors (there are no observations for the upper outlier category). The default name suggested is Custom Breaks (kids2000).6

We continue by specifying the name for the new classification as custom1, as in Figure 41.

After clicking OK, the category editor dialog is updated with the name for the new classification, which will appear in the drop down list below Create Custom Breaks. Note how the associated variable (Assoc Var.) is listed as kids2000, which is where the interface draws the values and category breakpoints from. When invoked from the toolbar, the associated variable will be the first variables in the data table (bor_sub), which is not always meaningful.

The other settings in the dialog define the classification.7 In Figure 40, this is User Defined for the Breaks, diverging for the Color Scheme, and 6 for the number of Categories. The panel on the right shows a histogram with the current classification applied to the associated variable. Moving the pointer over a bar in the histogram displays some summary statistics in the status bar, such as the range and its associated number of observations. Also, as soon as the custom editing process is initiated, the map from which it was started is synchronized with the current state of the category editor. In our example, initially, there is not change in the classification.

Besides the number of categories, the two main criteria to define a new classification are the break points and the associated colors. Each item has a number of options in a drop down list. For the Breaks, the five options consist of four traditional criteria, and one User Defined item. The latter is the default, shown in Figure 42.

The associated colors are selected from the Color Scheme drop down list, and include sequential, diverging, thematic (or, categorical), and custom. The custom colors are defined by clicking on the colored boxes next to each category under the heading Edit Custom Breaks. In our example, we will use a sequential coloring scheme, as in Figure 43.

As we adjusted the classification criteria, the histogram in the right-hand panel is immediately updated to reflect the latest selection, illustrated in Figure 44 (and so is the synchronized map). The categories are still the same, but the associated color has been changed to a sequential pattern.

#### Editing break points

We are now ready to edit the break points. There are two approaches to carry this out. One is to use the handle in the vertical slider next to the list of button breaks. One break is dealt with at a time, selected by means of the matching radio button to the left. In our example, since we currently only have five effective categories, even though Categories is set to 6, we start by adjusting the upper cut off point.

With the Button break 5 radio button checked, we move the slider up, which decreases the value of the last break point and starts to grow a sixth category on the right of the histogram. However, it is difficult to set a precise value. For example, in Figure 45, it is set at 49.984. As the slider moves up or down, the histogram (and the map) is instantaneously updated to reflect the new break points. With Automatic Labels checked (the default), the category labels are updated as well.

A second, more effective approach to edit the break points is to type them in directly. For example, we enter 20, 30, 40, 45 and 50 as the new break points, to end up with the break points as given in Figure 46. Again, as new values are entered, the histogram, map and labels are updated.

The corresponding map classification, shown in Figure 47, has the updated labels and categories. Note how the legend heading indicates the use of custom1 as the classification for the variable kids2000.

#### Custom category labels

Finally, even though in the current application it is not actually needed, we uncheck the Automatic Labels box to illustrate the custom labels feature. In the boxes, we enter cat1, cat2, etc. as the labels. The labels in the map in Figure 48 are updated accordingly.

To proceed further, we check the Automatic Labels again to return to the more informative labels that show the range for each bin.

### Applications of custom categories

Once created, the custom classification becomes available to any application where classification is involved. Most directly, this is the mapping functionality, where now the custom category will be listed as an option under the Custom Breaks when selecting Change Current Map Type. However, it currently cannot be used to create a map from scratch. In other words, one needs to first create a map using one of the built-in classifications, and then change the map type to the customized category.

This custom1 classification could be used to track the spatial distribution of the kids variable over time. For example, we can create a box map (with hinge 1.5) for the kids2005 variable, and proceed with Change Current Map Type to select custom1. The resulting map, shown in Figure 49, reflects the new custom categories. We observe an overall shift towards the lower categories, i.e., more sub-boroughs have a smaller share of households with children in 2005 compared to 2000.

In addition, the custom classification becomes available to other graphs, such as the histogram and the conditional plots, covered in the chapter on EDA. In many ways, using customized break points is the preferred way to implement conditional plots (see also below).

### Saving the custom categories – the Project File

GeoDa has the ability to save a so-called Project File that contains information on various variable transformations and other operations. We will revisit the project file in more detail when we discuss spatial weights. One useful feature of the project file is that it also contains the definition of any custom categories that were created. If this definition is not saved in a project file, then it will be lost, and will need to be recreated from scratch the next time the data set is analyzed.

The project file is created from the menu as File > Save Project, as in Figure 50.

This is followed by the usual file name dialog. The file is saved with a file extension of gda. It is a text file that includes XML encoding. For example, when we examine the just created project file with a text editor, we can locate the section pertaining to custom_classifications, as shown in Figure 51.

The custom classification section contains all the aspects needed for the definition of the custom category.

Once a project file has been saved, GeoDa should be started by loading the gda file, rather than the shape file or any other data set. This ensures that all the meta-information is taken into account, all variable transformations updated and custom categories stored. The options menu for any map, histogram or conditional plot will now contain custom1 as one of the available categories.

Once we move to more complex analyses, with multiple variable transformations, spatial weights, and other items created during various operations, the most efficient way to operate is to always save and use a project file.

## Conditional Map

We consider conditional plots more in depth in the treatment of EDA, but one option is to use a map. This is also known as a conditioned choropleth map, or a micromap matrix, discussed at length in Carr and Pickle (2010). A micromap matrix is a matrix of maps that each pertain to a subset of the observations, determined by the conditioning variables on the horizontal and vertical axes. Each map shows the spatial distribution of the variable of interest, but only for those observations that fall into the associated categories of the conditioning variables.

The main objective behind this conditioning is to detect any potential interaction between the conditioning variables and the topic of interest. The point of departure (or, null hypothesis) is that there is no interaction. If this were indeed the case, then the patterns shown on all the micromaps should be essentially the same. If there is interaction, then we would see high or low values of the variable of interest systematically associated with specific categories of the conditioning variables.

This functionality is the first of the options associated with the conditional plot toolbar icon, illustrated in Figure 52. Alternatively, it can be invoked from the menu as Map > Conditional Map.

Selecting this option brings up a variable selection dialog containing three columns, as was the case for the conditional histogram plots. The first column pertains to the conditioning variable for the horizontal axis, the second defines the conditioning variable for the vertical axis. The third column, Map Theme, selects the variable that will be mapped.

In our example, in Figure 53, we use forhis08 (% of Hispanic population not born in the U.S.) and hhsiz08 (average number of people per household) as the two conditioning variables, and rent2008 (median rent) as the focus variable. All values are for 2008. Note that the second column also contains an empty category, which can be used when only conditioning on one dimension.

Clicking OK brings up the default conditional map, shown in Figure 54. The matrix of micromaps contains three categories (quantiles) for each of the conditioning variables, and thus nine micromaps in total. On the horizontal axis, forhis08 is listed with two break points. The vertical axis variable is given as hhsiz08, also with two break points. The maps themselves are box maps for the median rent variable. Each of the micro maps contains only those observations that match the categories on the horizontal and vertical axes.

Note that, as in the other conditional plots, the break points listed may be slightly different from the quantiles given in a quantile map. This is to ensure that the categories are completely separated. For example, a quantile map with three categories for the horizontal conditional variable forhis08 would give the first category ending at 31.829 and the second starting at 31.972. The first breakpoint listed in the micromap matrix is 31.900, which is exactly the midpoint between the two values, ensuring complete separation.

Since there are only 55 observations in our example, the sample size for each of the subsets tends to be very small. Therefore, we use the Options menu (right click) to change the classification. This menu includes the option to change the conditioning bins through Vertical Bins Breaks and Horizontal Bins Breaks. There are seven preset classifications, as well as the option to create custom breaks by means of the category editor. Note that if you continued with the previous example, the custom category custom1 will be included as one of the Custom Breaks options.

In the illustration in Figure 55, the vertical and horizontal break points were changed from the default 3 quantiles, to 2. The result is a 2 x 2 matrix of micro maps

The classification suggests that sub-boroughs with larger household size tend to have lower rents (the two maps at the top), whereas there does not seem to be an effect of the % Hispanic that is foreign-born (the maps on the left and right do not seem to be drastically different in the range of values they contain). By manipulating the break points, further insight can be gained into the presence of interaction effects (or lack thereof). This can be further investigated more formally by means of an analysis of variance.

## Cartogram

### Principle

A cartogram is a map type where the original layout of the areal unit is replaced by a geometric form (usually a circle, rectangle, or hexagon) that is proportional to the value of the variable for the location. This is in contrast to a standard choropleth map, where the size of the polygon corresponds to the area of the location in question. The cartogram has a long history and many variants have been suggested, some quite creative. In essence, the construction of a cartogram is an example of a nonlinear optimization problem, where the geometric forms have to be located such that they reflect the topology (spatial arrangement) of the locations as closely as possible (see Tobler 2004, for an extensive discussion of various aspects of the cartogram).

GeoDa implements a circular cartogram, in which the areal units are represented as circles, whose size (and color) is proportional to the value observed at that location. The changed shapes remove the misleading effect that the area of the unit might have on perception of magnitude.

For example, in the case of median rent in NYC sub-boroughs, some of the smaller areas in Manhattan have the highest rent, and consequently they can barely be noticed in a standard choropleth map.

### Creating a cartogram

The cartogram is invoked by its toolbar button, situated in the center of the three mapping icons (Figure 56), or by selecting Map > Cartogram in the Map menu.

Next follows the Cartogram Variables dialog that contains two columns, one for the Circle Size and one for the Circle Color. It is highly recommended to select the same variable for both. In our example, shown in Figure 57, we again select rent2008. Note that the circle color variable can be different from the circle size variable, but then it may be difficult (and sometimes confusing) to keep the two separate.

Clicking OK brings up the cartogram view. The default, shown in Figure 58, is to use the Box Map classification for the circle colors (with hinge at 1.5 IQR). Note how the multilayer and base map options are not available in a cartogram.

The cartogram is most insightful when used in conjunction with a regular choropleth map. Selecting an observation in the cartogram then immediately links it with the corresponding area in the choropleth map, illustrated in Figure 59 for one of the Manhattan neighborhoods.

Except for multi-layer and base map, the cartogram has all the same options as a regular choropleth map, with one addition. The positioning of the circles in the cartogram is the result of a non-linear optimization algorithm. This tries to locate the center of the circle as close as possible to the centroid of the areal unit with which it corresponds, while respecting the contiguity structure as much as possible. There is no unique solution to this problem, and it is often good practice to experiment with further iterations that will slightly reposition the circles. This is implemented in the Improve Cartogram option, shown in Figure 60. A number of different iteration options are listed, together with the estimated time. The latter is particularly useful for larger data sets (but not in our example).

## Map Animation

In GeoDa, map animation, or, more generally, any kind of animation is carried out through the animation tool. This is invoked by the Map Movie toolbar icon, shown in Figure 61, or from the Menu, as Map > Map Movie.

This brings up the Animation dialog, the control center through which the various aspects of the animation are controlled. The first item to specify is the Variable from the drop down list. We continue with rent2008, shown in Figure 62.

At the bottom of the dialog are the main controls: the start > button, step-by-step forward >> or backward <<, whether the animation loops or stops at the end, an option to Reverse the progress, the speed of the animation, and whether the order followed is ascending or descending. The defaults are usually good, with Cumulative checked (i.e., the selection grows as the animation progresses) and Ascending order.

Once the forward button is activated, each observation is selected in turn, starting with the lowest value. This selection is not only for the map (the term map movie is a left-over from earlier versions), but for all currently active windows. The slider in the Animation dialog moves from left to right. Under the variable name, the currently selected observation and its value are listed. In our example, after 17 steps, the dialog looks as in Figure 63.

The current selected observation is listed as 51, with a value of 1000. The 17 lowest valued observations are highlighted in all currently open views, such as in the box map in Figure 64 (note how the status bar confirms that 17 observations were selected).

The animation tool can be paused at any point, reversed, changed from continuous change to step-by-step, etc., using the controls provided. The main point of the animation is to visually check for any patterns, such as all the lowest or highest values occurring in one location, or an increase in value that follows a given spatial trend (e.g., core-periphery, or East-West). Of course, this visual impression is only that, and will need to be confirmed with the more formal pattern detection methods that we will cover later.

## References

Anselin, Luc. 1994. “Exploratory Spatial Data Analysis and Geographic Information Systems.” In New Tools for Spatial Analysis, edited by Marco Painho, 45–54. Luxembourg: Eurostat.

Carr, Daniel B., and Linda Williams Pickle. 2010. Visualizing Data Patterns with Micromaps. Boca Raton, FL: Chapman & Hall/CRC.

Fisher, W. D. 1958. “On Grouping for Maximum Homogeneity.” Journal of the American Statistical Association 53: 789–98.

Jenks, G. F. 1977. “Optimal Data Classification for Choropleth Maps.” Occasional. Paper no. 2. Lawrence, KS: Department of Geography, University of Kansas.

Tobler, Waldo. 2004. “Thirty Five Years of Computer Cartograms.” Annals of the Association of American Geographers 94: 58–73.

Tomlin, C. Dana. 1990. Geographic Information Systems and Cartographic Modeling. Englewood Cliffs, NJ: Prentice-Hall.

1. University of Chicago, Center for Spatial Data Science – ↩

2. The base layer is based on a tile technology, which determines the map extent shown.↩

3. A free HERE account can be obtained from https://developer.here.com. The basemap can then be configured with the App ID and App Key.↩

4. Note that you may need to restore the table to the original order to get the exact same results as shown in Figure 20. The current state of your table may still be sorted on the rent2008 variable.↩

5. Map algebra tends to be geared to applications for raster data, i.e., regular grids. However, since the polygons for the different variables are identical, the same principles can be applied in the context of the categorical maps. The classic reference on the principles of map algebra is Tomlin (1990).↩

6. When invoked frome the toolbar, the default name is simply Custom Breaks.↩

7. If another classification was created earlier, the settings will inherit from that classification.↩


text:
# Joseph jogs from one end A to the other end B of a straight 300 m road in 2 minutes 30 seconds and then turns around and jogs 100 m back to point C in another 1 minute. What are Joseph’s average speeds and velocities in jogging             (a) from A to B and              (b) from A to C?

Given,

(a) Distance between A and B = $300\ m$

Time taken to reach from A to B = $2\ min\ 30\ s = 150\ s$

$\therefore$ Average speed from A to B = $\frac{Distance}{Time} = \frac{300}{150} = 2\ ms^{-1}$

And, Average velocity from A to B = $\frac{Displacement}{Time} = \frac{300}{150} = 2\ ms^{-1}$

(In this case, average speed is equal to the average velocity)

(b) Distance travelled from A to reach C = $AB + BC = 300 + 100 = 400\ m$

And, Displacement from A to C = $AC= 300-100 = 200\ m$

Also, time taken to reach C from A = $2\ min\ 30\ s + 1\ min= (150+60)\ s =210\ s$

$\therefore$ Average speed from A to C = $\frac{Distance}{Time} = \frac{400}{210} = 1.90\ ms^{-1}$

And, Average velocity from A to C = $\frac{Displacement}{Time} = \frac{200}{210} = 0.95\ ms^{-1}$

(In this case, average speed is not equal to the average velocity)

## Related Chapters

### Preparation Products

##### Knockout KCET 2021

An exhaustive E-learning program for the complete preparation of KCET exam..

₹ 4999/- ₹ 2999/-
##### Knockout KCET JEE Main 2021

It is an exhaustive preparation module made exclusively for cracking JEE & KCET.

₹ 27999/- ₹ 16999/-
##### Knockout NEET Sept 2020

An exhaustive E-learning program for the complete preparation of NEET..

₹ 15999/- ₹ 6999/-
##### Rank Booster NEET 2020

This course will help student to be better prepared and study in the right direction for NEET..

₹ 9999/- ₹ 4999/-

format: plain


text:
# 12.3: Laplace's Equation in Rectangular Coordinates

The temperature $$u=u(x,y,t)$$ in a two-dimensional plate satisfies the two-dimensional heat equation

$\label{eq:12.3.1} u_t=a^2(u_{xx}+u_{yy}),$

where $$(x,y)$$ varies over the interior of the plate and $$t>0$$. To find a solution of Equation \ref{eq:12.3.1}, it is necessary to specify the initial temperature $$u(x,y,0)$$ and conditions that must be satisfied on the boundary. However, as $$t\to\infty$$, the influence of the initial condition decays, so

$\lim_{t\to\infty}u_t(x,y,t)=0 \nonumber$

and the temperature approaches a steady state distribution $$u=u(x,y)$$ that satisfies

$\label{eq:12.3.2} u_{xx}+u_{yy}=0.$

This is Laplace’s equation. This equation also arises in applications to fluid mechanics and potential theory; in fact, it is also called the potential equation. We seek solutions of Equation \ref{eq:12.3.2} in a region $$R$$ that satisfy specified conditions – called boundary conditions – on the boundary of $$R$$. For example, we may require $$u$$ to assume prescribed values on the boundary. This is called a Dirichlet condition, and the problem is called a Dirichlet problem. Or, we may require the normal derivative of $$u$$ at each point $$(x,y)$$ on the boundary to assume prescribed values. This is called a Neumann condition, and the problem is called a Neumann problem. In some problems we impose Dirichlet conditions on part of the boundary and Neumann conditions on the rest. Then we say that the boundary conditions and the problem are mixed.

Solving boundary value problems for Equation \ref{eq:12.3.2} over general regions is beyond the scope of this book, so we consider only very simple regions. We begin by considering the rectangular region shown in Figure $$\PageIndex{1}$$.

The possible boundary conditions for this region can be written as

$\begin{array}{lcllll} (1-\alpha)u(x,0)&+&\alpha u_y(x,0)&=&f_0(x), &0\le x\le a,\\[4pt] (1-\beta) u(x,b)&+&\beta u_y(x,b)&=&f_1(x), &0\le x\le a,\\[4pt] (1-\gamma) u(0,y)&+&\gamma u_x(0,y)&=&g_0(y), &0\le y\le b,\\[4pt] (1-\delta) u(a,y)&+&\delta u_x(a,y)&=&g_1(y), &0\le y\le b, \end{array}\nonumber$

where $$\alpha$$, $$\beta$$, $$\gamma$$, and $$\delta$$ can each be either $$0$$ or $$1$$; thus, there are 16 possibilities. Let BVP$$(\alpha,\beta,\gamma,\delta)(f_0,f_1,g_0,g_1)$$ denote the problem of finding a solution of Equation \ref{eq:12.3.2} that satisfies these conditions. This is a Dirichlet problem if

$\alpha=\beta=\gamma=\delta=0\nonumber$

(Figure $$\PageIndex{2}$$), or a Neumann problem if

$\alpha=\beta=\gamma=\delta=1\nonumber$

(Figure $$\PageIndex{3}$$). The other 14 problems are mixed.

For given $$(\alpha,\beta,\gamma,\delta)$$, the sum of solutions of

$\mbox{BVP}(\alpha,\beta,\gamma,\delta)(f_0,0,0,0),\quad \mbox{BVP}(\alpha,\beta,\gamma,\delta)(0,f_1,0,0),\nonumber$

$\mbox{BVP}(\alpha,\beta,\gamma,\delta)(0,0,g_0,0), \quad \text{and} \quad \mbox{BVP}(\alpha,\beta,\gamma,\delta)(0,0,0,g_1)\nonumber$

is a solution of

$\mbox{BVP}(\alpha,\beta,\gamma,\delta)(f_0,f_1,g_0,g_1).\nonumber$

Therefore we concentrate on problems where only one of the functions $$f_0$$, $$f_1$$, $$g_0$$, $$g_2$$ isn’t identically zero. There are 64 (count them!) problems of this form. Each has homogeneous boundary conditions on three sides of the rectangle, and a nonhomogeneous boundary condition on the fourth. We use separation of variables to find infinitely many functions that satisfy Laplace’s equation and the three homogeneous boundary conditions in the open rectangle. We then use these solutions as building blocks to construct a formal solution of Laplace’s equation that also satisfies the nonhomogeneous boundary condition. Since it is not feasible to consider all 64 cases, we’ll restrict our attention in the text to just four. Others are discussed in the exercises.

If $$v(x,y)=X(x)Y(y)$$ then

$v_{xx}+v_{yy}=X''Y+XY''=0\nonumber$

for all $$(x,y)$$ if and only if

${X''\over X}=-{Y''\over Y}=k\nonumber$

for all $$(x,y)$$, where $$k$$ is a separation constant. This equation is equivalent to

$\label{eq:12.3.3} X''-kX=0,\quad Y''+kY=0.$

From here, the strategy depends upon the boundary conditions. We illustrate this by examples.

Example $$\PageIndex{1}$$

Define the formal solution of

$\label{eq:12.3.4} \begin{array}{ccc} {u_{xx}+u_{yy}=0,}&{0<x<a,}&{0<y<b,}\\{u(x,0)=f(x),}&{u(x,b)=0,}&{0\leq x\leq a,}\\{u(0,y)=0,}&{u(a,y)=0,}&{0\leq y\leq b}\end{array}$

(Figure $$\PageIndex{4}$$).

Solution:

The boundary conditions in Equation \ref{eq:12.3.4} require products $$v(x,y)=X(x)Y(y)$$ such that $$X(0)=X(a)=Y(b)=0$$; hence, we let $$k=-\lambda$$ in Equation \ref{eq:12.3.3}. Thus, $$X$$ and $$Y$$ must satisfy

$\label{eq:12.3.5} X''+\lambda X=0,\quad X(0)=0,\quad X(a)=0$

and

$\label{eq:12.3.6} Y''-\lambda Y=0,\quad Y(b)=0.$

From Theorem 11.1.2, the eigenvalues of Equation \ref{eq:12.3.5} are $$\lambda_n=n^2\pi^2/a^2$$, with associated eigenfunctions

$X_n=\sin{n\pi x\over a}, \quad n=1,2,3,\dots.\nonumber$

Substituting $$\lambda=n^2\pi^2/a^2$$ into Equation \ref{eq:12.3.6} yields

$Y''-(n^2\pi^2/a^2)Y=0,\quad Y(b)=0,\nonumber$

so we could take

$\label{eq:12.3.7} Y_n=\sinh{n\pi(b-y)\over a};$

however, because of the nonhomogeneous Dirichlet condition at $$y=0$$, it is better to require that $$Y_n(0)=1$$, which can be achieved by dividing the right side of Equation \ref{eq:12.3.7} by its value at $$y=0$$; thus, we take

$Y_n={\sinh n\pi(b-y)/a\over\sinh n\pi b/a}.\nonumber$

Then

$v_n(x,y)=X_n(x)Y_n(y)={\sinh n\pi(b-y)/a\over\sinh n\pi b/a}\sin{n\pi x\over a},\nonumber$

so $$v_n(x,0)=\sin n\pi x/a$$ and $$v_n$$ satisfies Equation \ref{eq:12.3.4} with $$f(x)=\sin n\pi x/a$$. More generally, if $$\alpha_1$$, …, $$\alpha_m$$ are arbitrary constants then

$u_m(x,y)=\sum_{n=1}^m\alpha_n {\sinh n\pi(b-y)/a\over\sinh n\pi b/a} \sin{n\pi x\over a}\nonumber$

satisfies Equation \ref{eq:12.3.4} with

$f(x)=\sum_{n=1}^m\alpha_n\sin{n\pi x\over L}.\nonumber$

Therefore, if $$f$$ is an arbitrary piecewise smooth function on $$[0,a]$$, we define the formal solution of Equation \ref{eq:12.3.4} to be

$\label{eq:12.3.8} u(x,y)=\sum_{n=1}^\infty \alpha_n {\sinh n\pi(b-y)/a\over\sinh n\pi b/a} \sin{n\pi x\over a},$

where

$S(x)=\sum_{n=1}^\infty \alpha_n\sin{n\pi x\over a}\nonumber$

is the Fourier sine series of $$f$$ on $$[0,a]$$; that is,

$\alpha_n={2\over a}\int_0^af(x)\sin{n\pi x\over a}\,dx,\quad n=1,2,3,\dots.\nonumber$

If $$y<b$$ then

$\label{eq:12.3.9} {\sinh n\pi(b-y)/a\over\sinh n\pi b/a}\approx e^{-n\pi y/a}$

for large $$n$$, so the series in Equation \ref{eq:12.3.8} converges if $$0< y < b$$; moreover, since also

${\cosh n\pi(b-y)/a\over\sinh n\pi b/a}\approx e^{-n\pi y/a}\nonumber$

for large $$n$$, Theorem 12.1.2 applied twice with $$z=x$$ and twice with $$z=t$$, shows that $$u_{xx}$$ and $$u_{yy}$$ can be obtained by differentiating $$u$$ term by term if $$0<y<b$$. Exercise 12.3.37. Therefore $$u$$ satisfies Laplace’s equation in the interior of the rectangle in Figure $$\PageIndex{4}$$. Moreover, the series in \ref{eq:12.3.8} also converges on the boundary of the rectangle, and satisfies the three homogeneous boundary conditions conditions in \ref{eq:12.3.4}. Therefore, since $$u(x, 0) = S(x)$$ for $$0 ≤ x ≤ L$$, $$u$$ is an actual solution of \ref{eq:12.3.5} if and only if $$S(x) = f(x)$$ for $$0 ≤ x ≤ a$$. From Theorem 11.3.2, this is true if $$f$$ is continuous and piecewise smooth on $$[0, L]$$, and $$f(0) = f(L) = 0$$.

Example $$\PageIndex{2}$$

Solve Equation \ref{eq:12.3.4} with $$f(x)=x(x^2-3ax+2a^2)$$.

Solution

From Example 11.3.6,

$S(x)={12a^3\over\pi^3}\sum_{n=1}^\infty{1\over n^3}\sin{n\pi x\over a}.\nonumber$

Therefore

$\label{eq:12.3.10} u(x,y)={12a^3\over\pi^3}\sum_{n=1}^\infty{\sinh n\pi(b-y)/a\over n^3\sinh n\pi b/a} \sin{n\pi x\over a}.$

To compute approximate values of $$u(x,y)$$, we must use partial sums of the form

$u_m(x,y)={12a^3\over\pi^3}\sum_{n=1}^m{\sinh n\pi(b-y)/a\over n^3\sinh n\pi b/a} \sin{n\pi x\over a}.\nonumber$

Because of Equation \ref{eq:12.3.9}, small values of $$m$$ provide sufficient accuracy for most applications if $$0<y<b$$. Moreover, the $$n^{3}$$ in the denominator in \ref{eq:12.3.10} ensures that this is also true for $$y = 0$$. For graphing purposes, we chose $$a = 2, b = 1$$, and $$m = 10$$. Figure $$\PageIndex{5}$$ shows the surface

$u=u(x,y),\quad 0\le x\le 2,\quad 0\le y\le1,\nonumber$

while Figure $$\PageIndex{6}$$ shows the curves

$u=u(x,0.1k),\quad 0\le x\le2,\quad k=0,1,\dots,10.\nonumber$

Example $$\PageIndex{3}$$

Define the formal solution of

$\label{eq:12.3.11} \begin{array}{ccc}{u_{xx}+u_{yy}=0,}&{0<x<a,}&{0<y<b,}\\{u(x,0)=0,}&{u_{y}(x,b)=f(x),}&{0\leq x\leq a,}\\{u_{x}(0,y)=0,}&{u_{x}(a,y)=0,}&{0\leq y\leq b}\end{array}$

(Figure $$\PageIndex{7}$$).

Solution

The boundary conditions in Equation \ref{eq:12.3.11} require products $$v(x,y)=X(x)Y(y)$$ such that $$X'(0)=X'(a)=Y(0)=0$$; hence, we let $$k=-\lambda$$ in Equation \ref{eq:12.3.3}. Thus, $$X$$ and $$Y$$ must satisfy

$\label{eq:12.3.12} X''+\lambda X=0,\quad X'(0)=0,\quad X'(a)=0$

and

$\label{eq:12.3.13} Y''-\lambda Y=0,\quad Y(0)=0.$

From Theorem 11.1.3, the eigenvalues of Equation \ref{eq:12.3.12} are $$\lambda=0$$, with associated eigenfunction $$X_0=1$$, and $$\lambda_n=n^2\pi^2/a^2$$, with associated eigenfunctions

$X_n=\cos{n\pi x\over a}, \quad n=1,2,3,\dots.\nonumber$

Since $$Y_0=y$$ satisfies Equation \ref{eq:12.3.13} with $$\lambda=0$$, we take $$v_0(x,y)=X_0(x)Y_0(y)= y$$. Substituting $$\lambda=n^2\pi^2/a^2$$ into Equation \ref{eq:12.3.13} yields

$Y''-(n^2\pi^2/a^2)Y=0,\quad Y(0)=0,\nonumber$

so we could take

$\label{eq:12.3.14} Y_n=\sinh{n\pi y\over a}.$

However, because of the nonhomogeneous Neumann condition at $$y=b$$, it is better to require that $$Y_n'(b)=1$$, which can be achieved by dividing the right side of Equation \ref{eq:12.3.14} by the value of its derivative at $$y=b$$; thus,

$Y_n={a\sinh n\pi y/a\over n\pi\cosh n\pi b/a}.\nonumber$

Then

$v_n(x,y)=X_n(x)Y_n(y)= {a\sinh n\pi y/a\over n\pi\cosh n\pi b/a}\cos{n\pi x\over a},\nonumber$

so

${\partial v_n\over \partial y}(x,b)=\cos{n\pi x\over a}.\nonumber$

Therefore $$v_n$$ satisfies Equation \ref{eq:12.3.11} with $$f(x)=\cos n\pi x/a$$. More generally, if $$\alpha_0$$, …, $$\alpha_m$$ are arbitrary constants then

$u_m(x,y)=\alpha_0y+{a\over\pi}\sum_{n=1}^m\alpha_n {\sinh n\pi y/a\over n\cosh n\pi b/a} \cos{n\pi x\over a}\nonumber$

satisfies Equation \ref{eq:12.3.11} with

$f(x)=\alpha_0+\sum_{n=1}^m\alpha_n\cos{n\pi x\over L}.\nonumber$

Therefore, if $$f$$ is an arbitrary piecewise smooth function on $$[0,a]$$ we define the formal solution of Equation \ref{eq:12.3.11} to be

$u(x,y)=\alpha_0y+{a\over\pi}\sum_{n=1}^\infty \alpha_n {\sinh n\pi y/a\over n\cosh n\pi b/a} \cos{n\pi x\over a},\nonumber$

where

$C(x)=\alpha_0+\sum_{n=1}^\infty \alpha_n\cos{n\pi x\over a}\nonumber$

is the Fourier cosine series of $$f$$ on $$[0,a]$$; that is,

$\alpha_0={1\over a}\int_0^af(x)\,dx \quad \text{and} \quad \alpha_n={2\over a}\int_0^af(x)\cos{n\pi x\over a}\,dx,\quad n=1,2,3,\dots.\nonumber$

Example $$\PageIndex{4}$$

Solve Equation \ref{eq:12.3.11} with $$f(x)=x$$.

Solution

From Example 11.3.1,

$C(x)=\frac{a}{2}-\frac{4a}{\pi ^{2}}\sum_{n=1}^{\infty}\frac{1}{(2n-1)^{2}}\cos\frac{(2n-1)\pi x}{a}\nonumber$

Therefore

$\label{eq:12.3.15} u(x,y)=\frac{ay}{2}-\frac{4a^{2}}{\pi ^{3}}\sum_{n=1}^{\infty}\frac{\sinh (2n-1)\pi y/a}{(2n-1)^{3}\cosh (2n-1)\pi b/a}\cos\frac{(2n-1)\pi x}{a}$

For graphing purposes, we chose $$a=2$$, $$b=1$$, and retained the terms through $$n=10$$ in Equation \ref{eq:12.3.15}. Figure $$\PageIndex{8}$$ shows the surface

$u=u(x,y),\quad 0\le x\le 2,\quad 0\le y\le1,\nonumber$

while Figure $$\PageIndex{9}$$ shows the curves

$u=u(x,.1k),\quad 0\le x\le2,\quad k=0,1,\dots,10.\nonumber$

Example $$\PageIndex{5}$$

Define the formal solution of

$\label{eq:12.3.16} \begin{array}{ccc}{u_{xx}+u_{yy}=0,}&{0<x<a,}&{0<y<b,}\\{u(x,0)=0,}&{u_{y}(x,b)=0,}&{0\leq x\leq a,}\\{u(0,y)=g(y),}&{u_{x}(a,y)=0,}&{0\leq y\leq b}\end{array}$

(Figure $$\PageIndex{10}$$).

Solution

The boundary conditions in Equation \ref{eq:12.3.16} require products $$v(x,y)=X(x)Y(y)$$ such that $$Y(0)=Y'(b)=X'(a)=0$$; hence, we let $$k=\lambda$$ in Equation \ref{eq:12.3.3}. Thus, $$X$$ and $$Y$$ must satisfy

$\label{eq:12.3.17} X''-\lambda X=0,\quad \quad X'(a)=0$

and

$\label{eq:12.3.18} Y''+\lambda Y=0,\quad Y(0)=0,\quad Y'(b)=0.$

From Theorem 11.1.4, the eigenvalues of Equation \ref{eq:12.3.18} are $$\lambda_n=(2n-1)^2\pi^2/4b^2$$, with associated eigenfunctions

$Y_n=\sin{(2n-1)\pi y\over2b}, \quad n=1,2,3,\dots.\nonumber$

Substituting $$\lambda=(2n-1)^2\pi^2/4b^2$$ into Equation \ref{eq:12.3.17} yields

$X''-((2n-1)^2\pi^2/4b^2)X=0,\quad X'(a)=0,\nonumber$

so we could take

$\label{eq:12.3.19} X_n=\cosh{(2n-1)\pi(x-a)\over 2b}.$

However, because of the nonhomogeneous Dirichlet condition at $$x=0$$, it is better to require that $$X_n(0)=1$$, which can be achieved by dividing the right side of Equation \ref{eq:12.3.19} by its value at $$x=0$$; thus,

$X_n= {\cosh(2n-1)\pi(x-a)/2b\over\cosh(2n-1)\pi a/2b}.\nonumber$

Then

$v_n(x,y)=X_n(x)Y_n(y)= {\cosh(2n-1)\pi(x-a)/2b\over\cosh(2n-1)\pi a/2b}\sin{(2n-1)\pi y\over2b},\nonumber$

so

$v_n(0,y)=\sin{(2n-1)\pi y\over2b}.\nonumber$

Therefore $$v_n$$ satisfies Equation \ref{eq:12.3.16} with $$g(y)=\sin(2n-1)\pi y/2b$$. More generally, if $$\alpha_1$$, …, $$\alpha_m$$ are arbitrary constants then

$u_m(x,y)=\sum_{n=1}^m \alpha_n {\cosh(2n-1)\pi(x-a)/2b\over\cosh(2n-1)\pi a/2b}\sin{(2n-1)\pi y\over 2b}\nonumber$

satisfies Equation \ref{eq:12.3.16} with

$g(y)=\sum_{n=1}^m \alpha_n\sin{(2n-1)\pi y\over2b}.\nonumber$

Thus, if $$g$$ is an arbitrary piecewise smooth function on $$[0,b]$$, we define the formal solution of Equation \ref{eq:12.3.16} to be

$u(x,y)=\sum_{n=1}^\infty \alpha_n {\cosh(2n-1)\pi(x-a)/2b\over\cosh(2n-1)\pi a/2b}\sin{(2n-1)\pi y\over 2b},\nonumber$

where

$S_M(x)=\sum_{n=1}^\infty \alpha_n\sin{(2n-1)\pi y\over2b}\nonumber$

is the mixed Fourier sine series of $$g$$ on $$[0,b]$$; that is,

$\alpha_n={2\over b}\int_0^bg(y)\sin{(2n-1)\pi y\over2b}\,dy.\nonumber$

Example $$\PageIndex{6}$$

Solve Equation \ref{eq:12.3.16} with $$g(y)=y(2y^2-9by+12b^2)$$.

Solution

From Example 11.3.8,

$S_{M}(y)=\frac{96b^{3}}{\pi ^{3}}\sum_{n=1}^{\infty}\frac{1}{(2n-1)^{3}}\left[3+(-1)^{n}\frac{4}{(2n-1)\pi } \right]\sin\frac{(2n-1)\pi y}{2b}\nonumber$

Therefore

$u(x,y)=\frac{96b^{3}}{\pi ^{3}}\sum_{n=1}^{\infty }\frac{\cosh (2n-1)\pi (x-a)/2b}{(2n-1)^{3}\cosh (2n-1)\pi a/2b}\left [3+(-1)^{n}\frac{4}{(2n-1)\pi } \right]\sin\frac{(2n-1)\pi y}{2b}\nonumber$

Example $$\PageIndex{7}$$

Define the formal solution of

$\label{eq:12.3.20}\begin{array}{ccc}{u_{xx}+u_{yy}=0,}&{0<x<a,}&{0<y<b,}\\{u_{y}(x,0)=0,}&{u(x,b)=0,}&{0\leq x\leq a,}\\{u_{x}(0,y)=0,}&{u_{x}(a,y)=g(y),}&{0\leq y\leq b}\end{array}$

(Figure $$\PageIndex{11}$$).

Solution:

The boundary conditions in Equation \ref{eq:12.3.20} require products $$v(x,y)=X(x)Y(y)$$ such that $$Y'(0)=Y(b)=X'(0)=0$$; hence, we let $$k=\lambda$$ in Equation \ref{eq:12.3.3}. Thus, $$X$$ and $$Y$$ must satisfy

$\label{eq:12.3.21} X''-\lambda X=0,\quad \quad X'(0)=0$

and

$\label{eq:12.3.22} Y''+\lambda Y=0,\quad Y'(0)=0,\quad Y(b)=0.$

From Theorem 11.1.4, the eigenvalues of Equation \ref{eq:12.3.22} are $$\lambda_n=(2n-1)^2\pi^2/4b^2$$, with associated eigenfunctions

$Y_n=\cos{(2n-1)\pi y\over2b}, \quad n=1,2,3,\dots.\nonumber$

Substituting $$\lambda=(2n-1)^2\pi^2/4b^2$$ into Equation \ref{eq:12.3.21} yields

$X''-((2n-1)^2\pi^2/4b^2)X=0,\quad X'(0)=0,\nonumber$

so we could take

$\label{eq:12.3.23} X_n=\cosh{(2n-1)\pi x\over 2b}.$

However, because of the nonhomogeneous Neumann condition at $$x=a$$, it is better to require that $$X_n'(a)=1$$, which can be achieved by dividing the right side of Equation \ref{eq:12.3.23} by the value of its derivative at $$x=a$$; thus,

$X_n= {2b\cosh(2n-1)\pi x/2b\over(2n-1)\pi\sinh(2n-1)\pi a/2b}.\nonumber$

Then

$v_n(x,y)=X_n(x)Y_n(y)= {2b\cosh(2n-1)\pi x/2b\over(2n-1)\pi\sinh(2n-1)\pi a/2b}\cos{(2n-1)\pi y\over2b},\nonumber$

so

${\partial v_n\over\partial x}(a,y)=\cos{(2n-1)\pi y\over2b}.\nonumber$

Therefore $$v_n$$ satisfies Equation \ref{eq:12.3.20} with $$g(y)=\cos(2n-1)\pi y/2b$$. More generally, if $$\alpha_1$$, …, $$\alpha_m$$ are arbitrary constants then

$u_m(x,y)={2b\over\pi}\sum_{n=1}^m \alpha_n {\cosh(2n-1)\pi x/2b\over(2n-1)\sinh(2n-1)\pi a/2b}\cos{(2n-1)\pi y\over 2b}\nonumber$

satisfies Equation \ref{eq:12.3.20} with

$g(y)=\sum_{n=1}^\infty \alpha_n\cos{(2n-1)\pi y\over2b}.\nonumber$

Therefore, if $$g$$ is an arbitrary piecewise smooth function on $$[0,b]$$, we define the formal solution of Equation \ref{eq:12.3.20} to be

$u(x,y)={2b\over\pi}\sum_{n=1}^\infty \alpha_n {\cosh(2n-1)\pi x/2b\over(2n-1)\sinh(2n-1)\pi a/2b}\cos{(2n-1)\pi y\over 2b},\nonumber$

where

$C_M(y)=\sum_{n=1}^\infty \alpha_n\cos{(2n-1)\pi y\over2b}\nonumber$

is the mixed Fourier cosine series of $$g$$ on $$[0,b]$$; that is,

$\alpha_n={2\over b}\int_0^bg(y)\cos{(2n-1)\pi y\over2b}\,dy.\nonumber$

Example $$\PageIndex{8}$$

Solve Equation \ref{eq:12.3.20} with $$g(y)=y-b$$.

Solution

From Example 11.3.3,

$C_M(y)=-{8b\over\pi^2}\sum_{n=1}^\infty{1\over(2n-1)^2} \cos{(2n-1)\pi y\over2b}. \nonumber$

Therefore

$u(x,y)=-{16b^2\over\pi^3}\sum_{n=1}^\infty{ \cosh(2n-1)\pi x/2b\over(2n-1)^3\sinh(2n-1)\pi a/2b} \cos{(2n-1)\pi y\over2b}.\nonumber$

## Laplace's Equation for a Semi-Infinite Strip

We now seek solutions of Laplace’s equation on the semi-infinite strip

$S:\{ 0<x<a,\quad y>0\} \nonumber$

(Figure $$\PageIndex{12}$$) that satisfy homogeneous boundary conditions at $$x=0$$ and $$x=a$$, and a nonhomogeneous Dirichlet or Neumann condition at $$y=0$$. An example of such a problem is

$\label{eq:12.3.24} \begin{array}{c} {u_{xx}+u_{yy}=0,\quad 0<x<a,\quad y>0,}\\{u(x,0)=f(x),\quad 0\leq x\leq a,}\\{u(0,y)=0,\quad u(a,y)=0,\quad y>0,}\end{array}$

The boundary conditions in this problem are not sufficient to determine $$u$$, for if $$u_0=u_0(x,y)$$ is a solution and $$K$$ is a constant then

$u_1(x,y)=u_0(x,y)+K\sin{\pi x\over a}\sinh{\pi y\over a}.\nonumber$

is also a solution. (Verify.) However, if we also require — on physical grounds — that the solution remain bounded for all $$(x,y)$$ in $$S$$ then $$K=0$$ and this difficulty is eliminated.

Example $$\PageIndex{9}$$

Define the bounded formal solution of Equation \ref{eq:12.3.24}.

Solution

Proceeding as in the solution of Example $$\PageIndex{1}$$, we find that the building block functions are of the form

$v_n(x,y)=Y_n(y)\sin{n\pi x\over a}, \nonumber$

where

$Y_n''-(n^2\pi^2/a^2)Y_n=0. \nonumber$

Therefore

$Y_n=c_1e^{n\pi y/a}+c_2e^{-n\pi y/a} \nonumber$

where $$c_1$$ and $$c_2$$ are constants. Although the boundary conditions in Equation \ref{eq:12.3.24} don’t restrict $$c_1$$, and $$c_2$$, we must set $$c_1=0$$ to ensure that $$Y_n$$ is bounded. Letting $$c_2=1$$ yields

$v_n(x,y)=e^{-n\pi y/a}\sin{n\pi x\over a}, \nonumber$

and we define the bounded formal solution of Equation \ref{eq:12.3.24} to be

$u(x,y)=\sum_{n=1}^\infty b_ne^{-n\pi y/a}\sin{n\pi x\over a}, \nonumber$

where

$S(x)=\sum_{n=1}^\infty b_n\sin{n\pi x\over a} \nonumber$

is the Fourier sine series of $$f$$ on $$[0,a]$$.

See Exercises 12.3.29-12.3.34 for other boundary value problems on a semi-infinite strip.


text:
# Why is the Cartesian product of a set $A$ and empty set an empty set? [duplicate]

Let $A \times \emptyset = \{(x,y)| x\in A, y \in \emptyset \}$. We know there is no element in $\emptyset$. But how does it follow that $A \times \emptyset = \emptyset$?

## marked as duplicate by Rahul, Micah, Asaf Karagila♦, Henry T. Horton, Alexander Gruber♦Mar 5 '13 at 1:39

• Suppose by contradiction that you're able to pick $(x,y) \in A \times \emptyset$ $\ldots$ – Dominique Feb 16 '13 at 21:10
Claim: $$A\times B=\emptyset$$ iff $$A=\emptyset$$ or $$B=\emptyset$$
Proof: If $$A=\emptyset$$ or $$B=\emptyset$$, then there is no $$(a,b)$$ such that $$a\in A$$ and $$b\in B$$. Therefore $$A\times B$$, which is the set of these pairs, is empty.
If $$A\neq\emptyset$$ and $$B\neq\emptyset$$, there exists $$a\in A$$ and $$b\in B$$, thus $$(a,b)\in A\times B$$. Therefore $$A\times B\neq\emptyset$$.


text:
# 1). What is additive identity?2). What is Reciprocal?3). What is multiplicative inverse?

Solution:

A value which is added to any number and the resulting value remains unchanged, is known as additive identity.

e.g. $x+0=x$

$\Rightarrow 0$ is the additive identity for any real number.

2). Reciprocal:

When a number is multiplied by any number such that the product is one , is known as Reciprocal of the number.

e.g. $x\times \frac{1}{x}=1$

Thus, $x$ and $\frac{1}{x}$ are the reciprocals of each other.

3). Multiplicative inverse:

Reciprocal and Multiplicative inverse mean the same.

Tutorialspoint

Simply Easy Learning


text:
# Solve A= 1/2 bh for b. Then find the base

Solve $A=\frac{1}{2}$ bh for b. Then find the base of a triangle with a height of 6 inches and an area of 24 square inches.
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

xandir307dc

$A=\frac{b\cdot h}{2}$
$2A=b\cdot h$
Divide both sides by h
$\frac{2A}{h}=b$
Now, substitute 6 in. for h and 24 in. for A and solve for b

Multiply


text:
LSU
Mathematics

# Initiative for minority recruiting and mentoring in mathematics (IMRAM)

The LSU department of mathematics has embarked on a renewed initiative to recruit and mentor students from the historically under represented minority groups in mathematics and physical sciences. By establishing a comprehensive program of intervention at critical nodes of the students’ academic careers, the initiative hopes to ease the transition from one stage to another of its participants. Partially funded by Louisiana board of regents, the project strategically aims to foster enthusiasm, interest and competence among its participants and help them become successful in their chosen careers. As such the initiative consists of three separate yet vertically integrated programs.

•  ACT prep academies for high school seniors and juniors.
• Summer mathematical institutes for college seniors and juniors who have expressed interest to get into graduate mathematics programs.
• Summer ACT math circles.
• Implementation of academic year Mathematics Interest Groups (MIG)  for a comprehensive academic advising, counseling and mentoring of minority mathematics students at LSU.

ACT prep academies: These academies are offered to minority LSU applicants during the Spring semester in March/ April and during the Summer semester in May/ June. The overall goal of these academies is to help students to do well on ACT exams to enhance the students’ chances of getting into universities and colleges of their choices. However, the summer portion of the program also caters to those high school seniors  who have shown interest to attend LSU but have scores slightly below what the university requires for admission. By an arrangement with the LSU office of admissions, the summer ACT prep academy recruits and invites such students for a two week residential intensive ACT preparation. At the end of the program students are expected to take the ACT exam and in the likely event of an improvement in their scores the office will review the applications and grant admissions as they are due.

Summer mathematical institutes for seniors and juniors: (Regrettably this program will not run during the summer 0f 2013) These institutes try to address the needs of minority students to navigate graduate programs related to mathematics.  These three week sessions, not only provide ample information about matters involving graduate programs, but will also have an intensive math specific educational component geared to give the participants a head start in preparation to the general exams, which practically every graduate program administers to students at the end of the first year tenure of a graduate student.  In so doing, the institute aims to enhance the enthusiasm and interest of its participants in mathematics by introducing the students early to graduate level mathematical content in a slower pace as well as foster the need for a hard and disciplined effort to succeed in graduate school. The successful program is in its fourth year and pending a final approval is funded through 2012 by the Louisiana board of regents.The 2012 session will accept 10 students and slated to meet tentatively through May 14 - June 01, 2012. Participants in the program will receive a stipend in the amount of  $1250 per student. The program will also provide$1200 to cover room and board for the duration. To apply for this program please click here.

Summer ACT Math Circles: These are 3-week summer enrichment programs which  appeal to those minority high school seniors who not only like to improve on their ACT scores  but also have interest in investigating concepts in mathematics that are not usually covered in high school.

## Program directors and contacts

Guillermo Ferreyra, PhD

Department of Mathematics, LSU

Amha Lisan, PhD

Department of Mathematics, LSU

Tel. 225-578-1578

e-mail: LISAN@MATH.LSU.EDU

Frank Neubrander, PhD

Department of Mathematics, LSU

Tel. 225-578-7677

e-mail: neubrand@math.lsu.edu

Michael Tom, PhD

Department of Mathematics, LSU

Tel. 225-578-1613

e-mail: tom@math.lsu.edu


text:
# How to increase the length of the arrows/increase space in schemes in chemfig?

I have a reaction scheme as shown in figure below:

MWE

\documentclass{article}
\usepackage{chemfig}

\begin{document}

\schemestart
A \arrow(a--b){->[*{0}$\mathrm{-HO}$][*{0}$\mathrm{+O_{2}}$]}[-90] B
\arrow(@b--c){->[][]} C
% \subscheme{\arrow{->}\lewis{1.,R}}%
\arrow(@b--d){<=>[][*{0}$\mathrm{+O_{2}}$]}[-90] D
\arrow(@d--f){} F
\arrow(@d--f){->[$\mathrm{-\lewis{1.,HO}}$][]}
\arrow(@b--@f){->[$\mathrm{+O_{2}}$][$\mathrm{-\lewis{1.,HO}}$]}
\arrow(@d--e){<=>[][]}[-90] E
\arrow(@e--g){->[$\mathrm{-\lewis{3.,OH}}$][]} G
\arrow(@e--@f){->[$\mathrm{-\lewis{1.,HO}}$][]}
\schemestop

\end{document}

However the area around product 'F' appears to be cramped. To fix this I add some space as shown in figure:

\\documentclass{article}
\usepackage{chemfig}

\begin{document}

\schemestart
A \arrow(a--b){->[*{0}$\mathrm{-HO}$][*{0}$\mathrm{+O_{2}}$]}[-90] B
\arrow(@b--c){->[][]} C
% \subscheme{\arrow{->}\lewis{1.,R}}%
\arrow(@b--d){<=>[][*{0}$\mathrm{+O_{2}}$]}[-90] D
\arrow(@d--f){} \hspace{3em} F
\arrow(@d--f){->[$\mathrm{-\lewis{1.,HO}}$][]}
\arrow(@b--@f){->[$\mathrm{+O_{2}}$][$\mathrm{-\lewis{1.,HO}}$]} \hspace{7em}
\arrow(@d--e){<=>[][]}[-90] E
\arrow(@e--g){->[$\mathrm{-\lewis{3.,OH}}$][]} G
\arrow(@e--@f){->[$\mathrm{-\lewis{1.,HO}}$][]}
\schemestop

\end{document}

Now, two problems exists:

1. The length of the arrow from 'D' to 'F' does not increase.
2. The arrows are not exactly aligned with 'F'

How to fix the above two issues with schemes in chemfig?

The length of an arrow can be set by adding a multiplier after the angle:

\arrow(@d--f){}[0, 2] F

where the 2 indicates that the arrow has twice the standard length. Note also that you should replace f by @f in the next line.

\documentclass{article}
\usepackage{chemfig}

\begin{document}

\schemestart
A \arrow(a--b){->[*{0}$\mathrm{-HO}$][*{0}$\mathrm{+O_{2}}$]}[-90] B
\arrow(@b--c){->[][]} C
% \subscheme{\arrow{->}\lewis{1.,R}}%
\arrow(@b--d){<=>[][*{0}$\mathrm{+O_{2}}$]}[-90] D
\arrow(@d--f){}[0, 2] F
\arrow(@d--@f){->[$\mathrm{-\lewis{1.,HO}}$][]}
\arrow(@b--@f){->[$\mathrm{+O_{2}}$][$\mathrm{-\lewis{1.,HO}}$]}
\arrow(@d--e){<=>[][]}[-90] E
\arrow(@e--g){->[$\mathrm{-\lewis{3.,OH}}$][]} G
\arrow(@e--@f){->[$\mathrm{-\lewis{1.,HO}}$][]}
\schemestop

\end{document}


text:
# Solving 42x2+-44x+94 using the Quadratic Formula

For your equation of the form "ax2 + bx + c = 0," enter the values for a, b, and c:

 a x2 + b x + c = 0
Reset

You entered:
42x2+-44x+94=0.

There are no solutions in the real number domain.
There are two complex solutions: x = 0.52380952380952 + 1.4013275209107i, and x = 0.52380952380952 - 1.4013275209107i,
where i is the imaginary unit.

## Here's how we found that solution:

You entered the following equation:
(1)           42x2+-44x+94=0.

For any quadratic equation ax2 + bx + c = 0, one can solve for x using the following equation, which is known as the quadratic formula:
(2)

In the form above, you specified values for the variables a, b, and c. Plugging those values into Eqn. 1, we get:
(3)           $$x=--44\pm\frac{\sqrt{-44^2-4*42*94}}{2*42}$$

which simplifies to:
(4)           $$x=--44\pm\frac{\sqrt{1936-15792}}{84}$$

Now, note that b2-4ac is a negative number. Specifically in our case, 1936 - 15792 = -13856.
(5)           $$x=--44\pm\frac{\sqrt{-13856}}{84}$$

This means that our solution will require finding the square root of a negative number. There is no real number solution for this, so our solution will be a complex number (that is, it will involve the imaginary number i, defined as the square root of -1.).
Let's calculate the square root:
(6)           $$x=--44\pm\frac{117.7115117565i}{84}$$

This equation further simplifies to:
(7)           $$x=-\frac{--44}{84}\pm1.4013275209107i$$

Solving for x, we find two solutions which are both complex numbers:
x = 0.52380952380952 + 1.4013275209107i
and
x = 0.52380952380952 - 1.4013275209107i

Both of these solutions are complex numbers.
These are the two solutions that will satisfy the equation 42x2+-44x+94=0.

### Notes

What is a quadratic equation? A quadratic equation is an function ax2 + bx + c = 0, where a, b, and c are constants. X is a variable which is not known. The constants a and b, are referred to as coefficients. Interestingly, a cannot be zero. Otherwise, the equation ceases to be a quadratic equation, and becomes a linear equation.

Solving a linear equation is relatively straightforward. Solving a quadratic equation is not quite so straightforward. Fortunately, you have this handy-dandy quadratic equation calculator. Acutally, quadratic equations can be reliably solved using the quadratic formula, which is the same technique used by this quadratic equation calculator. Try it, and it will explain each of the steps to you. The quadratic formula is:

Solving a quadratic equation will always result in 2 solutions for x. These solutions are called roots. These roots may both be real numbers or, they may both be complex numbers. Depending on the values of a, b, and c, the two roots may be the same, resulting in one solution for x.

Quadratic equations are more than just mathematical flights of fantasy Quadratic equations are needed to find answers to many real-world problems. The acceleration of an object as it falls to earth is one example of an application of quadratic equations.

As mentioned above, in the equation ax2+bx+c=0, a cannot be zero. If a were 0, then ax2 = 0x2 = 0 for any value of x, so our equation becomes 0 + bx + c = 0, which is the same as bx + c = 0, which is no longer a quadratic equation. In fact, bx + c = 0 is a linear equation, which is much simpler to solve than a quadratic equation.

We this quadratic equation calculator is useful to you. We hope the explanations showing how you can solve the equation yourself are educational and helpful. But we totally understand if you just want to use it to find the answers you're looking for. Thank you for using Quadratic-Equation-Calculator.com.


text:
# Will the energy of a randomly driven harmonic oscillator grow to infinity or oscillate about a finite value?

The equation of motion for an undamped harmonic oscillator, with driver $$f=f(t)$$ is given by: $$\ddot{x}+x=f.$$ Let the initial conditions be given by: $$x(0)=\dot{x}(0)=0.$$ If $$f=\cos(t)$$ then the solution is: $$x(t)=\frac{1}{2}t\sin(t).$$ Hence, a resonance is setup and the energy of the oscillator will grow forever. If $$f=\cos(\omega t)$$ where $$\omega\ne1$$, the solution is: $$x(t)=\frac{2}{\omega^2-1}\sin\left(\frac{\omega-1}{2}t\right)\sin\left(\frac{\omega+1}{2}t\right),$$ hence, the energy oscillates about some finite value. My question is, if $$f$$ were replaced with some continuous random driver where the frequency profile resmbled that of say gaussian white noise, would the energy of the oscillator grow forever or would it oscillate about some finite value?

Does anyone know of a simple function I could replace $$f$$ with to generate a continuous white noise driver?

• My gut says it definitely wouldn't grow to infinity. You might well get chaotic behavior, though. – Adrian Keister Dec 19 '18 at 19:47
• That's a very interesting question! Just some thoughts: multiplying the equation by $\dot{x}$ we have the total energy of the system: $$\dot{x} \ddot{x}+\dot{x}x = \frac{1}{2} \frac{d}{dt} \dot{x}^2 + \frac{1}{2} \frac{d}{dt} x^2 = \dot{E}.$$ Therefore, $\dot{E} = f \dot{x}$ and $$E = \int_0^t f \dot{x} dt.$$ – rafa11111 Dec 19 '18 at 19:49
• Nice one @rafa11111. That means in the long run, since $f$ is completely random, the integral is $0$. So the system will emit the same amount of energy it absorbs. On the short time scale however, the energy is not constant. – Andrei Dec 19 '18 at 20:02
• @Andrei I'm not sure... How can you ensure that the integral is $0$? I have the feeling that it should be $0$, but I don't know how can one show that. – rafa11111 Dec 19 '18 at 20:06
• I'm wondering if your DE there can be re-cast into the form of a stochastic differential equation (SDE). That might be a fruitful area of inquiry. – Adrian Keister Dec 19 '18 at 20:13

If you have a Gaussian random force, the equation becomes a Langevin equation. In physicists notation, you would write $$\ddot x + x = \lambda \xi(t) \tag{1}$$ with $$\lambda$$ the strength of the random force and (the bracket denotes the stochastic average) $$\langle \xi(t) \rangle = 0, \quad \text{and} \quad \langle \xi(t) \xi(t') \rangle = \delta(t-t')\,. \tag{2}$$ Note that in mathematics instead stochastic differential equations are more conventional.

Let us assume that $$x(0)=\dot x(0)=0$$. We can solve (1) to obtain $$x(t) = \lambda \int_0^t\!\sin(t-t') \xi(t')\,dt'\,. \tag{3}$$ This is a stochastic solution as it depends on the random function $$\xi(t)$$. However, from (3) together with (2) we can calculate statistical predictions. For example the average position is given by $$\langle x(t) \rangle =0\,,$$ which is not unexpected (just compare it to a random walk). So on average the oscillator does diverge as it does not even move.

Of course, the more reasonable measure if the harmonic oscillator performs an unbounded oscillation is the variance. We obtain $$\langle x(t)^2 \rangle = \lambda^2 \int_0^t \int_0^t\!\sin(t-t') \sin(t-t'') \langle\xi(t')\xi(t'')\rangle\,dt''\,dt' =\lambda^2 \int_0^t \sin^2(t-t')\,dt' = \lambda^2 \left(\frac{t}2 - \frac{\sin(2t)}{4}\right)\,.$$

From this we see that the typical amplitude of the oscillation, given by $$\sqrt{\langle x(t)^2 \rangle }$$ behaves as $$\sqrt{\langle x(t)^2 \rangle} \sim \lambda \sqrt{\frac{t}{2}}$$ for $$t\to\infty$$; i.e., the oscillation grows without bounds. However, the amplitude of the oscillation only grows as $$\sqrt{t}$$ instead of proportional to $$t$$.

• Thanks. How does equation (1) reduce to the Langevin equation: $$m\ddot{x}=-\lambda\dot{x}+\eta(t)?$$ Also, what is the stochastic average and how it is calculated? – Peanutlex Dec 19 '18 at 22:20
• It is a Langevin equation not the Langevin equation. The stochastic average simply encodes the notion that $\xi(t)$ is a random force with zero mean and "standard deviation" $\lambda$. – Fabian Dec 19 '18 at 22:28

Does anyone know of a simple function I could replace f with to generate a continuous white noise driver?

I'm not sure if this approach will help you, but here it is. My approach to problems such as the one you presented is related to implementation of said problem and then derive some, at least numeric, result. Having this said, I would do as follows.

Consider a finite discrete Gaussian white noise which is stored in an array $$G(n\Delta t)$$, with $$n$$ from $$0$$ to $$N$$. This can be interpolated using a polynomial $$P(t)$$ of order $$N-1$$ which is unique. This polynomial should be the solution you are looking for for $$t\in[0,N\Delta t]$$. From this you can compute your driver function using

$$f(t)=\frac{d^2 P}{dt^2}(t) + P(t)$$


text:
# Catching erroneous queries, without MySQL proxy

MySQL Proxy is a really neat tool. I remember a few years back when I first saw Jan talking about it. Back in those days it was significantly different than it is now, but the concept remains the same: direct your database traffic through a man-in-the-middle. Chris Calender’s post on capturing erroneous queries with MySQL Proxy shows one use for Proxy. But wait. MySQL Proxy is just inspecting the MySQL protocol. And unless you’re using it for something else too, having a man in the middle to catch errors is like standing in the middle of the street and blocking traffic to count the cars on the street. Why don’t you stand on the sidewalk to count the cars instead?

### Observing without interrupting

Maybe we can use tcpdump. If you search Google you’ll see lots of examples of using tcpdump and grep to extract queries from the MySQL protocol. These examples usually fall on their face when there are multi-line queries, or the compressed protocol is in use, but here there’s another problem: the error flag is just a field in the protocol, and that’s not very easy to inspect with grep. I’m not sure it’s even reasonably possible.

Maatkit to the rescue! The mk-query-digest tool can understand the protocol and we can then filter and manipulate however we wish. As usual, begin by downloading it:

wget http://www.maatkit.org/get/mk-query-digest

Next, let’s set it up to observe the traffic so we can see what’s happening on the server.

tcpdump -i lo port 3306 -s 65535 -xnq -tttt \
| perl mk-query-digest --type tcpdump

That’ll capture traffic on port 3306 and push it into mk-query-digest, which defaults to aggregating and reporting on queries. But what we really want to do with that traffic is filter out all the traffic that doesn’t have errors. This is a one-liner, but I’ll take a detour to show you how to fish instead of just giving you the fish.

### Writing mk-query-digest filters

You can filter and transform query events any way you wish with the --filter command-line option. To do this, you have to know the structure of a query event, as seen by mk-query-digest. This is really easy; let’s create a filter that simply prints the event itself with Perl’s built-in Data::Dumper module, so we can see it:

tcpdump -i lo port 3306 -s 65535 -xnq -tttt \
| perl mk-query-digest --type tcpdump --filter 'print Dumper $event' I’ll test this by leaving it running in one terminal, and running a malformed query, such as ‘SELECT’ without any FROM, in another terminal: mysql> select; ERROR 1064 (42000): You have an error in your SQL syntax...  Good enough for me. When I did this, mk-query-digest printed the following: $VAR1 = {
Error_no => '#1064',
No_good_index_used => 'No',
No_index_used => 'No',
Query_time => '0.000316',
Rows_affected => 0,
Warning_count => 0,
arg => 'select',
bytes => 6,
cmd => 'Query',
db => undef,
fingerprint => 'select',
host => '127.0.0.1',
ip => '127.0.0.1',
port => '39640',
pos_in_log => '0',
ts => '091101 14:54:44.293453',
user => undef
};

So the $event is a hash with an entry called Error_no. (There is a comprehensive reference to the structure of a query event in the Maatkit wiki, but I often find this technique faster than looking up the reference.) Now we’re ready to build a filter that’ll snag queries with errors, and print them out in slow-query-log format. Due to an oddity of the way the Error_no is reported for queries that do NOT have an error, I need to explicitly filter by queries that don’t say “none”. The final filter code, with a little sanity check to prevent crashing if it’s ever undefined, is just: --filter '($event->{Error_no} ||"") ne "none"'

Sorry to disappoint if you were expecting something more complicated!

### Mission accomplished

The final mk-query-digest command is as follows:

tcpdump -i lo port 3306 -s 65535 -xnq -tttt \
| perl mk-query-digest --type tcpdump \
--filter '(\$event->{Error_no} || "") ne "none"' --print

If I now run a bunch of queries, some with errors, I’ll see those with errors get printed out. Let’s try:

mysql> select 1; select current_date; select; set global nono=1;select 1;

And the result:

# Time: 091101 15:23:40.983195
# Client: 127.0.0.1:39640
# Query_time: 0  Lock_time: 0  Rows_sent: 0  Rows_examined: 0
select;
# Time: 091101 15:23:40.983457
# Client: 127.0.0.1:39640
# Query_time: 0  Lock_time: 0  Rows_sent: 0  Rows_examined: 0
set global nono=1;

Presto, we have a way to catch all queries causing errors.

### Benefits

There are a lot of benefits to doing things this way. Of course, we can do all the usual things with the queries (filter, aggregate, report, save to a file and analyze with any of a number of tools, store to the database…). But even better, we can do that at any time, without having to install MySQL Proxy or do anything else disruptive to the system. In fact, we can even dump the tcpdump output to a file and take it elsewhere to examine it – there is no need to even have Perl or the Maatkit tools on the server you want to examine. This is one of the nice things about not coupling the analysis and collection tightly together, which is unique to mk-query-digest as far as I know.

I'm Baron Schwartz, the founder and CEO of VividCortex. I am the author of High Performance MySQL and lots of open-source software for performance analysis, monitoring, and system administration. I contribute to various database communities such as Oracle, PostgreSQL, Redis and MongoDB. More about me.


text:
Nemo_Sol - 8 months ago 54
Java Question

# How to bind Borderpane left property to node with JavaFX

How would I go about changing the borderpane's left property to a certain node whenever an integer variable is changed? What type of ObjectProperty do I use and how do I bind this as well as listen to the integer variable?

BorderPane border = new BorderPane();
IntegerProperty intProp = new SimpleIntegerProperty();

border.leftProperty().bind(Bindings.createObjectProperty(
() -> {
int value = intProp.get();
Node node = getLeftNodeForValue(value);
return node ;
},
intProp));

Where getLeftNodeForValue(...) is just a method that retrieves the appropriate node for a give integer value.

Alternatively, just use a listener instead of a binding:

intProp.addListener((obs, oldValue, newValue) ->
border.setLeft(getLeftNodeForValue(newValue.intValue())));


text:
# Is there a way to use the ContentManager with full directory paths

So i want to figure out a way to use the ContentManager.Load method with full directory paths, so lets say

Content.Load<T>(@"Images\SomeImage");

becomes

Content.Load<T>(@"C:\Users\UserName\Documents\Visual Studio 2013\Projects\MyProject\Content\SomeImage");

• The resources are packaged with your game and you have no control over where its installed if you distribute it. I don't see a practical application for doing this. Nov 24 '14 at 0:21
• Why do you want to do this? It seems extremely limiting and pointless.
– user1430
Nov 24 '14 at 1:49
• Given the map-editor tag, and his previous question, I think he wants to load a precompiled asset from outside of the application/games content directory.
– Seta
Nov 24 '14 at 3:14
• Fair enough, seems you would just want to load them in with Texture2D.FromStream in that case though. Additionally since you would probably want to package the images with the map coping the images to the content directory to group them with the associated map. Nov 24 '14 at 15:19

Set Game.Content.RootDirectory to the path you want and then just specify the file name portion. But keep in mind that you still have to include them in the Content project.