Upload
helena-hawkins
View
213
Download
1
Embed Size (px)
Citation preview
1
Spreadsheet Problem Solving
syntax for Excel formulas one-way case studies:
using formula copy using the TABLE function
2
Syntax for Excel formulas
formulas must start with =, + or - ( leftover from 1-2-3)
expressions are evaluated left-to-right
parentheses are used to establish order for calculations
precedence for arithmetic operators is:negation unary –exponentiation ^multiplication & division * and /addition & subtraction + and -
functions are evaluated first and the result is insertedat the position of the function in the expression
3
Examples
algebraic format Excel syntax
2
y 2 x 2
x xy y
=(y+2)*(x-2)/(x^2+x*y+SQRT(y))
Order of evaluation:
1) put y into SQRT function, return answer to that position2) compute y+2 result3) compute x-2 result4) multiply y+2 result times x-2 result to get numerator result5) compute x^2 result6) compute x*y result7) add up x^2, x*y and SQRT(y) to get denominator result8) divide numerator result by denominator result
4
Examples
algebraic format Excel syntax
2D
4L
=pi()*D^2/(4*L)
or =pi()*D^2/4/L
L
H L
T T
a T T
=(T-TL)/a*(TH-TL)
or =(T-TL)/(a*(TH-TL))
or =(T-TL)/a/(TH-TL)
5
Examples
Negation – unary minus
algebraic format Excel syntax
23 -3^2
Result
9 or –9 ???
2yx =x^y^2 ??? or =x^(y^2)
Repeated exponentiation
algebraic format Excel syntax
[test it!, if you’re not sure]
[What do you really want tohave happen?]
6
Examples
algebraic format Excel syntax
2h 3R h
3
=PI()*h^2(3*Radius-h)/3
What’s wrong with this?
forgot the * operator
sin 45 =SIN(45)
What’s wrong with this?
=SIN(45/180*PI())
arguments to trig functionsmust be in radians
7
Examples
Logarithms and exponents Remember!
ln y x xy e exp x
10
Blog P A
T C
BA
T CP 10
a
ln xlog x
ln a
LN(y) EXP(X)
LOG10(P) 10^(A-B/(T+C))
=LN(x)/LN(a)
=LOG(x,a)
8
Examples
for3x
do not use=x^3.
but=x^3
This is ok
23 =(-3)^2
This is not
=(-3)^2.0
When Excel (and other computer programs) see anexponent with a decimal sign, it computes the resultas follows:
aAnswer x aln Answer ln x a ln x
a ln xAnswer e
calculates (-3)*(-3)
2.0 ln( 3 )e ?? Nope!
9
One-way case studies
Example Problem
Deflection of cantilever beam
d
bL
F
3F L
3 E I
3b dI
12
E modulus of elasticity I moment of inertia
10
Deflection of cantilever beam
Basic data: F = 100 N L = 3 ft
E = 30 x 106 psi
b = 1 in d = 2 in
Find in mm
Case study 1: How does change as L varies?
Case study 2: How does change as d varies?
Case study 3: How does change as b and d vary?
11
Deflection of cantilever beam
Find in mm
12
Deflection of cantilever beam
Find in mm
13
Deflection of cantilever beam
Case study 1: How does change as L varies?
Use formula copy
Single formula with only oneparameter changing
Range of parameter valuesin adjacent column
14
Case Study 1
0.00
0.20
0.40
0.60
0.80
1.00
1.20
2 2.2 2.4 2.6 2.8 3 3.2 3.4 3.6 3.8 4
Beam Length -- ft
Bea
m D
efle
ctio
n -
- m
m
15
Case study 2: How does change as d varies?
Deflection of cantilever beam
Use one-way data table[ Data Table ]
Multiple formulas
One input variable, d, in adjacentcolumn
One output variable, delta
“pointer”formula:where toget answeron spread-sheet
where valuefrom adjacentcolumn getsplaced onspreadsheet
16
Case Study 2
0.00
0.50
1.00
1.50
2.00
2.50
3.00
3.50
4.00
1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3
Beam vertical dimension -- in
Def
lect
ion
--
mm
17
Case study 3: How does change as b and d vary?Deflection of cantilever beam
row input: B11
column input: B9
pointer formula to delta
deflection in mm for allcombinations of b and d
18
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
S1
S3
S5
S7
S9S11
0.00
1.00
2.00
3.00
4.00
5.00
6.00
7.00
8.00
d categories
bcategories
Def
lect
ion
in m
m