Sie sind auf Seite 1von 6

Problem-Solving Tools for Engineering Students

Bruce R. Dewey
Mechanical Engineering
University of Wyoming
Laramie, WY 82071-3295
Abstract - The common first course in the engineering
curriculum has evolved from drafting/graphics to one in
computer applications. Goals for such a course include the
introduction of engineering methodologies, stimulation of
interest in the study of engineering, and development of
skills in using certain tools.
Candidate computing tools should solve equations such
as those in engineering applications and produce various
presentation graphics.
High level programming languages have been in
engineering curricula since the 1970s. More recently,
various solution programs have become available.
The intuitive graphical user interface makes the use of
spreadsheets appealing. As features have been added, we
have found increasing use of spreadsheets for problem
solving. An introductory course emphasizes basics, while
subsequent courses introduce applications that work well
on spreadsheets.
In addition to the usual calculus, chemistry, and English,
beginning engineering students traditionally have a first
technical course that focuses on problem-solving aspects.
Over time, such a course has evolved from board-based
graphics to one in computer applications. General goals for
this course encompass aspects of appreciating engineering
methodologies, creating interest in the study of engineering,
and providing some common tools that will be useful in
subsequent courses.
General-purpose problem-solving tools work
engineering problems that have been reduced to
mathematical terms. Useful in typical engineering courses as
well as engineering practice, a list of abilities for such tools
might include:
Solving systems of linear and nonlinear algebraic
Producing 2d and 3d presentation graphics including
regression to arbitrary functions
Performing repetitious calculations involving large
amounts of data
Finding optimum solutions problems subjected to
various constraints
Numerically integrating and differentiating arbitrary
Supporting creative endeavors where what-if scenarios
can be tested
Being inexpensive, easy to obtain, and simple to learn.
A little over thirty years ago, Fortran was the only
practical way to solve problems with the computing
resource. Subsequently, other high level languages have been
developed with significant advantages over Fortran. The
ubiquitous and intuitive graphical user interface, such as the
one in spreadsheets, provides even more productivity.
Should only one software tool be chosen to meet the
above requirements, spreadsheets are the clear choice for a
common curriculum. Over the past eight years, an approach
has evolved for incorporating spreadsheet-based problem
solving in the curriculum. Our introductory course
emphasizes problem-solving methodology, starting with
formulation of practical problems and using various solution
techniques in spreadsheets. Sophomore courses assign
occasional problems that are appropriate for spreadsheet
To show how spreadsheets support the above
requirements, we will first detail some of the built-in
functions available in the industry-leader Excel. Next, we
briefly discuss the available general-purpose numerical
equation solvers. Some examples follow, illustrating how
the listed goals are met with various Excel features.
Functions in Excel
Using one of nearly three hundred built-in functions in Excel
may be the quickest way to arrive at the solution to some
problem. A paperback [1] is available that gives a summary
of how to use the built-in functions and formulas. While
many of the functions handle esoteric financial calculations or
do some housekeeping item, a surprising number find direct
application in engineering.
About 100 built-in statistical functions in Excel support
practically all that is needed by engineers in this realm of
work. A number of functions cater to the common needs of
finding central tendency statistics for data sets and of
calculating best-fit straight lines, log-log, semi-log, and
polynomial curves. Furthermore, Excel determines several
different probability distribution functions.
The robust set of financial functions handily supports
the computation needed in engineering economics. While
depreciation rules are not built-in, schedules of depreciation
can easy be computed with row and column formulas. The
rate-of-return calculations that can be vexing to students are
trivialized in the Excel environment.
A set of functions labeled engineering is of some
interest. Included here are functions to convert numbers
between binary, decimal, octal, and hexadecimal as well as
to perform complex arithmetic. Bessel and error functions
can be computed.
A group of mathematical functions provides
trigonometric functions, including inverse and hyperbolic.
Matrix functions provide multiplication, inversion, and
determinant computation. Although not listed as a
mathematical function, Excel is very adept at sorting data.
Logical and information functions allow branching as
various conditions are met. The most used of these is the IF
function. Date and time functions find use in acquisition of
experimental data and in financial calculation.
The built-in plotting of presentation graphics produces
plots of high quality. Plot types include x-y (Excel calls
these scatter plots), pie, column, bar, radar (polar),
combination (such as column and line), 3-d surface, and 3-d
column. A best-fit line and R
are very easy to add to an x-y
Numerical Equation Solvers
Excel contains four different, useful schemes for numerical
solution of transcendental equations and systems of linear
and nonlinear equations.
1. Matrix Inversion
Linear systems of equations of the form [A][X] = [B] are
solved with the MMULT and MINVERSE functions that are
built into Excel. The typed function that returns [X] =
is entered in the array of cells [X] intended to receive the
solution. The matrices [A], [B], and [X] are naturally
adapted to the row/column structure of the spreadsheet.
Although the author has not tested the limitations of the
built-in inversion algorithm, the routine seems to be robust
for a moderately large number of equations. Excel returns an
error message if the system is singular, etc.
2. Goal Seek
The Goal Seek feature, a command in the Tools menu, lets
you vary the contents of one cell in order to make another
cell equal some arbitrary value. In other words, a cell
containing the value of x could be changed with an iterative
scheme until another cell containing f(x) becomes equal to a
chosen value such as 0. Goal Seek is faster, easier to use,
and more bulletproof than Solver, below.
3. Solver
Solver, also accessed under the Tools menu is considerably
more versatile than the Goal Seek command. Solver causes
the contents of one cell (the target cell) to take on a certain
value (or a maximum or a minimum value) by varying the
contents of one or more other cells (Changing Cells).
Optionally, one or more constraints can be applied to any or
all of the Changing Cells. Solver deals with large-scale
optimization problems, the solution of nonlinear systems of
equations, and other decision problems.
Solver uses proprietary nonlinear optimization code,
simplex methods, and branch and bound algorithms that are
supplied to Microsoft by Frontline Systems, Incline Village
Nevada. In use, Solver has proven to be fairly robust and
versatile. Improvements have been made in Solver as Excel
has gone up in versions.
Sometimes solutions require good starting guesses to
converge, an advantage in teaching engineering. In the
problem solving process, students should be encouraged to
estimate answers and to question whether results are
reasonable. In nonlinear problems with multiple solutions,
users need to provide starting guesses over the range of
acceptable solutions.
4. Iterative Solution of Circular Reference Formulas
While this solution method is by far more arcane than the
other choices, it is ideal from some problems, such as the
partial differential equation solution below. A circular
reference is where the contents of two or more cells depend
on each otherusually causing an error message because of
the undefined nature of the information. To use this method
of solution, the user selects manual calculation and iteration
from the Tools:Options menu. Additionally, the number of
iterations and the maximum change (the convergence
criterion) can be controlled from the same menu.
When asked what computer software they use most, a very
informal survey of perhaps two dozen mechanical engineers
in industry placed word processing and Excel as nearly
universal choices. AutoCAD, Ansys, and Nastran had a few
mentions. Excel found use for such diverse tasks as
Optimizing production schedules in a multi-product
manufacturing environment with hundreds of variables
Doing load and balance calculations on a commercial
Assembling data arising from various sources as input
to engineering analysis codes; passing data files in a
universal form among various groups
Doing budgets and keeping accounts (a no-brainer!)
Compiling and analyzing quality control statistics
Chosen to demonstrate application of one (or two) of the
Excel equation solvers, some typical engineering problem
solutions typical of those done in engineering classes are
presented below.
Example 1 Simultaneous Linear Equations
In many engineering analyses, simultaneous linear equations
of equations of the form [A]{x} = {B} arise. As a numerical
example, consider
On the spreadsheet, the input for [A] will be in cells A2:D5;
{B} will be in F2:F5. Descriptive titles are recommended.
The solutions, appearing in the column with cells for {x},
have the underlying code
where the cell ranges references provide the location of the
input data. With Excel, the results are recalculated
automatically whenever any of the input data are changed.
If a user does this code sequence frequently, the macro
language in Excel permits the construction of a new function
that replaces Eq. (2) with a user-chosen name and a call such
= SIMEQ(A2:D5,F2:F5) (3)
The presentation of this solution on a spreadsheet (not
shown) can look almost identical to Eq. (1), with the
enclosing brackets being added using the drawing tools.
Example 2 Nonlinear Regression
The widely used regression process, finding unknown
parameters in the equation of a line or curve to best fit a set
of data, aids in the interpretation experimental data. Linear
regression is built into Excel as the Trendline function. The
Trendline gives the choice of fitting the data to a straight
line, to a semilog line, a log-log line, or to a polynomial up
to order five. The coefficient of determination R
can be
reported in addition to the equation of the line.
Excels Solver provides an intuitive method to perform
nonlinear regression by minimizing the sum of squares of
the residuals (the same criterion used in linear regression.)
The following example from hydrology involves fitting an
observed distribution of rainfall to the normal probability
distribution function.
The starting point is the frequency distribution of the
amount of rainfall over 55 years of observation as shown in
the first two columns of the worksheet in Fig. 1. The
normalized frequency distribution f(x) is given in the third
column. The model to which the data are regressed is given
by the equation
where the unknown parameters and will be
determined with nonlinear regression to best fit the data.
With guesses for and placed in the cells provided at
the bottom of the sheet, Eq. (4) coded in the fourth column
of the worksheet. The fifth column is the square of the
difference between the values in the third and fourth
columns. Excels Solver is called to minimize the sum of
the residuals squared (the last value in the fifth column) by
changing the guesses for and . The resulting values
appear in Fig. 1; the data in column four have been
computed with these values.
Figure 1. Worksheet for nonlinear regression.
The results are plotted in Fig. 2, using one of the
supplied line chart types in Excel. The shaded bars show
the given histogram, while the curve shows the normal
distribution function computed with the solved values of
and . Of course, features such as color, shading, titles,
font, line styles are under user control.
The foregoing method fits data to any arbitrary curve.
Criteria other than minimizing the sum of the squares of the
residuals can be used with this method. For example, it is
not difficult to regress with the criterion that the sum of the
squares of the perpendicular distances to a straight line is to
be minimized.

25 10 0 15
10 52 24 0
0 24 44 20
15 0 20 35
Annual Rainfall - Teton County
x f(x) f(x) model Resi
Amount Frequency Frequency squa
in (no. yrs) fraction
2 5 0.091 0.025 0.0
4 2 0.036 0.075 0.0
6 9 0.164 0.156 0.0
8 11 0.200 0.227 0.0
10 15 0.273 0.231 0.0
12 7 0.127 0.163 0.0
14 5 0.091 0.080 0.0
16 1 0.018 0.028 0.0
55 1.000 0.0
Parameters for normal distribution function

3.3258 9.0839
Not shown in this example is the built-in Trendline
function that very easily performs linear regression.
Figure 2. Histogram and best-fit normal distribution curve
for Example 1.
Example 3 Solution of a Nonlinear System of
Mass balance problems, hydraulics problems, and others
frequently yield systems of nonlinear equations. Solution of
such systems is the forte of programs like TK-Solver and
EES. In Excel, each of the equations need to be arranged in
the form f(xi) = 0. As an example, consider the contrived
(5) 0
0 2 . 2
0 77 . 0
0 42 . 2
2 1 3 2 4 1
4 3 2 1
4 3 1
2 1
+ +

x x x x x x
x x x x
x x x
x x
where the xi are the unknowns. (The contrived roots are 1.1,
2.2, 3.3, and 4.4.)
The worksheet of Fig. 3 provides four cells to hold the
initial guesses and the subsequent results of the iterative
solution. A solution criterion that works well, avoiding
problems with negative signs, is that
( ) (6) 0 ) (

j i
x f
Solver is used to minimize the contents of the cell labeled
sum of squares, which contains the code for Eq. (6). The
results for the xs appear in place of the initial guesses.
Figure 3. Worksheet for solution of nonlinear system of
The result, which depends on the quality of the initial
guesses, is good to four places without tweaking the default
precision in Solver.
Example 4 Eigenvalue Problem
Goal Seek, Solver, and matrix commands are useful in the
iterative solution of problems involving the extraction of
eigenvalues and eigenvectors. As an example, the orientation
of the principal axes and the values of the principal mass
moments are determined for a 3-d solid.
The worksheet, Fig. 4, contains space for the input of
the moments and products of inertia. The user provides a
reasonable guess for one of the three principal moments in
the cell for I. Goal Seek is used to make the iteratively find I
such that
where the value (|Det|) of the determinant is computed
with Excels MDETERM function. Goal Seek is appropriate
for this solution, since only one variable I is changed.
The corresponding direction cosines (l, m, n) must
subject to the constraint
(9) 1
2 2 2
+ + n m l
The user puts guesses for the direction cosines in {d}, with
the constraint of Eq. (9) coded in the shaded cell labeled
(di^2). The three shaded work cells for the product {P} are
each squared and added in the shaded cell labeled (Pi^2).
Annual Rainfall - Teton Cty
2 4 6 8 10 12 14 16
Amount (in)
(7) 0

xx yz xz
yz xx xy
xz xy xx

zz yz xz
yz yy xy
xz xy xx
Figure 4. Worksheet example for determination of one of
three principal moments of inertia.
Solver is used to change the {d} to minimize (Pi^2) with
the constraint that the contents of (di^2) = 1. The numbers
shown in Fig. 4 represent one of the solutions. The user is
expected to enter reasonable guesses for the other solutions
good pedagogy because some understanding of the problem
is required.
Example 5 Partial Differential Equation
Steady state heat conduction is governed by the equation
T = 0. The row-column arrangement of the worksheet is
intuitively used for nodes in PDE problems that are reduced
to difference equations. An interior node with temperature Tij
is related to its adjacent nodes by the equation
1 , , 1 1 , , 1 + +
+ + +

j i j i j i j i
Boundary nodes may have temperature specified, be
insulated, or have other conditions such as convection.
In a simple numerical example, a symmetrical
rectangular chimney is considered that has outside
dimensions of 3 ft by 2 ft with 0.5-ft thick uniform walls.
The outside temperature is 70F and the inside temperature
varies linearly from 300F at the center to 250F at the
corners. To make a compact illustration, nodes are selected
0.1 ft on center, and symmetry permits modeling one-fourth
the cross section.
The Excel worksheet provides one cell for each node
point, arranged exactly as in physical space. Because we are
going to use iterative solution of circular reference formulas,
we select manual calculation and iteration under the Tools:
Options:Calculation menu. The specified temperature
distribution is placed on the inner and outer boundaries. The
interior nodes and the insulated (symmetry) boundaries are
coded with relative cell references in the manner of Eq. (10).
Copy and fill features make this a very quick process. After
calculation, the worksheet of Fig. 5 appears.
Figure 5. Worksheet for heat conduction. Cells pertain to
one quadrant of the chimney.
Excels surface plot feature works very well for
illustrating the result, Fig. 6. To improve visualization, the
user can rotate plots around vertical and horizontal axes, and
change the perspective viewing distance parameter.
The examples presented show a sample of the versatility of
Excel in solving engineering problems. Engineering students
seem to have no trouble catching on to doing operations like
these. Beginning users of Excel will find getting started with
the excellent text by Gottfried [2] much less tedious than
using references aimed at non-technical/business users.
For the past eight years, our first-year students have
been introduced to Excel from an engineering standpoint.
Students find Excel fun and easy to use. In the introductory
course, students have far more challenge in formulating
problem solutions than in using computer software. Some
instructors in other core courses reinforce Excel instruction
by assigning the "computer problems" found in various
textbooks. Very little use of Excel macro functions seems to
Ixx Iyy Izz
10 16 22
Ixy Ixz Iyz
9 -3 -3
7.392 -9.000 3.000
-9.000 13.392 3.000
3.000 3.000 19.392
{d} {P}=[M]{d}
0.7887 0.000185
0.5773 -0.000162
-0.2113 0.000240


1.00000 1.179E-07
70 125 182 239 300
70 125 181 237 295
70 124 179 234 290
70 123 177 231 285
70 122 175 227 280
70 121 172 223 275
70 119 169 219 270
70 118 166 215 265
70 115 161 210 260
70 111 155 202 255
70 106 144 189 250 260 270 280 290
70 98 127 158 190 206 217 225 231
70 89 108 128 145 158 166 172 176
70 79 89 98 107 113 117 120 122
70 70 70 70 70 70 70 70 70
be needed. The supported programming language, visual
basic, fills in when needed.
In our curriculum, a junior-level course, taught by
math/computer science faculty, presents structured
programming in a high-level language (either Fortran or C as
determined by the department or advisor.) Programming
exercises cover various topics in numerical methods.
Because this course follows the traditional differential
equations class in the mathematics department, a more
rigorous treatment of the nuances of various algorithms is
possible. On an as-needed basis, other engineering courses
introduce software such as Matlab, Mathcad, C++,
AutoCAD, finite element analysis, etc.
Figure 6. Surface plot of temperature distribution in
When given assignments and projects that require a
computing resource, our students will nearly always pick
Excel. This software is unsurpassed for reducing laboratory
data and for making all sorts of data plots. The built-in
presentation graphics of Excel encourages structure, e.g.
proper labels and "even" calibration of axes, of students'
work. Plots and tables produced by Excel can be seamlessly
pasted into Word documents.
None of the other computing tools enjoy the wide
availability (many computers come with Excel bundled) and
versatility of Excel. Furthermore, these other tools are less
intuitive and more difficult to use than Excel. For many
reasons, Excel is a clear choice for the first software learned,
and the one software system needed, if there can be only one.
References Cited
[1] Microsoft Excel 97 Worksheet Function Reference,
Microsoft Press, 1997.
[2] Gottfried, B., Spreadsheet Tools for Engineers, Excel 97
Version. WCB/McGraw-Hill. 1998.