Sample Cue Cards for Mathematical Tasks

Here are some examples of the bisect, graph, matinvert and matmult functions. To use the templates, simply enter your values at lines marked ****, then process all lines that are in courier font. The word "process" means to select (highlight) the relevant text and click the spinning globe in the Engineers' Compendium window. To work with the cue card, you need MATHSERV , which you may download here.

1. Restricted passage: Find the longest length of a flat object that can be negotiated around the corner of a restricted passage, where L1+L2 is the length, W1 and W2 are the restricted widths, and A (given), B and C (sought) are angles in radians that add-up to _pi:

From: L1 = W2/sin(B); L2 = W1/sin(C), B = _pi - A - C
we get: L = W2/sin(_pi - A - C) + W1/sin(C)
and: dL/dC = 0 = W2*cos(_pi-A-C)/(sin(_pi-A-C))^2 - W1*cos(C)/(sin(C))^2
where C is our unknown X, given:

**** width 1 in m, W1 = 1.5
**** width 2 in m, W2 = 2.5
**** angle A in degress, A = 135
in Radians, A = A*_pi/180 := 2.3562

FX = "W2*cos(_pi-A-X)/(sin(_pi-A-X))^2 - W1*cos(X)/(sin(X))^2"
C = bisect(FX, 0, _pi-A, .001) := 0.3444
L = W2/sin(_pi - A - C) + W1/sin(C) := 10.2997
at C in degrees, C = C*180/_pi := 19.7314

2. Neutral axis factor: Given a bending moment, M, and the properties of a concrete section, it is often necessary to find the neutral axis factor KU to ensure that it is less than the ductility limit of 0.4. The moment capacity is FI*C*JD where FI is the capacity factor (0.8), C is the concrete stress block and JD the distance from centroid of reinforcement to centroid of C.

From clause 8.1.2.2 of AS 3600, C is .85*FC*B*GAMMA*KU*D, where
GAMMA is 0.85 - 0.007*(FC-28) within the limits of 0.65 to 0.85, therefore:
FI*.85*FC*B*GAMMA*KU*D*(D-GAMMA*KU*D/2) - M = 0 with KU the unknown X.

**** capacity factor FI = .8
**** concrete strength in MPa, FC = 32
**** width in mm, B = 300
**** depth to centroid of steel in mm, D = 450
**** bending moment in kNm, M = 265

GAMMA = max(.65, .85 - .007*(FC-28)*(FC > 28)) := 0.822
FX = "FI*.85*FC*B*GAMMA*X*D*(D-GAMMA*X*D/2) - M*10^6"
KU = bisect(FX, 0, 1, .001) := 0.2744

3. Capacitance of simple circuit: The solution for a simple circuit with a resistance, R, and a capacitance, C, in series with a battery voltage, V, is Q = C*V*(1 - exp(-T/(R*C))), where Q is the charge on the capacitor and T is the time needed to get the charge. Solving for C as the unknown X, it pays to magnify the vertical scale by 10^6:

FX = "10^6*(X*V*(1 - exp(-T/(R*X))) - Q)"
**** required charge in coulombs, Q = 10^-5 := 0.00001
**** battery volts, V = 10
**** resistance in ohms, R = 2000
**** required time in seconds, T = 4*10^-3 := 0.004

graph(FX, .0000005, .000005)

C = bisect(FX, 0.000001, .000002, .00000001) := 1.2578E-6
* test Q = C*V*(1 - exp(-T/(R*C))) := 0.00001001

4. Polynomials: Engineering expressions often take the form:
    A + B*X + C*X^2 + D*X^3 + E*X^4 = 0 or
    A + B*X^2*exp(C*X) = 0.
These kinds of expression have more than one solution. The method is to find the approximate roots with the graph command, then the exact roots with the bisect command executed in a for loop:

example 1: FX = "A + B*X + C*X^2 + D*X^3 + E*X^4"

**** A = 1
**** B = -32
**** C = 160
**** D = -256
**** E = 128

graph(FX, 0, 1)

from graph: LO = {0, .25, .6, .9}
from graph: HI = {.1, .4, .8, 1}
for i = 1 to 4
    root[i]= bisect(FX, LO[i], HI[i], .00001)
    print "root[";i;"]= ";root[i]
next i

root[1]= 0.0381
root[2]= 0.3087
root[3]= 0.6913
root[4]= 0.9619

example 2: FX = "A + B*X^2*exp(C*X)"

**** A = 2
**** B = -1
**** C = -.385

graph(FX, -2, 15)

from graph: LO = {-2, 2, 10}
from graph: HI = {-.5, 3, 11}
for i = 1 to 3
    root[i]= bisect(FX, LO[i], HI[i], .00001)
    print "root[";i;"]= ";root[i]
next i

root[1] = -1.1364
root[2] =  2.1317
root[3] = 10.3295

5. Matinvert and matmult: Simultaneous equations are often expressed as a square matrix of factors A and an array of results C. The object is the unknown vector X in the equation A*X=C. X may be found with X=matmult(B,C), where B=matinvert(A).

For example, to find the coefficients X of a cubic equation when four points (PX,PY) are given, we can write four simultaneous equations (i = 1 to 4) thus:
    X[1]*PX[i]^3 + X[2]*PX[i]^2 + X[3]*PX[i] + X[4] = PY[i]
from which we can find X[1:4].

clear A, B, C, PX, PY

**** X-values, PX = {3.2, 2.7, 1.0, 4.8}
**** corresponding Y-values, PY = {22.0, 17.8, 14.2, 38.3}

automatically generates array F1 = PX^3
automatically generates array F2 = PX^2

Set up the matrix A:
for I = 1 to 4
   A[I,1:4] = {F1[I], F2[I], PX[I], 1}
next I

Find the inverse, B = matinvert(A)

Get the result, X = matmult(B,PY)

print X
   -0.5275
    6.4952
  -16.1177
   24.3499

Check it out:
FX = "-0.5275*x^3 +6.4952*x^2 -16.1177*x +24.3499"
graph(FX, 1.0, 4.8)

6. Add your own solutions - (1) state the problem; (2) develop a mathematical expression for it; (3) solve the expression as outlined above, (4) save the project with File | Save project, (5) mark the document with File | Mark as cue card. If you are new to Engineers' Compendium, first highlight the command and press function key F1.

Your comments or questions are most welcome - call Helmut Schmidhofer on 0500 818 500 or email engcomp@pbq.com.au