# 9

This problem is not difficult to solve using Maple (or by hand). Note that the Maple solution utilized the piecewise command - you may not want to take the time to learn about this command at this point in the semester.

If you are still reading, it is necessary to define an expression that gives the number of staff people working at any hour of the day. The scheduled staffing is given by :

> staff := piecewise( t <= 1, 1, t<=7, 0, t <= 14, 3, t <= 16, 2, t <= 22, 4, 1 );

[Maple Math]

>

The actual staffing is a little different - because the store is unmanned between 2pm and 4pm. Here is how the actual staffing function would look:

> staff2 := piecewise( t <= 1, 1, t<=7, 0, t <= 14, 3, t <= 15, 2, t <= 16, 0, t <= 22, 4, 1 );

[Maple Math]

>

Graphing the two staffing expressions in a single plot is not very interesting - except between t=14 (2pm) and t=16 (4pm).

> plot( [ staff, staff2 ], t=0 .. 24 );

>

The average number of staff on duty throughout the day can be computed in exactly the same way as in # 3 - the only difference is that the function is now discontinuous.

> avg := 1/24 * Int( staff2, t=0..24 );

[Maple Math]

> value( avg );

[Maple Math]

> evalf( % );

[Maple Math]

Note that the average number of staff on duty is NOT found by averaging the number of staff on duty during the different shifts.

>