Professional Documents
Culture Documents
XC e XC e
F- w F- w
PD
PD
er
er
!
!
W
W
O
O
N
N
y
y
bu
bu
4 Chapter 1: Introduction to EES
to
to
k
k
lic
lic
C
C
w
w
m
m
w w
w
w
o
o
.d o .c .d o .c
c u -tr a c k c u -tr a c k
Entering Equations
Consider the following set of equations:
x+ y =
3 (1-1)
y= z − 4 (1-2)
=
z x2 − 3 (1-3)
Equations (1-1) through (1-3) are three non-linear equations in the three unknowns x, y, and z.
However, they are not directly solvable using most formal programming languages (e.g.,
MATLAB or Fortran) because they are equations rather than assignments. In order to solve this
system of equations using a formal programming language, it would be necessary to either
employ an iterative solution technique (e.g., successive substitution) or carry out sufficient
algebra to convert the equations into assignments. Let's take the latter approach here.
Substituting Eq. (1-3) into Eq. (1-2) provides:
y = x2 − 3 − 4 (1-4)
x + x2 − 7 =3 (1-5)
x 2 + x − 10 =0 (1-6)
Equation (1-6) is a quadratic equation that can be solved using the quadratic formula: