Caringal Activity 9 Application of System of Linear Equation

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Name: Caringal, Ken Rhanley B.

Date: September 21,2022

Math-022B/CPE21S2/Mon-Fri/7:30am-10:30am Mathlab Activity 9

Honor Pledge:

“I affirm that I have not given or received any unauthorized

help on this activity, and that this work is my own.”

Applications of System of Linear Equation

1. Objective(s):

1.1 To solve homogenous system of linear equation.


1.2 To setup and solve a system of equations to fit a polynomial function and set a data points as
well as to represent a network.
2. Intended Learning Outcomes (ILOs):

The students shall be able to:


2.1 Demonstrate scientific thinking and the ability to approach scientific resources intelligently.
2.2 Utilize MATLAB software in solving linear algebra problems related to their fields of
specialization.
2.3 Infer appropriate conclusions based upon the results of activity.
2.4 Reflect on personal transformation along the TIP graduate attributes, specifically,
professionalcompetence and critical thinking skills.
3. Discussion:
Systems of linear equations are set of equations that deal with all together at once. This is
arising in a wide variety of applications and one of the central themes in linear algebra. The
polynomial curve fitting, networks and Kirchhoff’s laws of electricity are examples of application of
systems of linear equations.

A polynomial curve fitting is a procedure where represented by n points in the xy-plane,


(x1,y1),(x2,y2),…,(xn,yn) a collection of data of polynomial function of degree n – 1 where p(x) =
a0 + a1x
+ a2x +…+ an-1xn-1 whose graph passes through the specified points.
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 flowinto 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 each
current can be solve by using the matrix equation RI = V. By solving the augmented matrix
(reducing the matrix to reduce echelon form), values of I1, I2,and I3 can be determined. The
matrix equation can be very useful when large circuits with many loops are to be analyzed.

4. Procedure:

Activity 1.

Polynomial curve fitting The net profits (in millions of Pesos) for instant powdered milk
drink from 2010 to 2017 are shown in the table

Year (x) Net Profit, P(x)


2010 9421
2011 10003
2012 10384
2013 10526
2014 10930
2015 11215
2016 12599
2017 14410
a. Set up system of equations to fit the data for the years 2010 to 2017 in n – 1 model.

b. Solve the system


Procedure:

1.) Identify all the given information from the problem.

To identify all of the given information from the problem, we will let z = (x – 2013). This
procedure is crucial, for step two, where we will setup a system equation to fit the data for each and
every specified years.

let z = (x – 2013)

(2010-2013) = -3
(2011-2013) = -2
(2012-2013) = -1
(2013-2013) = 0
(2014-2013) = 1
(2015-2013) = 2
(2016-2013) = 3
(2017-2013) = 4

(-3, 9421), (-2, 10003), (-1 10384), (0, 10526),

(1,10930), (2,11215), (3,12599), (4, 14410)


2.) Setup system of equations to fit the data for the specified years to a n – 1

model, let z = (x – 2013),


P(z) = a0 + a1z + a2z2 + a3z3 + a4z4 + a5z5 + a6z6 + a7z7

We have a total of 8 system of equations, we will substitute each of them to p(z) to form a
Matrix to find the approximate solution of the system.

If (-3,9942)
Then 9421 = (𝑎 + 𝑎 (−3) + 𝑎 (−3) + 𝑎 (−3) + 𝑎 (−3) + 𝑎 (−3) + 𝑎 (−3) + 𝑎 (−3) )
9421 = (𝒂𝟎 − 𝟑𝒂𝟏 + 𝟗𝒂𝟐 − 𝟐𝟕𝒂𝟑 + 𝟖𝟏𝒂𝟒 − 𝟐𝟒𝟑𝒂𝟓 + 𝟕𝟐𝟗𝒂𝟔 − 𝟐𝟏𝟖𝟕𝒂𝟕)

If (-2, 10003)
Then 10003 = (𝑎 + 𝑎 (−2) + 𝑎 (−2) + 𝑎 (−2) + 𝑎 (−2) + 𝑎 (−2) + 𝑎 (−2) + 𝑎 (−2) )
10003 = ( 𝒂𝟎 − 𝟐𝒂𝟏 + 𝟒𝒂𝟐 − 𝟖𝒂𝟑 + 𝟏𝟔𝒂𝟒 − 𝟑𝟐𝒂𝟓 + 𝟔𝟒𝒂𝟔 − 𝟏𝟐𝟖𝒂𝟕)

If (-1, 10384)
Then 10384 = (𝑎 + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) )
10384 = (𝒂𝟎 − 𝒂𝟏 + 𝒂𝟐 − 𝒂𝟑 + 𝒂𝟒 − 𝒂𝟓 + 𝒂𝟔 − 𝒂𝟕 )

If (0, 10384)
Then 10384 = (𝑎 + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) )
10384 = ( 𝒂𝟎 )

If (1, 10384)
Then 10384 = (𝑎 + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) )
10384 = (𝒂𝟎 + 𝒂𝟏 + 𝒂𝟐 + 𝒂𝟑 + 𝒂𝟒 + 𝒂𝟓 + 𝒂𝟔 + 𝒂𝟕 )

If (2, 10384)
Then 10384 = (𝑎 + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) )
10384 = ( 𝒂𝟎 + 𝟐𝒂𝟏 + 𝟒𝒂𝟐 + 𝟖𝒂𝟑 + 𝟏𝟔𝒂𝟒 + 𝟑𝟐𝒂𝟓 + 𝟔𝟒𝒂𝟔 + 𝟏𝟐𝟖𝒂𝟕)

If (3, 10384)
Then 10384 = (𝑎 + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) )
10384 = ( 𝒂𝟎 + 𝟑𝒂𝟏 + 𝟗𝒂𝟐 + 𝟐𝟕𝒂𝟑 + 𝟖𝟏𝒂𝟒 + 𝟐𝟒𝟑𝒂𝟓 + 𝟕𝟐𝟗𝒂𝟔 + 𝟐𝟏𝟖𝟕𝒂𝟕)

If (4, 10384)
Then 10384 = (𝑎 + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) + 𝑎 (−1) )
10384 = ( 𝒂𝟎 + 𝟒𝒂𝟏 + 𝟏𝟔𝒂𝟐 + 𝟔𝟒𝒂𝟑 + 𝟐𝟓𝟔𝒂𝟒 + 𝟏𝟎𝟐𝟒𝒂𝟓 + 𝟒𝟎𝟗𝟔𝒂𝟔 + 𝟏𝟔𝟑𝟖𝟒𝒂𝟕 )
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 augmented matrix, name the matrix as A.
d. Find the reduced row echelon form of the matrix using the command “rats(rref(A))”.
The last column of the reduced row echelon form will be the values of a0, a1, a2 to a7.

Augmented Matrix

The following picture below is the result of using rats(rref(A))

1 0 0 0 0 0 0 0 10526
0 1 0 0 0 0 0 0 3863 / 11
0 0 1 0 0 0 0 0 1326 / 7
0 0 0 1 0 0 0 0 -1729 / 16
0 0 0 0 1 0 0 0 -447 / 7
0 0 0 0 0 1 0 0 191 / 6
0 0 0 0 0 0 1 0 38 / 7
0 0 0 0 0 0 0 1 -47 / 24
4.) Write the polynomial function model. ( coefficients are in fraction )

z = (x – 2013),

P(z) = a0 + a1z + a2z2 + a3z3 + a4z4 + a5z5 + a6z6 + a7z7

By substituting the last column of the calculated matrix, the given


polynomial function model was formed below.

𝟑𝟖𝟔𝟑 𝟏𝟑𝟐𝟔 2 𝟏𝟕𝟐𝟗 3 𝟒𝟒𝟕 4 𝟏𝟗𝟏 5 𝟑𝟖 6 𝟒𝟕 7


P(z) = 10526 + z+ z - z - z + z + z - z
𝟏𝟏 𝟕 𝟏𝟔 𝟕 𝟔 𝟕 𝟐𝟒

To predict the value of net profit for following years. Z = ( x – 2013 ). Where x is the year
to predict net profit. For example, 2020 – 2013 = 7. 7 will be substitute to all of the z on

𝟑𝟖𝟔𝟑 𝟏𝟑𝟐𝟔 2 𝟏𝟕𝟐𝟗 3 𝟒𝟒𝟕 4 𝟏𝟗𝟏 5 𝟑𝟖 6 𝟒𝟕 7


P(z) = 10526 + z+ z - z - z + z + z - z
𝟏𝟏 𝟕 𝟏𝟔 𝟕 𝟔 𝟕 𝟐𝟒

5.) Predict the value of net profit in the following years.


substitute x(year) in z = (x – 2013)

Year (x) Net Profit, P(x)


2020 - 607 203
2023 - 1.1685e+07
2030 - 6.3314e+08
2035 - 4.1212e+09
2038 - 1.0343e+10
2042 - 2.9947e+10
2045 - 6.0461e+10
2050 -1.6990e+11
The used syntax for predicting the table is show below.
Is the polynomial function model a reasonable model in predicting future net profits? Explain.

No.It is okay to reference for polynomial function model to predict future net profits. But
in reality, profits are unpredictable. Just like how the table of predicting future net
profits, all of it is in negative. Once they see this, there is a high chance that the owner
of this business will shut it down immediately.The polynomial function model finds a
sequence within the preciding profit of the year table. In reality, there will be ups and
down of having profits, it is not always to be progressing. So it is not really a good way
to put your faith on using polynomial function model to predict future net profits. Use it
just a reference, but don’t use it for predicting your future net profits.

Activity 2. Network Analysis

The flow of traffic (in vehicles per hour) through a network of street is shown in figure 1.

Figure 1.0

Solve this system for xi, i= 1,2,3,4,5,6 and 7

1. Find the linear equation in each junction.

Junction 1: x1 + x3 = 600
Junction 2: x1-x2-x4 =0
Junction 3: x2 + x5 = 500
Junction 4: x3+ x6 = 600
Junction 5: x4 – x6 + x7 = 0
Junction 6: x5 + x7 = 500
2. Using MATLAB solve for the traffic flows x1, x2, x3, x4, x5, x6,and x7
a. Write the linear equations involve in each junction.
b. Write the linear system of equation in augmented matrix form.
c. Input the augmented matrix form in MATLAB and name as “A”.
d. Find the reduce row echelon form of the augmented matrix using the
command “rref(A)” then press enter.
e. To solve the values of x1 to x7 use Back-Substitution and use parameter
(t, s, u).

Augmented Matrix

1 0 0 0 0 -1 0 0
0 1 0 0 0 0 -1 0
0 0 1 0 0 1 0 600
0 0 0 1 0 -1 1 0
0 0 0 0 1 0 1 500
0 0 0 0 0 0 0 0
by using the rref(B). the result was shown below

By using back to back substitution, the table below will be solved.

Write the values( in parameters ) of x1 to x7 on the table below:


X Flow (Vehicle Per Hour)
𝑥 s
𝑥 t
𝑥 600-s
𝑥 s-t
𝑥 500-t
𝑥 s
𝑥 t
Using the table above as a guide, we will substitute the given
number on variable x6 and x7 on the table #2. By doing so,
we will be able to solve the table on number 3 and 4.

3. Use the traffic flow when x6 = 410 and x7 = 125.


Solve for the flows on x1, x2, x3, x4, and x5.

X Flow (Vehicle Per Hour)


𝑥 410
𝑥 125
𝑥 190
𝑥 285
𝑥 375
𝑥 410
𝑥 125
same process as table #3. But we will find for s and t. where 600-s = 378,
and 500 – t = 225. We will be able to find s and t and fill the blanks
to be able to solve for all of the blank in the table.

4. Find the traffic flow when x5 = 225 and x3 = 378.


Solve for the flows on x1, x2, x4, x6, and x7
X Flow (Vehicle Per Hour)
𝑥 222
𝑥 275
𝑥 378
𝑥 -53
𝑥 225
𝑥 222
𝑥 275

Conclusion:

In Conclusion, the students were able to identify, solve, and show the solution to the
given problem. The student were also able to solve homogenous system of linear
equation, set up all of the data that was need for predicting the flow of vehicles, and the
net profit of a company. The student uses matlab to prevent any further calculation error
that could be foresaw from manually computing a problem. Furthermore, the intended
learning outcomes were satisfied by the student. There were also difficulties that the
student were encountered, but was eventually solved by the student. The student also
used different kind of reference to check and answer the given problem.

You might also like