Category Archives: Technology

Invariable Calculus Project II

As Rocky hinted in his comment to my last post, \displaystyle f(x)=\frac{k}{x}  also has the constant area property.  Following a lead from Cohen, et al’s Student Research Projects in Calculus, I discovered long ago that with nothing more than knowledge of the product rule, the quotient and/or chain rule, and a healthy dose of some patient algebra manipulations, students could actually determine all functions which have the property that right triangles formed by the x– and y-axes and tangent lines to those functions have constant area.  This morning, I discovered a nice CAS approach that makes the problem accessible to far more students.

This makes another great project for calculus students who’ve just learned algebraic rules for differentiation:

Determine an equation for any twice-differentiable function–y=g(x)–with the property that all tangent lines to g in Quadrant I, along with the x- and y-axes, form triangles of constant area.

(Very minor) HINT:  At some point in solving this problem, you’ll need to make and use some assumptions about the values of a, g(a), g'(a), and g''(a).

SOLUTION ALERT!  Don’t read further if you want to solve this problem for yourself.

Assumptions:  Let (a,g(a)) be any arbitrary point on y=g(x) in Quadrant I.  This makes a>0 and g(a)>0.  I also know g'(a)<0 because otherwise both of the x– and y-intercepts of the tangent line would not be positive, making the triangle’s area negative.  Finally, if g''(a)=0, then g would be a linear function, and there would be only one triangle.  To keep the problem interesting, I’m going to assume g''(a)\ne 0.

Setting up:  We no longer have a specific function, so everything must be in generalities.  A generalized equation for a tangent line to any function y=g(x) at x=a is

y-g(a)=g'(a)\cdot (x-a).

From here, the generalized x-intercept is \displaystyle a-\frac{g(a)}{g'(a)}, and the y-intercept is g(a)-a\cdot g'(a).  [Side note, the x-intercept is also the same form used in Newton’s Method for root approximations, a connection I’ll make later in the term when I’m teaching AP Calculus.]  Combining the generalized intercepts, I can write a generic area formula.

\displaystyle Area = \frac{1}{2} \cdot \left( a - \frac{g(a)}{g'(a)} \right) \cdot \left( g(a) - a \cdot g'(a) \right)

Differentiating and Cleaning Up:  Whenever I’ve used this problem in the past, my students and I have always used paper & pencil techniques.  While I’m quite comfortable with my algebraic manipulation skills, the significant majority of my students struggle with this part of the assignment.  As I was writing this post today, I finally had a technology insight that I should have years ago, given my long interest in CAS.  So, I’ll show the next portion in two different approaches, first traditional, and then via CAS.

APPROACH 1 – TRADITIONAL PAPER & PENCIL:  Trying to keep some brevity in this expanding post, I skip a few algebra steps below while providing some guiding explanations.  Finding a common denominator in the Area equation and recognizing a common factor leads to

\displaystyle Area(a) = - \frac{1}{2} \cdot \frac{\left( a \cdot g'(a) - g(a) \right) ^2}{g'(a)} .

Applying the quotient rule with respect to a gives

\frac{d(Area(a))}{da} = -\frac{1}{2} \cdot \frac{g'(a)\cdot 2(a\cdot g'(a)-g(a))(1\cdot g'(a)+a\cdot g''(a) - g'(a))- (a\cdot g'(a)-g(a))^2\cdot g''(a)}{(g'(a))^2} .

Remember that I seek functions whose tangent lines create constant area triangles, so \displaystyle \frac{d(Area(a))}{da} = 0.  Using this on the left and canceling some terms on the right gives

\displaystyle 0 = -\frac{1}{2} \cdot \frac{2a\cdot g'(a)\cdot g''(a)(a\cdot g'(a)-g(a))-(a\cdot g'(a)-g(a))^2 \cdot g''(a)}{(g'(a))^2} .

Pulling out common factors and cleaning up a little more turns this into a completely factored form.

\displaystyle 0 = - \frac{1}{2} \cdot \frac{(a\cdot g'(a)-g(a))\cdot g''(a)\cdot (a\cdot g'(a)+g(a))}{(g'(a))^2}

APPROACH 2 – CAS:  Because the algebra was going to be complicated enough to make viewing on a handheld calculator very difficult, I used my TI-nSpire CAS Computer software to tackle the problem.  In the image below, I defined the area function in line 1 and differentiated with respect to a in line 2.  Equating the final equation to 0 gives the last algebraic line above from APPROACH 1.

Invariable1

Notice that I did not need to define a differentiation technique or to manipulate the factoring.  The results on both lines automatically accomplish the factoring I worked so carefully to establish earlier in APPROACH 1.  This is a beautiful example of what I see as a central benefit of CAS:  Keeping users focused on the mathematics of the problem situation. 

Some students might actually be curious about how the challenge of differentiating line 1 could end up as relatively “clean” as the result in line 2.  GOOD!  CAS also inspires creative thinking.

Other than the differentiation step, everything else in APPROACH 1 was simple algebra.  Complicated, perhaps, but simple.  In fact, I don’t think it’s mathematics at all; it’s algebraic arithmetic.  I’m not disparaging the work or the approach, but I see mathematics as pattern recognition and big thinking.  I think CAS is completely justified in this problem.

Applying the Zero Product Property:  Our initial assumptions clear the denominator because g'(a)<0.  Because g''(a)\ne 0, I can eliminate that term, too.  With a and g(a) both positive and g'(a)<0, the (a\cdot g'(a)-g(a)) term must be negative and therefore can be eliminated.  That drops the initially complicated differential equation to

\displaystyle 0 = a\cdot g'(a)+g(a).

Finally–the Solution:  Depending on how much your students know, this last equation can be solved three different ways:  A) recognizing differentiation rules, B) solving a separable differentiable equation, or C) using a CAS solver.  I typically assign this problem so early in a calculus course that they have no idea what a differential equation is, making  the first approach the only available technique.  But this is also a great problem to introduce after learning about separable DEs.

APPROACH A:  If you look carefully, you can recognize the right side as the result of the product rule applied to a\cdot g(a).  (In my experience, most students need some time, encouragement, and occasionally some hints to “see” this.)  Because the product rule result equals zero, the original expression must have equalled a constant.  That means a\cdot g(a) = C for any constant, C.  Solving gives \displaystyle g(a)=\frac{C}{a}.  That means Rocky’s suggested family of functions at the top of this post, \displaystyle f(x)=\frac{k}{x} not only produces triangles of constant area, it’s the only family of functions that does!  Very cool!

APPROACH B:  Rewriting the result of the Zero Product Property simplification using xs and ys gives \displaystyle 0=x\cdot \frac{dy}{dx} +y.  The variables can be rearranged to give \displaystyle -\frac{dx}{x}=\frac{dy}{y}.  Integration gives -ln(x)+ln(C)=ln(y) for any random constant, ln(C).  Logarithm properties lead to y=\displaystyle \frac{C}{x}, as before.

APPROACH C:  While I like the pattern recognition insights from the previous two approaches, the solution can also be found using a CAS.

Invariable3On the TI-nSpire, c1 represents any random constant, so the DE solver again gives the same results.

Conclusion:  No matter what approaches you take, this problem shows that the only functions that have the property of their tangent lines producing constant area triangles.

Shiny.

Exploring Sequences and Lines

Here’s another favorite problem that could be used for any middle or high school students who’ve been exposed to both arithmetic sequences and linear equations.

There is a family of lines, Ax+By+C=0, for which \left\{ A, B, C \right\} can be any arithmetic sequence.  What do all members of this family have in common?

As with most great math problems, the problem is simply stated and can be approached from many different perspectives.  In the end, this one isn’t that difficult to crack, but the solution (at least to me) is not intuitively obvious from the problem statement. If you’ve not seen this before, please try it before reading further.

WARNING:  Problem Solution Follows

MOST COMMON STUDENT APPROACH:  Given the problem’s phrasing, most begin by writing out a few possible equations using different arithmetic sequences, typically with positive common differences.  After a few tries, most get a little frustrated as no obvious pattern emerges from the equations.

It is this point that is typically the most difficult for me as a teacher.  I want to help anyone who struggles, but “help” often means allowing others the room to struggle and to find ways of solving problems on their own.  Only when a student or group gets really frustrated do I sometimes ask, “Are there any other ways you can look at this problem or at your work?”

Eventually, most decide to graph their equations to see if anything pops out.  The following graph was submitted this past semester by one of my precalculus students using the free online Desmos calculator.

ALines1

Two lines intersecting in a point is common.  Three or more in a single point almost always indicates something interesting.  Seven lines through a single point is screaming for attention!  From this graph, all lines in this family apparently contain the point (1,-2).  That seems a bit random until you investigate further, but pattern recognition is just half of the battle for a mathematician.  Now that something interesting has been discovered, a mathematician wants to know if this is a fluke or something inherent to all members of the family.

NOTE:  All graphs my students have produced over the years have always contained specific equations.  I don’t know that it’s any more enlightening, but I did create on Desmos a slider version of the graphs of this family with one slider for the initial term (A) and a second for its common difference (d).

UNIQUE SOLUTION METHODS FROM STUDENTS:

All successful solutions eventually rewrite the sequence \left\{ A,B,C \right\} to \left\{ A,A+d,A+2d \right\} where d is the common difference for a generic arithmetic sequence with initial term A.

Method I: After discovering the common point of intersection, most plug it into the left side of the equation and simplify to get

Ax+By+C=A\cdot 1+\left( A+d\right)\cdot -2+\left( A+2d \right)=0.

Because the left side reduces to zero for all generic arithmetic sequences, \left\{ A,A+d,A+2d \right\}, (1,-2) must be common to all members of this family.

A few students aren’t comfortable dealing with 0=0, so these tend to plug in x=1 and solve for y to get y=-2, proving that the y-coordinate for x=1 for all members of this family is always -2.

Method II:  A few students every year work algebraically from properties of arithmetic sequences.  For any arithmetic sequence, \left\{ A,B,C \right\}, \frac{A+C}{2}=B.  This rewrites to 1\cdot A-2\cdot B+C=0, so whenever \left( x,y \right)=\left(1,-2 \right), then Ax+By+C=0 is a fundamental property of all arithmetic sequences.

Personally, I think this method gets closest to explaining why the point (1,-2) is the common characteristic of this family.

Method III:  This year, I had a student take an approach I’d never seen before.  She defined one arithmetic sequence as \left\{ a,a+d,a+2d \right\} and another as \left\{ m,m+n,m+2n \right\} for any real values of a,d,m, and n.  This leads to a system of equations: a\cdot x+(a+d)\cdot y+(a+2d)=0 and m\cdot x+(m+n)\cdot y+(m+2n)=0 .  If you have some younger students or if all the variables make you nervous, the solution is available via Wolfram Alpha.

Still, this system is pretty easy to manipulate.  If you multiply the first equation by m and the second by a, the x-terms will eliminate with subtraction, giving

m\cdot((a+d)\cdot y+(a+2d))-a\cdot((m+n)\cdot y+(m+2n))=0.

Solving for y shows that all of the coefficients simplify surprisingly easily.

((ma+md)-(am+an))\cdot y=-(ma+2md)+(am+2an)
(md-an)\cdot y = -2\cdot (md-an)\Longrightarrow y=-2

From here, determining x=1 is easy, proving the relationship.

SOLUTIONS and APPROACHES NOT YET OFFERED BY STUDENTS:

Approach A:  High school students don’t often think about ways to simplify problem situations, especially at the beginning of problems.  One way I did that for this problem in later class discussions was to recognize that it one of the terms in the arithmetic sequence was 0, you didn’t need to deal with nearly as many terms. For example, if your sequence was {1,0,-1}, the linear equation would be x-1=0.  Similarly, the sequence \left\{ 01,2 \right\} leads to y+2=0.  Obviously, the only thing these two lines have in common is the point (1,-2).  A proof of the property must still be established, but this is one of the fastest ways I’ve seen to identify the central property.

Approach B:  A purely algebraic approach to this problem could redefine the arithmetic sequence as \left\{ a,a+d,a+2d\right\}as before, giving:

a\cdot x+(a+d)\cdot y+(a+2d)=0

Collecting like terms gives

(x+y+1)\cdot a+(y+2)\cdot d=0.

The values of a and d must remain as parameters to include all possible arithmetic sequences.  Because the equation always equals 0, the coefficients of a and d are both 0, making y=-2 (for the coefficient of d) and therefore x=1.

EXTENSION:

We once had a test question at the end of the unit containing this exercise.  Basically, it reminded students that they had discovered that all lines Ax+By+C=0, for which \left\{ A, B, C \right\} can be any arithmetic sequence contained the point (1,-2).  It then asked for an equation of a family of linear functions using the same arithmetic \left\{ A, B, C \right\} that all contained the point (1,2).

The two most common responses we’ve seen involve a reflection or a vertical translation.  (1,-2) can become (1,2) by reflecting over the x-axis, so making the y-values negative would do the trick:  Ax-By+C=0.  Similarly, (1,-2) can become (1,2) by translating up 4 units, giving Ax+B(y-4)+C=0.

Exponentials and Transformations

Here’s an old and (maybe) a new way to think about equations of exponential functions.  I suspect you’ve seen the first approach.  If you understand what exponentials functions are, my second approach using transformations is much faster and involves no algebra!

Members of the exponential function family can be written in the form y=a\cdot b^x for real values of a and postive real values of b.  Because there are only two parameters, only two points are required to write an equation of any exponential.

EXAMPLE 1: Find an exponential function through the points (2,5) and (4,20).  

METHOD 1:  Plug the points into the generic exponential equation to get a 2×2 system of equations.  It isn’t necessary, but to simplify the next algebra step, I always write the equation with the larger exponent on top.

\left\{\begin{matrix} 20=a\cdot b^4 \\ 5=a\cdot b^2 \end{matrix}\right.

If the algebra isn’t the point of the lesson, this system could be solved with a CAS.  Users would need to remember that b>0 to limit the CAS solutions to just one possibility.

If you want to see algebra, you could use substitution, but I recommend division.  Students’ prior experience with systems typically involved only linear functions for which they added or subtracted the equations to eliminate variables.  For exponentials, the unknown parameters are multiplied, so division is a better operational choice.  Using the system above, I get \displaystyle \frac{20}{5}=\frac{a\cdot b^4}{a\cdot b^2}.  The fractions must be equivalent because their numerators are equal and their denominators are equal.

Simplifying gives 4=b^2\rightarrow b=+2 (because b>0 for exponential functions) and a=\frac{5}{4}.

This approach is nice because the a term will always cancel from the first division step, leaving a straightforward constant exponent to undo, a pretty easy step.

METHOD 2:  Think about what an exponential function is and does.  Then use transformations.

Remember that linear functions (y=m\cdot x+b) “start” with a y-value of b (when x=0) and add m to y every time you add 1 to x.  The only difference between linear and exponential functions is that exponentials multiply while linears add.  Therefore, exponential functions (y=a\cdot b^x) “start” with a y-value of a when x=0 and multiply by b every time 1 is added to x.

What makes the given points a bit annoying is that neither is a y-intercept.  No problem.  If you don’t like the way a problem is phrased, CHANGE IT!    (Just remember to change the answer back to the original conditions!)

If you slide the given points left 2 units, you get (0,5) and (2,20).  It would also be nice if the points were 1 x-unit apart, so halving the x-values gives (0,5) and (1,20).  Because the y-intercept is now 5, and the next point multiplies that by 4, an initial equation for the exponential is y = 5\cdot 4^x . To change this back to the original points, undo the transformations at the start of this paragraph:  stretch horizontally by 2 and then move right 2.  This gives y = 5\cdot 4^\frac{x-2}{2}.

This is algebraically equivalent to the y=\frac{5}{4}\cdot 2^x found early.  Obviously, my students prove this.

One student asked why we couldn’t make the (4,20) point the y-intercept.  Of course we can!  To move more quickly through the set up, starting at (4,20) and moving to (2,5) means my initial value is 20 and I multiply by \frac{1}{4} if the x-values move left 2 from an initial x-value of 4.  This gives y = 20\cdot\left( \frac{1}{4} \right) ^\frac{x+4}{-2}.  Of course, this 3rd equation is algebraically equivalent to the first two.

Here’s one more example to illustrate the speed of the transformations approach, even when the points aren’t convenient.

EXAMPLE 2: Find an exponential function through (-3,7) and (12,13).  

Starting at (-3,7) and moving to (12,13) means my initial value is 7, and I multiply by \frac{13}{7} if the x-values move right 15 from an initial x-value of -3.  This gives y = 7\cdot\left( \frac{13}{7} \right) ^\frac{x-3}{15}.

Equivalently, starting at (12,13) and moving to (-3,7) means my initial value is 13, and I multiply by \frac{7}{13} if the x-values move left 15 from an initial x-value of 12.  This gives y = 13\cdot\left( \frac{7}{13} \right) ^\frac{x+3}{-15}.

If you get transformations, exponential equations require almost no algebraic work, no matter how “ugly” the coordinates.  I hope this helps give a different perspective on exponential function equations and helps enhance the importance of the critical math concept of equivalence.

Calling for More CAS in Statistics

When you allow your students to solve problems in ways that make the most sense to them, interesting and unexpected results sometimes happen.  On a test in my senior, non-AP statistics course earlier this semester, we posed this.

A child is 40 inches tall, which places her in the top 10% of all children of similar age. The heights for children of this age form an approximately normal distribution with a mean of 38 inches. Based on this information, what is the standard deviation of the heights of all children of this age? 

From the question, you likely deduced that we had been exploring normal distributions and the connection between areas under such curves and their related probabilities and percentiles.  Hoping to get students to think just a little bit, we decided to reverse a cookbook question (given or derive a z-score and compute probability) and asked instead for standard deviation.  My fellow teacher and I saw the question as a simple Algebra I-level manipulation, but our students found it a very challenging revision.  Only about 5% of the students actually solved it the way we thought.  The majority employed a valid (but not always justified) trial-and-error approach.  And then one of my students invoked what I thought to be a brilliant use of a CAS command that I should have imagined myself.  Unfortunately, it did not work out, even though it should.  I’m hoping future iterations of CAS software of all types will address this shortcoming.

What We Thought Would Happen

The problem information can be visually represented as shown below.  

Given x-values, means, and standard deviations, our students had practice with many problems which gave the resulting area.  They had also been given areas under normal curves and worked backwards to z-scores which could be re-scaled and re-centered to corresponding points on any normal curve.  We hoped they would be able to apply what they knew about normal curves to make this a different, but relatively straightforward question.

Given the TI-nSpire software and calculators each of our students has, we’ve completely abandoned statistics tables.  Knowing that the given score was at the 90th percentile, the inverse normal TI-nSpire command quickly shows that this point corresponds to an approximate z-score of 1.28155.  Substituting this and the other givens into the x-value to z-score scaling relationship, z=\frac{x-\overline{x}}{s} , leads to an equation with a single unknown which easily can be solved by hand or by CAS to find the unknown standard deviation, s \approx 1.56061 .  Just a scant handful of students actually employed this.

What the Majority Did

Recognizing the problem as a twist on their previous work, most invoked a trial-and-error approach.  From their work, I could see that most essentially established bounds around the potential standard deviation and employed an interval bisection approach (not that any actually formally named their technique).

If you know the bounds, mean, and standard deviation of a portion of a normal distribution, you can find the percentage area using the nSpire’s normal Cdf command.  Knowing that the percentage area was 0.1, most tried a standard deviation of 1, and saw that not enough area (0.02275) was captured.  Then they tried 2, and goth too much area (0.158655).  A reproduction of one student’s refinements leading to a standard deviation of s \approx 1.56 follows.

THE COOL PART:  Students who attempted this approach got to deal directly with the upper 10% of the area; they weren’t required to adapt this to the “left-side area” input requirement of the inverse normal command.  While this adjustment is certainly minor, being able to focus on the problem parameters–as defined–helped some of my students.

THE PROBLEM:  As a colleague at my school told me decades ago when I started teaching, “Remember that a solution to every math problem must meet two requirements.  Show that the solution(s) you find is (are) correct, and show that there are no other solutions.”

Given a fixed mean and x-value, it seems intuitive to me that there is a one-to-one correspondence between the standard deviation of the normal curve and the area to the right of that point.  This isn’t a class for which I’d expect rigorous proof of such an assertion, but I still hoped that some might address the generic possibility of multiple answers and attempt some explanation for why that can’t happen here.  None showed anything like that, and I’m pretty certain that not a single one of my students in this class considered this possibility.  They had found an answer that worked and walked away satisfied.  I tried talking with them afterwards, but I’m not sure how many fully understood the subtle logic and why it was mathematically important.

The Creative Solution

Exactly one student remembered that he had a CAS and that it could solve equations.  Tapping the normal Cdf command used by the majority of his peers, he set up and tried to solve an equation as shown below.

Sadly, this should have worked for my student, but it didn’t.  (He ultimately fell back on the trial-and-error approach.) The equation he wrote is the heart of the trial-and-error process, and there is a single solution.  I suspect the programmers at TI simply hadn’t thought about applying the CAS commands from one area of their software to the statistical functions in another part of their software.  Although I should have, I hadn’t thought about that either.

Following my student’s lead, I tried a couple other CAS approaches (solving systems, etc.) to no avail.  Then I shifted to a graphical approach.  Defining a function using the normal Cdf command, I was able to get a graph.

Graphing y=0.1 showed a single point of intersection which could then be computed numerically in the graph window to give the standard deviation from earlier.

What this says to me is that the CAS certainly has the ability to solve my student’s equation–it did so numerically in the graph screen–but for some reason this functionality is not currently available on the TI-nSpire CAS’s calculator screens.

Extensions

My statistics students just completed a unit on confidence intervals and inferential reasoning.  Rather than teaching them the embedded TI syntax for confidence intervals and hypothesis testing, I deliberately stayed with just the normal Cdf and inverse normal commands–nothing more.  A core belief of my teaching is

Memorize as little as possible and use it as broadly as possible.

By staying with these just two commands, I continued to reinforce what normal distributions are and do, concepts that some still find challenging.  What my student taught me was that perhaps I could limit these commands to just one, the normal Cdf.

For example, if you had a normal distribution with mean 38 and standard deviation 2, what x-value marks the 60th percentile?

Now that’s even more curious.  The solve command doesn’t work (even in an approximation mode), but now the numerical solve gives the solution confirmed by the inverse normal command.

What if you wanted the bounds on the same normal distribution that defined the middle 80% of the area?  As shown below, I failed to solve then when I asked the CAS to compute directly for any of the equivalent distance of the bounds from the mean (line 1), the z-scores (line 2), or the location of the upper x-value (line 3).

But reversing the problem to define the 10% area of the right tail does give the desired result (line 2) (note that nsolve does work even though solve still does not) with the solution confirmed by the final two lines.

Conclusion

Admittedly, there’s not lots of algebra involved in most statistics classes–LOADS of arithmetic and computation, but not much algebra.  I’m convinced, though, that more attention to some algebraic thinking could benefit students.  The different statistics packages out there do lots of amazing things, especially the TI-nSpire, but it would be very nice if these packages could align themselves better with CAS features to permit students to ask their questions more “naturally”.  After all, such support and scaffolding are key features that make CAS and all technology so attractive for those of us using them in the classroom.

Binomial Probability and CAS

I posted previously about a year ago an idea for using CAS in a statistics course with probability.  I’ve finally had an opportunity to use it with students in my senior one-semester statistics course over the last few weeks, so I thought I’d share some refinements.  To demonstrate the mathematics, I’ll use the following problem situation.

Assume in a given country that women represent 40% of the total work force.  A company in that country has 10 employees, only 2 of which are women.
1) What is the probability that by pure chance a 10-employee company in that country might employ exactly 2 women?
2) What is the probability that by pure chance a 10-employee company in that country might employ 2 or fewer women?

Over a decade ago, I used binomial probability situations like this as an application of polynomial expansions, tapping Pascal’s Triangle and combinatorics to find the number of ways a group of exactly 2 women can appear in a total group size of 10.  Historically, I encouraged students to approach this problem by defining m=men and w=women and expand (m+w)^{10} where the exponent was the number of employees, or more generally, the number of trials.  Because question 1 asks about the probability of exactly 2 women, I was interested in the specific term in the binomial expansion that contained w^2.  Whether you use Pascal’s Triangle or combinations, that term is 45w^2m^8.  Substituting in given percentages of women and men in the workforce, P(w)=0.4 and P(m)=0.6, answers the first question.  I used a TI-nSpire to determine that there is a 12.1% chance of this.

That was 10-20 years ago and I hadn’t taught a statistics course in a very long time.  I suspect most statistics classes using TI-nSpires (CAS or non-CAS) today use the binompdf command to get this probability.

The slight differences in the input parameters determine whether you get the probability of the single event or the probabilities for all of the events in the entire sample space.  The challenge for the latter is remembering that the order of the probabilities starts at 0 occurrences of the event whose probability is defined by the second parameter.  Counting over carefully from the correct end of the sequence gives the desired probability.

With my exploration of CAS in the classroom over the past decade, I saw this problem very differently when I posted last year.  The binompdf command works well, but you need to remember what the outputs mean.  The earlier algebra does this, but it is clearly more cumbersome.  Together, all of this screams (IMO) for a CAS.  A CAS could enable me to see the number of ways each event in the sample space could occur.  The TI-nSpire CAS‘s output using an expand command follows.

The cool part is that all 11 terms in this expansion appear simultaneously.  It would be nice if I could see all of the terms at once, but a little scrolling leads to the highlighted term which could then be evaluated using a substitute command.

The insight from my previous post was that when expanding binomials, any coefficients of the individual terms “received” the same exponents as the individual variables in the expansion.  With that in mind, I repeated the expansion.

The resulting polynomial now shows all the possible combinations of men and women, but now each coefficient is the probability of its corresponding event.  In other words, in a single command this approach defines the entire probability distribution!  The highlighted portion above shows the answer to question 1 in a single step.

Last week one of my students reminded me that TI-nSpire CAS variables need not be restricted to a single character.  Some didn’t like the extra typing, but others really liked the fully descriptive output.

To answer question 2, TI-nSpire users could add up the individual binompdf outputs -OR- use a binomcdf command.

This gets the answer quickly, but suffers somewhat from the lack of descriptives noted earlier.  Some of my students this year preferred to copy the binomial expansion terms from the CAS expand command results above, delete the variable terms, and sum the results.  Then one suggested a cool way around the somewhat cumbersome algebra would be to substitute 1s for both variables.

CONCLUSION:  I’ve loved the way my students have developed a very organic understanding of binomial probabilities over this last unit.  They are using technology as a scaffold to support cumbersome, repetitive computations and have enhanced in a few directions my initial presentations of optional ways to incorporate CAS.  This is technology serving its appropriate role as a supporter of student learning.

OTHER CAS:  I focused on the TI-nSpire CAS for the examples above because that is the technology is my students have.  Obviously any CAS system would do.  For a free, Web-based CAS system, I always investigate what Wolfram Alpha has to offer.  Surprisingly, it didn’t deal well with the expanded variable names in (0.4women+0.6men)^{10}.  Perhaps I could have used a syntax variation, but what to do wasn’t intuitive, so I simplified the variables here to get

Huge Pro:  The entire probability distribution with its descriptors is shown.
Very minor Con:  Variables aren’t as fully readable as with the fully expanded variables on the nSpire CAS.

Extending graph control

This article takes my idea from yesterday’s post about using g(x)=\sqrt \frac{\left | x \right |}{x} to control the appearance of a graph and extends it in two ways.

  • Part I below uses Desmos to graph y=(x+2)^3x^2(x-1) from the left and right simultaneously
  • Part II was inspired by my Twitter colleague John Burk who asked if this control could be extended in a different direction.

Part I: Simultaneous Control

When graphing polynomials like y=(x+2)^3x^2(x-1), I encourage my students to use both its local behavior (cubic root at x=-2, quadratic root at x=0, and linear root at x=1) and its end behavior (6th degree polynomial with a positive lead coefficient means y\rightarrow +\infty as x\rightarrow\pm\infty). To start graphing, I suggest students plot points on the x-intercepts and then sketch arrows to indicate the end behavior.  In the past, this was something we did on paper, but couldn’t get technology to replicate it live–until this idea.

In class last week, I used a minor extension of yesterday’s idea to control a graph’s appearance from the left and right simultaneously.  Yesterday’s post suggested  multiplying  by \sqrt \frac{\left | a-x \right |}{a-x} to show the graph of a function from the left for x<a.  Creating a second graph multiplied by \sqrt \frac{\left | x-b \right |}{x-b} gives a graph of your function from the right for b<x.  The following images show the polynomial’s graph developing in a few stages.  You can access the Desmos file here.

First graph the end behavior (pull the a and b sliders in a bit to see just the ends of the graph) and plot points at the x-intercepts.

From here, you could graph left-to-right or right-to-left.  I’ll come in from the right to show the new right side controller. The root at x=1 is linear, so decreasing the b slider to just below 1 shows this.

Continuing from the right, the next root is a bounce at x=0, as shown by decreasing the b slider below 0.  Notice that this forces a relative minimum for some 0<x<1.

Just because it’s possible, I’ll now show the cubic intercept at x=2 by increasing the a slider above 2.

All that remains is to connect the two sides of the graph, creating one more relative minimum in -2<x<0.

The same level of presentation control can be had for any function’s graph.

Part II: Vertical Control

I hadn’t thought to extend this any further until my colleague asked if a graph could be controlled up and down instead of left and right.  My guess is that the idea hadn’t occurred to me because I typically think about controlling a function through its domain.  Even so, a couple minor adjustments accomplished it.  Click here to see a vertical control of the graph of y=x^3 from above and below.

 

Enjoy.

Controlling graphs and a free online calculator

When graphing functions with multiple local features, I often find myself wanting to explain a portion of the graph’s behavior independent of the rest of the graph.  When I started teaching a couple decades ago, the processor on my TI-81 was slow enough that I could actually watch the pixels light up sequentially.  I could see HOW the graph was formed.  Today, processors obviously are much faster.  I love the problem-solving power that has given my students and me, but I’ve sometimes missed being able to see function graphs as they develop.

Below, I describe the origins of the graph control idea, how the control works, and then provide examples of polynomials with multiple roots, rational functions with multiple intercepts and/or vertical asymptotes, polar functions, parametric collision modeling, and graphing derivatives of given curves.

BACKGROUND:  A colleague and I were planning a rational function unit after school last week wanting to be able to create graphs in pieces so that we could discuss the effect of each local feature.  In the past, we “rigged” calculator images by graphing the functions parametrically and controlling the input values of t.  Clunky and static, but it gave us useful still shots.  Nice enough, but we really wanted something dynamic.  Because we had the use of sliders on our TI-nSpire software, on Geogebra, and on the Desmos calculator, the solution we sought was closer than we suspected.

REALIZATION & WHY IT WORKS: Last week, we discovered that we could use g(x)=\sqrt \frac{\left | x \right |}{x} to create what we wanted.  The argument of the root is 1 for x<0, making g(x)=1.  For x>0, the root’s argument is -1, making g(x)=i, a non-real number.  Our insight was that multiplying any function y=f(x) by an appropriate version of g wouldn’t change the output of f if the input to g is positive, but would make the product ungraphable due to complex values if the input to g is negative.

If I make a slider for parameter a, then g_2(x)=\sqrt \frac{\left | a-x \right |}{a-x} will have output 1 for all x<a.  That means for any function y=f(x) with real outputs only, y=f(x)\cdot g_2(x) will have real outputs (and a real graph) for x<a only.  Aha!  Using a slider and g_2 would allow me to control the appearance of my graph from left to right.

NOTE:  While it’s still developing, I’ve become a big fan of the free online Desmos calculator after a recent presentation at the Global Math Department (join our 45-60 minute online meetings every Tuesday at 9PM ET!).  I use Desmos for all of the following graphs in this post, but obviously any graphing software with slider capabilities would do.

EXAMPLE 1:  Graph y=(x+2)^3x^2(x-1), a 6th degree polynomial whose end behavior is up for \pm \infty, “wiggles” through the x-axis at -2, then bounces off the origin, and finally passes through the x-axis at 1.

Click here to access the Desmos graph that created the image above.  You can then manipulate the slider to watch the graph wiggle through, then bounce off, and finally pass through the x-axis.

EXAMPLE 2:  Graph y=\frac{(x+1)^2}{(x+2)(x-1)^2}, a 6th degree polynomial whose end behavior is up for \pm \infty, “wiggles” through the x-axis at -2, then bounces off the origin, and finally passes through the x-axis at 1.

Click here to access the Desmos graph above and control the creation of the rational function’s graph using a slider.

EXAMPLE 3:  I believe students understand polar graphing better when they see curves like the  limacon r=2+3cos(\theta ) moving between its maximum and minimum circles.  Controlling the slider also allows users to see the values of \theta at which the limacon crosses the pole. Here is the Desmos graph for the graph below.

EXAMPLE 4:  Object A leaves (2,3) and travels south at 0.29 units/second.  Object B leaves (-2,1) traveling east at 0.45 units/second.  The intersection of their paths is (2,1), but which object arrives there first?  Here is the live version.

OK, I know this is an overly simplistic example, but you’ll get the idea of how the controlling slider works on a parametrically-defined function.  The $latex \sqrt{\frac{\left | a-x \right |}{a-x}}$ term only needs to be on one of parametric equations.  Another benefit of the slider approach is the ease with which users can identify the value of t (or time) when each particle reaches the point of intersection or their axes intercepts.  Obviously those values could be algebraically determined in this problem, but that isn’t always true, and this graphical-numeric approach always gives an alternative to algebraic techniques when investigating parametric functions.

ASIDE 1–Notice the ease of the Desmos notation for parametric graphs.  Enter [r,s] where r is the x-component of the parametric function and s is the y-component.  To graph a point, leave r and s as constants.  Easy.

EXAMPLE 5:  When teaching calculus, I always ask my students to sketch graphs of the derivatives of functions given in graphical forms.  I always create these graphs one part at a time.  As an example, this graph shows y=x^3+2x^2 and allows you to get its derivative gradually using a slider.

ASIDE 2–It is also very easy to enter derivatives of functions in the Desmos calculator.  Type “d/dx” before the function name or definition, and the derivative is accomplished.  Desmos is not a CAS, so I’m sure the software is computing derivatives numerically.  No matter.  Derivatives are easy to define and use here.

I’m hoping you find this technology tip as useful as I do.

Air Sketch app follow-up

I mentioned in my Air Sketch review last week that one of its biggest drawbacks, IMO, was that I could not use multiple blank pages when running the app.

PROBLEM SOLVED:  I created a 10-page blank document in MS Word by inserting 9 page breaks and nothing more, and printed that doc to a pdf file in Dropbox.  From my Dropbox app on my iPad, I open the 10-page blank pdf into Air Sketch.  Voila!  I now have a 10-page scrollable blank document on which I can take all the notes I need!  As a pdf, Air Sketch and compress any inking into a new pdf and save it wherever I need.  Obviously, I could create a longer blank pdf with more pages if needed, but I couldn’t see any classes going beyond 10 pages.

I still don’t get some of the hot linke or multiple image tools of SMART Notebook (see below), but this work-around clears a major usage hurdle for me.

OK, one problem solved, but a few more are realized:

  • It would be very cool if I could copy-paste images within Air Sketch–something akin to cloning on a SMART Board.
  • Also, while I can import images, it seems that I can operate on only one at a time.  Inserting a 2nd erases the writing and insert of a previous image.  It can be undone, but I still get just 1 image at a time.  Worse, inserting an image takes me out of editing my 10-page blank pdf, so I can’t layer images on top of my pdf files in the current Air Sketch version.

These issues aside, Air Sketch remains a phenomenal piece of software and MY STUDENTS LOVE IT!  I hope the Air Sketch editors take note of these for future editions.

Aside:  Another teacher at my school independently discovered one of my suggestions in my first review of Air Sketch–that you can run one piece of software (as a math teacher, I often run CAS, nSpire, or statistical packages) through the projector while my students keep the written notes on their laptops/iPads/smart phones via the local Web page to which Air Sketch is publishing.  Having two simultaneous technology packages running without flipping screens has been huge for us.

Air Sketch iPad app

I’ve rarely been so jazzed by a piece of software that I felt compelled to write a review of it.  There’s plenty of folks doing that, so I figured there was no need for me to wander into that competitive field.  Then I encountered the iPad Air Sketch app (versions: free and $9.99 paid) last Monday and have been actively using in all of my classes since.

Here’s my synopsis of the benefits of Air Sketch after using it for one week:

–Rather than simply projecting my computer onto a single screen in the room, I had every student in my room tap into the local web page created by Air Sketch.  Projection was no longer just my machine showing on the wall; it was on every student machine in the room.  Working with some colleagues, we got the screen projections on iPhones, iPads, and computers.  I haven’t projected onto Windows machines, but can’t think of a reason in the world why that wouldn’t happen.

–In my last class Friday, I also figured out that I could project some math software using my computer while maintaining Air Sketch notes on my kids’ computers.  No more screen flipping or shrunken windows when I need to flip between my note-taking projection software and other software!

–When a student had a cool idea, I handed my iPad to her, and her work projected live onto every machine in the room.  About half of my students in some classes have now had an opportunity to drive class live.

–This is really cool:  One of my students was out of country this past week on an athletic trip, so he Skyped into class.  Air Sketch’s Web page is local, so he couldn’t see the notes directly, but his buddy got around that by sharing his computer screen within Skype.  The result:  my student half way around the globe got real-time audio and visual of my class.

–This works only in the paid version:  We reviewed a quiz much the way you would in Smart Notebook—opened a pdf in Air Sketch and marked it live—but with the advantage of me being able to zoom in as needed without altering the student views.

–Finally, because the kids can take screen shots whenever they want, they grabbed portions of the Air Sketch notes only when they needed them.  My students are using laptops with easily defined screen shot capture areas, but iPad users could easily use Skitch to edit down images.

–Admittedly, other apps give smoother writing, but none of them (that I know) project.   Air Sketch is absolutely good enough if you don’t rush.

By the way, the paid version is so much better than the free, allowing multiple colors, ability to erase and undo, saving work, and ability to ink pdfs.

Big down side:  When  you import a multi-page pdf, you can scroll multiple pages, but when creating notes, I’m restricted to a single page.  I give my students a 10-15 second warning when I’m about to clear a screen so that any who want cant take a screen shot.  It would be annoying to have to save multiple pages during a class and find a way to fuse all those pdfs into one document before posting.  The ad on the Air Sketch site was (TO ME) a bit misleading when it showed multiple pages being scrolled.  As far as I can tell, that happened on a pdf.  Perhaps it’s my bad, but I assumed that could happen when I was inking regular notes.  Give me this, and I’ll drop Smart Notebook forever.  Admittedly, SN has some features that Air Sketch doesn’t but I’m willing to work around those.

Overall, this is a GREAT app, and my students were raving about it last week.  I’ll certainly be using it all of my future presentations.

Exponential Derivatives and Statistics

This post gives a different way I developed years ago to determine the form of the derivative of exponential functions, y=b^x.  At the end, I provide a copy of the document I use for this activity in my calculus classes just in case that’s helpful.  But before showing that, I walk you through my set-up and solution of the problem of finding exponential derivatives.

Background:

I use this lesson after my students have explored the definition of the derivative and have computed the algebraic derivatives of polynomial and power functions. They also have access to TI-nSpire CAS calculators.

The definition of the derivative is pretty simple for polynomials, but unfortunately, the definition of the derivative is not so simple to resolve for exponential functions.  I do not pretend to teach an analysis class, so I see my task as providing strong evidence–but not necessarily a watertight mathematical proof–for each derivative rule.  This post definitely is not a proof, but its results have been pretty compelling for my students over the years.

Sketching Derivatives of Exponentials:

At this point, my students also have experience sketching graphs of derivatives from given graphs of functions.  They know there are two basic graphical forms of exponential functions, and conclude that there must be two forms of their derivatives as suggested below.

When they sketch their first derivative of an exponential growth function, many begin to suspect that an exponential growth function might just be its own derivative.  Likewise, the derivative of an exponential decay function might be the opposite of the parent function.  The lack of scales on the graphs obviously keep these from being definitive conclusions, but the hypotheses are great first ideas.  We clearly need to firm things up quite a bit.

Numerically Computing Exponential Derivatives:

Starting with y=10^x, the students used their CASs to find numerical derivatives at 5 different x-values.  The x-values really don’t matter, and neither does the fact that there are five of them.  The calculators quickly compute the slopes at the selected x-values.

Each point on f(x)=10^x has a unique tangent line and therefore a unique derivative.  From their sketches above, my students are soundly convinced that all ordered pairs \left( x,f'(x) \right) form an exponential function.  They’re just not sure precisely which one. To get more specific, graph the points and compute an exponential regression.

So, the derivatives of f(x)=10^x are modeled by f'(x)\approx 2.3026\cdot 10^x.  Notice that the base of the derivative function is the same as its parent exponential, but the coefficient is different.  So the common student hypothesis is partially correct.

Now, repeat the process for several other exponential functions and be sure to include at least 1 or 2 exponential decay curves.  I’ll show images from two more below, but ultimately will include data from all exponential curves mentioned in my Scribd document at the end of the post.

The following shows that g(x)=5^x has derivative g'(x)\approx 1.6094\cdot 5^x.  Notice that the base again remains the same with a different coefficient.

OK, the derivative of h(x)=\left( \frac{1}{2} \right)^x causes a bit of a hiccup.  Why should I make this too easy?  <grin>

As all of its h'(x) values are negative, the semi-log regression at the core of an exponential regression is impossible.  But, I also teach my students regularly that If you don’t like the way a problem appears, CHANGE IT!  Reflecting these data over the x-axis creates a standard exponential decay which can be regressed.

From this, they can conclude that  h'(x)\approx -0.69315\cdot \left( \frac{1}{2} \right)^x.

So, every derivative of an exponential function appears to be another exponential function whose base is the same as its parent function with a unique coefficient.  Obviously, the value of the coefficient depends on the base of the corresponding parent function.  Therefore, each derivative’s coefficient is a function of the base of its parent function.  The next two shots show the values of all of the coefficients and a plot of the (base,coefficient) ordered pairs.

OK, if you recognize the patterns of your families of functions, that data pattern ought to look familiar–a logarithmic function.  Applying a logarithmic regression gives

For y=a+b\cdot ln(x), a\approx -0.0000067\approx 0 and b=1, giving coefficient(base) \approx ln(base).

Therefore, \frac{d}{dx} \left( b^x \right) = ln(b)\cdot b^x.

Again, this is not a formal mathematical proof, but the problem-solving approach typically keeps my students engaged until the end, and asking my students to  discover the derivative rule for exponential functions typically results in very few future errors when computing exponential derivatives.

Feedback on the approach is welcome.

Classroom Handout:

Here’s a link to a Scribd document written for my students who use TI-nSpire CASs.  There are a few additional questions at the end.  Hopefully this post and the document make it easy enough for you to adapt this to the technology needs of your classroom.  Enjoy.