'ProgramMode:RUN Menu "Use current _GraphY_1 ?","Yes",1,"No, let me type it",0 Lbl 0 "Type new _GraphY_1 (use X)"?->Str 1 Str 1->GraphY1 Lbl 1 "Lower Bound"?->A "Upper Bound"?->C GraphY1(A)->B GraphY1(C)->D ClrText Locate 1,2,"(" Locate 2,2,A Locate 10,2,"," Locate 11,2,B Locate 20,2,")" Locate 1,3,"(" Locate 2,3,C Locate 10,3,"," Locate 11,3,D Locate 20,3,")" (D-B)/(C-A)->M M*-1*A+B->I Locate 1,4,"Slope M: " Locate 11,4,M Locate 1,5,"some c values in P,Q" Solve(d/dx(GraphY1(X),X)-M=0,X,A,C)->P Locate 1,6,P (D-B)/(C-A)->M (-)1*M*A+B->I "M*X+I"->GraphY2 A->Xmin C->Xmax If M<0 Then GraphY1(A)->Ymax GraphY1(C)->Ymin Else GraphY1(C)->Ymax GraphY1(A)->Ymin IfEnd Stop