Posted by: Dave Richeson | April 18, 2012

An interesting multivariable calculus example

Earlier this semester in my Multivariable Calculus course we were discussing the second derivative test. Recall the pesky condition that if {(a,b) } is a critical point and {D(a,b)=f_{xx}(a,b)f_{yy}(a,b)-(f_{xy}(a,b))^{2}=0}, then the test fails.

A student emailed me after class and asked the following question. Suppose a function {f} has a critical point at {(0,0)} and {D(0,0)=0}. Moreover, suppose that as we approach {(0,0)} along {x=0} we have {f_{xx}(0,y)>0} when {y<0} and {f_{xx}(0,y)<0} when {y>0}. Is that enough to say that the critical point is a not a maximum or a minimum? His thought process was that if we look at slices {y=k} we get curves that are concave up when {k<0} and curves that are concave down when {k>0}—surely that could not happen at a maximum or minimum.

I understood his intuition, but I was skeptical. Indeed, after a little playing around I came up with the following counterexample. The function is

{\displaystyle f(x,y)=\begin{cases} x^{4}+y^{2}e^{-x^{2}} & y\ge 0\\ x^{4}+x^{2}y^{2}+y^{2} & y<0. \end{cases}}

The first partial derivatives are

{\displaystyle f_{x}(x,y)=\begin{cases} 4x^{3}-2xy^{2}e^{-x^{2}} & y\ge 0\\ 4x^{3}+2xy^{2} & y<0, \end{cases}}

{\displaystyle f_{y}(x,y)=\begin{cases} 2ye^{-x^{2}} & y\ge 0\\ 2x^{2}y+2y & y<0. \end{cases}}

Clearly {(0,0)} is a critical point. The second partial derivatives are

{\displaystyle f_{xx}(x,y)=\begin{cases} 12x^{2}-2y^{2}e^{-x^{2}}+4x^{2}y^{2}e^{-x^{2}} & y\ge 0\\ 12x^{2}+2y^{2} & y<0, \end{cases}}

{\displaystyle f_{yy}(x,y)=\begin{cases} 2e^{-x^{2}} & y\ge 0\\ 2x^{2}+2 & y<0, \end{cases}}

{\displaystyle f_{xy}(x,y)=f_{yx}(x,y)=\begin{cases} -4xye^{-x^{2}} & y\ge 0\\ 4xy & y<0. \end{cases}}

Thus {D(0,0)=f_{xx}(0,0)f_{yy}(0,0)-(f_{xy}(0,0))^{2}=0\cdot 2-0^{2}=0}. So the second derivative test fails. But observe that when {x=0} we have

{\displaystyle f_{xx}(0,y)=\begin{cases} -2y^{2} & y\ge 0\\ 2y^{2} & y<0. \end{cases}}

So {f_{xx}(0,y)>0} when {y<0} and {f_{xx}(0,y)<0} when {y>0}. Yet it is easy to see that {(0,0)} is a minimum: {f(0,0)=0} and {f(x,y)>0} for all {(x,y)\ne (0,0)}. A graph of the function is shown below. You can see the concave down cross sections for x=0 and y>0.

Posted by: Dave Richeson | February 21, 2012

Parametric curve project for multivariable calculus

I’m teaching two sections of Multivariable Calculus this semester. Each class has 3 hours of lecture and a 1 hour 20 minute lab each week. Last week the students were learning about parametric equations. So in lab I wanted to give them some hands-on experience with 2-dimensional parametric curves. Their assignment was to create a work of art using Grapher (Apple’s free graphing program) and parametric curves. They worked on the projects in lab for about an hour (in pairs, mostly). Some finished in that time, but others finished outside of class. The results were fantastic, so I thought I’d share them here.

Here is a pdf of the lab assignment.

This lab was not my idea. It was written by my colleague Lorelei Koss. It was also classroom-tested by my colleague Jen Schaefer. This semester I took their feedback, changed the lab a little, and used it in my class. Lorelei said that she got the idea from Judy Holdener and Keith Howard at Kenyon College and Tommy Ratliff at Wheaton College. I’ve also found some similar ideas in the mathematical literature: there’s an article by Barry Tesman (also a colleague of mine) and Marc Sanders, “MATH and other four-letter words,” College Math Journal, Nov. 1998, and “Painting by Parametric Curves and Van Gogh’s Starry Night,” by Stephen Lovett, Matthew Arildsen, Jon Jones, Anna Larson and Rebecca Russ, Math Horizons, Nov. 2010.

Here are their amazing works of art (click to see a slide show):

Posted by: Dave Richeson | October 28, 2011

Cantor set applet

I made this Cantor set applet for my Real Analysis class. It is nothing fancy, but it saves me from drawing it on the board.

Posted by: Dave Richeson | October 28, 2011

Applet to illustrate the epsilon-delta definition of limit

Here’s a GeoGebra applet that I made for my Real Analysis class. It can be used to explore the definition of limit:

Definition. The limit of f(x) as x approaches c is L, or equivalently \displaystyle \lim_{x\to c}f(x)=L, if for any \varepsilon>0 there exists \delta>0 such that whenever 0<|x-c|<\delta, it follows that |f(x)-L|<\varepsilon.

Posted by: Dave Richeson | October 7, 2011

The danger of false positives

As I mentioned earlier, I’m teaching a first-year seminar this semester called “Science or Nonsense?” On Monday and Wednesday this week we discussed some math/stats/numeracy topics. We talked about the Sally Clark murder trial, the prosecutor’s fallacy, the use of DNA testing in law enforcement, Simpson’s paradox, the danger of false positives, and the 2009 mammogram screening recommendations.

I made a GeoGebra applet to illustrate the dangers of false positives. So I thought I’d share that here. Here’s the statement of the problem.

Suppose Lenny Oiler visits his doctor for a routine checkup. The doctor says that he must test all patients (regardless of whether they have symptoms) for rare disease called analysisitis. (This horrible illness can lead to severe pain in a patient’s epsylawns and del-tahs. It should not to be confused with analysis situs.) The doctor says that the test is 99% effective when given to people who are ill (the probability the test will come back positive) and it is 95% effective when given to people who are healthy (it will come back negative).

Two days later the doctor informs Lenny that the test came back positive.

Should Lenny be worried?

Surprisingly, we do not have enough information to answer the question, and Lenny (being pretty good at math) realizes this. After a little investigating he finds out that approximately 1 in every 2000 people have analysisitis (about 0.05% of the population).

Now should Lenny be worried?

Obviously he should take notice because he tested positive. But he should not be too worried. It turns out that there is less than a 1% chance that he has analysisitis.

Notice that there are four possible outcomes for a person in Lenny’s position. A person is either ill or healthy and the test may come back positive or negative. The four outcomes are shown in the chart below.

Test result Ill Healthy
Positive true positive false positive
Negative false negative true negative

Obviously, the two red boxes are the ones to worry about because the test is giving the incorrect result. But in this case, because the test came back positive, we’re interested in the top row.

For simplicity, suppose the city that is being screened has a population of 1 million. Then approximately (1000000)(0.0005)=500 people have the illness. Of these (500)(.99)=495 will test positive and (500)(0.01)=5 will test negative. Of the 999,500 healthy people (999500)(.05)=49975 will test positive and (999500)(.95)=949525 will test negative. This is summarized in the following chart.

Test result Ill Healthy
Positive 495 49975
Negative 5 949525

Thus, 495+49975=50470 people test positive, and of these only 495 are ill. So the chance that a recipient of positive test result is sick is 495/50470=0.0098=0.98%. That should seem shockingly low! I wonder how many physicians are aware of this phenomenon.

You can try out this or other examples using this GeoGebra applet that I made.

Posted by: Dave Richeson | September 14, 2011

A neat probability rule-of-thumb

Disclaimer: I am NOT a probabilist. Not only have I never taught probability, the last time I took a course in probability was in my sophomore year of college. So if this is well known (or totally wrong), forgive me.

A non-mathematician friend of mine shared this link with me. It compares the lifetime risk of dying by various means—cancer, heart disease, shark attack, etc. There are many problems with the analysis presented on this web page (for example, you are not equally likely to die from the flu in each of your 77.6 years (the average lifespan), conditional probability would be a more useful measure of risk for some of these, etc.), but I will ignore all of that. I want to focus on the last line. It says:

Lifetime risk is calculated by dividing 2003 population (290,850,005) by the number of deaths, divided by 77.6, the life expectancy of a person born in 2003.

For example, for drowning the risk is 1 in 290850005/(3306\cdot 77.6)=1133.7

Stated another way, they are claiming that if D people die each year from a given cause, the total population is P, and the life expectancy is L, then the probability of dying from the given cause is DL/P. I saw this and I thought, “Surely this is wrong. Why would that formula give the probability?”

So I tried to calculate it myself. Here is my back-of-the-envelope calculation. The chance of dying from this cause in one year is D/P. The chance of not dying from this cause in one year is 1-D/P, the chance of not dying from this cause for L years is (1-D/P)^L, and so the chance of dying from the cause in L years is 1-(1-D/P)^L. (Of course, this leaves open the possibility of dying several times in those L years, but we’ll ignore that.)

Let’s use this formula with the drowning example. I get 1-(1-3306/290850005)^{77.6}=0.000881671\ldots, or 1 in 1134.2.

What?!?! I was shocked to see an answer almost identical to the one using the “wrong” technique. There must be more to this than I first thought. Let’s look a little closer.

First, notice that 1-(1-D/P)^L=1-((1+(-D)/P)^P)^{L/P}. Sitting inside this expression is a sub-expression that looks a lot like the limit definition of e^x. In particular, because P is a large number, this expression is very nearly 1-(e^{-D})^{L/P}=1-e^{-DL/P}. Aha! There’s the DL/P term! But we still don’t quite have what we want.

What we’ve shown is that if the probability someone dies of a given cause in one year is x, then the probability that they will die from it in L years is approximately 1-e^{-Lx}. Now suppose the probability x is small (like the probability of dying by drowning). We will compute the linear approximation to this function at x=0. We see that d(1-e^{-Lx})/dx=Le^{-Lx}. At x=0, that derivative is L. So the linear approximation at x=0 is simply Lx. In particular, if we evaluate it at our specific annual probability value D/P, we obtain DL/P. And there it is! [Update: thank you to the commenters for pointing out that the introduction of the exponential function, while fine, is unnecessary. Quicker: just use the linear approximation for 1-(1-x)^L at x=0.]

Again, I’ve never seen this before. Perhaps it is well known. For example, maybe it is a good rule-of-thumb that all good actuaries know.

I’d be happy to hear people’s thoughts about this formula and my reasoning. Maybe there’s another, different way to see this.

[I’d like to thank my colleague Jeff Forrester for talking through this with me.]

Posted by: Dave Richeson | August 30, 2011

Advice for new college students

I’m teaching a first year seminar this semester. This isn’t a math course. (The title of my course is “Science or Nonsense?” We will look at a wide range of topics including the paranormal, evolution, climate change, the vaccine/autism controversy, alternative medicines, etc.) We are required to focus on academic writing, library research, oral communication, etc. I will also be the academic advisor to the students in my class until they declare a major. With this last role in mind, I decided to write up some advice for these new students. Here’s my list. I gave them only statements in bold, the plain text is what I told them as we went through the list.

Advice for new college students

  1. Get to class on time.
  2. Read your email, but not during class.
  3. Spend a summer on campus. Work for a professor, be a tour guide, do research, etc.
  4. Use proper grammar and capitalization in the email messages to your professors. The email shorthand that may be appropriate between friends is not appropriate when corresponding with your professor (e.g., “hey, prof. when r u going 2 b in yr office?”).
  5. Call your teachers “Professor —” not “Mr. —” or “Mrs. —.” Almost all of your professors have the highest degree in their field (usually a PhD). (Addressing them as “Dr. —” is appropriate too, although it isn’t common at our school.)
  6. Get to know your professors and let them get to know you. They’re nice people. Ask your professors about their research, their family, their schooling, etc. Tell them about your summer research projects, your internships, etc. Down the road you may want to ask them for a letter of recommendation and they will be able to write you a much better letter if they know you. Besides, they are human beings, if you are rude to them, they will be less enthusiastic about helping you.
  7. Don’t skip class. Either you won’t be able to learn the material that you missed or the “free hour” that you gained will be lost several times over trying to catch up. If you do skip class, DON’T ask the professor what you missed—get notes from a classmate.
  8. Take classes outside of your comfort zone.
  9. Be protective of your online identity. Don’t post photos on Facebook that you wouldn’t want your parents, your professors, your future inlaws, or your future employers to see.
  10. Don’t sell your books back, especially for classes in your major.
  11. Don’t be a member of a clique. For many of you college will be the most diverse living experience of your life. Get to know as many people as possible and not just those with the same background as you.
  12. Be organized, use a calendar, and pay attention to due dates.
  13. Find a good distraction-free place to study.
  14. Learn to write well. I’ve seen far too many mathematics and science students avoid writing courses. They are under the impression that it won’t be relevant to them. Writing is an extremely important skill that is a prerequisite for almost all careers. You will be amazed at how much you will need to write.
  15. Learn from your mistakes. Look over your assignments when you get them back. The professor put those comments on there for your benefit. If you don’t understand the comments, ask.
  16. Do the assigned work. And the related…
  17. Don’t ask for extra credit. I don’t give extra credit and neither do most other college professors; if they do, they would give it to the entire class not just to you individually. Extra credit is great for the strong students—it can boost their grades from an A to an A+. Weaker students who need a grade booster should spend their time doing the assigned work (which they often haven’t done—that’s why their grade is in trouble in the first place). Doing the assigned work is the best preparation for the exams in the class—it gives the best “bang for the buck.”
  18. Start assignments early and start studying early. Related: don’t email the professor late the night before (or worse, the day of) an exam or the due date for an assignment asking for help.
  19. Admit when you are wrong. It may be difficult, painful, or embarrassing, but it is liberating. Living with a lie or a guilty conscience is worse than coming clean.
  20. If you choose to drink alcohol, do so in moderation. Not all college students drinks alcohol. According to a survey given here last year at fall break, approximately one fourth of the first year students had not consumed any alcohol in the past year.
  21. Stay healthy: eat well, exercise, and get enough sleep.
  22. Take the courses you want to take, not the ones your parents want you to take.
  23. Beware of technology such as video games, movies, social media, etc. They can be unhealthy, addictive time sinks.
  24. Don’t read or send text messages in class.
  25. Try new things (clubs, sports, volunteering, etc.), but don’t spread yourself too thin.
  26. Call home, but not too often.
  27. Get off campus and explore the area. Eat in restaurants, go for a hike, see a movie, visit a museum, etc.
  28. Study abroad.
  29. Do not beg your professor for more points on your graded work. If you have doubts about the grading, ask the professor to explain his or her reasoning. Most likely, if there was a grading error, your professor will fix it.
  30. Show up for appointments and be punctual.
  31. Don’t let your parents fight your battles. Professors cannot speak with your parents anyway (without a FERPA release).
  32. If things start going wrong, see a counselor. Each year the counseling center is used by 15–20% of the student body. The service is completely confidential; they won’t notify your parents, your professors, your friends, or your insurance company.
  33. Let go of your high school anxieties. Your classmates didn’t know you in high school. Make new friends, wear new clothes, listen to different music, and try new things.
  34. Don’t lie to your professors; they’ve heard them all (otherwise known as the “dead grandmother rule”). (A retired professor I know used to send a condolence card to the student’s parents every time a student informed him of a death in the family.)
  35. Be considerate of the neighbors. Not everyone in town is a college student. Keep this in mind when you are returning from a party at 2:00 AM.
  36. Be a good roommate.
  37. Don’t cheat. The penalties are steep if you are caught. If you are not caught you will have to contend with a guilty conscience. Cheating will produce a short-term gain and a long-term loss. Besides, it is a slippery slope—this is not the way you want to conduct the rest of your life.
  38. Become a novice. You’ll learn more and get more out of college if you don’t hold onto the attitude that you know everything already.
  39. Go on a road trip.
  40. Look at your final exam schedule before scheduling your flight home.
Posted by: Dave Richeson | August 17, 2011

A quick guide to LaTeX

This semester I’ll be teaching real analysis. I am going to have the students type their homework in LaTeX. To make this as easy for them as possible, I will give them a template that is all ready for them to enter their solutions. They shouldn’t have to worry about headers, packages, font sizes, margins, etc. Furthermore, I decided that I should give them a LaTeX cheat sheet—a single document that has all the LaTeX information that they will need. I’ve created LaTeX cheat sheets like this before—but one was for real analysis, one was for topology, one was for linear algebra, and one was for discrete math. Each cheat sheet had different symbols.

So, I decided to bring them all together into a one-size-fits-all LaTeX cheat sheet. I kept it to two pages, so it can be printed (double-sided) on one piece of paper. (I have also posted the LaTeX code. Feel free to take it, edit it, and use it.)

It doesn’t have everything. As I said, I’ve left out all information about headers, etc. Also, since these students will probably not be using figures or tables, I’ve left them out. [Update: I added information about figures. I also added links to some online resources.]

Please let me know in the comments if there is anything that you think I should add. I still have a week and a half to tinker with it before classes begin. Also, please let me know if you find any errors. Thanks!

[Note: When I began this project I intended to modify this cheat sheet by Winston Chang to suit my needs. But in the end, I wiped it clean and started from scratch. (I did use his very nice three-column format though.)]

Posted by: Dave Richeson | August 12, 2011

Highlights from MathFest 2011

Last weekend I was in Lexingon, Kentucky for MathFest 2011. I had a very nice time and saw some very good talks. I thought, just for fun, that I’d share a couple of juicy mathematical tidbits I learned.

Fibonacci numbers and the golden ratio

Ed Burger of Williams College gave a talk entitled “Planting your roots in the natural numbers: A rational and irrational look at 1, 2, 3, 4,…” From his talk I learned the following interesting facts.

In 1939 Edouard Zeckendorf proved that every natural number can be decomposed uniquely into a sum of Fibonacci numbers in such a way that no two of the Fibonacci numbers are consecutive. Recall, of course, that the Fibonacci numbers are 1, 1, 2, 3, 5, 8, 13, 21, 34, 55,… In particular, they satisfy the relation F_1=1, F_2=1, and F_{k+1}=F_k+F_{k-1}.

For example:

Then, in 1957 G. Bergman proved that every natural number can be written uniquely as the sum of distinct nonconsecutive integer powers of \varphi (where \varphi the “golden ratio(1+\sqrt{5})/2). For example:

6=\varphi^{-4}+\varphi^1+\varphi^{3} (check it here if you don’t believe it)

Then, in 2008 Dale Gerdemann noticed that these facts are related.

First of all, the fact that \varphi=1+\varphi^{-1} implies that \varphi^{k+1}=\varphi^{k}+\varphi^{k-1}, which is a very Fibonacci-like relation.

Moreover, notice that 30=6\cdot 5=6\cdot F_5 and that 30=1+8+21=F_1+F_6+F_8.

Similarly, 48=6\cdot 8=6\cdot F_6 and 48=1+13+34=F_2+F_7+F_9.

Do you see the connection yet? How about this:


6\cdot F_5=F_{5-4}+F_{5+1}+F_{5+3}

6\cdot F_6=F_{6-4}+F_{6+1}+F_{6+3}

Indeed, Gerdemann proved that n=\varphi^{k_1}+\cdots+\varphi^{k_n} if and only if nF_m=F_{m+k_1}+\cdots+F_{m+k_n} (for m sufficiently large).

So, for example, 7\cdot F_6=7\cdot 8= 56=1+55=F_2+F_{10}=F_{6-4}+F_{6+4}. So from this we can conclude that 7=\varphi^{-4}+\varphi^{4}, which it is. Isn’t that cool?

Burger went on to describe some work he did with his REU students to extend these results to other sequences and other irrational numbers.

Beyond the Pythagorean theorem

Roger Nelson gave an excellent talk entitled “Math Icons.” It is base on material in his new book (with Claudi Alsina) Icons of Mathematics. They look at the mathematics behind several famous images (icons) in mathematics.

He started by talking about the “bride’s chair.” This is the famous image which gives the geometric interpretation of the Pythagorean theorem. Rather than our usual algebraic a^2+b^2=c^2, it shows that the sum of the areas of the squares on sides a and b is equal to the area of the square on the side c.

He went on to point out, for instance, that the figures on the sides of the triangle need not be squares. Any similar shapes will do. For example, in the figure below we see that the area sum property holds for semicircles as well. (This is in Euclid’s Elements, VI.31: In right-angled triangles the figure on the side opposite the right angle equals the sum of the similar and similarly described figures on the sides containing the right angle.)

He also discussed various properties of the so-called Vecten configuration. This is the same as the brides’ chair, but for triangles that aren’t right.

One property that I thought was particular nice is that if we take a Vecten configuration and draw in the three “flanks” (the red triangles below), then the area of each of the three flanks is the same as the area of the original (blue) triangle.

Finally, we turn to a Vecten-type configuration, but with equilateral triangles on each face. In this case, if we join the midpoints of each of the equilateral triangles, we obtain a new equilateral triangle (the red triangle below). This is now known as Napoleon’s theorem (yes, that Napoleon, and no, although he was interested in mathematics, we don’t believe that he discovered or proved this theorem).

This entire talk was fascinating. There was a lot more great material in it. I’ll have to check out their book!

How to draw a towel on a beach

Annalisa Crannell gave an amazing talk called “In the shadow of Desargues” on math, art, and perspective drawing. The main focus of her talk was Desargues’s theorem and using it to draw a towel on a beach. I couldn’t do the topic justice here, so you’ll have to check out her new book (with Marc Franz) called Viewpoints: Mathematical Perspective and Fractal Geometry in Art. I’m excited to read it.

MAA: The Musical

Finally, I was honored to be asked to participate in MAA: The Musical, which was performed during the opening banquet. I was happy to be asked and even happier not to be asked to sing in the production. I was enlisted as tech support (running the slide-show that went along with their songs). That was right up my alley. The MAA players were Alissa Crans, Annalisa Crannell, Art Benjamin, Bud Brown (musical director), Dan Kalman, David Bressoud, Francis Su, Frank Farris, Jennifer Beineke, Jenny Quinn, Matthew DeLong, Norm Richert, Paul Zorn, Talithia Williams. They did an amazing job (at least one song is now on YouTube).

[Update: Francis Su recorded the entire performance on his phone. It is now available online (audio only). Enjoy!]

All-in-all, it was a great conference.

Posted by: Dave Richeson | June 22, 2011

The Japanese theorem for nonconvex polygons

A couple of years ago I wrote blog posts about two beautiful theorems from geometry: the so-called Japanese theorem and Carnot’s theorem. Today I finished a draft of a web article that looks at both of these theorems in more detail. It contains all that you could want—connections between these theorems, generalizations of them, and consequence of them. It even has a little topology (the n-dimensional torus makes an appearance). The mathematics is supplemented by some Geogebra applets so that you can see the theorems in action.

You can find the draft of the article here: The Japanese theorem for nonconvex polygons [The article is now online at the MAA’s Loci.]

« Newer Posts - Older Posts »