ENGR 1990 Engineering Mathematics Applications of Systems of Linear, Algebraic Equations in ME 2560 Commonly Used Methods Consider a system of n linear algebraic equations in n unknown variables x1 , x2 ,", xn . The equations may be written algebraically or in matrix form as a11 x1 + a12 x2 + " + a1n xn = b1 a21 x1 + a22 x2 + " + a2 n xn = b2 # an1 x1 + an 2 x2 + " + ann xn = bn or [ A]{ x} = {b} (1) Here, [ A] is an n × n matrix of coefficients, { x} is the n × 1 vector of unknowns, and {b} is an n × 1 vector of known values. That is, [ A]n×n ⎡ a11 a12 " a1n ⎤ ⎢a a22 " a2 n ⎥ 21 ⎢ ⎥ = ⎢ # # # # ⎥ ⎢ ⎥ ⎣ an1 an 2 " ann ⎦ ⎧ x1 ⎫ ⎪x ⎪ { x} = ⎪⎨ 2 ⎪⎬ ⎪#⎪ ⎪⎩ xn ⎭⎪ ⎧ b1 ⎫ ⎪b ⎪ {b} = ⎪⎨ 2 ⎪⎬ ⎪#⎪ ⎩⎪bn ⎭⎪ Four commonly used methods used to solve these equations, that is, find the vector of unknowns { x} that satisfies the equations are o o o o Graphical Method Substitution (or Gaussian Elimination) Cramer’s Rule Matrix Inversion What if we cannot find a solution? In general, Eq. (1) may or may not have a solution. If we find that no solution exists, then from an engineering prospective, there are two possibilities. We have either failed to describe the physical problem correctly, or the physical problem itself has no solution. It is up to us as engineers to determine which is the case. As we apply the above methods, we will see the conditions under which no solution exists. 1/5 Example: ME 2560 Statics B Given: The weight W = 500 (lb) . 5 3 30o C 4 Find: The forces in the cables AB and AC required to hold the weight in equilibrium. A Solution: For point A to be in equilibrium, the sum of all forces acting there must be zero. Using the free body diagram, FAB FAB + FAC + W = 0 where FAB = ( FAB − 54 i W (2) 3 j FAC 5 30o 4 + j ) (lb) 3 5 A FAC = FAC ( cos(30) i + sin(30) j ) = FAC ( 3 2 i ) + j (lb) 1 2 W = −500 j (lb) i W Free body diagram Substituting into Eq. (2): FAB ( − 54 i + 53 j ) + FAC (− 4 5 FAB + 3 2 ) ( 3 2 i ) + 12 j + ( −500 j ) = 0 FAC i + ( 53 FAB + 12 FAC − 500 ) j = 0 This last equation can be written as two linear, algebraic equations for the unknowns FAB and FAC . To find these forces, we must solve the equations simultaneously. − 54 FAB + 3 2 3 1 5 FAB + 2 FAC = 0 FAC = 500 Graphical Method: In this method, we think of each equation as the equation of a line, and look for the intersection of the two lines. That point would be a solution to both equations. − 54 FAB + 3 5 FAB 3 2 FAC = 0 ⇒ + 12 FAC = 500 ⇒ FAB = 583 FAC = 1.0825FAC 5 5 FAB = 2500 3 − 6 FAC = 833.3 − 6 FAC 2/5 Intersection of Force Equations 1200.0 Force, FAB (lb) 1000.0 434.97, 470.86 800.0 600.0 400.0 200.0 0.0 0.0 200.0 400.0 600.0 800.0 1000.0 Force, FAC (lb) From the graph, we see that if FAC = 434.97 (lb) and FAC = 470.86 (lb) both equations are satisfied. Also, it is easy to visualize that no solution would exist if the two lines are parallel. In that case, there would be no intersection point. Substitution (Gaussian Elimination): In the method of substitution (or Gaussian Elimination), we solve the first equation for one of the variables, say the first one, and substitute that into the second equation. Then, use that equation to solve for the second variable. We can then substitute the results for the second variable into the first equation to solve for the first variable. − 54 FAB + 3 5 FAB 3 2 FAC = 0 ⇒ + 12 FAC = 500 ⇒ FAB = 583 FAC ( 3 5 3 5 8 ) FAC + 12 FAC = 500 ⇒ + )F ( 3 3 8 1 2 AC = 500 1.1495 or FAC = 500 / 1.1495 = 434.97 (lb) and FAB = 583 FAC = 1.0825 × 434.97 = 470.87 (lb) Substitution has the advantage of not requiring us to plot the functions, but it has the disadvantage of not understanding the condition under which no solution exists. We just immerse ourselves in the algebraic solution. 3/5 Cramer’s Rule: To use Cramer’s Rule, we first express our equations in matrix form, and then we calculate the unknowns one at a time. An illustration of how to apply Cramer’s Rule to a set of three equations follows. Extension of the rule to larger sets of equations should be obvious. ⎡ a11 a12 a13 ⎤ ⎧ x1 ⎫ ⎧ b1 ⎫ [ A]{ x} = {b} ⇒ ⎢⎢a21 a22 a23 ⎥⎥ ⎪⎨ x2 ⎪⎬ = ⎪⎨b2 ⎪⎬ ⎢⎣ a31 a32 a33 ⎥⎦ ⎪⎩ x3 ⎪⎭ ⎪⎩b3 ⎪⎭ The solution for each of the xi (i = 1,2,3) are calculated as follows ⎡ b1 a12 a13 ⎤ det ⎢b2 a22 a23 ⎥ ⎢ ⎥ ⎢⎣ b3 a32 a33 ⎥⎦ x1 = det [ A] ⎡ a11 b1 a13 ⎤ det ⎢ a21 b2 a23 ⎥ ⎢ ⎥ ⎢⎣ a31 b3 a33 ⎥⎦ x2 = det [ A] ⎡ a11 a12 b1 ⎤ det ⎢ a21 a22 b2 ⎥ ⎢ ⎥ ⎢⎣ a31 a32 b3 ⎥⎦ x3 = det [ A] Clearly, solutions can be found only if det [ A] ≠ 0 . We now return to our example from ME 2560 Statics. We first write our simultaneous force equations in matrix form, and then we solve for the two unknowns, individually. − 54 FAB + 3 2 3 1 5 FAB + 2 FAC ⎡ 0 det ⎢ ⎣⎢500 FAB = ⎡− 4 det ⎢ 5 3 ⎣⎢ 5 FAC ⎡ − 54 ⇒ [ A]{ f } = ⎢ 3 = 500 ⎣⎢ 5 3⎤ F 2 ⎧ AB ⎫ = ⎥ 1 ⎨F ⎬ ⎥ 2 ⎦ ⎩ AC ⎭ FAC = 0 3⎤ 2 ⎥ 1 ⎥ 2 ⎦ 3⎤ 2 ⎥ 1 ⎥ 2 ⎦ ⎧ 0 ⎫ ⎬ ⎩500 ⎭ {b} = ⎨ ( (0 × ) − ( × 500) ) = −433.013 = 470.86 (lb) = ( (− × ) − ( × ) ) −0.9196 3 2 1 2 4 5 1 2 3 2 3 5 ⎡ − 54 0 ⎤ det ⎢ 3 ⎥ 500 ⎦ ( (− 54 × 500) − (0 × 53 ) ) −400 5 ⎣ = = = = 434.97 (lb) −0.9196 ⎡ − 54 23 ⎤ (− 54 × 12 ) − ( 23 × 53 ) det ⎢ ⎥ 1 ⎢⎣ 53 2 ⎥ ⎦ ( ) 4/5 Matrix Inversion: To use Matrix Inversion, we again express our equations in matrix form. Then, we multiply both sides of the equation by the inverse of the coefficient matrix. [ A]{ x} = {b} ⇒ [ A] [ A]{ x} = [ A] {b} −1 −1 ⇒ { x} = [ A] {b} −1 Calculating the inverse of a matrix can be quite tedious for larger matrices. However, we will work only with 2 × 2 matrices for which it is easy to calculate the inverse. For a 2 × 2 matrix, ⎡a [ A] = ⎢ a11 ⎣ 21 a12 ⎤ ⇒ a22 ⎥⎦ ⎡ a22 − a12 ⎤ ⎡ a22 −a12 ⎤ ⎢ −a ⎥ ⎢ −a a11 ⎦ a11 ⎥⎦ −1 21 21 ⎣ ⎣ = [ A] = det [ A] ( a11a22 − a12a21 ) Clearly, [ A] exists only if det [ A] ≠ 0 . −1 We now return again to our example. We again write our simultaneous force equations in matrix form, and then we solve for the two unknowns. ⎡ − 54 = A f [ ]{ } ⎢ 3 ⎢⎣ 5 3⎤ F 2 ⎧ AB ⎫ = ⎥ 1 ⎨F ⎬ 2 ⎥ ⎦ ⎩ AC ⎭ ⎧ 0 ⎫ {b} = ⎨ ⎬ ⇒ ⎩500 ⎭ ⎡ 12 ⎧ FAB ⎫ −1 1 ⎨ ⎬ = [ A] {b} = −0.9196 ⎢ 3 ⎢⎣ − 5 ⎩ FAC ⎭ ⎡ 12 −1 1 = A [ ] −0.9196 ⎢ 3 ⎢⎣ − 5 3⎤ 0 ⎫ ⎧470.87 ⎫ 2 ⎧ ⎥ ⎨ ⎬=⎨ ⎬ − 54 ⎥⎦ ⎩500 ⎭ ⎩434.97 ⎭ − 3⎤ 2 ⎥ − 54 ⎥⎦ − (lb) 5/5