Making Mathematics Fun, Accessible, and Challenging using Mathematica 6

Paul C. Abbott

School of Physics, M013

Abstract: The theme of this year's conference is “Making Mathematics Fun, Accessible and Challenging through Technology”. Version 6 of Mathematica, released in May 2007, is instantly interactive, allowing teachers and students to easily construct live interfaces to illustrate and investigate mathematical concepts at all levels []. Over 2000 examples of these interactive capabilities, including a number written by high school students, are freely available at the Demonstrations Project website []. Other new features of Version 6, relevant to this conference, include high-quality adaptive visualization of functions and load-on-demand data of mathematical properties such as graphs, knots, lattices, and polyhedra.

. Introduction

Version 1 of Mathematica was introduced in 1998 as a “System for doing Mathematics by Computer”, combining numerics, symbolic computation, and graphics []. Almost 20 years later, Mathematica 6 was released, now consisting of seven tightly integrated components:

Although there are a huge number of new features in Mathematica 6, from the perspective of ATCM, the most important ones are:

This paper is itself a Mathematica Notebook [] and includes many interactive examples. Unfortunately, there is no easy way to transfer this interactivity to paper. However, even if you do not have access to Mathematica, you can run the interactive examples using the freely available Mathematica Player [].

. Visualization and Graphics

Here are a few examples of the enhanced visualization and graphics.

Use RegionPlot to display the region in which (((x+(1/2)))^2)+(y^2)≤1⊻(((x-(1/2)))^2)+(y^2)≤1.

RegionPlot[(((x+(1/2)))^2)+(y^2)≤1⊻(((x-(1/2)))^2)+(y^2)≤1,{x,-1.6,1.6},{y,-1,1}]

Plot sin(x+cos(y)) over [-π,2π]×[-π,2π] restricted such that x<(y^2) using RegionFunction.

Plot3D[Sin[x+Cos[y]],{x,-π,2 π},{y,-π,2 π},RegionFunction->Function[{x,y},x<(y^2)],Filling->Bottom,Mesh->8]

Produce a 3D Contour plot of (x^2)+(y^2)-(z^2)==0.1.

ContourPlot3D[(x^2)+(y^2)-(z^2)==0.1,{x,-1,1},{y,-1,1},{z,-1,1},ContourStyle->{{Yellow,Thickness[0.04]}},Mesh->None]

Smooth shading is generated via geometric or analytic vertex normal computation.

ContourPlot3D[16 (x^3)+16 (y^3)-31 (z^3)+24 (x^2) z-48 (x^2) y-48 x (y^2)+24 (y^2) z-54 (Sqrt[3]) (z^2)-72 z==1,{x,-2.5,2.5},{y,-2.5,2.5},{z,-2.5,2.5},Mesh->None,PlotPoints->50,ContourStyle->{{Brown,Specularity[White,20]}},Background->Black,Boxed->False,Axes->False,SphericalRegion->True,Mesh->All]

Here is an example of an interesting algebraic surface.

ContourPlot3D[(x^4)-5 (x^2)+(y^4)-5 (y^2)+(z^4)-5 (z^2)==-12.5,{x,-3,3},{y,-3,3},{z,-2.3,2.3},PlotPoints->50,MeshFunctions->{Function[{x,y,z},x y z]},MeshStyle->Purple,MeshShading->{Blue,Yellow,Green},ContourStyle->Green,Boxed->False,Axes->False]

. Data Sources

Next I present a few examples of the variety of data sources available in Mathematica 6.

Generate an array of Cayley graphs.

GraphicsGrid[Partition[GraphData/@GraphData["CayleyGraph"],14]]

If you take a polyhedron, cut along certain edges, and lay the whole thing flat the result is called a polyhedron net.

Here is a table of net images, indexed using Tooltip.

GraphicsGrid[Partition[(Graphics[Tooltip[PolyhedronData[#1,"NetImage"][[1]],PolyhedronData[#1,"Name"]]]&)/@PolyhedronData["NetImage","Defined"],15]]

Look-up those nuclear isotopes with mass-number A in the range 50≤A≤51 and then draw a decay network.

is=Select[IsotopeData[],50≤IsotopeData[#,"MassNumber"]≤51&]

LayeredGraphPlot[Table[(IsotopeData[#,"Symbol"]&/@(i->#))&/@IsotopeData[i,"DaughterNuclides"],{i,is}]//Flatten,DirectedEdges->True,VertexLabeling->True]

Visualize the caffeine molecule in 3D.

ChemicalData["Caffeine","MoleculePlot"]

Generate a graphic of solar system orbit paths.

Graphics3D[{Red,AbsoluteThickness[1],AstronomicalData[#,"OrbitPath"]&/@AstronomicalData["Planet"]}]

Generate a world map using a Mollweide projection.

CountryData["World",{"Shape","Mollweide"}]

Since ATCM 2007 is held in Taiwan, find the country's population and show the shape of its electrical plug.

CountryData["Taiwan",#]&/@{"Population","ElectricalGridPlugImages"}

. Dynamic Interactivity

Version 6 includes a range of capabilities that define a new kind of dynamic interactive computing.

. Manipulate

Manipulate is a new function that enables users to create dynamic user interfaces as easily as they might create a table or a plot. Manipulate is flexible and is tightly integrated with Mathematica notebooks, typesetting, and graphics.

Show the factors of 1-(x^n) for integer parameter 1≤n≤120.

Manipulate[Factor[x^n-1],{n,1,120,1}]

Animate a three-dimensional plot of sin(x y+t) over [0,4]×[0,4] as t varies from 0 to 2π.

Manipulate[Plot3D[Sin[x y+t],{x,0,4},{y,0,4},ImageSize->200],{t,0,2π},ControlPlacement->Left,ControlType->VerticalSlider]

. LocatorPane and ClickPane

Here are two examples of interactive graphic solutions to matrix differential equations of the form

(OverDot[x])(t)==A·x(t),

for Dynamic values of the initial condition, x(0), provided by the location of a mouse click.

Visualize solutions using LocatorPane.

DynamicModule[{pt={{4,0},{0,6},{-5,-5}}},LocatorPane[Dynamic[pt],Dynamic@ParametricPlot[Evaluate[MatrixExp[(({{-1.1, 0.9}, {-1.4, 0.3}})) t,#]&/@pt],{t,0,10},PlotRange->7,ImageSize->200]]]

Keep track of all solutions as you go using ClickPane.

DynamicModule[{s={}},ClickPane[Framed@Dynamic@ParametricPlot[s,{t,0,10},PlotRange->5,ImageSize->200],(AppendTo[s,MatrixExp[(({{-1.1, 0.9}, {-1.4, 0.3}})) t].#])&]]

. Teaching Examples

I have just started using this new interactive functionality in my teaching and would like to share with you some examples.

. Complex Numbers Applied to Electric Circuits

Using complex numbers one can generalize Ohm's law so as to handle alternating current (AC) circuits containing resistors R, inductors L, and capacitors, C. First one needs to make clear the cartesian and polar representations of complex numbers.

The imaginary axis is perpendicular to the real axis. The point {x,y}≡r {cos(θ),sin(θ)} is represented by z==x+i y==r (e^(i θ)) and is indicated by a Locator.

Manipulate[theta(a_):=If[a[[2]]≥0,arg(a[[1]]+I a[[2]]),arg(a[[1]]+I a[[2]])+2 π];Column[{Text[Style[Row[{z," = ",SetAccuracy[a[[1]]+I a[[2]],2],Spacer[40],r," = ",SetAccuracy[Norm[a],3],Spacer[40],"θ = ",SetAccuracy[theta(a),3]}]]],Graphics[{{Dashed,Line[{a,5{ sgn(a[[1]]),((a[[2]] sgn(a[[1]]))/(a[[1]]))}}]},Red,Line[{{0,0},a}],Gray,Line[{{0,a[[2]]},a}],Line[{{a[[1]],0},a}],Circle[{0,0},.5,{0,theta(a)}],Text[Style[x==r cos(θ),N[12 (1-(E^(-\[LeftBracketingBar]a[[1]]\[RightBracketingBar])))]],{((a[[1]])/2),a[[2]]+.25}],Text[Style[y==r sin(θ),N[12 (1-(E^(-\[LeftBracketingBar]a[[2]]\[RightBracketingBar])))]],{a[[1]]+(E^(-\[LeftBracketingBar]a[[2]]\[RightBracketingBar])),((a[[2]])/2)},If[a[[1]]≥0,Left,Right]],Text[Style[r,N[12 (1-(E^(-\[LeftBracketingBar]\[LeftDoubleBracketingBar]a\[RightDoubleBracketingBar]\[RightBracketingBar])))]],{((a[[1]])/2),((a[[2]])/2)+.25}],Text[Style["θ",N[12 (1-(E^(-\[LeftBracketingBar]\[LeftDoubleBracketingBar]a\[RightDoubleBracketingBar]\[RightBracketingBar])))]],{.7 cos(((theta(a))/2)),.6 sin(((theta(a))/2))}]},ImageSize->250,PlotRange->5,Axes->True,AxesLabel->{Real,Imaginary}]},Center],{{a,{3,3}},{-5,-5},{5,5},Locator},TrackedSymbols:>{a}]

Now consider the circuit in Figure .

The complex impedance of this circuit is

Z=(Subscript[Z, L])+(Subscript[Z, C])+(Subscript[Z, R])=R+(1/(i ω C))+i ω L=R+i (ω L-(1/(ω C))),

where ω==2π ν is the angular frequency of oscillation of the power source. Usually we are only interested in the magnitude and phase of Z=|Z|(e^(i ϕ)):

|Z|=(Sqrt[(R^2)+(((ω L-(1/(ω C))))^2)]), tan(ϕ)=(y/x)=((ω L-(1/(ω C)))/R).

The average power ⟨P⟩ supplied by the power source in Figure  is

⟨P⟩=((OverTilde[ℐ])^2)R=(((OverTilde[V])^2)/(Z^2))R=((((OverTilde[V])^2)R (ω^2))/((ω^2)(R^2)+(L^2) ((((ω^2)-(Subscript[ω, 0]^2)))^2)))=(((OverTilde[V])^2)/R)/(1+((L^2)/(R^2)) (ω^2) (((1-((Subscript[ω, 0]^2)/(ω^2))))^2)),

where (Subscript[ω, 0])==1/(Sqrt[L C]) is the resonant frequency. Plots of ⟨P⟩ versus ω are called resonance curves. Here is a demonstration that shows how resonant curves () depend upon the resistance R and the inductance L.

Log-linear plot of ⟨P⟩ versus ω for the series LCR circuit in Figure . The line marked with Δ ω=R/L joins the two half-power points and is called the full-width at half maximum (FWHM). The (dimensionless) quality factor is Q=(Subscript[ω, 0])/Δ ω.

Manipulate[LogLinearPlot[ℛ/((ℛ^2)+(ℒ^2) (((ω-(1/ω)))^2)),{ω,0.2,5},PlotRange->{0,2.1},AspectRatio->0.4,ImageSize->{400,180},AxesLabel->{ω,⟨P⟩},Ticks->{Table[{(2^k),(2^k) (Subscript[ω, 0])},{k,-2,2}],{{(1/ℛ),((OverTilde[V])^2)/R},{(1/(2ℛ)),(1/2)((OverTilde[V])^2)/R}}},Epilog->{Line[{{log((((Sqrt[4 (ℒ^2)+(ℛ^2)])-ℛ)/(2 ℒ))),(1/(2ℛ))},{log((((Sqrt[4 (ℒ^2)+(ℛ^2)])+ℛ)/(2 ℒ))),(1/(2ℛ))}}],Text[Δ ω, {0,(1/(2ℛ))+0.08}],GrayLevel[0.5],Line[{{0,0},{0,(1/(2ℛ))-0.05}}],Line[{{0,(1/(2ℛ))+0.15},{0,(1/ℛ)}}]}],{{ℛ,0.5,R},0.5,2},{{ℒ,0.5,L},0.5,2}]

Once the behavior of simple circuits is understood, one can move to more complicated circuits such as that shown in Figure , where we measure the output voltage (Subscript[(OverTilde[V]), out]) across (Subscript[R, 2]).

The total impedance of this circuit is complicated. However, we can effectively consider it as being built from two filter circuits  as that shown in Figure .

Considering the output, (Subscript[(OverTilde[V]), out]), of the first filter as the input, (Subscript[(OverTilde[V]), in]), to the second filter, one sees that the transfer function of this combination is, approximately, just the product of the transfer function of each filter:

|((Subscript[(OverTilde[V]), out])/(Subscript[(OverTilde[V]), in]))|≈(1/(Sqrt[1+(((ω/(Subscript[ω, 1])))^2)]))(1/(Sqrt[1+((((Subscript[ω , 2])/ω))^2)])),where (Subscript[ω, i])=(1/((Subscript[R, i]) (Subscript[C, i]))).

Log-linear plot of the approximate transfer function |(Subscript[(OverTilde[V]), out])/(Subscript[(OverTilde[V]), in])| versus ω for a band-pass filter. The centre frequency is the geometric mean of the two half-power frequencies, (Subscript[ω, C])=(Sqrt[(Subscript[ω, 1])(Subscript[ω, 2])])≈316 rad·(s^(-1)).

Manipulate[Module[{c1=log((1/((Subscript[R, 1]) (Subscript[C, 1])))),c2=log((1/((Subscript[R, 2]) (Subscript[C, 2]))))},LogLinearPlot[{(1/(Sqrt[1+(((ω (Subscript[R, 1]) (Subscript[C, 1])))^2)])),(1/(Sqrt[1+1/(((ω (Subscript[R, 2]) (Subscript[C, 2])))^2)])),(1/(Sqrt[1+(((ω (Subscript[R, 1]) (Subscript[C, 1])))^2)]))(1/(Sqrt[1+1/(((ω (Subscript[R, 2]) (Subscript[C, 2])))^2)]))},{ω,0.01,(10^6)},PlotRange->{{1/10Min[{(1/((Subscript[R, 1]) (Subscript[C, 1]))),(1/((Subscript[R, 2]) (Subscript[C, 2])))}],10 Max[{(1/((Subscript[R, 1]) (Subscript[C, 1]))),(1/((Subscript[R, 2]) (Subscript[C, 2])))}]},{0,1.1}},AxesLabel->{ω,"\[LeftBracketingBar](Subscript[(OverTilde[V]), out])/(Subscript[(OverTilde[V]), in])\[RightBracketingBar]"},Ticks->{Join[{{1/((Subscript[R, 1]) (Subscript[C, 1])),Tooltip[(Subscript[ω, 1]),PaddedForm[(1/((Subscript[R, 1]) (Subscript[C, 1]))),{3,2},ExponentFunction->Identity]]},{1/( (Subscript[R, 2]) (Subscript[C, 2])),Tooltip[(Subscript[ω, 2]),PaddedForm [(1/((Subscript[R, 2]) (Subscript[C, 2]))),{3,2},ExponentFunction->Identity]]},{1/(Sqrt[ (Subscript[R, 1]) (Subscript[C, 1]) (Subscript[R, 2]) (Subscript[C, 2])]),Tooltip[(Subscript[ω, C]),PaddedForm[1/(Sqrt[ (Subscript[R, 1]) (Subscript[C, 1]) (Subscript[R, 2]) (Subscript[C, 2])]),{3,2},ExponentFunction->Identity]]}}],{{1,1}}},Epilog->{GrayLevel[0.5],Line[{{log(0.01),1},{log((10^6)),1}}],Line[{{c1,0},{c1,(1/(Sqrt[2]))(1/(Sqrt[1+((( (((Subscript[R, 1]) (Subscript[C, 1]))/((Subscript[R, 2]) (Subscript[C, 2])))))^2)]))}}],Line[{{c2,0},{c2,(1/(Sqrt[2]))(1/(Sqrt[1+((( (((Subscript[R, 1]) (Subscript[C, 1]))/((Subscript[R, 2]) (Subscript[C, 2])))))^2)]))}}],Line[{{((c1+c2)/2),0},{((c1+c2)/2),(1/(1+(((Subscript[R, 1]) (Subscript[C, 1]))/((Subscript[R, 2]) (Subscript[C, 2])))))}}]},ImageSize->{400,150},AspectRatio->0.3]],{{(Subscript[R, 1]),5.×(10^3),"(Subscript[R, 1])"},0.01×(10^3),500.×(10^3),Appearance->"Labeled"},{{(Subscript[C, 1]),0.1×(10^(-6)),"(Subscript[C, 1])"},0.01×(10^(-7)),100.×(10^(-7)),Appearance->"Labeled"},{{(Subscript[R, 2]),2.×(10^5),"(Subscript[R, 2])"},5.×(10^4),20.×(10^5),Appearance->"Labeled"},{{(Subscript[C, 2]),0.1×(10^(-6)),"(Subscript[C, 2])"},0.01×(10^(-6)),100.×(10^(-7)),Appearance->"Labeled"}]

. Forced Oscillations and Resonance

Consider horizontal motion on a frictionless surface of a mass-spring system. The spring is loosely wound and can be compressed as well as stretched with force F==-k x, where k is the spring constant and x is the displacement from the equilibrium position.

Graphs of x (—), v (—), and a (—) for a mass-spring system.

Manipulate[Module[{k=sin(2 π τ)+2,α=13 π,n},Show(Graphics[{Line[(({{-4, 0}, {0, 0}}))],Line[(({{k ((α/3)+2), 0}, {((α/3)+2) k+10, 0}}))],Rectangle[{90,-1},{160,1},Plot[Evaluate[Table[(((∂^n)sin(((2 π t)/3)))/(∂(t^n))),{n,0,2}]],{t,0,3τ},PlotRange->{{0,3},1.1{-4((π^2)/9),4((π^2)/9)}},AxesLabel->{t,""}]],AbsoluteThickness[2],Line[(({{-4, -1}, {-4, 1}}))],Rectangle[{((α/3)+2) k+10,-0.5},{((α/3)+2) k+30,0.5}],Red,Line[(({{((α/3)+2) 2+20, -1}, {((α/3)+2) 2+20, 1}}))]}],ParametricPlot[{k ((θ/3)-cos(θ)+1),sin(θ)},{θ,0,α}],PlotRange->{{-4,160},All},AspectRatio->(1/4),ImageSize->450)],{{τ,0.8,t/T},0.001,1}]

The acceleration is always toward the equilibrium position (x=0) and proportional to distance from the that point.

Now introduce a damping force, (Subscript[F, d])=-b v, that opposes the motion and is proportional to the instantaneous velocity. Students should have an intuitive feel for the behaviour of this system; if the spring is stretched and then released, the mass will undergo damped simple harmonic motion with the amplitude reducing over time. And if the damping is sufficiently large, the mass will not oscillate at all.

From Newton's second law, the differential equation describing the motion of the mass, m, is

m (((d^2)x(t))/(d(t^2)))+b((dx(t))/(dt))+k x(t)==0,

and students should therefore have a ‘feel’ for the behavior of solutions to this differential equation, namely exponential decay of harmonic motion, that is

x(t)==(Subscript[x, 0]) (e^(-t/(2τ)))cos(α t),

where (Subscript[x, 0])==x(0) is determined by the initial condition and, to satisfy the differential equation, the parameters are τ==1/Δ ω==m/b and α=(Subscript[ω, 0])(Sqrt[1-1/(4(Q^2))]), where (Subscript[ω, 0])==(Sqrt[k/m])is the resonant frequency and the (dimensionless) quality factor is Q=(Subscript[ω, 0])/Δ ω.

An interesting question is what happens to the total energy. Energy is dissipated only when the mass is moving. For this reason, the total energy decays exponentially only on average.

The top plot displays the solution to the differential equation of the form (Subscript[x, 0]) (e^(-t/(2τ)))cos(α t). The envelope of the oscillation (—) is ±(Subscript[x, 0])(e^(-t/(2τ))). The bottom plot shows the kinetic energy (—), K=(1/2)m (v^2), spring potential energy (—), U=(1/2)k (x^2), and total energy (—), E=K+U, for the damped oscillator.

For an oscillatory driving force  the differential equation reads

m (((d^2)x(t))/(d(t^2)))+b((dx(t))/(dt))+k x(t)=(Subscript[F, 0])cos(ω t),

where ω is the angular frequency of the driving force. By analogy with the series LCR circuit, the amplitude of a forced mechanical oscillator is

=>((Subscript[x, 0])/(Subscript[F, 0]))=(1/k)(1/(Sqrt[(((1-((ω^2)/(Subscript[ω, 0]^2))))^2)+((((ω/(Q (Subscript[ω, 0])))))^2)]))=(1/k)G(ω),

where G(ω) is the (dimensionless) transfer function.

Plot of G(ω) as a function of ω for various values of Q. On resonance G((Subscript[ω, 0]))=Q.

Manipulate[LogLogPlot[1/(Sqrt[(((1-(ω^2)))^2)+((((ω/(10^Q))))^2) ]),{ω,(10^(-1)),10},PlotPoints->100,PlotRange->{{0.1,12},{0.01,100}},Ticks->{Table[{(2^k),(2^k) (Subscript[ω, 0])},{k,-3,3}],Automatic},AxesLabel->{ω,G(ω)},PlotStyle->Red,PlotLabel->Row@{"Q == ",PaddedForm[N[(10^Q),4],{3,2}]},Epilog->Line[{{-3,log((10^Q))},{0,log((10^Q))}}],ImageSize->{400,200},AspectRatio->0.4],{{Q,2},-1,2}]

At low frequency the response, (Subscript[x, 0])=(Subscript[F, 0])/k, depends only on the spring. On resonance the response depends on the Q. At high frequency the response is (Subscript[x, 0])->(Subscript[F, 0])/k ((((Subscript[ω, 0])/ω))^2)=(Subscript[F, 0])/(m (ω^2))->0, which is the same as for a free mass.

. Solitons

The Korteweg de Vries (KdV) equation, describing water waves in shallow channels, is given by

((∂u)/(∂t))-6 u ((∂u)/(∂x))+(((∂^3)u)/(∂(x^3)))=0,

where u(x,t) is the wave amplitude.

The initial value of the n-soliton solution is (Subscript[u, n])(x,0)==-n (n+1)(sech^2)(x)==2(Subscript[𝒱, n])(x). If (Subscript[𝒱, n])(x) is interpreted as the potential of the Schrödinger equation, that is

((-1)/2)(((∂^2)ψ(x))/(∂(x^2)))+(Subscript[𝒱, n])(x)ψ(x)=ℰ ψ(x),

where

(Subscript[𝒱, n_])(x_)=-((n (n+1))/2)(sech^2)(x);

the (unnormalized) solution is

(Subscript[ψ, n_,m_])(x_)=(Subscript[P, n]^m)(tanh(x));

where (Subscript[P, n]^m)(z) is the associated Legendre function, and the energy is

(Subscript[ℰ, m_])=((-(m^2))/2);

For each n, there exists n bound states with 1≤m≤n. First we compute and save the normalization constants (Subscript[𝒩, n,m]) determined by requiring (Subscript[𝒩, n,m]^2)(∫_(-∞)^∞)(((Subscript[ψ, n,m])(x))^2)dx=1.

𝒩/:(Subscript[𝒩, n_,m_]):=𝒩/:(Subscript[𝒩, n,m])=1/(Sqrt[(∫_(-∞)^∞)(((Subscript[ψ, n,m])(x))^2)\[DifferentialD]x])

On one plot, display the potential (Subscript[V, n])(x) together with the normalized eigenfunctions, shifted downwards by the associated energy, (Subscript[𝒩, n,m]^2)(((Subscript[ψ, n,m])(x))^2)+(Subscript[ℰ, m]), for 1≤n≤5 and 1≤m≤n.

Manipulate[Plot[Evaluate[Join[Table[(Subscript[𝒩, n,m]^2)(((Subscript[ψ, n,m])(x))^2)+(Subscript[ℰ, m]),{m,n}],{(Subscript[𝒱, n])(x)}]],{x,-5,5},Filling->Table[m->(Subscript[ℰ, m]),{m,n}]],{n,Range[5]},SaveDefinitions->True]

Here we visualize the time evolution of the “two-soliton” solution to the KdV equation (). It is clear that there are now two waves; one slow and one fast.

Manipulate[Plot[-((12 (4 cosh(8 t-2 x)+cosh(64 t-4 x)+3))/(((3 cosh(28 t-x)+cosh(36 t-3 x)))^2)),{x,-40,40},PlotRange->{-8.1,0.1}],{t,-2,2,0.25}]

. Kepler Equation

The Kepler equation, s=u+e sin(s) — critical in celestial mechanics — relates the mean anomaly u (a parameterization of time) of a body in an elliptical orbit of eccentricity e to the body's eccentric anomaly s (a parameterization of polar angle) []. Computing s is a commonly-used intermediate step to the calculation of planetary position as a function of time.

Consider the following related geometrical example: Pick an arbitrary point F inside the unit circle centered at O. Let P be the point on the circle closest to F and pick another point Q elsewhere on the circle. The location of F and Q are dynamic and can be modified by moving the Locator associated with each point. Define s and e as pictured below and let u be twice the area of the shaded sector PFQ.

Observe that (1/2)u=Area(sector P0Q)-Area(ΔF0Q)=(1/2)s-(1/2)e sin(s).

DynamicModule[{𝒪={0,0},pt1={0.3,(Sqrt[1-(0.3^2)])},pt2={(Sqrt[1-(0.6^2)]),0}},LocatorPane[Dynamic[{pt1,pt2},({pt1,pt2}={Normalize[First@#],{First[Last@#],0}})&],Module[{𝓈=Dynamic@Mod[ArcTan@@pt1,π]},Graphics[{Circle[𝒪,1,{-0.1,π+0.05}],{Hue[0.5],Disk[𝒪,1-0.002,{0.001,Max[0,𝓈-0.001]}]},{GrayLevel[1],Dynamic@Polygon[{𝒪,pt1,pt2}]},PointSize[0.02],Point[𝒪],Point[{1,0}],Line[{{-1,0},{1,0}}],Dynamic@Line[{𝒪,pt1,pt2}],Circle[𝒪,0.15,{0,Max[0,𝓈-0.001]}],Text[O,𝒪-0.05],Dynamic@Text[F,pt2-0.05],Text[P,{1.07,0}],Dynamic@Text[Q,pt1+{0,0.1}],Dynamic@Text[s,0.1Normalize[pt1+{1,0}]],Dynamic@Text[1,0.6RotationTransform[0.1][Normalize[pt1]]],Dynamic@Text[e,(pt2/2)-{0,0.1}],Dynamic@Text[1-e,(({1,0}+pt2)/2)-{0,0.1}],Dynamic@Text[(u/2)==(1/2)Mod[ArcTan@@pt1,π]-(1/2)(First@pt2) Sin[Mod[ArcTan@@pt1,π]],0.9Normalize[pt1+{1,0}],{-1,0}]},PlotRange->{{-1.05,1.05},{-0.2,1.2}},ImageSize->{300,200}]]]]

. Demonstrations

Here are a few more advanced examples of the functionality of Manipulate freely available for download from the Demonstrations Project website [].

Produce a random set of up to 200 points and join each point to a specified number of nearest neighbors, computed using the Nearest function [].

Manipulate[SeedRandom[seed];
With[{r=RandomReal[1,{pt,2}]},With[{nf=Nearest[r->Automatic]},Graphics[GraphicsComplex[r,{Line[Flatten[Table[Thread[{n,nf[r[[n]],s+1]}],{n,pt}],1]],Red,PointSize[Large],Point[Range[pt]]}],PlotRange->{{0,1},{0,1}},ImageSize->200]]],{{pt,150,"points"},20,400,1,Appearance->"Labeled",ControlPlacement->Top},{{s,8,"neighbors"},1,10,1,Appearance->"Labeled",ControlPlacement->Top},Delimiter,{{seed,1,"new random set"},1,30,1},ControlType->VerticalSlider,ControlPlacement->Left]

Here is a very nice demonstration of least-squares curve fitting [].

The following problem was presented at the International Mathematical Olympiad (IMO) of 2006 in Slovenia []: Let ABC be a triangle with incentre I. A point P in the interior of the triangle satisfies ∠PBA+∠PCA=∠PBC+∠PCB. Show that AP≥AI, and that equality holds if and only if P=I.

Observe that P moves along the brown circle with center at the intersection of the circumcircle and the bisector of the angle A.

. Conclusion

In this talk I demonstrated several of the new capabilities in Mathematica Version 6, showing how much fun one can have when the technology is high-level, robust, portable, and easy to use.

References

http://www.wolfram.com

http://demonstrations.wolfram.com

http://www.wolfram.com/products/mathematica/history.html

Available at http://physics.uwa.edu.au/pub/ATCM/2007 as a Mathematica Notebook

http://www.wolfram.com/products/player/

http://mathworld.wolfram.com/KeplersEquation.html

http://demonstrations.wolfram.com/NearestNeighborNetworks/

http://demonstrations.wolfram.com/LinearAndQuadraticCurveFittingPractice/

http://demonstrations.wolfram.com/AnIMOTriangleProblem/