 Home Mathematics  # Models with Unique Solutions Using Systems of Linear Equations

Let’s use the method of joints to analyze the Warren truss from the Introduction.

Example 5.3. Analysis of a Truss by the Method of Joints.

A segment of a Warren truss with vertical supports that is fixed at the lower left endpoint pi, and can move horizontally at the lower right endpoint pi is displayed in Figure 5.5. The pin-joints of the truss are at p, p2, рз, and Pi. A load of 10 kilonewtons (lcN) is placed at joint рз; the forces on the truss with magnitudes fi, /2, /3, /4, and /5 are indicated in the figure. The stationary support member has a horizontal force F and a vertical force F2: the horizontally movable support member has only a vertical force F3. FIGURE 5.5: A Warren Truss with Vertical Supports Segment

Since the truss is in static equilibrium, Newton’s Law for equilibrium of forces implies that the sum of the force vectors at each joint must be the zero vector. Therefore, the sum of the horizontal components of the forces and the sum of the vertical components must each be zero.

Begin with joint pi, the fixed joint at the lower left of the truss. Both f and /2 are forces into p, while forces F and F2 pull away from pi. Force /1 acts at angle of 7t/4 which resolves into the horizontal component (/2/2)/i and vertical component (p/2/2)f. These forces are at equilibrium, so that Next, we consider joint P2 at the top of the truss segment. Both /1 and /3 pull away, while /4 acts into the joint. Resolving the angular forces and summing gives Complete the model for the forces at each joint and place the force vector equations in Table 5.1. Verify that these are correct!

TABLE 5.1: Forces on the Truss’s .Joints

 Joint Horizontal Component Vertical Component Pi  Pi  Рз  Pi  Write this model as a system of equations in matrix notation Ax = b with 8 equations in 8 unknowns: Enter the augmented matrix, and then reduce the matrix using ReducedRowEchelonForm. Interpret the results to solve the problem.

As this matrix is large (for entering by hand, that is), use the Matrix palette to enter it. Set the size to 8 x 9, click the “Insert Matrix” button, then fill in the entries. Note that we used evalf to force decimal arithmetic.

We interpret the solution of the linear system as the magnitude of the forces: Fx = 0, F2 = -23660.25, F3 = -13660.25, /, = -33460.65, f2 = 23660.25, /3 = 10000, /4 = -27320.51, and /5 = 23660.25.

This problem is continued as an exercise at the end of the section.

Wassily Leontief, recipient of the 1973 Nobel Prize in Economics, explained his input-output model showing the interdependencies of the U.S. economy in the April 1965 issue of Scientific American. He organized the 1958 American economy into an 81 x 81 matrix. The 81 sectors of the economy, such as steel, agriculture, manufacturing, transportation, and utilities, each represented resources that rely on input from the output of other resources. For example, the production of clothing requires an input from manufacturing, transportation, agriculture, and other sectors. The following is a brief example of a Leontief model and its solution.

Example 5.4. A Leontief Input-Output Economic Model.

Consider an open production model, one that doesn’t consume all of its production, where to produce 1 unit of output (units are in millions of dollars):

• • the petroleum sector requires 0.1 units of itself, 0.2 units of transportation, and 0.4 units of chemicals;
• • the textiles sector requires 0.4 units of petroleum, 0.1 units of itself, 0.15 units of transportation, 0.3 units of chemicals, and 0.35 units of manufacturing;
• • the transportation sector requires 0.6 units of petroleum, 0.1 units of itself, and 0.25 units of chemicals;
• • the chemicals sector requires 0.2 units of petroleum, 0.1 units of textiles, 0.3 units of transportation, 0.2 units of itself, and 0.1 units of manufacturing;
• • the manufacturing sector requires 0.1 units of petroleum, 0.3 units of transportation, and 0.2 units of itself.

Table 5.2 shows the technology matrix representing this model.

TABLE 5.2: Leontief Input-Output Table for Our Five-Sector Economy

 Purchased From Input Consumed per Unit of Output Petrol. Textiles Transport. Chemicals Manufact. Petrol. 0.1 0.4 0.6 0.2 0.1 Textiles 0.0 0.1 0.0 0.1 0.0 Transport. 0.2 0.15 0.1 0.3 0.3 Chemicals 0.4 0.3 0.25 0.2 0.0 Manufact. 0.0 0.35 0.0 0.1 0.2

The entries of Table 5.2 form the consumption matrix C for this economy. We use C to answer Leontief’s question, “Is there a production level that will balance the total demand?” Let the vector x be the total production of the economy, and let the vector d be the final demand, the demand external to production. Then Cx is the intermediate demand, the amount of production consumed internally by the individual sectors of the economy. The Leontief Exchange Input-Output model, or Production Equation, is Let I be the identity matrix. We can solve for x as follows. If the economy produces 900 million dollars of petroleum, 300 million dollars of textiles, 850 million dollars of transportation, 800 million dollars of chemicals, and 750 million dollars of manufacturing, how much of this production is internally consumed by the economy?

Use Maple to enter the augmented matrix L = [C | d] and row reduce it. Remember to load LinearAlgebra first. We interpret the unique solution as the amounts the sectors need to produce to meet the total demand: We studied the method of least squares in Chapter 5 of Volume 1. We used multivariable calculus to minimize the sum of squares of the errors leading to least squares in Chapter 4, Volume 2. Now, we will consider least squares curve fitting as solving a system of linear equations.

The sum of squares of the errors from fitting a parabola f(x) = ax2+bx+c is given by To minimize S, first set the first partial derivatives equal to 0 and then solve the resulting system. After a little algebra, we have the normal equations Rewrite these equations as a system of linear equations. Observe the pattern in the equations; what would the system be for a cubic fit?

Example 5.5. A Least Squares Model as a System of Equations.

Fit a quadratic model fix) = ax2 + bx + c to the following data:

 X 0 1 2 3 4 У 62 50 39 18 2

Substitute the following into (5.1). We have the linear system Enter the augmented coefficient matrix for the system into Maple and row reduce to find the solution. The output yields a = —197/111. b = —326/36, and c = 11557/185. Therefore, the quadratic model for our data is Check the fit. The plot shows visually that the fit captures the trend of the data.

Our next example of an application of systems of linear equations is a different method of fitting a curve to data: this time, smoothly connecting data points via cubic polynomials to form a piecewise curve. These curves are called “cubic splines,” cubic for the third degree and spline after the flexible draftsman’s ruler originally used to draw the curves. The data points are called “knots.” Pierre Bezier, a French design engineer at Renault, introduced using splines for designing auto bodies in the 1960s. Splines are ubiquitous today, appearing in numerous applications. TrueType, developed by Apple in the 1990s, uses two-dimensional quadratic splines to form the characters on your phone or computer screen, and PostScript, developed by Adobe in the 1980s, uses two-dimensional cubic splines for printed characters.

Example 5.6. Natural Cubic Splines as a System of Equations.

Fit a natural cubic spline to the data

 X 7 14 21 28 35 42 У 125 275 800 1200 1700 1650

We will need 5 third order equations. There are 20 unknowns: so we need 20 equations to uniquely solve

for these unknowns. The (x, y) data pairs give 10 equations, ,\$'i (7) = 125, Si(14) = 275, S2(14) = 275, S'2(21) = 800, and so forth. We need 10 more equations.

To make the spline smooth, we require the curve to have both first and second derivatives equal, i.e., match slope and concavity, at the knots (data points). So, for i = 1..4, make These requirements give us 8 more equations. For the last two equations, use the condition for “natural” splines: We have the requisite 20 equations. Let’s use Maple to build the equations, the augmented coefficient matrix, and find the spline.

First, we load the needed packages and enter the data. We define the individual cubic functions using an “indexed procname” to make the code more general. Now define the natural cubic spline function for our 6 point data set. In order to avoid some convoluted statements, we’ll define the cubic segment’s derivative functions directly. Let’s calculate the 3 sets of equations that make up the system of 20 linear equations. Displaying the sets as vectors make them much easier to read. Get a list of the variables of the system: the coefficients of the equations. Use Linear Algebra's GenerateMatrix to create the augmented matrix for the system. (To see the full matrices, execute interface(rtablesize= 50) before executing the next Maple command.) Compute the reduced row echelon form of A. Use LinearAlgebra's GenerateEquations to capture the values of the coefficients. Set the values of the coefficients. And plot the results. The natural cubic spline fits the data very well. Caution: do not use the spline outside the data! Plot over a larger range to see why.

Use Maple’s to verify that we have found the curve.

In general, to connect N knots (data points), we need N — 1 cubic equations. To set up the system of equations, we will need: 1

2(N — 2) equations matching the endpoints of the N — 1 connecting cubic curves,

• 2. (N — 1) equations matching the first derivatives at the N — 1 connecting points of the cubic curves,
• 3. (N — 1) equations matching the second derivatives at the Ar — 1 connecting points of the cubic curves,
• 4. • either 2 equations for natural cubic splines setting the second derivative of the left end of the first cubic and the right end of the last cubic to 0, or • 2 equations for clamped cubic splines setting the first derivative of the left end of the first cubic and the right end of the last cubic to given values.

Combining these equations gives a total of 4n — 4 equations for our system

with (N — 1) x 4 variables.

Exercises

• 1. A Bridge Too Far. Revisit the truss of Example 5.3. Set up and solve a model of the truss:
• (a) if the angles at joint pi and joint p,i are both 7r/3.
• (b) if the angles at joint pi and joint p,i are both 7t/4.
• (c) if the angles at joint pi and joint p,i are both 7r/6.
• 2. Consider the Leontief Input-Output model of Example 5.4.
• (a) Determine the solution for the following technology matrix:
 Petrol. Textiles Transport. Chem. Manufact. Petrol. 0.2 0.3 0.6 0.2 0.1 Textiles 0.0 0.2 0.0 0.1 0.0 Transport. 0.2 0.15 0.2 0.3 0.3 Chem. 0.4 0.35 0.25 0.2 0.0 Manufact. 0.0 0.35 0.0 0.1 0.2
• (b) If the economy now produces 1,000 million dollars of petroleum, 400 million dollars of textiles, 950 million dollars of transportation, 750 million dollars of chemicals, and 950 million dollars of manufacturing, how much of this production is internally consumed by the economy?
• 3. Use the least squares technique to fit the model /(ar) = kx2 to the following data:
 X 0.5 1 1.5 2 2.5 У 0.7 3.4 7.2 12.4 20.1

4. Use the least squares technique to fit the model W = kL3 to the following data:

 Length L 12.5 12.625 12.625 14.125 14.5 14.5 17.27 17.75 Weight W 17 16 17 23 26 27 43 49

5. Use cubic spline interpolation to fit the following sets of data points. Projects

Project 1. One of the main decisions that manufacturers have is to choose how much of a product to produce. Considering that an economy consists of producers of many things, this problem gets very complex very quickly. Leontief received the Nobel Prize in Economics in 1973 “for the development of the input-output method and for its application to important economic problems.” What we will discuss now comes from his work, hence the name Leontief Model. An example of such a model follows.

First, divide an economy into certain sectors. In reality, there are hundreds of sectors, but for the sake of simplicity, we will posit three sectors: manufacturing (m), electronics (e), and agriculture (a). We must decide how many units of each sector to produce, expressing the amounts as a production vector Now, let’s say that the public wants 100 units of manufacturing, 200 units of electronics, and 300 units of agriculture. Put this data into an (external) demand vector Now, one might say that if this is what the economy wants, then this is what should be produced; i.e., x = d. The problem, however, is that the production of certain resources actually consumes resources as well. In other words, it takes stuff to make stuff. How much is consumed by production can be expressed by using an input-output matrix. The matrix T indicates that the production of 1 unit of manufacturing uses up 0.1 units of manufacturing, 0.2 units of electronics, and 0.1 units of agriculture. The production of 1 unit of electronics uses up 0.2 units of manufacturing, 0.1 units of electronics, and 0.1 units of agriculture. Finally, the production of 1 unit of agriculture uses up 0.3 units of manufacturing, 0.3 units of electronics, and 0.1 units of agriculture. So, not only must we account for what the people want, but we must also make up for what is used up in the process of producing what the people want. The amount consumed by production is called internal demand, it is given by the product Tx. Hence, what we produce needs to satisfy both internal demand and external demand. That is, Using the matrix T above, determine the production vector x, also called the total demand, and the internal demand Tx for our three-sector economy.

Project 2. Wassily Leontief (1906-1999), the Russian-born, Nobel Prize winning American economist who, aside from developing highly sophist icated economic theories, also enjoyed trout fishing, ballet and fine wines. In this project, we will look at a very simple special case of his work called a closed exchange model.

Long, long ago, far, far away in the land of Eigenbazistan, in a small country town called Matrixville, there lived a Farmer, a Tailor, a Carpenter, a Coal Miner and Slacker Bob. The Farmer produced food; the Tailor, clothes; the Carpenter, housing; the Coal Miner supplied energy; and Slacker Bob made High Quality 100-Proof Moonshine, half of which he drank himself. Let’s make the following assumptions:

• • Everyone buys from and sells to the central pool (i.e., there is no outside supply or demand).
• • Everything produced is consumed.

This type of economy is called a closed exchange model. Table 5.3 specifies what fraction of each of the goods is consumed by each person in our town.

TABLE 5.3: Matrixville’s Closed Exchange Model

 Food Clothes Housing Energy Moonshine Farmer 0.25 0.15 0.25 0.18 0.20 Tailor 0.15 0.28 0.18 0.17 0.05 Carpenter 0.22 0.19 0.22 0.22 0.10 Coal Miner 0.20 0.15 0.20 0.28 0.15 Slacker Bob 0.18 0.23 0.15 0.15 0.50

So for example, the Carpenter consumes 22% of all food, 19% of all clothes, 22% of all housing, 22% of all energy and 10% of all High Quality 100 Proof Moonshine.

If the matrix I — T is invertible, the total demand equation, x = 7 x + d can be solved for x.

• (a) Determine С = IT using Table 5.3.
• (b) If possible, determine C~l.
• (c) If feasible, compute the total demand x for this closed exchange model.
• (d) For those who have studied linear algebra: what is the relation between the total demand x and the eigenvalues and eigenvectors of T, if any?

•  Wassily W. Leontief, “The Structure of the U.S. Economy,” Scientific American, April,1968, pp. 25-35.
•  Natural cubic splines mimic the original engineer’s flexible ruler by requiring that thesecond derivative of the spline at the two end data points be 0. “Clamped” cubic splinesuse specified values for the first derivative at the two end data points.
•  See https://www.nobelprize.org/prizes/economic-sciences/1973/leontief/biographical/.

 Related topics