%% 2250maple-Lab7-faq-F2010.txt Email Question November 2010. ================================== "I have been working on Maple Lab 7 and I am not sure exactly what to do for part b of 7.1." ANSWER. ======= The maple code below gives an example of what is expected for function f1. There are six (6) more similar code segments expected for functions f2 to f7. The function h1 has been coded in the example. The remaining finite pulses h2 to h7 must be coded similarly. They are NOT PERIODIC functions. For example, f1(t) DOES NOT EQUAL h1(t). To make a periodic function of the correct period from h1(t), compose it with the function t - P floor(t/P) where P=2 is the period expected. This is already coded in the lab as P*f2(t/P) = P(t/P) - P*floor(t/P) = t - P*floor(t/P) Then h1(2*f2(t/2)) is a periodic function of period 2 which equals h1(t) on 0 <= t <= 2. PART(a). Plot the function f1(t) over 3 periods. PART(b). Construct the periodic function F1(t) from h1(t) and t-P*floor(t/P). Plot F1(t)-f1(t), hoping to get the zero graph, which justifies the equation F1(t) = f1(t). The function F1(t) is h1(2*f2(t/2)), in the example. ==================================================== # Sample maple code used to solve L7.1(a),(b) for f1(t). opts1a:=ytickmarks=3,color=red,labels=['t','f'], title="square wave",numpoints=100,discont=true,thickness=2; f1:=t ->(-1)^floor(t); h1:=t->piecewise(t<1,1,t<2,-1,0); f2:=t -> t-floor(t); print("L7.1(a) for f1(t). Plot f1(t), square wave."); plot(f1(t),t=0..3*2,opts1a); print("L7.1(b) for f1(t). Zero graph expected."); print("The answer check verifies that f1(t) = h1(2*f2(t/2))"); opts1b:=ytickmarks=3,color=red,labels=['t','f'], title="square wave answer check",numpoints=100,discont=true,thickness=2; plot(h1(2*f2(t/2))-f1(t),t=-2..2*2,opts1b); ====================================================