Showing posts with label calculus. Show all posts
Showing posts with label calculus. Show all posts

Monday, December 29, 2014

Using GeoGebra to teach calculus concepts

GeoGebra is a fantastic tool for demonstrating geometry, algebra, and calculus concepts. (The statistics package is getting pretty good, too.) But I think the hardest part is imagining how to use the program effectively to really demonstrate concepts.

Here are eight demonstrations you can download from me, or watch my videos to figure out how to make them yourself, geared to teaching calculus concepts.

-----

1. I can't quite get the gifs to synch, but the GeoGebra allows the students to look at a composite function for the values where its derivative is 0. The two functions are graphed side-by-side, and students can manipulate the input, see the change in the inside function, and then watch the outside function change.

Of course, the crucial concept is that the derivative of the composite function will be zero when either the inside function or the outside function has a derivative of 0.

 


Here's link to construction 1, and the video on its construction.

-----

2. Another important concept is understanding that the limit of the Riemann sums approaches the integral as n goes to infinity. The neat part in GeoGebra is that your function can be any squiggle you draw.


Here's the link to construction 2, and the video on its construction.

-----

3. Of course, the most important idea in a calculus class is the fundamental theorem. Students find the fact the f(x) is discontinuous but F(x), the integral of f(x), is continuous challenging. Many students will not, at first, correctly identify that F(x) is continuous but not smooth at 2. Even more students think that the behavior of F(x) at 6 will be more obvious.


Here's the link to construction 3, and the video of its construction.

-----

4. I like this demonstration of Euler's method. GeoGebra is making 100 points using Euler's method. Students can move the initial point around to see how changing the initial value gives them a different particular solution.


Here's the link to construction 4, and the video of its construction.

-----

5. This isn't a calculus concept per se, but I love the baseball problem. It's a great refresher for students on how to do parametric graphing. I set this up so my students could manipulate the windspeed and the angle to figure out the maximum distance a baseball can travel.


Here's the link to construction 5, and the video of its construction.

-----

6. A topic worth reviewing for B.C. Calculus: polar graphing. It is difficult for students to grasp. Even more challenging is visualizing the area integral, but setting up this Riemann sum helps!



Here's the link to construction 6, and the video of its construction.

-----

7. Perhaps the hardest concept of all for students to grasp in an introductory calculus course is Taylor polynomials. This demonstration allows students to see that the error bounds grow smaller each time as the degree of the Taylor polynomial increases.


Here's the link to construction 7, and the video of its construction.

8. OK, also not a calculus concept, but a fun one: the ellipse appears from using the definition that the sum of the two distances to the foci is fixed.


Here's the link to construction 8, and the video of its construction.

Friday, October 10, 2014

GeoGebra 5 -- into three dimensions

Last month GeoGebra, the free multi-platform graphing and math program, came out with version 5, which includes three-dimensional graphing. As a geometry and calculus teacher, I was ecstatic and immediately set out to do whatever I could do. Here are some of the things I made for my calculus classes:


This is a standard maximize the volume of the cone question. Here's the GeoGebra file.

There's lots of fun stuff to do with the volumes by known cross-section:


The slices are semi-circles, and the slicing plane makes that clear. Here's the GeoGebra file.

Here is a solid where the cross-sections are equilateral triangles:


Here's the GeoGebra file, and a video on how I made a similar construction.

One can also set up rotational solids pretty easily:


Here's the GeoGebra file, and a video on how to construct it.

And here is a more complicated region:


Here's the GeoGebra file.

And my previous post had a nice GeoGebra demo on conics (made by a colleague, not me).

Thursday, March 6, 2014

Lock-in 2

I have written about the concept of lock-in before, but it is an idea I keep coming back to. Rather than starting from the assumption that systems and institutions have been designed rationally, we should think about them historically, trying to unearth all the contingent twists and turns that got us to where we are today.

Which is to say path dependence is a lot more important than we normally view it. What has come before makes certain next steps easier and more likely than others. Rarely does anyone make a from-scratch, all-factors-considered in rational-long-term-planning decision (especially in democracies where power is dispersed). So people muddle through.

One example is fossil fuels. All sorts of things happened along the way that got us to where we are today. But now that we ARE here, and lock-in means that we have designed systems, and have settled expectations, on what energy should and should not be able to do. For example, we built long-distance interstate highways because internal combustion vehicles could travel hundreds of miles before needing to refuel. We spent money on that instead of developing other interstate travel systems. Now we think electric vehicles ought to be able to travel hundreds of miles before recharging... because we have those roads to use, and we always have been able to do. This is insane demand on electric vehicles. They are clearly perfectly fine for intracity use (although prices for electric vehicles are still too high). Renting a gas-powered car for long-haul drives, or finding a different way to do these trips, would allow us to use electric vehicles 95% of the time. But re-setting expectations is hard.

As far as I understand economists' answer to this question -- and I admit I do not really understand their answer -- is that high prices will lead people to substitute. In other words, once electric vehicles are cheaper than gas vehicles, people will make the switch (in the basic economic models). But this is too much of an assumption for me to accept; many substitutions are not easy. There are always trade-offs. Nothing does exactly what gasoline does. The basic economic models say that as soon as the prices of electric vehicles come down, their use will skyrocket, but differences from gas vehicles will slow their adoption. And even if it does not slow adoption, lock-in to the existing set of automobile capabilities has slowed the development of electric cars. Everyone has worked hard to emulate the existing capabilities without asking what the from-scratch design might look like.

Apparently, the transition from wood to coal was kind of rough.

Here is another great example of lock-in: California's water system.

I believe there is also a lock-in on the subjects covered in high school. If I had to organize all human knowledge simply, I would split it into three main branches: literature and arts, natural sciences, and social studies (economics, history, etc.). There are areas of overlap, too: mathematics, for example, is both art and science. The typical high school curriculum actually covers all of these main branches: students must read and analyze literature, often take art classes, and must also cover basic sciences and mathematics. But I have two specific examples of lock-in in mind. [Note: I am a little worried that the ideas below, which I heard from a professor in grad school, are a just-so story. But the information I can find on the history of U.S. curriculum is scarce. If you had access to contradictory information, please pass it along so I can correct my post.]

Why is it the focus of the high school social studies curriculum is history? And why is writing taught in literature classes? Mostly, the students are expected to write expository papers, so, although the analysis of literature exposes them to different rhetorical techniques, it does not expose the students to garnering evidence and putting together a clear position. Social studies would obviously make a lot more sense.

The short answer is Charles Eliot and the Committee of Ten:

There is little dispute about the historical importance of the report of the Committee of Ten. Appointed by the National Education Association (NEA), the committee, composed mainly of presidents of leading colleges, was charged with establishing curriculum standardization for public-high-school students who intended to go to college. During the previous half century, from roughly 1840 to 1890, the public high school had gradually emerged from the shadow of the private academy. While enrollments were still small by today’s standards (probably less than 5 percent of American teenagers attended public high school in the post-Civil War era), by the 1870s and 1880s the number of public secondary schools was increasing fast enough to occasion some attention. And the Committee of Ten was convened to bring some order to the varied curricula that were growing with them. Under the leadership of Charles Eliot, president of Harvard University, the committee undertook a broad and comprehensive exploration of the role of the high school in American life, concluding, significantly, that all public-high-school students should follow a college preparatory curriculum, regardless of their backgrounds, their intention to stay in school through graduation, or their plans to pursue higher education.

From EducationNext. The public high school movement was gaining momentum but their curricula were all different, which made it hard for Harvard and the others to decide whom to admit. Enter a standardized core, suggested by this influential committee: Latin, Greek, English, modern languages, mathematics, sciences, natural history, history, and geography. Of course, it is easier to cut subjects than to add new ones to the list. Latin and Greek were eventually eliminated. Geography is still taught in some middle schools but not at a high school level, and natural history is now mostly subsumed by biology and earth sciences. Nothing new has been added to the list for a century (really, not even computer science makes the required subjects list?).

This is not to say that high school education today looks like it did a century ago; it looks dramatically different, far less focused on the classic literature of Latin and Greek. But the basic structure remains the same, so history is still the clear focus of high school social studies, despite some attempts to broaden it, for, ahem, mostly historical reasons. In most U.S. high schools, students take world history for two years, perhaps split up into ancient civilizations and modern civilizations, plus U.S. history for another year. Maybe senior year includes an elective on economics, political science, or yet another history class. So history comprises, for most students, 75% or more of their high school social studies curriculum. One example of lock-in from a century ago, when history and the classics formed the core of collegiate learning. (For example, at Harvard, economics became a separate department in 1897, birthed from the History, Government, and Economics department; sociology was first added in 1931; and psychology was added in the 1880s -- I cannot get a definite date. Before the 1880s, the classics held outmoded weight.)

Now to the other question. Why is writing mostly taught in literature class? While I am out of my zone of expertise here, my guess is two-fold. First, because students in those days were expected to read the classics in Latin and Greek, I would guess the English class read far less literature than today (indeed, most English-language literature would have been looked down upon as "popular" and trashy). With less literature to read, their English class would have had a lot more time to focus on grammar, rhetoric, and yes, exposition and argument. I believe the English class then was seen as inheritor of the trivium.

Second, I think writing expository papers ended up in English, not social studies, because the history research paper is especially challenging for students. If social studies classes covered a broader range of topics of economics, politics, or ethics, it might be easier to get those students writing basic position papers. I know good history teachers have the students write multiple in-class or homework essays, but these presume a right answer. "Essay" is really a misnomer. The evidence is just facts they already learned from the textbook. Yet staking an original position and doing research on it is intimidating in a history course. Less so when the topic is, "A flat tax is efficient and fair." Anyone with an Internet connection can dig into that topic; it is not intimidating at all. One vision about such a course -- an open-ended inquiry course, broader than just covering a fixed set of facts -- was presented appealing in Neil Postman's Teaching as a Subversive Activity. Or really in any debate-across-the-curriculum book.

Consider, as another example of high school curriculum lock-in, the two types of Advanced Placement math exams: A.B. and B.C. Calculus, on the one hand, versus Statistics. More than twice as many students take the Calculus exams than take the Statistics exam, although Statistics is growing more rapidly. The Calculus exam was first given in 1956; the Statistics exam was first given in 1996. When the Calculus exam was first given, it was kind of a rarity that students would get to Calculus in high school. Most students finished with Geometry or perhaps Advanced Algebra with Trigonometry. The sine qua non of a rigorous high school program was students got to Calculus -- less about the student than the school, in a way. Now, it is not really such a rarity anymore. A lot of students do take Calculus, but the Calculus exam has not lost its imprimatur for college admissions.

However, there are several compelling reasons for a lot of students to prefer taking a Statistics course to a Calculus course: 1) statistics will be more beneficial in the college studies of students intending to study biology, psychology, or other social sciences than calculus, which is only necessary for math and engineering students; 2) statistics is more important for being a well-informed citizen; and 3) statistics is a mode of thinking that can be applied to a lot of situations. Self-selection is an important concept to understand in many contexts. But the A.P. Statistics exam is seen as an inferior marker of a rigorous high school math preparation and probably always will be.

Or, in a more general turn, why not develop a more general exam of basic mathematical knowledge we expect high school students to know, from modeling to manipulating functions to probability to vectors and trigonometry? I think this is what the I.B. exams (S.L. or H.L.) attempt to do. But this may never, in the U.S. at least, replace the Calculus exam. It all comes down to an initial decision, back in the 50s, to write a subject specific exam, rather than a cumulative, general mathematics exam. The latter is less locked-in and can evolve; the former less so. The fact of the Calculus exam implies that mathematics is a sequential, hierarchical ladder and the goal is to get to the top as fast as you can. This is false on both counts.

Here is another example, a special pet peeve of mine: the Texas Instruments calculator.


From: mathwithbaddrawings. Hilarious! Please visit his site. My analysis:
TI-84 calculator:
15 MHz processor, 24 KB ram,1.5 MB flash storage, b&w screen
$110
iPod touch:
1 GHz processor, 512 MB ram, 16 GB flash storage, color screen
$229

The iPod touch: 67 times faster; 11,000 times more ram; 22,000 times more storage. But the iPod costs only slightly more than twice. The TI-84 calculator was on the cutting edge a long time ago, then math textbooks included examples using the calculator, then the A.P. exams decided to allow calculator use. Now we are locked-in on the TI-84 calculator until -- and it will happen soon -- the College Board is ready certify some iOS apps as exam appropriate. This will require a lock-out feature (i.e. an app must have a time lock that prevents leaving the app, so no one can text or use the Internet during the test).

One final example of lock-in. Did you know the National Speech and Debate Association, formerly the National Forensic League, does NOT write policy debate topics for high school? (The N.S.D.A. does write the Public Forum and Lincoln Douglas topics.) Policy topics are written by the National Federation of State High School Associations. As you can tell from this screen shot, the organization's focus is on sports. Football, baseball, soccer, and basketball all get a visual:


You can see debate in the left-hand links. So why is a sports organization also organizing debate? My guess: the N.F.H.S. was founded in 1920. The N.F.L. was founded in 1925. This is also -- again, my guess -- why state championship speech and debate tournaments are separate from N.F.L. (now N.S.D.A.) qualifiers. And why moot court and model U.N. aren't part of the same organization. Perhaps it was some organizational rivalry at the time.

Saturday, February 22, 2014

Log, log, it's big, it's heavy, it's wood

Every time I go for a jog, the first mile takes me 10 minutes. The second miles takes me 20 minutes. The third mile takes me 40 minutes. The next mile, of course, takes me 80 minutes. How long does it take me to finish my 10 mile jog? I think this "logarithmic jogging" fad is so silly...

That's why I got into "root jogging" instead! The first mile takes 10 minutes. The second mile takes 30 minutes. The third mile takes 50 minutes. The fourth miles takes 70 minutes... yet I finish my 10 mile jog so much faster!

How many intersections are there between y= x and y=lo g 2 ( x+1 ) ? A lot of students would look at this graph



and say "one." Just like the logarithmic vs. root jogging, students notice the initial growth rate but fail to continue the pattern. Doubling the time to jog each mile will make jogging the fifth mile much slower under logarithmic jogging (160 minutes) compared to root jogging (90 minutes). Come to think of it, how many will recognize the question is exactly the same as this: How many intersections between y= x 2 and y= 2 x -1 ?


On the other hand, it is easier to internalize and understand that exponential growth is insanely fast than it is to internalize that logarithmic growth is insanely slow.

To be fair, how logarithms work is pretty confusing. John Napier's purpose in developing logarithms was to simplify complicated multiplications, specifically, multiplications of long trigonometric decimals, such as sin(1)*cos(1). Before calculators, this kind of multiplication would be quite tedious. But logarithms turn multiplication into addition, so log[sin(1)*cos(1)] = log[sin(1)] + log[cos(1)]. All one needs to do is look up the logarithms of the two numbers in a table, add them together (much faster than multiplication), and then look up the inverse logarithm in a table.

The identity that logarithms turn multiplication into addition is quite mind-bending. Here is one way to demonstrate this fact: On a logarithm graph, a horizontal compression is the same thing as a positive vertical translation.


(Download the GeoGebra file here.)

In a pre-calculus class, I would want to establish that ln(x) is in in between reciprocal functions and root functions by graphing all three types, such as f⁡(x)=-10(x)-110+10, g(x)=ln(x), and h⁡(x)=10 ⋅ x10 -10


The root function (in blue) grows without limit but has a finite value at x = 0. The ln(x) (in green) grows without limit but goes to negative infinity as x goes to 0. The reciprocal function (in red) grows to a horizontal asymptote and also goes to negative infinity as x goes to 0. Any reciprocal function has some horizontal asymptote. The ln(x) grows as slowly as possible without having an horizontal asymptote.

In a calculus class, once the students have seen l'Hopital's rule, they can prove that ln(x) fits in between these two types of functions. Both the reciprocal and root functions are of the form y=n x 1/n -n . Here is the short version: x= ( y+n n ) n
li m n → ∞ ( y+n n ) n = e y =x
So y=ln(x).

For the same reason, one can show this:


One final thought about logs. In a B.C. Calculus course, I ask my students to look at the Taylor series for the reciprocal, logarithmic, and root functions I mentioned above.  The Taylor series are:

h⁡(x)=10 ⋅ x10 -10 ≈ ( x-1 )-0.45(x-1 ) 2 +0.285(x-1 ) 3 -0.207(x-1 ) 4
g⁡(x)=ln⁡(x) ≈ ( x-1 )-0.5(x-1 ) 2 +0.333(x-1 ) 3 -0.25(x-1 ) 4
f(x)=-10x-0.1+10≈(x-1)-0.55(x-1)2+0.385(x-1)3-0.298(x-1)4

As you can see, the ln(x) fits right in between the other two.

One final thought on ln(x): a really neat property about its radius of convergence.

Thursday, May 9, 2013

Taxes as a calculus problem

Around this time of year, no one wants to think any more about taxes, but it makes for a very excellent calculus problem.

Secants vs. tangents


First, let us say that we have a function t(x), where t is the total tax owed and x is the pre-tax income. What is t '(x), the derivative of t(x)? It is the instantaneous tax rate: at a given income x, t ' is the additional tax paid on earning one additional cent. This is distinct from the effective tax rate, which is t(x) / x. To make this distinction clear, I have my students first work with the current U.S. income tax bracket system:


This is a graph of the current U.S. function for t(x). The x-axis shows pre-tax income; the y-axis shows total tax owed (note: the scales are logarithmic). I ask my students questions about the effective tax rate for someone earning $93,100 -- a rate represented by the secant line from (93.1, 17.03) to the origin. The effective rate is 17.03/93.1 = .183 = 18.3%. I ask my students to compare that to the instantaneous rate a person earning $93,099.99 pays on one additional cent -- a rate represented by the tangent line at x = 93.09999. From incomes in the $44,000 to $93,100 range, each additional cent is taxed at the same rate. This is the 25% bracket: (17.03 - 4.75)/(93.1 - 44) = .25. If a taxpayer's income falls in this range, she pays a top marginal rate of 25%, and a raise of $.01 results in .25 cents of additional tax. However, no taxpayer whose income falls in this range pays an effective rate of 25%. The top marginal rate a taxpayer pays never equals her effective rate! In fact, it is the person who earns $228,100 who pays an effective rate of 25%; she is in the 33% top marginal rate, but a lot of her income is taxed at lower rates.

Here is the graph for t '(x), the derivative of the t(x) above:


Note that the x-axis is still logarithmically scaled pre-tax income; the y-axis is instantaneous tax rate and is normally scaled.

Modeling, first derivatives, second derivatives, and c


Here is a graph of the effective tax rates, t(x) / x, at the endpoints of each bracket:



The x-axis is logarithmically scaled pre-tax income in thousands of dollars (note: all subsequent formulas assume x is in thousands of dollars). The effective tax rate (total tax paid per $1,000 pre-tax income) is shown on the y-axis. Intriguingly, the above graph looks linear (but remember, the x-axis is ln(x)). The equation T(x) / x = .076 ln(x) - .17 models the key points fairly well. Thus, the real t(x) can be modeled closely by T(x) = .076 x ln(x) - .17x. And T '(x) would be .076 ln(x) - .094. Here is this T '(x) versus the actual tax brackets:



I also ask them to think about T "(x), which is 0.076 / x. What conclusion can they draw from the fact that, when x > 0, T " > 0? This shows that T '(x) is always increasing, and T (x) is concave up. Of course, they can see from the graph above that T '(x) continues increasing; however, the real tax brackets top out at 35% marginal rate. This function T '(x) eventually equals 1 at about x = 1.8 million, meaning it would hit a 100% instantaneous rate and this high-earner could keep no additional money. At about 5 million, T(x) = x, so this person would have $0 income after paying taxes! Obviously, this makes no sense; T '(x) should have an asymptote at no greater 1, a conclusion my students reach with little prompting. An asymptote means that T '(x) will always be positive and increasing (progressive) but never reach confiscatory levels.

Furthermore, I ask my students to think about what increasing or decreasing the c in T(x) will do. It will not change T '(x) or T "(x), but it will affect the x- and y-intercepts. Why does it make sense for the y-intercept to be negative? This might correspond to the earned income tax credit: cash payments, in the form of a tax rebate, to people with very low incomes.

Setting up an ideal function


So, we need to set up an ideal tax function, i(x), such that its derivative will have an asymptote (unlike the linear T '(x)). Generally speaking, the easiest way to accomplish this is by setting up its derivative in the form:


where a and b can be adjusted to change the x- and y-intercepts, and c can alter how quickly the instantaneous tax rate increases (where c > 0). Furthermore, it makes sense to set a = b so that i '(x) > 0 where x > 0, otherwise one would create the unusual situation where additional income pushed the total tax down (i.e., a negative slope on the integral i (x)). The simplest example of i '(x) is


and thus its integral, i(x), would be x - ln(x+1) + c. At this point, I set my students loose to play with the function i '(x). Here is one example that matches up well against the current brackets:


This i '(x) is


I ask my students to compute its antiderivative -- good practice for them -- and compare it to T(x). They look quite similar below $600,000. After $600,000, T(x) becomes much bigger, eventually crossing the line y = x. The function i(x), however, looks like it starts to plateau, but appearances are deceptive: i(x) continues to increase, its slope continues to increase, and it is always concave up -- yet it never crosses y = x. Therefore, i(x) could create a progressive tax system without brackets.




Here's the GeoGebra mentioned.