Activity 2
Activity 2
2
Applications of System of Linear Equations
1. Objective(s):
Systems of linear equations are set of equations that you deal with all together at once. This is arising in
wide variety of applications and one of the central themes in linear algebra. The polynomial curve fitting,
networks and Kirchhoff’s laws for electricity are examples of application of systems of linear equations.
Suppose a collection of data is represented by n points in the xy-plane, (x1,y1),(x2,y2),…,(xn,yn) And you
are ask to find a polynomial function of degree n-1 p(x) = a0 + a1x + a2x +…+ an-1xn-1 whose graph passes
through the specified points. This procedure is called polynomial curve fitting.
Networks composed of branches and junctions are used as models in many diverse fields such as
economics, traffic analysis and electrical engineering. In such models it is assumed that the total flow into
the junction is equal to the total flow out of the junction and this is represented by a linear equation. When
analyzing an electric circuit, one simple technique uses the idea of Kirchhoff’s voltage law. Kirchhoff’s
voltage law states that the algebraic sum of the voltages around any closed path in a circuit is identically
zero for all time. Using Ohm’s law, each equation can be written in the form RI = V (similar to Ax = b).
Putting these equations into matrices lets us solve for each current by using the matrix equation RI = V. By
solving the augmented matrix (reducing the matrix to reduced echelon form), values of I1, I2, and I3 can
be found. The matrix equation can be very useful when large circuits with many loops are too be analyzed.
4. Resources:
MATLAB Software
Textbook: Larson, R. & Falvo, D. (2011), Linear Algebra. Singapore: Cengage Learning Asia Pte. Ltd.
5
5. Procedure:
The net profits (in millions of dollars) for Microsoft from 200 to 2007 are shown in the table. (source:
Microsoft corporation)
a. Set up system of equations to fit the data for the years 2001, 2003, 2005 and 2007 to a cubic
model.
b. Solve the system. Does the solution procedure a reasonable model for predicting future net profits?
Explain.
Procedure:
1. Identify all the given information from the problem.
2. Setup system of equations to fit the data for the specified years to a cubic model,
P(x) = a0 + a1x + a2x2 + a3x3
3. Using MATLAB find the approximate solution of the system.
a. Find all the systems of linear equations involved
b. Write the system in matrix form to find the unknown coefficients.
c. Using MATLAB input the matrix formed, name the matrix as A.
d. Find the reduced row echelon form of the matrix using the command “rref(A)” then press enter.
e. The last column of the reduced row echelon form will be the values of a0, a1, a2 and a3.
4. Write the polynomial function model.
p(x) =__+ __x + __x2 + ___x3
5. To predict the value of net profit in the following year.
Year Profit
1998 17067.25
1999 13306
2008 14397.25
2009 13451
2010 11301.25
6
Network Analysis
The flow of traffic (in vehicles per hour) through a network of street is shown in figure 1.
Fig. 1
2. Using MATLAB solve for the traffic flows x1, x2, x3, x4, x5, x6,and x7
a. Write the linear equations involve in each junctions.
b. Write the linear system of equation in augmented matrix form.
c. To solve for the values of x flows use the Gauss-Jordan elimination to obtain the reduced
row echelon form.
d. Input the augmented matrix form in MATLAB and name as “A”.
e. Find the reduce row echelon form of the augmented matrix using the command “rref(A)”
then press enter. The last column will indicate the values of respectively.
7
3. Find the traffic flow when x6 = x7 = 0.
a. Write the new augmented matrix form using x6 = x7 = 0.
b. Use the same procedure to solve for the flows on x1, x2, x3, x4, and x5
X Flow (vehicles per hour)
x1 0
x2 0
x3 600
x4 0
x5 500
x6 0
x7 0
8
P(x) = 22595-6501(x)+4073/4(x2) - 45(x3)
#2-4
7. Conclusion:
In this experiment, getting the roots is much easier using Matlab. Matlab does not just make
equations easier to solve, it also makes things possible like solving 1000 equation not
consuming too much time.
9
8. Assessment (Rubric for Laboratory Performance):
Rating =
(Total Score / 24) x 50 + 50%
10