Example of Graph and Cograph of straight lines

29 July 2011

Introduction

This Mathematica notebook provides an example of using both the graph and the cograph of two functions to generate questions and discussions in a class.  It is licensed under a MouseOver . I hope anyone interested will feel free to improve this work and to use it in their own publications and coursework.

Charles Wells

Code for RealCograph

Remove[Env]

To produce a robust package, this definition of RealCograph should be turned into a module incorporating the definition of Tikk and Tixx.

Tikk[x_,y_]:=Line[{{x,y-.05},{x,y+.05}}];
Tixx[a_,b_,c_,n_]:=Table[Tikk[a+k n,c],{k,0,(b-a)/n}]

Options[RealCograph]={ArrowSource->2,ArrowTarget->0,SampleIncrement->1/2,ArrowHeadSize->.015,TikkIncrement->1/4,LabelIncrement->1,ArrowColor->Blue}

RealCograph[x_,DisplayLeft_,DisplayRight_,DomainLeft_,DomainRight_,Expr_,OptionsPattern[]] :=(LabelOffset:=(1/10)(OptionValue[ArrowSource]-OptionValue[ArrowTarget]);
Show[Graphics[Line[{{DisplayLeft,OptionValue[ArrowSource]},{DisplayRight,OptionValue[ArrowSource]}}]],Graphics[Line[{{DisplayLeft,OptionValue[ArrowTarget]},{DisplayRight,OptionValue[ArrowTarget]}}]],Graphics[Tixx[DisplayLeft,DisplayRight,OptionValue[ArrowTarget],OptionValue[TikkIncrement]]],Graphics[Tixx[DisplayLeft,DisplayRight,OptionValue[ArrowSource],OptionValue[TikkIncrement]]],Graphics[Text[#,{#,OptionValue[ArrowSource]+LabelOffset}]&/@Table[n,{n,DisplayLeft,DisplayRight,OptionValue[LabelIncrement]}]],Graphics[Text[#,{#,OptionValue[ArrowTarget]-LabelOffset}]&/@Table[n,{n,DisplayLeft,DisplayRight,OptionValue[LabelIncrement]}]],Graphics[{OptionValue[ArrowColor],Arrowheads[OptionValue[ArrowHeadSize]],Table[Arrow[{{x,OptionValue[ArrowSource]},{Expr,OptionValue[ArrowTarget]}}],{x,DomainLeft,DomainRight,OptionValue[SampleIncrement]}]}],ImageSize->Medium])

Example for student discussion

The Graph and Cograph

Manipulate[{Plot[{a x+b,a(x+b)},{x,-5,5},PlotRange->{{-5,5},{-5,5}},PlotStyle->Evaluate[{Thick,#}&/@ {Blue,Red}],AspectRatio->Automatic,ImageSize->Small],Show[RealCograph[x,-5,5,-5,5,a (x+b),SampleIncrement->1,ArrowSource->3],RealCograph[x,-5,5,-5,5,a x+b,SampleIncrement->1,ArrowSource->3,ArrowColor->Red],PlotRange->{{-5.1,5.1},{-.5,3.5}},PlotRangeClipping->True]},{{a,0.7},-2,2,.001,Appearance->"Open"},{{b,1.2},-2,2,.001,Appearance->"Open"},SaveDefinitions->True]

Questions for discussion

My idea is that students will manipulate the slider to see what happens and do some algebra on the relations between a, b and x to explain the phenomena that occur.

Questions about the graph (left figure).

Question G1.  Prove that the two straight lines are parallel for any choice of a and b.

Question G2.  When do the red and blue straight lines in the graph coincide?  Answer: The lines coincide when a = 1 OR b = 0.

• “When do the..." translates into "for what values of a and b do the...".   I predict that which way you ask the question will make a big difference for some students.  To answer this question, you are not solving for x but for a and b.   If you ask "When..." they have to discover this for themselves.

• The answer is disjunctive:   This may be a new idea for some of the students.

Question G3.  Find a formula in terms of a and b for the distance between the two straight lines in the graph.  Answer: (Abs[b-a b]).

Questions about the cograph.

Question C1.  When do the red and blue arrows in the cograph coincide?   Answer: Same as answer to Question G1.

Question C2.  In the cograph, for what a and b are the arrow targets for a given choice of x closer together than the arrow sources?   Answer:  | a | > 1; b is irrelevant.

Question C3.  Manipulate a and b.  For some values the blue arrows all cross each other at the same point.  (Same question for red arrows.)  When does this happen?  Answer: When a is negative.

• The abstract setting of the cograph is shifted by this question (and the next) in this way:  The arrows provide a visual pointer from the input to the output of the function.  All of a sudden we are treating them as mathematical objects (straight line segments in the plane).

• The abstraction is also broken in another way:  The space between the source line and the target line is just a visual separation, but after this question both lines lie on the xy plane.  The question turns a visual illustration into a mathematical object.

Question 4.  Describe the common point where all the red arrows cross when a is negative.   (Same question for blue arrows.)   Answer: The point is {(b/(1-a)),((3 a)/(a-1))}.