Simultaneous Linear Equation

25
CHAPTER 2 LINEAR LINEAR EQUATIONS EQUATIONS and and SIMULTANEOUS SIMULTANEOUS LINEAR LINEAR EQUATIONS EQUATIONS Major: Chemical Engineering Subject: Chemical Engineering Mathematics 2 • Author: Andrew KUMORO Dept. of Chemical Engineering • Diponegoro University

description

SIMULTANEOUS LINEAR EQ

Transcript of Simultaneous Linear Equation

  • CHAPTER 2

    LINEAR EQUATIONS andSIMULTANEOUS LINEAR EQUATIONSMajor: Chemical EngineeringSubject: Chemical Engineering Mathematics 2

    Author: Andrew KUMORO

    Dept. of Chemical EngineeringDiponegoro University 2013

  • Linear equations

    Simultaneous linear equations with two unknowns

    Simultaneous linear equations with three unknownsSUB CHAPTER

  • LINEAR EQUATIONSSolution of simple equationsA linear equation in a single variable (unknown) involves powers of the variable no higher than the first. A linear equation is also referred to as a simple equation.

    The solution of simple equations consists essentially of simplifying the expressions on each side of the equation to obtain an equation of the form:

  • SIMULTANEOUS LINEAR EQUATIONS WITH TWO UNKNOWNS

    Solution by graphical methos

    Solution by substitution

    Solution by equating coefficients/Elimination

  • Simultaneous linear equations with two unknownsSolution by graphical methodLet us consider the following system of two simultaneous linear equations in two variable. 2x y = -1 3x + 2y = 9Here we assign any value to one of the two variables and then determine the value of the other variable from the given equation.

  • For the equation

    2x y = -1 ---(1) 2x +1 = y Y = 2x + 1

    3x + 2y = 9 --- (2)2y = 9 3x 9 - 3xY = ----------- 2

    X 0 2 Y 1 5 X 3 -1 Y 0 6

  • XXYY(2,5)(-1,6)(0,3)(0,1)X= 1Y=3

  • Simultaneous linear equations with two unknownsSolution by substitutionA linear equation in two variables has an infinite number of solutions. For two such equations there may be just one pair of x- and y-values that satisfy both simultaneously. For example:

  • Simultaneous linear equations with two unknownsSolution by equating coefficients/EliminationExample:

    Multiply (a) by 3 (the coefficient of y in (b)) and multiply (b) by 2 (the coefficient of y in (a))

  • Simultaneous linear equations with three unknowns

    With three unknowns and three equations the method of solution is just an extension of the work with two unknowns.

    By equating the coefficients of one of the variables it can be eliminated to give two equations in two unknowns. These can be solved in the usual manner and the value of the third variable evaluated by substitution.

  • Simultaneous linear equationsPre-simplificationSometimes, the given equations need to be simplified before the method of solution can be carried out. For example, to solve:

    Simplification yields:

  • Matrix Form of Linear EquationsA total of N algebraic equations for the N nodal points and the system can be expressed as a matrix formulation: [A][T]=[C]

  • Matrix form: [A][T]=[C].

    From linear algebra: [A]-1[A][T]=[A]-1[C], [T]=[A]-1[C]where [A]-1 is the inverse of matrix [A]. [T] is the solution vector.

    Matrix inversion requires cumbersome numerical computations and is not efficient if the order of the matrix is high (>10)Numerical Solutions

  • Numerical SolutionsGauss elimination method and other matrix solvers are usually available in many numerical solution package. For example, Numerical Recipes by Cambridge University Press or their web source at www.nr.com.

    For high order matrix, iterative methods are usually more efficient. The famous JACOBI ITERATION & GAUSS-SEIDEL ITERATION methods will be introduced in the following.

  • Iteration For Solving Simulatenous Linear Equations(k) - specify the level of the iteration, (k-1) means the present level and (k) represents the new level. An initial guess (k=0) is needed to start the iteration. By substituting iterated values at (k-1) into the equation, the new values at iteration (k) can be estimated The iteration will be stopped when maxTi(k)-Ti(k-1), where specifies a predetermined value of acceptable errorReplace (k) by (k-1)for the Jacobi iteration

  • Solve the following system of equations using (a) the Jacobi methos, (b) the Gauss Seidel iteration method.(a) Jacobi method: use initial guess X0=Y0=Z0=1, stop when maxXk-Xk-1,Yk-Yk-1,Zk-Zk-1 0.1 First iteration: X1 = (11/4) - (1/2)Y0 - (1/4)Z0 = 2 Y1 = (3/2) + (1/2)X0 = 2 Z1 = 4 - (1/2) X0 - (1/4)Y0 = 13/4EXAMPLE

  • Second iteration: use the iterated values X1=2, Y1=2, Z1=13/4X2 = (11/4) - (1/2)Y1 - (1/4)Z1 = 15/16Y2 = (3/2) + (1/2)X1 = 5/2Z2 = 4 - (1/2) X1 - (1/4)Y1 = 5/2

    FINAL SOLUTION [1.014, 2.02, 2.996]

    EXACT SOLUTION [1, 2, 3]

  • (b) Gauss-Seidel iteration: Substitute the iterated values into the iterative process immediately after they are computed.Immediate substitution

  • It takes three different ingredients A, B, and C, to produce a certain chemical substance. A, B, and C have to be dissolved in water separately before they interact to form the chemical. Suppose that the solution containing A at 1.5 g/cm3 combined with the solution containing B at 3.6 g/cm3 combined with the solution containing C at 5.3 g/cm3 makes 25.07 g of the chemical. If the proportion for A, B, C in these solutions are changed to 2.5, 4.3, and 2.4 g/cm3 , respectively (while the volumes remain the same), then 22.36 g of the chemical is produced. Finally, if the proportions are 2.7, 5.5, and 3.2 g/cm3, respectively, then 28.14 g of the chemical is produced. What are the volumes (in cubic centimeters) of the solutions containing A, B, and C?GROUP TASK 1

  • A garden supply centre buys flower seed in bulk then mixes and packages the seeds for home garden use. The supply center provides 3 different mixes of flower seeds: Wild Thing, Mommy Dearest and Medicine Chest.

    1) One kilogram of Wild Thing seed mix contains 500 grams of wild flower seed, 250 grams of Echinacea seed and 250 grams of Chrysanthemum seed. 2) Mommy Dearest mix is a product that is commonly purchased through the gift store and consists of 75% Chrysanthemum seed and 25% wild flower seed. 3) The Medicine Chest mix has gained a lot of attention lately, with the interest in medicinal plants, and contains only Echinacea seed, but the mix must include some vermiculite (10% by weight of the total mixture) for ease of plantingGROUP TASK 2

  • In a single order, the store received 17 grams of wild flower seed, 15 grams of Echinacea seed and 21 grams of Chrysanthemum seed. Assume that the garden center has an ample supply of vermiculite on hand.

    Use matrices and complete Gauss-Jordan Elimination to determine how much of each mixture the store can prepare.

  • Your company has three acid solutions on hand: 30%, 40%, and 80% acid. It can mix all three to come up with a 100 - gallons of a 39% acid solution. If it interchanges the a mount of 30% solution with the amount of the 80% solution in the first mix, it can create a 100 - gallon solution that is 59% acid. How much of the 30%, 40%, and 80% solutions did the company mix to create a 100- gallons of a 39% acid solution? GROUP TASK 3

  • A bakery displays the number of ounces of yogurt, wheat, and butter used in the production of one patch of its products. It uses 0.625 kg of yogurt, 0.625 kg of wheat and 0.625 kg of butter in a patch of rolls; 0.9375 kg of wheat and 0.9375 kg of butter in a patch of cookies; and 1.25 kgof yogurt and 1.25 kg of butter in a patch of bread. The bakery is supplied with 400 kg of yogurt, 350 kg of wheat, and 500 kg of butter, which must be used up completely. a . Put the above information in a table format.b. What is the maximum number of patches of all products that can be made to completely use up all the supplies?GROUP TASK 4

  • Last year you purchased shares in three Internet companies: OHaganBooks.com, FarmersBooks.com, and JungleBooks.com. The OHaganBooks.com cost you $50 per share, Far mersBooks.com stocks cost you $45 per share, and JungleBooks.com cost you $30 per share. You spent a total of $24,400, and purchased twice as many FarmersBooks.com shares as JungleBooks.com. The OHaganBooks.com stocks appreciated by 20%, while the other two appreciated by 10%, and you sold all the stocks for $3,440 more than you originally paid. How many stocks of each company did you originally purchase?GROUP TASK 5

  • THE END

    ****