Interactive Mathematics in High School

Teaching and Learning with Mathematica

Abigail Brown

Torrey Pines High School

My History with Mathematica

College Student: as calculation tool

Beginning Teaching: make graphs and create problems

Later Teaching: have students use Mathematica

Now and Future: students as developers

Using Mathematica (pre-6)

Lecture Notes Examples

a[n_]= (-1)^n 1/n;

terms=15;

seqplotA=ListPlot[Table[{n,a[n]},{n,1,terms}],PlotStyle->{PointSize[0.03],Hue[0]},AxesOrigin->{0,0},PlotLabel->StyleForm[StringJoin["Sequence Plot ",ToString[TraditionalForm[a[n]]]],FontWeight->"Bold",FontSize->16],ImageSize->350];

sumplotA=ListPlot[Table[{m,Sum[a[n],{n,1,m}]},{m,1,terms}],PlotStyle->{PointSize[0.03],Hue[0]},PlotLabel->StyleForm[StringJoin["Series Plot ",ToString[TraditionalForm[a[n]]]],FontWeight->"Bold",FontSize->16],ImageSize->350]

Guided Computer Lab Lessons

Web Site Materials

Student Presentations

Student Projects

MathRules Web Site

Graphing

Practice Activities

Worksheet Generators

Fun!

Interactive Examples

Algebra

Lines

Manipulate[
grtck=Range[-5,5];
Column[{Graphics[Text[If[showeqn,Style[Row[{Style["y",Italic]," = ",TraditionalForm[If[m==0,If[b==0,"0",""],If[usefractions,Rationalize[m],m]]],If[m==0,"",If[b>0,Row[{Style["x",Italic]," + "}],Style["x ",Italic]]],TraditionalForm[If[b==0,"",If[usefractions,Rationalize[b],b]]]}],20],Style["",20]]],ImageSize->{300,30}],

Plot[m*x+b,{x,-6,6},PlotStyle->{Red,Thick},AxesStyle->Thick,BaseStyle->{14},AspectRatio->Automatic,
PlotRange->{{-6,6},{-6,6}},Ticks->{grtck,grtck},GridLines->{grtck,grtck},ImageSize->300]
}],
{{usefractions,True,""},{True->"fractions",False->"decimals"},ControlType->RadioButtonBar,ControlPlacement->Top},
{{showeqn,True,Style["show equation",14]},{True,False},ControlPlacement->Left},"",
{{m,1.5,Style["slope (m)",14]},-15,15,If[usefractions,1/12,0.001],ImageSize->Medium,ControlPlacement->Top},
{{b,-1,Style["y-intercept (b)",14]},-6,6,If[usefractions,1/12,0.001],ControlType->VerticalSlider,ImageSize->{20,300},ControlPlacement->Left},RotateLabel->True,ControlPlacement->Left,AutorunSequencing->Automatic, ControllerLinking->True,SaveDefinitions->True]

Quizzer

Manipulate[
Quiz[NumberOfProblems,NumberOfForms,probtype],
{{probtype,twostep,""},{twostep->Column[{"two-step","linear eqns"}],multbinomials->Column[{"","multiply","binomials"}],facttrinomials->Column[{"","factor","trinomials"}],quadeqns1->Column[{"","factorable","quad. eqns"}],quadeqns2->Column[{"","quadratic","eqns ≠ 0"}],sys2linear->Column[{"","systems of","linear eqns"}]},ControlType->RadioButtonBar,ControlPlacement->Left,Appearance->"Vertical"},
{{NumberOfProblems,9,"number of problems"},{6,9,12},ControlType->RadioButtonBar},{{NumberOfForms,3,"number of forms"},{1,2,3,4,5,6}},
AutorunSequencing->Automatic,ControllerLinking->True,SaveDefinitions->True,
Initialization:>{
Quiz[probs_,forms_,probtype_]:=TabView[Table[

allproblems={
(* two-step eqns *)
{twostep,Style[Table[
coeff=RandomInteger[{-10,10}];
cnst=RandomInteger[{-10,10}];
ans=RandomInteger[{-10,10}];
While[And[coeff==0],coeff=RandomInteger[{-10,10}]];
prob[i_]:=coeff*x+cnst==ans;
{Row[{n,".  ",TraditionalForm[temp=prob[n]]}],"   ",Row[{"    ",Style["x",Italic]," = ",Solve[temp,x][[1,1,2]]}]},
{n,1,probs}],
16,FontFamily->"Times"],"Two-Step Linear Equations"},

(* multiplying binomials *)
{multbinomials,Style[Table[
prob[i_]:=(x+RandomInteger[{-10,10}])(x+RandomInteger[{-10,10}]);
{Row[{n,".  ",TraditionalForm[temp=prob[n]]}],"",Row[{"    ",TraditionalForm[Expand[temp]]}]},
{n,1,probs}],
16,FontFamily->"Times"],"Product of Binomials"},

(* factoring trinomials *)
{facttrinomials,Style[Table[
prob[i_]:=Expand[(x+RandomInteger[{-10,10}])(x+RandomInteger[{-10,10}])];
temp=prob[n];
soln=Factor[temp];
{Row[{n,".  ",TraditionalForm[temp]}],"   ",TraditionalForm[soln]},
{n,1,probs}],
16,FontFamily->"Times"],"Factor Trinomials"},

(* quadratic equations = 0 *)
{quadeqns1,Style[Table[
prob[i_]:=Expand[(x+RandomInteger[{-10,10}])(x+RandomInteger[{-10,10}])]==0;
temp=prob[n];
soln=Flatten[Solve[temp,x]];
{Row[{n,".  ",TraditionalForm[temp]}],"   ",Row[{"    ","{",soln[[1,2]],If[soln[[1,2]]==soln[[2,2]],"",Row[{", ",soln[[2,2]]}]],"}"}]},
{n,1,probs}],
16,FontFamily->"Times"],"Factorable Quadratic Equations"},

(* quadratic equations not = 0 *)
{quadeqns2,Style[Join[Table[
prob[i_]:=Expand[(x+RandomInteger[{-10,10}])(x+RandomInteger[{-10,10}])]==RandomInteger[{-10,10}];
temp=prob[n];
soln=Flatten[Solve[temp,x]];
{Row[{n,".  ",TraditionalForm[temp]}],"   ",Row[{"    ","{",soln[[1,2]],If[soln[[1,2]]==soln[[2,2]],"",Row[{", ",soln[[2,2]]}]],"}"}]},
{n,1,probs}],{{"","",""}}],
16,FontFamily->"Times"],"Quadratic Equations"},

(* systems of two linear equations *)
{sys2linear,Style[Table[
prob[i_]:={RandomInteger[{-10,10}]x+RandomInteger[{-10,10}]y==RandomInteger[{-10,10}],RandomInteger[{-10,10}]x+RandomInteger[{-10,10}]y==RandomInteger[{-10,10}]};
temp=prob[n];
While[MemberQ[temp,False],temp=prob[n]];
soln=Flatten[Solve[temp,{x,y}]];

{Grid[{{StringJoin[ToString[n],"."],TraditionalForm[Column[temp]]}},Alignment->Top],"   ",If[soln==={},"No Solution",Row[{Style["x",Italic]," = ",soln[[1,2]],",   ",Style["y",Italic]," = ",soln[[2,2]]}]]},

{n,1,probs}],
16,FontFamily->"Times"],"Systems of Linear Equations"}
};

problist=Select[allproblems,(First[#1]==probtype)&][[1,2]];
title=Select[allproblems,(First[#1]==probtype)&][[1,3]];

Row[{"Form ",CharacterRange["A","Z"][[form]]}]->TabView[{"Quiz"->Column[{Style[Row[{title," (Form ",CharacterRange["A","Z"][[form]],")"}],16,Bold,FontFamily->"Helvetica"],Style[Grid[Partition[Table[problist[[1,i,1]],{i,1,Length[problist[[1]]]}],If[probtype===quadeqns2,2,3]],Alignment->Left,
Spacings->{"Rows"->{2,{3},0},"Columns"->3}],14,FontFamily->"Times"],""},Spacings->2],
"Answer Key"->Column[{Style[Row[{title," (Form ",CharacterRange["A","Z"][[form]],")",Style["  Answer Key",Blue]}],16,Bold,FontFamily->"Helvetica"],Style[Grid[Partition[Table[Column[{problist[[1,i,1]],Style[problist[[1,i,3]],Blue]}],{i,1,Length[problist[[1]]]}],If[probtype===quadeqns2,2,3]],Alignment->Left,Spacings->{"Rows"->{1,{2},0},"Columns"->3}],14,FontFamily->"Times"]
},Spacings->2]
}],{form,1,forms}]];
}]

Geometry

Triangle Angles

Manipulate[
Column[{
Style[Row[{"m∠",Style["CAB",Italic]," = ",angle[c,a,b],"°"}],16,FontFamily->"Helvetica"],
Style[Row[{"m∠",Style["ABC",Italic]," = ",angle[a,b,c],"°"}],16,FontFamily->"Helvetica"],
Style[Row[{"m∠",Style["BCA",Italic]," = ",angle[b,c,a],"°"}],16,FontFamily->"Helvetica"],
Style[Row[{"m∠",Style["CAB",Italic]," + ","m∠",Style["ABC",Italic]," + ","m∠",Style["BCA",Italic]," = ",SetAccuracy[angle[c,a,b]+angle[a,b,c]+angle[b,c,a],5],"°"}],16,FontFamily->"Helvetica"],
Graphics[{Line[{a,b,c,a}],
Text[ptStyle["A"],a+{0.3,0.3}],Text[ptStyle["B"],b+{0.3,0.3}],Text[ptStyle["C"],c+{0.3,0.3}]},PlotRange->{{-5,5},{-5,5}},ImageSize->300]
}],
{{a,{2,4}},{-5,-5},{5,5},Locator,Appearance->Style["●",14]},
{{b,{-4,1}},{-5,-5},{5,5},Locator},
{{c,{3,-4}},{-5,-5},{5,5},Locator},FrameLabel->{"","",Style["Angles of a Triangle",FontFamily->"Helvetica",20],""},AutorunSequencing->Automatic, ControllerLinking->True, SaveDefinitions->True,Initialization:>{ptStyle[str_]:=Style[str,FontFamily->"Helvetica",Italic,16];
angle[pt1_,pt2_,pt3_]:=N[ArcCos[(pt1-pt2).(pt3-pt2)/(Norm[(pt1-pt2)]*Norm[(pt3-pt2)])]*180/Pi]}]

Angles with a Transversal

Manipulate[

DynamicModule[{a={-1,0.25},b={1,ptb},c={-1,-0.25},d={1,ptb-0.5},e={pte,1},f={-0.25,-1},g,h},

angle[pt1_,pt2_,pt3_]:=SetAccuracy[Round[ArcCos[(pt1-pt2).(pt3-pt2)/(Norm[(pt1-pt2)]*Norm[(pt3-pt2)])]*180/Pi,0.01],3];

linetwo[pt1_,pt2_]:=(y-pt1[[2]])==(pt2[[2]]-pt1[[2]])/(pt2[[1]]-pt1[[1]])(x-pt1[[1]]);

intsec[{pt1_,pt2_},{pt3_,pt4_}]:=Flatten[{x,y}/.Solve[{linetwo[pt1,pt2],linetwo[pt3,pt4]},{x,y}]];

angletext[e_,g_,b_,color_,adj_,adj2_,num_]:=Graphics[{FontSize->14,FontFamily->"Helvetica",color,Rotate[Text[If[num===0,Row[{angle[e,g,b],"°"}],num],g+0.2Through[{Cos,Sin}[If[adj2==Pi,-1,1]*(Sign[b[[2]]-g[[2]]]angle[b,g,{b[[1]],g[[2]]}])Pi/180+adj*Pi/10+adj2]]],If[adj2==Pi,-1,1]*(Sign[b[[2]]-g[[2]]]angle[b,g,{b[[1]],g[[2]]}])Pi/180]}];

Deploy[
Grid[{{
SliderPane[Dynamic[{a,b,c,d,e,f},
(a={-1,#[[1,2]]};
b={1,#[[2,2]]};c={-1,Min[{#[[3,2]],a[[2]]}]};d={1,b[[2]]-(a[[2]]-c[[2]])};e={#[[5,1]],1};f={#[[6,1]],-1})&],
Dynamic[Refresh[Show[
Plot[2,{x,-1,1}],
Graphics[{Darker[Green,0.3],Thick,Line[{{a,b},{c,d},{e,f}}]}],

Graphics[{PointSize[0.025],Black,Opacity[0],Point[g=intsec[{a,b},{e,f}]],Point[h=intsec[{c,d},{e,f}]]}],

ang2[clr_,num_]:=angletext[e,g,b,clr,1,0,num];ang6[clr_,num_]:=angletext[e,h,d,clr,1,0,num];
ang3[clr_,num_]:=angletext[f,g,a,clr,1,Pi,num];
ang7[clr_,num_]:=angletext[f,h,c,clr,1,Pi,num];ang4[clr_,num_]:=angletext[f,g,b,clr,-1,0,num];ang8[clr_,num_]:=angletext[f,h,d,clr,-1,0,num];
ang1[clr_,num_]:=angletext[e,g,a,clr,-1,Pi,num];ang5[clr_,num_]:=angletext[e,h,c,clr,-1,Pi,num];

If[angletypes===none,{},{}],
If[angletypes===numbers,{ang1[Black,1],ang4[Black,4],ang2[Black,2],ang3[Black,3],ang5[Black,5],ang8[Black,8],ang6[Black,6],ang7[Black,7]},{}],
If[angletypes===altext,{ang1[Red,0],ang8[Red,0],ang2[Blue,0],ang7[Blue,0]},{}],
If[angletypes===altint,{ang4[Red,0],ang5[Red,0],ang3[Blue,0],ang6[Blue,0]},{}],
If[angletypes===consecext,{ang1[Red,0],ang7[Red,0],ang2[Blue,0],ang8[Blue,0]},{}],
If[angletypes===consecint,{ang3[Red,0],ang5[Red,0],ang4[Blue,0],ang6[Blue,0]},{}],
If[angletypes===corresp,{ang1[Red,0],ang5[Red,0],ang2[Purple,0],ang6[Purple,0],ang3[Blue,0],ang7[Blue,0],ang4[Orange,0],ang8[Orange,0]},{}],
If[angletypes===vert,{ang1[Red,0],ang4[Red,0],ang2[Blue,0],ang3[Blue,0],ang5[Orange,0],ang8[Orange,0],ang6[Purple,0],ang7[Purple,0]},{}],
If[angletypes===allequal,{ang1[Red,0],ang4[Red,0],ang2[Blue,0],ang3[Blue,0],ang5[Red,0],ang8[Red,0],ang6[Blue,0],ang7[Blue,0]},{}],

Graphics[{FontSlant->Italic,FontSize->14,FontWeight->Bold,FontFamily->"Helvetica",Text["A",{-1.1,a[[2]]}],Text["B",{1.1,b[[2]]}],Text["C",{-1.1,c[[2]]}],Text["D",{1.1,b[[2]]-(a[[2]]-c[[2]])}],Text["E",{e[[1]],1.1}],Text["F",{f[[1]],-1.1}],{{PointSize[0.05],Opacity[0.75],White,Point[g]},Text["G",g]},{{PointSize[0.05],Opacity[0.75],White,Point[h]},Text["H",h]}}],

PlotRange->1,AspectRatio->Automatic,ImagePadding->20,ImageSize->350,PlotRangeClipping->False,Axes->False],
TrackedSymbols:>{angletypes,a,b,c,d,e,f}]]
],
Column[{"",""
}]

}},ItemSize->{"Columns"->{27,0}},Alignment->{"Rows"->{Top}}]
]
],
{{pte,0.25},-1,1,ControlType->None},{{ptb,0.25},-1,1,ControlType->None},
"","",
{{angletypes,none,""},{none->"no angle labels",numbers->"angle numbers",altext->"alternate exterior",altint->"alternate interior",consecext->"consecutive exterior",consecint->"consecutive interior",corresp->"corresponding",vert->"vertical angles",allequal->"congruent angles"},ControlType->RadioButtonBar,Appearance->"Vertical"},ControlPlacement->Right,TrackedSymbols:>{pte,ptb,angletypes}]

Trigonometry

Illustrating Sine

Manipulate[
Module[{anglegraph,maingraph},
anglegraph[th_,showtext_]:=Show[
Graphics[{
{Lighter[Gray,0.5],Circle[{0,0},1]},
{Darker[Green,0.2],Thick,Circle[{0,0},1,{0,th}]},
{Lighter[Gray,0.5],Line[{{0,0},{Cos[th],Sin[th]}}]},
{Red,Thick,Line[{{Cos[th],0},{Cos[th],Sin[th]}}]},
If[showtext,Rotate[Text[Style[N[Sin[th]],11],{Cos[th]-0.15,Sin[th]/2}],3Pi/2,{Cos[th]-0.15,Sin[th]/2}],{}],
{Lighter[Red,0.3],Dashing[Medium],Line[{{Cos[th],Sin[th]},{2,Sin[th]}}]}
}],
PlotRange->1,ImageSize->145,BaseStyle->{12},Axes->True,Ticks->{{-1,1},{-1,1}},PlotRange->{{-1,1},{-1,1}},PlotRangePadding->0.25];

maingraph[th_,showtext_]:=Module[{},
Show[Plot[{Sin[x]},{x,0.0001,th},PlotRange->{{0,2Pi},{-1,1}},PlotRangePadding->{0,0.25},ImagePadding->{{30,12},{0,0}},PlotRangeClipping->False,PlotStyle->Gray,
Ticks->{Table[{n Pi/4,n Pi/4},{n,0,8}],Table[n,{n,-1,1,1/2}]},
GridLines->{Table[{n Pi/4,Lighter[Gray,0.7]},{n,-2,8}],Table[{n,Lighter[Gray,0.7]},{n,-1,1,1/2}]},ImageSize->{Automatic,145}],
Graphics[{If[showtext,Rotate[Text[Style[N[Sin[th]],11],{th+0.15,Sin[th]/2}],3Pi/2,{th+0.15,Sin[th]/2}],{}],
{Lighter[Red,0.3],Dashing[Medium],Line[{{th,Sin[th]},{-2,Sin[th]}}]},
{Darker[Green,0.2],Thick,Line[{{0,0},{th,0}}]},
{Red,Thick,Line[{{th,0},{th,Sin[th]}}]}
}],AspectRatio->Automatic,BaseStyle->{12}]];

DynamicModule[{pt={Cos[ptctrl],Sin[ptctrl]},pt2={ptctrl,0}},
Labeled[Grid[{
{SliderPane[Dynamic[pt,
{(pt={Cos[pt2[[1]]],Sin[pt2[[1]]]})&,
(pt=Normalize[#];pt2={If[pt2=={2Pi,0},2Pi,Mod[ArcTan[#[[1]],#[[2]]],2 Pi]],0})&,
(pt=Normalize[#];ptctrl=pt2[[1]])&}],
Dynamic[anglegraph[If[pt2=={2Pi,0},2Pi,Mod[ArcTan[pt[[1]],pt[[2]]],2 Pi]],showvalue]]],
SliderPane[Dynamic[pt2,
{(pt2={If[pt2=={2Pi,0},2Pi,Mod[ArcTan[pt[[1]],pt[[2]]],2 Pi]],0})&,
(pt2={#[[1]],0};pt={Cos[#[[1]]],Sin[#[[1]]]})&,
(pt2={#[[1]],0};ptctrl=#[[1]])&}],
Dynamic[maingraph[If[pt2=={2Pi,0},2Pi,Mod[ArcTan[pt[[1]],pt[[2]]],2 Pi]],showvalue]]]}},Spacings->0],{Style[Row[{"Illustrating ",Style["sin(",Red],Style["x",Italic,Bold,Darker[Green,0.3]],Style[")",Red]}],20,FontFamily->"Helvetica",Gray],
Style["",10,Lighter[Gray,0.7],FontFamily->"Helvetica"]},{{Top,Left},{Bottom,Right}}]]
],
{{showvalue,False,"show value"},{False,True}},
{{ptctrl,Pi/6,""},0,2Pi},TrackedSymbols:>{showvalue,ptctrl},
AutorunSequencing->Automatic,SaveDefinitions->True,ControllerLinking->True]

Illustrating Cosecant

Manipulate[
Module[{anglegraph,maingraph},
anglegraph[th1_,showtext_]:=Module[{th},
th=Which[th1==0,0.000001,th1==Pi,3.14159,th1==2Pi,2*3.14159,True,th1];
Show[Graphics[{
{Gray,Circle[{0,0},1]},
{Darker[Green,0.2],Thick,Circle[{0,0},1,{0,th}]},
{Gray,Line[{{-6,If[Csc[th]≥0,1,-1]},{6,If[Csc[th]≥0,1,-1]}}]},
{Red,Thick,Line[{{0,0},If[th1==0,6,Abs[Csc[th]]]*{Cos[th],Sin[th]}}]},
If[showtext,Text[Style[If[MemberQ[{0.,Pi,2Pi},th1],"∞",N[Csc[th]]],11],{Sign[Cos[th]]*1.5,Sign[Sin[th]]*1.25}],{}]
}],
ImageSize->{270,Automatic},BaseStyle->{11},Axes->True,Ticks->{Range[-5,5],{-1,1}},PlotRange->{{-5,5},{-1.1,1.1}},PlotRangePadding->{{0.1,0.1},{0.4,0.4}}]];

maingraph[th_,showtext_]:=Module[{theta,labelpos},
theta=Which[th==0,0.000001,th==Pi,3.14159,th==2Pi,2*3.14159,True,th];
labelpos=Which[Csc[theta]/2<-3,-3,Csc[theta]/2>3,3,True,Csc[theta]/2];
Show[Plot[{Csc[x]},{x,0.0001,theta},Exclusions->{x==Pi,x==2Pi},PlotRange->{{0,2Pi},{-5,5}},PlotRangePadding->{0,0.25},ImagePadding->{{15,12},{0,0}},PlotRangeClipping->False,PlotStyle->Gray,ExclusionsStyle->Directive[Gray,Dashing[Small]],
Ticks->{Table[{n Pi/4,n Pi/4},{n,0,8}],Table[n,{n,-5,5}]},
GridLines->{Table[{n Pi/4,Lighter[Gray,0.7]},{n,-2,8}],Table[{n,Lighter[Gray,0.7]},{n,-5,5,1}]},ImageSize->{Automatic,270},BaseStyle->{11}],
Graphics[{If[showtext,Rotate[Text[Style[If[MemberQ[{0.,Pi,2Pi},th],"∞",N[Csc[theta]]],11],{theta+0.3,labelpos+0.1}],3Pi/2,{theta+0.3,labelpos+0.1}],{}],
{Darker[Green,0.2],Thick,Line[{{0,0},{theta,0}}]},
{Red,Thick,Line[{{theta,0},{theta,Csc[theta]}}]}
}],AspectRatio->Automatic
]];

DynamicModule[{pt={Cos[ptctrl],Sin[ptctrl]},pt2={ptctrl,0}},
Labeled[Grid[{
{SliderPane[Dynamic[pt,
{(pt={Cos[pt2[[1]]],Sin[pt2[[1]]]})&,
(pt=Normalize[#];pt2={If[pt2=={2Pi,0},2Pi,Mod[ArcTan[#[[1]],#[[2]]],2 Pi]],0})&,
(pt=Normalize[#];ptctrl=pt2[[1]])&}],
Dynamic[anglegraph[If[pt2=={2Pi,0},2Pi,Mod[ArcTan[pt[[1]],pt[[2]]],2 Pi]],showvalue]]]},
{SliderPane[Dynamic[pt2,
{(pt2={If[pt2=={2Pi,0},2Pi,Mod[ArcTan[pt[[1]],pt[[2]]],2 Pi]],0})&,
(pt2={#[[1]],0};pt={Cos[#[[1]]],Sin[#[[1]]]})&,
(pt2={#[[1]],0};ptctrl=#[[1]])&}],
Dynamic[maingraph[If[pt2=={2Pi,0},2Pi,Mod[ArcTan[pt[[1]],pt[[2]]],2 Pi]],showvalue]]]}},Spacings->0],
{Style[Row[{"Illustrating ",Style["csc(",Red],Style["x",Italic,Bold,Darker[Green,0.3]],Style[")",Red]}],20,FontFamily->"Helvetica",Gray],Style["",10,Lighter[Gray,0.7],FontFamily->"Helvetica"]},{{Top,Left},{Bottom,Center}}]]
],
{{showvalue,False,"show value"},{False,True}},
{{ptctrl,Pi/6,""},0,2Pi},TrackedSymbols:>{showvalue,ptctrl},
AutorunSequencing->Automatic,SaveDefinitions->True,ControllerLinking->True]

Calculus

Graphing Derivatives

Manipulate[

poly[x_]:=-(x-1)(x-3)(x-6)(x-9)/30+2;
trig[x_]:=Sin[x]+Cos[2x];
ln[x_]:=3 Log[x]/2;

xmin=0; xmax=10;

plotoptions={PlotRange->{{0,10},{-5,5}}, PlotRangePadding->0.25,AspectRatio->Automatic,ImageSize->300};

curve[x0_]:=Show[Plot[fcn[x],{x,xmin,xmax},Evaluate[plotoptions]],Graphics[Point[{x0,fcn[x0]}]]];
tline[x0_]:=Plot[fcn'[x0](x-x0)+fcn[x0],{x,xmin,xmax},PlotStyle->Purple];
deriv1[x0_]:=Show[Plot[fcn'[x],{x,xmin,xmax},Evaluate[plotoptions],PlotStyle->Brown],Graphics[Point[{x0,fcn'[x0]}]]];
deriv2[x0_]:=Show[Plot[fcn''[x],{x,xmin,xmax},Evaluate[plotoptions],PlotStyle->Gray],Graphics[Point[{x0,fcn''[x0]}]]];

Dynamic[Refresh[Show[curve[pt[[1]]],Through[showderivs[pt[[1]]]]],TrackedSymbols:>{pt,showderivs}]],

{{fcn,poly,""},{poly->"polynomial",trig->"trigonometric",ln->"logarithmic"},ControlType->RadioButtonBar,ControlPlacement->Top},
Delimiter,"",
{{pt,{1,0}},{0,0},{10,0},Locator,Appearance->Style["|",20,Bold,Red]},
{{showderivs,{tline},""},{tline->" tangent line  ",deriv1->" first derivative  ",deriv2->" second derivative"},ControlType->CheckboxBar,ControlPlacement->Top},
FrameLabel->Column[{Style[Row[{"move the ",Style["red",Red]," marker along the ",Style["x",Italic],"-axis"}],16]},Alignment->Center],TrackedSymbols:>{pt,showderivs,fcn},AutorunSequencing->{1,2},ControllerLinking->True,SaveDefinitions->True]

Solids of Known Cross Sections

Manipulate[

Refresh[
Switch[region,
reg1,
f1=Function[{x},-Sqrt[1-x^2]];
g1=Function[{x},Sqrt[1-x^2]];
xmin1=-1;xmax1=1,
reg2,
f1=Function[{x},-1];
g1=Function[{x},1];
xmin1=-1;xmax1=1,
reg3,
f1=Function[{x},0];
g1=Function[{x},1-Abs[x]];
xmin1=-1;xmax1=1,
reg4,
f1=Function[{x},2(x-1/2)^2-1/2];
g1=Function[{x},x];
xmin1=0;xmax1=1,
reg5,
f1=Function[{x},-Sin[2 x]-2];
g1=Function[{x},Sin[2x]+2];
xmin1=0;xmax1=2Pi
],TrackedSymbols:>{region}];

plotoptions={Boxed->False,Axes->MemberQ[opts,showaxes],AxesEdge->{{-1,-1},{-1,-1},{-1,-1}},Mesh->If[MemberQ[opts,showmesh],{20,0},None],PlotPoints->If[shape===semicircles,{20,20},{40,2}],PlotRange->Automatic,BoxRatios->Automatic,ViewPoint->{2.791, -1.137, 1.540} ,ImageSize->300};

squares[f_,g_,xmin_,xmax_]:=ParametricPlot3D[{{x,(g[x]-f[x])t+f[x],g[x]-f[x]},{x,(g[x]-f[x])t+f[x],0},{x,f[x],t(g[x]-f[x])},{x,g[x],t(g[x]-f[x])}},{x,xmin,xmax},{t,0,1},
Evaluate[plotoptions]];

eqtriangles[f_,g_,xmin_,xmax_]:=
ParametricPlot3D[{{x,(g[x]-f[x])t/2+f[x],Sqrt[3](g[x]-f[x])t/2},{x,(f[x]-g[x])t/2+g[x],Sqrt[3](g[x]-f[x])t/2},{x,(g[x]-f[x])t+f[x],0}},{x,xmin,xmax},{t,0,1},
Evaluate[plotoptions]];

semicircles[f_,g_,xmin_,xmax_]:=ParametricPlot3D[{{x,(g[x]-f[x])t+f[x],Sqrt[((g[x]-f[x])/2)^2-((g[x]-f[x])t+(f[x]-g[x])/2)^2]},{x,(g[x]-f[x])t+f[x],0}},{x,xmin,xmax},{t,0,1},
Evaluate[plotoptions]];

rectangles[f_,g_,xmin_,xmax_]:=ParametricPlot3D[{{x,(g[x]-f[x])t+f[x],(g[x]-f[x])/2},{x,(g[x]-f[x])t+f[x],0},{x,f[x],t(g[x]-f[x])/2},{x,g[x],t(g[x]-f[x])/2}},{x,xmin,xmax},{t,0,1},
Evaluate[plotoptions]];

graph[f_,g_,xmin_,xmax_]:=Deploy[Labeled[Plot[{f[x],g[x]},{x,xmin,xmax},PlotStyle->{{Black,Thickness[0.01]}},Filling->True,AspectRatio->Automatic,ImageSize->150],Column[{"",Style["Base Region",FontFamily->"Helvetica"]}]]];

Grid[{{graph[f1,g1,xmin1,xmax1],shape[f1,g1,xmin1,xmax1]}}],

{{region,reg1,"base region"},{reg1->"circle",reg2->"square",reg3->"triangle",reg4->"algebraic",reg5->"trigonometric"}},
{{shape,squares,"cross sections"},{squares->"squares",eqtriangles->"equilateral triangles",semicircles->"semicircles",rectangles->"rectangles"}},
"cross sections are perpendicular to the x-axis",
{{opts,{showmesh},""},{showmesh,showaxes},ControlType->CheckboxBar,ControlPlacement->Bottom},
TrackedSymbols:>{shape,region,opts},ControllerLinking->True
]

Statistics

Manipulate[(*Dice*)dicelist={{Disk[{0,0},0.2]},{Disk[{0.6,0.6},0.2],Disk[{-0.6,-0.6},0.2]},{Disk[{0,0},0.2],Disk[{0.6,0.6},0.2],Disk[{-0.6,-0.6},0.2]},{Disk[{0.6,0.6},0.2],Disk[{-0.6,-0.6},0.2],Disk[{0.6,-0.6},0.2],Disk[{-0.6,0.6},0.2]},{Disk[{0,0},0.2],Disk[{0.6,0.6},0.2],Disk[{-0.6,-0.6},0.2],Disk[{0.6,-0.6},0.2],Disk[{-0.6,0.6},0.2]},{Disk[{-0.6,0},0.2],Disk[{0.6,0},0.2],Disk[{0.6,0.6},0.2],Disk[{-0.6,-0.6},0.2],Disk[{0.6,-0.6},0.2],Disk[{-0.6,0.6},0.2]}};
Dice[i_]:=Graphics[{{White,EdgeForm[Directive[Black,Thickness[0.045]]],Rectangle[{-1,-1},{1,1}]},If[MemberQ[Range[1,6],i],Part[dicelist,i],{}]},ImageSize->50];
hist[lst_,fixmax_]:=Module[{},xticks=Transpose[{Range[2.5,12.5],Range[2,12]}];
Show[Graphics[{White,Rectangle[]}],If[lst=={},{},Histogram[lst,HistogramCategories->{2,3,4,5,6,7,8,9,10,11,12,13},BarStyle->Red]],Axes->True,Ticks->{xticks,Automatic},AxesOrigin->{1.75,0},AspectRatio->1/GoldenRatio,ImageSize->{400,400/GoldenRatio},PlotRange->{{2.25,13.25},{0,If[fixmax,max+1,Automatic]}},ImagePadding->{{40,20},{20,20}}]];
If[tracker===numberoftrials,tracker=numberoftrials,n=0;
rolls=Table[RandomInteger[{1,6}],{numberoftrials},{2}];
data=Apply[Plus,rolls,2];
md=Sort@Commonest[data];
max=Count[data,First[md]];
tracker=numberoftrials];
Deploy[Column[{hist[Take[data,{1,n}],fixmax],Row[{Dice[If[n==0,0,rolls[[n,1]]]]," ",Dice[If[n==0,0,rolls[[n,2]]]],"   ","number of trials = ",n}]}]],{{fixmax,True,"set maximum"},{True,False}},{{numberoftrials,200,"total trials"},{10,50,100,200,500,1000,2000}},{{n,0,"number of trials"},0,numberoftrials,1,Appearance->"Open"},TrackedSymbols:>{fixmax,n,numberoftrials},AutorunSequencing->{3},ControllerLinking->True,Initialization:>{Needs["Histograms`"];<<Histograms`;}]

Teaching and Learning with Mathematica

Visualization

Multiple Representations

Changed Conversations

Experimentation

Interest in Mathematics

What's Next?

More Mathematica in More Classes

Advanced Topics Class

Community Service

MathematiClub Web Site

Interactive Mathematics in High School

Abigail Brown
Torrey Pines High School

www.abbymath.com

www.MathRules.org (webMathematica)

www.MathematiClub.com (coming soon!)