Linear Methods

Download Report

Transcript Linear Methods

ENM 503 Block 2
Lesson 6 –Linear Systems
- Methods
straight lines and other
non-crooked objects
Narrator: Charles Ebeling
1
Block 2 Linear Systems



Lesson 6 The Methods of Linear Systems
Lesson 7 Matrix Algebra
Lesson 8 Modeling Linear Systems
Just 3 easy lessons!
Did you know: The shortest distance between two points is not
a straight-line when traveling on the surface of a sphere?
2
Cartesian Coordinates & Straight
Lines
y
Quadrant II
Quadrant I
3 __
B(x2,y2)
2 __
A(x1,y1)
1 __
|
|
|
|
-4
-3
-2
-1
|
-1 __
|
|
|
|
1
2
3
4
x
-2 __
-3 __
-4 __
Quadrant III
-5 __
Quadrant IV
3
Equations of a straight line - 1
General linear equation: Ax + By + C = 0
Solving for Y as the dependent variable: y = -C/B – Ax/B
let b = -C/B and m = -A/B, then
Slope – Intercept form: y = mx + b
where b is the y-intercept (i.e. when x = 0, y = b) and m is
the slope.
4
Equations of a straight line - 2
Point-slope Formula: Given a point A:(x1,y1) and slope m,
then
y1  b  mx1
or b  y1  mx1
Therefore y  y1  mx1  mx
or y  y1  m( x  x1 )
5
Equations of a straight line - 3
Two-point Formula: Given to points A (x1,y1) and B (x2,y2),
then
y2  y1
Slope  m 
x2  x1
since y  y1  m( x  x1 )
y2  y1
and y  y1 
 x  x1 
x2  x1
6
Intercept Form
x y
 1
a b
y
Quadrant II
3 __
2 __
2x – 4y = 8
x/4 + y/-2 = 1
y = 0; x = 4
x = 0; y = -2
Quadrant I
1 __
|
|
|
|
-4
-3
-2
-1
|
-1 __
|
|
|
|
1
2
3
4
x
-2 __
-3 __
Quadrant III
-4 __
-5 __
Quadrant IV
7
A Linear Example - 1
UPS charges $54 to deliver a package of a
specified weight 500 miles and charges $66
to deliver the same package 1000 miles.
Assuming that delivery costs are linear with
distance, derive a model that will provide
delivery costs (for the specified weight) as a
function of distance and determine the
delivery cost if the distance is $750 miles.
8
A Linear Model - 2
Let x = number of miles and y = delivery cost
Then (x1,y1) = (500, 54) and (x2,y2) = (1000, 66)
using the 2-point formula:
66  54
y  54 
 x  500 
1000  500
y  54  .024  x  500   .024 x  42
y  f ( x); f (750)  .024  750   42  60
9
Systems of Linear Equations
n variables and m equations
coefficients
a11 x1  a12 x2  ...  a1n xn  b1
right hand side
a21 x1  a22 x2  ...  a2 n xn  b2
am1 x1  am 2 x2  ...  amn xn  bm
10
Systems of Linear Equations
n variables and m equations
Case I. if m < n, there are an infinite number of
solutions
(arbitrarily assign values to n-m variables and solve for
the remaining)
Case II. If m > n, there may be no solutions (null set)
Case III. If m = n, there may be
1. a unique solution (consistent and independent)
2. an infinite number of solutions (consistent and
dependent)
3. no solution (inconsistent)
11
Case I. (m < n)
One equation and two variables
y
Any (x,y) satisfying
Ax + By = C
x
Infinite number of solution
12
Case II. (m > n) Three equations
and two variables
y
y
x
no solution
x
unique solution
13
Case III. (m=n) Two equations
and two variables
y
y
unique solution
y
x
x
no solution (parallel lines)
y + x = 10
2y + 2x = 20
x
infinite solutions (lines coincide)
14
2 Eqs, 2 variables – unique
solution
2x + 3y = 10
4x - 2y = 12
method of substitution
y = 10/3 – (2/3)x
4x - 2[10/3 – (2/3)x] = 12
4x –(20/3) + (4/3)x = 12
(16/3)x = 12 + 20/3 = 56/3
x = (3/16) (56/3) = 56/16 = 3.5
y = 10/3 – (2/3) (3.5) = 1.0
15
2 Eqs, 2 variables – no
solution
2x - 3y = 10
4x - 6y = 12
rewrite equations in
slope-intercept form
same slope
parallel lines
y = -10/3 + (2/3)x = -3.33 + (2/3)x
y = -12/6 + (4/6)x = -2.0 + (2/3)x
using substitution:
4x - 6 [-10/3 + (2/3)x ] = 12
4x + 20 – 4x  12
an inconsistency, no solution exists
16
2 Eqs, 2 variables – infinite
solution
2x – 3y = 12
5x – 7.5y = 30
Eq2 = 2.5 x Eq1
y = -12/3 + (2/3)x
substituting:
5x – 7.5 [-12/3 + (2/3)x] = 30
5x - (15/2)(-12/3) - (15/2) (2/3)x = 30
5x + 30 - 5x = 30
30 = 30; an identity
17
2 Eqs, 2 variables – unique
solution alternate method
2x + 3y = 10
4x - 2y = 12
multiply the first equation
by -2 then add to the
second equation:
(-2)2x + (-2)3y = (-2)10
4x
- 2y =
12
-8y = -8
y=1
from the first equation: 2x +3(1) = 10
x = (10 – 3)/2 = 3.5
18
Solution by Elementary Operations
Given a n x n system of linear equations,
1.
2.
3.
any 2 equations may be interchanged
any equation may be multiplied by a constant
a multiple of any equation may be added to
another equation replacing the equation
Count them, there
are only three!
Imagine that.
19
Solution by Elementary Operations
Given a n x n system of linear equations,

any 2 equations may be interchanged
2 x1  3x2  4 x3  20
 x1  6 x2  3x3  71
 x1  6 x2  3x3  71
2 x1  3x2  4 x3  20
x1  x2  2 x3  55
x1  x2  2 x3  55
20
Solution by Elementary Operations
Given a n x n system of linear equations,

any equation may be multiplied by a constant
2 x1  3x2  4 x3  20
2 x1  3x2  4 x3  20
1
1
1
1
  2 x1    3x2    4 x3    20
2
2
2
2
3
x1  x2  2 x3  10
2
 x1  6 x2  3x3  71
x1  x2  2 x3  55
21
Solution by Elementary Operations
Given a n x n system of linear equations,

a multiple of any equation may be added to
another equation replacing the equation
3
x1  x2  2 x3  10
2
+ x1  x2  2 x3  55
2 x1  3x2  4 x3  20
 x1  6 x2  3x3  71
x1  x2  2 x3  55
5
2 x1  x2  65
2
22
Equivalent Systems of Equations
2 x1  3x2  4 x3  20
 x1  6 x2  3x3  71
x1  x2  2 x3  55
Solution
21.065574
9.147541
12.393443
 x1  6 x2  3 x3  71
3
x1  x2  2 x3  10
2
5
2 x1  x2  65
2
Solution
21.065574
9.147541
12.393443
23
Solving systems of eqs. by
elementary operations
a11 x1  a12 x2  ...  a1n xn  b1
a x  a x  ...  a x  b
 21 1 22 2
2n n
2


am1 x1  am 2 x2  ...  amn xn  bm
elementary
 x1

operations
x2





 b1'
 b2'
xn  bm'
24
Let’s solve a system of equations
using elementary operations!
1.
2 x  2 y  3z  2

3 x  y  6 z  4
8 x  4 y  3 z  8

3.
3

x  y  2 z  1

21

0

4
y

z 1

2

0  4 y  9 z  0


2.
3

x  y  2 z  1

3 x  y  6 z  4
8 x  4 y  3 z  8


Work x variable
multiply first row by ½
1/2 R1  R’1
multiply first row by -3 and add to 2nd row
-3R1 + R2  R’2
multiply first row by -8 and add to 3rd row
-8R1 + R3  R’3
25
keep solving…
Work y variable
1.
2.
3
3


x  y  2 z  1
x  y  2 z  1


21
21
1


multiply 2nd row by -1/4
 0  4 y  z  1 0  y  z 
-1/4 R2  R’2
2
8
4


0  4 y  9 z  0
0  4 y  9 z  0


3.


multiply 2nd row by -1 and add to 1st row
9
5

- R2 + R1  R’1
x  0  8 z  4

21
1

0  y  z 
8
4

multiply 2nd row by 4 and add to 3rd row
3

4 R2 + R3  R’3
0  0  2 z  1

26
not much longer now…
1.
9
5

x  0  8 z  4

21
1

0

y

z


8
4

3

0

0

z  1

2

1

x

0

0


2

3.0  y  0  3
2

2

0  0  z   3

Work z variable
2.
9
5

x  0  8 z  4

21
1

0

y

z


8
4

multiply 3rd row by 2/3
2

2/3 R3  R’3
0  0  z   3

multiply 3rd row by 9/8 and add to1st row
9/8 R3 + R1  R’1
multiply 3rd row by -21/8 and add to 2nd row
-21/8 R3 + R2  R’2
x = 1/2, y = 3/2, z = -2/3 27
Excel with solver
There must be an
easier way to do
this!
2 x  2 y  3z  2

3x  y  6 z  4
8 x  4 y  3z  8

28
XYZ makes A, B, and C’s

The XYZ Company makes three products: A, B, and C. Each
product requires processing on three machines: M1, M2, and
M3. Based upon the data in the following table, how many
units of each product should manufactured in one month if all
3 machines are to be fully utilized?
Machine hours per unit
Product
M1
M2
M3
A
B
C
1
2
2
200
2
8
1
525
2
3
4
350
Available hrs /
month
29
How many A, B, and C’s?
Product
M1
M2
M3
A
B
C
1
2
2
200
2
8
1
525
2
3
4
350
Available hrs /
month
A + 2B + 2C = 200
2A + 8B + C = 525
2A + 3B + 4C = 350
solution:
A = 50, B = 50, C = 25
30
Systems of Linear Inequalities
Find the intersection of the following sets:
A = {x| 3x-5 < 40}, B = {x| -2x+10 < 66},
C = {x| 6x+50 > 20}, D = {x| -4x – 20 > -24}
solution:
3x-5 < 40
 3x < 45 or x < 15
-2x+10 < 66  -2x < 56 or x > 56/-2 = -28
6x+50 > 20  6x > -30 or x > -5
-4x – 20 > -24  -4x > -44 or x < 11
Therefore: -5 < x < 11
|
-15
|
-10
|
-5
|
0
|
5
|
10
|
15
31
The Makit Manufacturing Company
The Makit Manufacturing Company produces two
products A and B. Each unit of product A requires 3
hours of machine time and Each unit of product B
requires 2 hours of machine time. There are 300
hours of machine time available this month for
production.
Let x = the number of units of A produced and y =
number of units of B produced this month.
Then 3x + 2y = 300 provides the allowable
combinations of X and Y if the machine is at full
capacity.
and 3x + 2y  300 represents all feasible production
levels.
32
The feasible region
y
200
3x + 2y = 300
boundary equation
100
3x + 2y  300; x  0; y  0
feasible region
100
200
300
x
33
More of Makit


In addition to machine time, each unit of product A
requires 2 hours of manual assembly time and each
unit of product B requires 5 hours of assembly time.
There are 500 labor hours of assembly time
available.
Therefore: 2x + 5y  500 hours
Product A assembly
34
The feasible region
y
200
100
2x + 5y = 500 hours
boundary equation
feasible region
100
200
300
x
35
Conclusion – pick one…






Life is good
It doesn’t get any better than this
I can solve systems of linear equations
The professor is our friend
Being an ENM student is the (pinnacle)
(nadir) of my career
Solving equations is the best thing in the
whole world
36