Lightly edited samples of student writing in Calculus&Mathematica  at Illinois.

Reported by Don Brown, H. Porta and J. J. Uhl
February 1990

Preface

All claims made about a new course have to be backed up by student performance.  Here is a selection of problems from the laboratory final project in first semester calculus turned in by Calculus&Mathematica students at Illinois in December 1989. All students were freshman in various majors including engineering, biology, general liberal arts and sciences, etc.

Not everything these students said is correct or mathematically precise, but they did arrive at correct answers.  Our goal is for the students to be able to solve the problem correctly and explain themselves to the best of their ability.  Note that student writing is a strong component of Calculus&Mathematica and that a clear organization of the solutions is strongly emphasized.  To achieve these goals the authors of these solutions spent  considerable amounts of time.

We have added some comments:  they are contained in closed cells marked by comment,  and can be displayed by opening them and in some cases, executing them.

The problems

A standard optimization problem.  The answer is by Ginny Mark.

Problem:
 Find the highest and lowest points on the graph of 
      f[ x ] =  xz Exp[-xo].
 Recall Exp[x] is another way of writing e.

Student's answer:

Simplify[Exp[x] - E^x]

Oh, okay, thanks.

comment

Notice the "dialogue"! This is not unusual in this and other students who felt very much a part of the project and the real owners of the lab.

f[x_]=x^9 Exp[-x^2]

Plot[f[x],{x,-5,5}, PlotRange->All,AspectRatio->Automatic]

The highest point appears to be around (2.5, 9.5) and the lowest point (-2.5, -9.5).

Plot[f'[x],{x,-5,5},PlotRange->All,AspectRatio->Automatic]

FindRoot[f'[x],{x,-2}]

FindRoot[f'[x],{x,2}]

f[x]/.x->2.12132

f[x]/.x->-2.12132

comment

Notice how the student gains confidence and goes from "it appear" to "is". Also the whole thing is done without much apparent suffering, which is quite an accomplishment in itself.

Our high point is (2.12132,  9.66343)  and our low  point is  (-2.12132, -9.66343).

Here is a first class calculus problem suggested to us by Rod Smart of the University of Wisconsin.  Answers to all parts by Cody Buchman.

Problem:
You own the  Calculus&Mathematica  Steel Plate Company.  In comes an order for 750 square steel plates each measuring 12 feet wide and 12 feet long.

border = 
Graphics[Line[{{-6,0},{-6,12},{6,12},{6,0},{-6,0}}]]

Show[border,
Axes->{0,0},AspectRatio->Automatic,AxesLabel->{"x","y"}]

A drill (or router) is to be used to drill out a parabolic arch bounded by the parabola
                  y = - 4 (x - 3/2) (x + 3/2).

arch = Plot[{- 4 (x - 3/2)  (x + 3/2)},{x,-3/2,3/2},
DisplayFunction->Identity]

Show[border,arch,PlotRange->{{-6,6},{0,12}},
Axes->{0,0},AspectRatio->Automatic,
AxesLabel->{"x","y"},DisplayFunction->$DisplayFunction]

Part a: 
You have a selection of router bits to do the job.
The bits available to you come in the following cutting diameters:
                                2 inch
                                3 inch
                                4 inch
                                5 inch
                                6 inch
Which of these bits can be used to cut out the arch?
Discuss how you arrived at your answer.

Student's answer:

First: to cut out such an arch, the bit must be no wider or narrower than the diameter of the smallest osculating circle.  Why?  We saw already that the smallest osculating circle of a parabola is always found tangent to the vertex of said parabola, and always fills the bottom of the parabola.  If a bit larger than the diameter of this circle was used, it would cut a whole different, wider parabola, with possible ugly results (depending what the plates were being used for).  Using a bit of smaller diameter would produce similar results.  This will be illustrated later.  For now, let's find the radius by setting the f[x] equal to - 4 (x - 3/2) (x + 3/2),  and running it through the mill:

comment

The student is using here a Tutorial problem that describes how to find the osculating circle at any point. See Exhibit 3 in the article   
"Mathematica Courseware for the nineties: Calculus&Mathematica."

Clear[x,y,h,k,r,f,x0]

f[x_] := -4 (x - 3/2) (x + 3/2)

circleeqn = ((x - h)^2 + (y[x] - k)^2 == r^2);

eqn1 = circleeqn/.{x->x0,y[x]->f[x0]};

firstderiveqn = D[(x - h)^2 + (y[x] - k)^2 == r^2,x];

eqn2 = firstderiveqn/.{x->x0,y[x]->f[x0],
y'[x]->f'[x0]};

seconderiveqn = D[(x - h)^2 + (y[x] - k)^2 == r^2,
{x,2}];

eqn3 = seconderiveqn/.{x->x0,y[x]->f[x0],
y'[x]->f'[x0],y''[x]->f''[x0]};

hkrsolved = Solve[{eqn1,eqn2,eqn3},{h,k,r}]

The first "r" is the correct one.  Now let's solve for "r".

comment

What the student means to do here is to find the smallest radius to guarantee that the bit will fit everywhere.

radius = hkrsolved[[1,1,2]]

Solve[D[radius,x0] == 0,x0]

This could also be seen from the illustration, but the numerical proof
is here.  Now, let's find the diameter by plugging back into r:

diameter =2 (N[radius/.x0->0])

Hmm.  The bit that I need must be 0.25 feet--3 inches--in diameter.

Part b:
Choose a bit that will work and give a plot of the path of the center of the router.

Student's answer:

Let's start by solving for its slope:

y = - 4 (x - 3/2) ( x + 3/2)

comment

This may look better if it is simplified:

ysimp=Simplify[y]

yprime = D[y,x]

comment

Again this may look better if it is simplified:

yprimesimp=Simplify[yprime]

This is the slope for the tangent line at any  x  along the parabola.
Now, let's say a single point on the bitpath is (s,t).  This point is on a
line whose equation is given above, and which lies a distance  a  from a 
point on the parabola,  {x, y[x]}.  This gives us the equation 
              {x, y[x]} + b{-1, 1/y'[x]} = (s,t),  
where  b  is some multiple that increases as distance  a  increases.  Now, we know that distance  a = 0.125 (the radius of the osculating circle).  Also, we can simplify the right term of the  equation to  {-b, b/y'[x]},  which represents the distance we must travel from the point  {x, y[x]},  along the perpendicular line, to reach the point (s,t).  Since we know this = 0.125, we get the equation  Sqrt[bo + bo/y'[x]o] = .125, and can solve for b:

Clear[b]

Solving for b in the above equation gives:
bo = .125o/(1 + 1/y'[x]o), or

b = .125 /Sqrt[1 + 1/yprime^2]

comment

This can be simplified:

bsimp=Simplify[b]

or even:

bsimpfact=Factor[bsimp]

Now, let's plug in "b" and plot:

pointt = {x,y} + Sign[x] b {-1,1/yprime}

comment

Another simplification:

pointtsimp=Simplify[pointt]

par = ParametricPlot[{x,y},{x,-3/2,3/2},
PlotPoints->75,DisplayFunction->Identity]

router = ParametricPlot[pointt,{x,-3/2,3/2},
PlotPoints->75,DisplayFunction->Identity]

Show[par,router,DisplayFunction->$DisplayFunction]

Note that glitch at the top.  This is caused by a round-off error in the plotting mechanism.  To solve this, let's go in for a close-up of the top:

comment

This remark is actually incorrect, but the student sees a difficulty and gets it solved!

Show[par,router,PlotRange->{{-.2,.2},{8.8,9}},
DisplayFunction->$DisplayFunction]

comment

This can be improved somewhat by plotting in true scale:

both=Show[par,router,PlotRange->{{-.2,.2},{8.8,9}},
DisplayFunction->$DisplayFunction,AspectRatio->Automatic]

and by adding a few circles:

Clear[circle]
circle[0]:=Graphics[Circle[{0,8.875},.125]]
circle[t_]:=Graphics[Circle[pointtsimp/.x->t,.125]]
Show[both,Release[Table[circle[k],{k,-.2,.2,.02}]],
PlotRange->{{-.2,.2},{8.75,9.0}},
AspectRatio->Automatic]

Note the peak at the top of the drill path.  This is logical, for when the 
drill reaches the point of maximum curvature of the parabola, it must abruptly shift directions to maintain the cut's shape.

A problem dealing with accuracy of computation. Answer by Anne Bierzychudek.

Problem:
If x is in [-12,12] , then how many accurate decimals of x are needed  to guarantee k accurate decimals of f[x] = x> - 3x< + 5xo - 2x + 8?

Student's answer:

Clear[f,x,y,z]

f[x_] = x^4 - 3x^3 + 5x^2 - 2x + 8

Plot[Abs[f'[z]],{z,-12,12},PlotRange->All]

The plot makes it clear that  for z in [-12,12],
                          |f'(z)| < 10,000 = 10^4;
To get k accurate decimals of  f[x]  for  x  in  [-12,12], we need at least 
k + 4  accurate decimals of  x .

comment

Notice that the student trusts the graph and what she sees. This allows her to obtain the correct solution without delay.

A standard problem on tangent lines. The answer is by Mabel Chiu.

Problem:
Describe all constants a, b and c such that the parabola
                      y =  a xo  + b x + c
passes through   {0,1}   and is  tangent to the line y = x.
Plot several of these parabolas and the line on the same axes.

Student's answer:

Clear[c,a,x,b,y]

Let's set the equation first:

y=a x^2 + b x + c

Since the equation   y   and   y=x   are tangent to each other they should share the same slope and touch at a certain point.  So, the two equations are set equal to one another.

eqn1 = a x^2 + b x + c == x

Since the two equations are tangent to each other their derivatives should be equal to one another.  So the derivative of the two equations are set equal to each other.

eqn2 = D[(c + b x + a x^2),x]==D[x,x]

There are three unknowns that must be found  a, b, c.  So, one more equation must be generated in order to get what we want.  We have three unknowns so we need three equations in order to solve for  a, b, c.

comment

Notice the comfort in deciding the correct number of needed equations. The student simply adds an equation assigning to the unknown variable  c  the only value it can take (because the parabola passes through x=0, y=1), and proceeds with the solution. This is usualy lacking in standard calculus courses.

eqn3 = c==1

Now  let's solve those three equations.

solved1=Solve[{eqn1,eqn2,eqn3}]

Since the variable "a" is first in the alphabet the computer, chose  a  as the variable that everything else should be in terms of since it wasn't specified.  So, x, b, c is solved in terms of "a."

y

Now,  the solved values of x, b, c are plugged back into the equation "y" which is above.  However, the plot will need the variable x to remain in the equation in order for it to be plotted since f(x) is dependent on the variable x.  So,  x  remains to be  x  DO NOT SOLVE X IN TERMS OF A.  It is not necessary.  Look down.  Only  b  and  c  is plugged into the equation.

comment

Here the student discards the possibility of using  a  as a parameter, or any fancy arrangement, and simply sticks with  x  as a variable. The successful answer justifies the choice.

alt1 = y/.{b -> (2 + (4 - 4*(1 - 4*a))^(1/2))/2,c -> 1}

alt2 = y/.{b -> (2 - (4 - 4*(1 - 4*a))^(1/2))/2,c -> 1}

There are solutions for this equation.  The values b and c are part of one solution.  They go together.  Let's try to plot both the solutions.

Plot[{alt1/.a->3,alt2/.a->3,alt1/.a->1,alt2/.a->1,
alt1/.a->.4,alt2/.a->.4,x},{x,-2,2}]

Answer:  Here is the plot of the two solutions along with the tangent line y=x  and random values for the variable  a.  All of the curves for equation "alt1"  are on the left side of the graph.  All of the curves for equation  "alt2" are on the right side of the graph.

comment

The student talks about  "two solutions"  which is not really correct, but the construction is quite satisfactory and the two families of parabolas are neatly distinguishable.

A problem on Fourier approximation.  The answer is by Rod Johnson, a student in first semester calculus who had never heard of trigonometric polynomials.

Problem:
Find the constants   a,   b  and  c   that make
   %0 (x(` - x) - (a Sin[x] + b Sin[2x] + c Sin[3 x]))o dx
as small as possible.
After you have found a, b and c, plot 
         x(` - x)  and (a Sin[x] + b Sin[2x] + c Sin[3 x])
on the same axes for 0 . x . ` and assess the quality of the fit.

Student's answer:

We will integrate this equation first.

Clear[a,b,c,x]

int = Integrate[(x(Pi - x) - (a Sin[x] + b Sin[2x]
 + c Sin[3 x]))^2,{x,0,Pi}]

All we have to do is take the derivative of the integral with respect to each constant, set it equal to 0, and solve for that constant.
Let's start with a.

comment

Comment: first semester calculus students do not normally consider maxima and minima of functions of several independent variables. We found however that this does not seem to be a conceptual difficulty, and here is an exmaple.

derva = D[int,a]

Solve[{derva == 0},a]

Now let's find b.

dervb = D[int,b]

Solve[{dervb == 0},b]

Finally we can get c.

dervc = D[int,c]

Solve[{dervc == 0},c]

To get    %0 (x(` - x) - (a Sin[x] + b Sin[2x] + c Sin[3 x]))o dx
as small as possible we will need to use
                      a = 8/`
                      b = 0
                      c = 8/(27 `).
Now let Mathematica know the values for a, b, and c:

a = 8/Pi;
b = 0;
c = 8/(27 Pi);

We are going to plot the equation
               (a Sin[x] + b Sin[2x] + c Sin[3 x])
with these values for a, b, and c so let's find out what that will be.

eqn2 = (a Sin[x] + b Sin[2x] + c Sin[3 x])

Here is the plot of  
         x(` - x)    and   (8 Sin[x])/` + (8 Sin[3x])/(27 `) 
from 0 to `.

Plot[{eqn2,x(Pi - x)},{x,0,Pi}]

Now that is a hell of a fit.   That is looking real sweet the whole way from 
0 to `.

A problem from The Waterloo Maple Calculus Workbook.  The answer is by by Ann Brzozkiewicz.

Problem:
The Waterloo Tile Co. is designing 1 foot by 1 foot ceramic tiles. On 
each tile, two fourth degree polynomial curves are running from the lower left hand corner to the upper right hand corner. They are positioned so that they trisect the square's right angles at the the 
lower left hand and the upper right hand corners.
A shade of red paint is to be applied above the top curve, white 
paint is to be applied between the curves and a shade of blue is to 
be applied below the bottom curve.
It is required that the red area = white area = blue area = 1/3 square feet.
Determine the equations of the polynomial curves and plot.

Student's answer:

There are two curves and therefore two equations.  One I will call f[x] 
and the other will be g[x].

Clear[a,b,c,d,f,g,k,l,m,n]

f[x_] := a x^4 + b x^3 + c x^2 + d x + e

g[x_] := k x^4 + l x^3 + m x^2 + n x + o

comment

In the next paragraph the student (engineering) makes a little inventory of the data and conditions of the problem. The handling of "number of equations = number of unknowns" is quite adequate and the explanations are remarkably clear.

There are five variables so I will need 5 equations to solve each one.
The things that I know are:
			a.) The equations move from x = 0 to x = 1, so for x equal to zero the
		  function equals zero, and for x equal to one, the function equals one.
			b.) The slope of the tangent lines to the curves at 0 and 1 are given
			(because they trisect the corners of the tile.)
			c.) The area between the curves must be equal to 1/3 sq. ft
The following equations are therefore true.
			f[0] = g[0] =  0
			f[1] = g[1] = 1
			f'[0] = g'[1] =  Tan[Pi/3]
			f'[1] = g'[0] = Tan[Pi/6]
			%0- f[x] - g[x] dx = 1/3
This last equation and the information given also indicate that the area under the lower curve will be equal to 1/3, and the total area under the higher curve will be 2/3.  Keeping this in mind I start out to make f[x] the lower curve.

f1 = f[0] == 0

f2 = f[1] == 1

f3 = f'[0] == Tan[Pi/6]

f4 = f'[1] == Tan[Pi/3]

f5 = Solve[Integrate[f[x],{x,0,1}] == 1/3]

newf5 = a == 5/3 - (5*b)/4 - (5*c)/3 - (5*d)/2 - 5*e

N[Solve[{f1,f2,f3,f4,newf5},{a,b,c,d,e}]]

comment

Again, the student know where she is going and the plan is followed with a lot of elegance and confidence.

These are all my variables, I just need to substitute them into my fourth power polynomial.

goodf = f[x]/.{a -> -2.11325, b -> 4.5359, 
   c -> -2, d -> 0.57735, 
   e -> 0.}

Plot[goodf,{x,0,1},PlotRange->{0,1}]

It looks like it might be ok, lets proceed to g[x].

comment

A partial assessment, quite in tune with the experimental character of the course.

g1 = g[0] == 0

g2 = g[1] == 1

g3 = g'[0] == Tan[Pi/3]

g4 = g'[1] == Tan[Pi/6]

f5 = Solve[Integrate[g[x],{x,0,1}] == 2/3]

newg5 = k == 10/3 - (5*l)/4 - (5*m)/3 - (5*n)/2 - 5*o

N[Solve[{g1,g2,g3,g4,newg5},{k,l,m,n,o}]]

goodg = g[x]/.{k -> 2.11325, l -> -3.9171, 
   m -> 1.0718, n -> 1.73205, 
   o -> 0.}

Plot[{goodf,goodg},{x,0,1},
PlotRange->{0,1},AspectRatio->Automatic]

comment

The next comment sums it up: the student found an answer but she wants to verify that it does what she wants to do. This is a very healthy reflex that seldom appears in the standard courses where the objectives are usualy the repetition of techniques with little regard for the value of the answers obtained.

That's rather a funny looking tile, so to check my answers I will 
integrate the different areas to see if they meet the specifications.
First, the area between the curves should be equal to 1/3.

Integrate[goodg - goodf,{x,0,1}]

Got it.

Another thing to check is that the area from the top of the tile to the top function g[x], is also equal to 1/3.

Integrate[1 - goodg,{x,0,1}]

Got it again!
Lastly, the area under the bottom curve should be 1/3.

Integrate[goodf,{x,0,1}]

comment

A great final sentence:

Right on the money!  Now the ratio of the three areas red to white 
to blue is 1:1:1 and  the tangent lines to the curves trisect the right   angles

A problem on chemical reactions. All answers are by Maria Gonzalez. Notice how she uses the word processor to do interactive algebra with Mathematica.

Part i)
Two chemicals A and B react with each other and in the process, one 
molecule from A bonds with one molecule from B to form a new 
compound.Let a be the number of molecules of A present at the start 
and let b be the number of molecules of B present at the start. Let 
y[t] be the number of molecules of the new compound present t 
seconds after the reaction starts.
At anytime t,  there are  ( a- y[t] )  molecules of A available for reaction and there are ( b- y[t] ) molecules of B available for reaction.
Since reaction requires collision of an A- molecule and a B- molecule, it  makes sense to assume that y'[t] is proportional to both 
              (a - y[t])   and   to (b - y[t]).
What differential equation does this lead to?

Student's answer:

comment

Here the answer is given with no justification. This is part of the course: the students should be able to communicate facts from their previous work, very much as in tests. This component of the course requires a little discipline because it is rather tempting to start each problem from scratch. The students got used to this type of question, but at the beginning they sometimes felt that they had not "answered enough". Several times we heard the question: is that all we have to say?

y'[t] =  K   (a - y[t])  (b - y[t]) with y[0] = 0.

Part ii)
Find a formula for y[t] in terms of   a,   b   and   K.
What is the limiting behavior of y[t] if a > b?

Student's answer:

Rewrite the equation to get:
      y'[t]/((A - y[t])  (B - y[t]))  =  K

Clear[y,t,x,K,a,b]

left = Integrate[y'[t]/((a - y[t])  (b - y[t])),
{t,0,t}]/.y[0]->0

right = Integrate[K,{t,0,t}]

Simplify the left side of the equation to get:
     (1/(a - b)) (Log[b (a - y[t])/(a(b - y[t])])

Now solve for y[t]:
     (1/(a - b)) (Log[b (a - y[t])/(a(b - y[t])]) = K t
     Log[b (a - y[t])/(a(b - y[t])] = (a - b) K t
     b (a - y[t])/(a(b - y[t]) = E^((a - b) K t)

Solve[(b (a - y[t]))/(a(b - y[t])) == 
E^((a - b) K t),y[t]]

To find the limiting behavior of y[t] if a > b, then simplify y[t] by
multiplying the top and bottom by E^(- K a t):

y[t] = ((a b) (1 - (E^(K b t))/(E^(K a t))))/
        (a - b(E^(K b t))/(E^(K a t)))

Now if a > b then the term (E^(K b t))/(E^(K a t)) will be 0 leaving:
     y[t] = a b (1 - 0)/a
     y[t] = b  (since a will cancel)
Therefore,  the limiting behavior of y[t] if a > b will be approaching b.

comment

Notice the beautiful flow of the text with the executable  statements. This student has found a natural way to express herself in the medium. She has already developed into a superb writer of Mathematica Notebooks