Mathemagical Moments

XKCD
XKCD is the best!

One of the best things about my job: watching 3 of my students in an intense discussion of a problem on the homework. One of my often less-motivated students holding her own arguing with the two other guys about how to solve the problem.

I realized today that the LaTeX my students are producing in their reports is so much cleaner and nicer than what I’ve seen in previous semesters. I gave them LaTeXercises at the beginning. I took a list of my pet peeves from student reports and marched this crop of students through correcting them one by one for the first homework assignment. I instructed the TAs to be draconian about grading; you either reproduced the document perfectly or points came off. That did not endear me to the students; I got complaints on the early course feedback, “I missed one space and a whole point was taken off!” Sigh. Indeed, I am so mean.

Complaining aside, I think it was worth it. For me. Maybe not for them. I’ve been preaching the gospel about composing in LaTeX or a text editor rather than composing in a word processor; this should also help. None of that would matter if no one was listening to me. Clearly quite a few someones are. I have to remember to share this with them.

At the beginning of the semester, I felt bad for not doing much math, and now we are in lots-and-lots of math mode. We just has the most mathematically brutal assignment of the semester; some cleverness, some common sense, and a whole lot of algebra.

Project 2 is about population models; we do curve fitting to three reasonably well-known population models. Exponential growth, the logistic function, and the Gompertz function. All are non-linear. We will use linear least squares to get an initial estimate for the function parameters; then we use a nonlinear least squares optimizer to improve our parameter estimates.

We go through a basic calculus lesson about linear least squares, in which we calculate the squared error, see that it has a minimum, and then take derivatives and set them equal to zero to solve. We get two gnarly equations in two unknowns. Then I walk them through the same problem formulated via linear algebra, where you have an overdetermined system with full rank. Then we discuss how to use this tactic for doing exponential functions. Later on, with one initial guesstimate, we use this for logistic and Gompertz.

We also cover the differential equation formulation of these three models, and how you get the Per unit Population Growth Rate (also called Per Capita Growth Rate) abbreviated PPGR. This is how the population grows per individual in the population per unit time. Exponential growth has a constant PPGR. If you look at the US Census numbers from 1790-1840, you will find the PPGR for the USA was about 0.3 in that time, meaning for every one person in the initial population adds 0.3 persons over the course of a decade. In more recent decades this number is much lower!

If the population in a logistic model is close to zero, the PPGR is constant and it looks like exponential growth. But in a logistic model, we take into account finite resources and space, and it has the PPGR go to zero as the population approaches the limiting population.

The Gompertz model, like the logistic model, takes into account finite resources and space, and its PPGR goes to zero as the population approaches the limiting population. What’s weird about Gompertz is that as the population goes to zero, the PPGR goes to infinity. This model hypothesizes that if there are abundant and unlimited resources, a woman can decrease her genstation period in order to increase her number of births without bound. Clearly unreasonable. Yet the Gompertz model does a good job of fitting population data!

Each student picks his or her own dataset. Any US state or city is open (everyone does the US Population), and any foreign country, state, city, province is open.

When I first put the project together, I was dutifully paying homage to the necessity of teaching curve fitting as a mathematical modeling topic. I thought this was one of the most boring projects in the universe, but we all have to suffer sometimes. I’m surprised at how much rich learning there is in this project. In order for a student to succeed with writing the results and discussing the models and the data, s/he has to know something about the history of the population s/he is working with and be able to connect that history up with what s/he sees in the data and curve fits.

The first semester I taught the course and assigned this project, one of my students had been on a mission trip to Micronesia. He wanted to work with the population of Micronesia. Fine with me. Of course, Micronesia wasn’t really in contact with Western civilization until about the turn of the 20th century. Then things got disrupted by WWII. So there wasn’t a lot of data, and what there was wasn’t very good. My student was off to the library to see if he could dig out more and better. He didn’t get much. We did get some decent curve fits in the end. He learned a lot and I encouraged him to talk about this for his final project presentation. He punctuated the mathematics with photographs he took while he was there, discussing the models, the data, and the history, all at once.

Dumb project indeed. That was a definite win.

Early Course Feedback

Some gems from my early course feedback. We’ll start with the ugly.

Like most classes that require Matlab, the coding is always much more advanced than students are capable of. The math department does not realize the talk amongst the students is how just about all of us don’t know how to use Matlab. Students generally just copy and paste from google searches to get their assignments done and rename functions and variables to look different. When errors still remain, students just have the Matlab TA’s fix the errors for them. Matlab assignments account for most of the hours spent for this class as well as all other courses that require Matlab

I’ve seen too many students grow and learn the Matlab to believe this is true of everyone. I’ve also had students thank me later when they were looking for jobs and discovered employers want them to know Matlab. There are probably one or two using this tactic to get by. I think this student is going to hate my class or drop it; I don’t think you can get away with this in my class for the entire semester.

The teacher cares about teaching a lot but is a little intimidating and scary. She is almost like a mom in that she cares a lot and while I’m sure she is happy she always seems pissed off. My mom is scary when she is pissed off. Dr. (Jinx) expects only the best work, which is good, but at the same time she seems to favor the top students in the class. She is very involved though! She is always willing to help and is willing to give us life/career tips. She genuinely wants you to learn and puts effort into her teaching. Because of this class, I am learning LaTeX and Matlab and I can put the end of semester project on my resume.

At least there’s some good and some bad. I am not happy to hear that I always seem pissed off. Yikes. On the other hand, it is probably good to be perceived as scary when you are pissed off. More respect and all. It’s not like I feel like I get an overabundance of that from my superiors.

Yes, it is easy to favor the top students in the class who show up expecting to work, capable, and happy to learn. On the other hand, I spend a lot of time with some students who are not very strong. Unsurprisingly, many of these end up becoming top performers when they put the effort in, but some don’t. I hope I give them the help they deserve, and appreciation/admiration for the effort they put in to doing well in my class.

I think the professor means well, but does not take into consideration that not everyone in the class loves mathematics as much as she does, but rather are in the course to simply get 3 hours of credit.

Seriously? Please, please, please drop my class. No senior level science or engineering class is going to give you 3 hours of credit for just showing up. If you don’t care to learn, there’s nothing I can do for you. Go find a teacher who doesn’t care.

—–

There are plenty of nice comments, which get swamped out of my emotional buffer by the ones above. What’s the real picture? It is so hard to tell.

Learned more about matlab in this class than I have in the past 3 years

Honestly can say that Dr. (Jinx) is one of the best teachers I’ve encountered at this university and hope she continues to teach as well as she has been.

Encourages class participation, provides examples, effective communicator.

Instructor is very honest and humble. This is something not so easy to come by in some professors.

Finally learning how to put all the math I learned all of my life into proper use.

The student below gave me a B rating on the item “Written assignments are interesting and stimulating” with the following quote:

Lorenz equations opened my mind a little more. One of those things that keep you interested in mathematics.

So am I doing okay? Now there is the question.

Valentine’s Day

Lunch with two of my favorite former students today. That was enjoyable! Happy Valentine’s Day.

Project 1 is due today. Office hours went from after class (3:35 pm) to 6 pm, at which point it was time for me to be done. I returned home with a headache. A few minor crises this evening, one solved by “just put that in your document and resubmit it”. One, “yes, your partner requested an extension to Monday and that applies to you too.” One “my connection with the Calclab isn’t working!” at 10:30 pm, which I think I am not going to answer until tomorrow. At the earliest.

My students are learning many things. Not always what I intended to teach them. Many lessons are being learned about math and writing and the real world and all of its awesome complexity.

Writing is hard, and because it is hard, it is often left to the last minute, which doesn’t make it any easier. We want to sound smart and important, but good writing often consists of making things simple and straightforward. It is hard to write something smart, to spend time and effort and energy on it, and then decide that it has to go because it isn’t simple or straightforward.

I am grateful for the opportunity to teach. I am grateful for those who try to learn from me. I am grateful for having a job that I care about and students who care to learn and try.

I am grateful for my special someone, who is not at home today. I am grateful for salads that he makes. I am grateful to have someone who cares about me. I am grateful for the help around the house and with the yard work. I am grateful that I can help out by taking his class when he is gone. I am grateful that he supports my teaching and my mission. I am grateful that he is patient with my many imperfections.

Things to Appreciate

There’s nothing quite like seeing one of your former students give a seminar to current students, especially when she does a great job. She is now a graduate student with a friend and colleague. I was able to help put those two together in what has been a good collaboration. I am proud of that! The colleague gave the other half of the seminar. He always does a good job; I enjoy his talks. About half my current students were in attendance.

It was fantastic to see my current students asking tons of questions in the seminar tonight. #1 thing I want to help give them is the courage to ask their questions. Okay. I can’t give them courage. I want them to know they have my approval and encouragement for asking their questions. That, perhaps, I have managed to do.

I really was lucky last year in all the things my students accomplished. I was really lucky in having two of my students come with me to MathFest last August. It was so much fun to seeing the world through their eyes.

Sometimes things work out really well, and when they do, you should treasure it. Because there are plenty of times when they aren’t going to work out so well, and you are going to have to use the emotional fuel you are storing to get through it.

I hope I get to bring some of this year’s students with me to MathFest again. I know, I know, it won’t be quite the same as that first time, but I hold out hope that it will be nearly as much fun.

Personalities

Classes really do have personalities. My morning class has its act together. They are hard at work; they get things done. On the most part, they do them well. The afternoon class struggles. Same material, same day, it always takes longer in the afternoon. If work is undone on assignments, it’s the afternoon class with several members who didn’t get it done. If a group is not paying attention, it’s the afternoon class. If part of the class seems lost on the topic, it’s the afternoon class. I am trying not to be down on that class, but it’s the afternoon class.

I try to use the morning class to keep my spirits up. In the afternoon, spirits up, I just keep trying. There are several students in that class that I really like and who are doing very well. Keep those students moving forward. Help the others as much as I can. Try not to worry about it. When lower grades are earned, they will be recorded. That’s only fair.

I wish I knew what I could change. I am smart enough to recognize that maybe there is nothing I can do to change the class. Each individual person decides what to put in or not; I don’t get to make that choice for them. I still wish there was something I could do to make everyone happy and productive.

Every day, every student, I interact with, I want to bring that student an “I am glad to see you.” Even when I am frustrated and tired. Even when I have to explain the same thing again. It’s hard. I hope I am succeeding at bringing each student an “I am glad to see you,” even when it seems like the other lessons are not sinking in!

I am justifiably angry, but boy, do I feel bitchy.

Something on the order of 10-20 emails later, I finally got my speaker on the schedule for the undergraduate seminar. I handled most of the arrangements; I’ve been trying to get this scheduled since the beginning of the semester. The speaker is coming next week Wednesday; I think it was long past time!

I just want you to imagine for a second how much frustration is built in to working with someone who requires 10-20 requests and reminders to do a fairly routine and straightforward job of putting a speaker on a schedule, reserving a room and designating a time. It would have been easier if I had just had a special seminar for this speaker, arranging the room and time myself.

Needless to say, I am not going to work with that undergraduate seminar organizer again any time soon if I can avoid it. Of course, my boss may dictate that I can’t avoid it. It’s sad, because I have another (good) speaker lined up for that seminar, and I’m not willing to put either of us through this nonsense.
———

I feel tense and angry. Describing the interactions earlier today, I’ve said I had to throw a hissy fit in order to get the job done. I feel like a real bitch.

I look at those judgments. I got justifiably angry after so many repeated requests. “I threw a hissy fit,” really? I think everyone is within their rights to get angry and frustrated under those circumstances. Having to make repeated strident requests of someone to please do their job … it feels bitchy, but is that bitchy? It is the helplessness and frustration of having to work with someone who is not working.

Since I am female and I am angry and frustrated, even I label myself as bitchy.

I think men (and other women) deemed special and important find those of us deemed less special and less important (in part because of our gender) easy to ignore and blow off. Too often we get labeled as bitchy when someone blow us off and we don’t go along with it. And, sadly, even I cooperate with this and label myself as bitchy.

I feel bitchy.

But I think I was justifiably angry. Very angry. And very justified.

———

Today one of the “participation points” opportunities in class was to explain the difference between two Matlab calls to the differential equation solver ode45(). The function, ode45(), solves differential equations of the form
$$\dfrac{d\mathbf{x}}{dt} = \mathbf{f}(t,\mathbf{x})$$
where \(\mathbf{x}\) can be a vector and \(t\) is your independent variable (usually time). The syntax to ode45() is ode45(function, time span, initial condition). The function is the \(\mathbf{f}(t,\mathbf{x})\) in the differential equation. The time span can be given two different ways. I put the following two sets of commands up on the board with a request to explain what each did.

tspan = [0 50];
[t u] = ode45(@lorenz, tspan, u0);

or

tspan = 0:0.01:50;
[t u] = ode45(@lorenz, tspan, u0);

To you the difference may not be obvious (although I hope you could easily Just Ask Google). Possibly it is not obvious to the students either, but I know they are about to get bitten by this in some code they have to write. My students have been instructed to Just Ask Google, I think everyone in the class can figure this out.

Recall that a solution to a differential equation is a function \(\mathbf{x}(t)\). Matlab can’t give you back a function, it gives you back a vector t with the time values and a matrix u where the rows are the components of \(\mathbf{x}\) evaluated at the corresponding time in t

If I give only the start time and end time, tspan = [0 50], Matlab will decide where to evaluate my function \(\mathbf{x}(t)\) in between those points. If I dictate the points in the middle of the range, then Matlab will evaluate \(\mathbf{x}(t)\) where I tell it to. This is useful, since otherwise two solutions to a differential equation may be evaluated at different points, and you may wish to compare them by, for example, finding the distance between them.

Several students found out in office hours that paying attention in class is actually worth while. Running into precisely this problem, I first asked if they remembered what we discussed about this in class. Then I asked if they could bring out their notes from class (notes?!?). Then I had them pull out a piece of paper and wrote out the two commands that had been on the board and I asked again what was the difference. I then reinforced the idea that I really do try to do useful things in class and I would really appreciate it if they paid attention and took notes.

I managed all of this with a fairly even temper.

My patience was tested further by a student unable to solve the differential equation
$$\frac{dx}{dt} = x$$
No signs of intelligence whatsoever after I suggested separation of variables. A differential equations course is a prerequisite for this class, and “I don’t remember anything!” is not much of an excuse. I bitterly blame his differential equations instructor for lax standards, and the sad thing is, she’s the person I see in the mirror every morning as I brush my teeth!

Math formulas courtesy of MathJax, which is awesome and you should check it out.

R-e-s-p-e-c-t

What if doing what you love, and what you are truly good at, is something that is undervalued, something not respected. A career-limiting proposition. Underpaid, and likely to remain so.

Right now, that’s what I’m thinking. About me. About my career. About teaching.

I keep circling back to the #1 thing, which is that I love it. I think I am truly good at it. Then there are the days when nothing seems to come together. Then there are the moments when it all comes together.

It’s not about me and my brilliant lecture, or my carefully written assignments. It is all about them and what they learned and what they are taking away from this time we’ve spent together, from the time they’ve spent alone, learning.

I can live with being underpaid, but I’d rather not be. I have a hard time with the not respected. I think I should do something about that. Command respect. Sometimes I need to command a little more respect, and I don’t know how. My voice feels silenced.

I get that I work in a research university, and that research is king. But it is a research university. Isn’t teaching the mission of a university? Aren’t the students the reason to have the university?

And yes, I, too, find those pesky students mighty inconvenient from time-to-time, when I have to get other work done. When someone that I don’t even know is knocking on my office door asking me for help with a homework problem that I didn’t assign.

If I had my choice between working with a student and other work, I’d rather work with the student. There is nothing on this earth like the feeling of seeing someone get it.

There has to be a balance between the two missions. Research and teaching. A balance where both are valued and both are respected.

I feel like we are way out of balance. Respect for the teaching mission, at least where I’ve been lately, seems hard to come by.

I am going to hold my head high, and I am going to do the what I can to be respectable and respectful. I will not always be quick enough with my words to rebuff all of the disrespect that come my way. Others will look down on me, nothing I can do about that.

Secrets to Success

If the math on this page is not formatted correctly, try reloading the page.

Some problems with a colleague have me thinking back to the list I gave my students at the beginning of the semester:

  • Show up on time for class.
  • Bring a smile or a kind word for someone in our class every single day.
  • Stay in the classroom for the entire class period.
  • Participate.
  • Use class time productively for class work.
  • Be professional.

Is that everything required for success? Of course not. But if you are struggling with the list, you are probably also struggling to achieve success. Strange how that goes hand-in-hand.

————————

What are we learning in class these days? We are working on Project 1, which is all about the Lorenz attractor. We are going to use Matlab to solve the system of differential equations in the Lorenz attractor, and then make graphs that show clearly that we see the butterfly effect.

Merriam-Webster definition of BUTTERFLY EFFECT:

a property of chaotic systems (as the atmosphere) by which small changes in initial conditions can lead to large-scale and unpredictable variation in the future state of the system

The Lorenz attractor is an example of a chaotic system

Merriam-Webster definition of CHAOS:

2b : the inherent unpredictability in the behavior of a complex natural system (as the atmosphere, boiling water, or the beating heart)

I skipped definition 1 and 2a, since 2b is the one of concern to us. The Lorenz attractor is unpredictable, but it is deterministic there is no element of chance involved; it does what it does.

One of the first struggles that students have is to figure out what system is the the Lorenz attractor a mathematical model for? Students often answer that it is a mathematical model for the butterfly effect, because that is what we will demonstrate in the project we do for our class. Lorenz’s equations actually model convection in the atmosphere where you have a fluid (such as air) heated from below and cooled from above. We expect that heat rises, so the air molecules rise when heated, then they fall when cooled. This forms a circulatory pattern, which is, unsurprisingly, what we see when we solve the differential equations for the Lorenz attractor.

One question I posed to my students is whether or not the behavior of

$$\frac{dx}{dt} = x \qquad \hbox{with}\ x(0) = 1 \qquad \hbox{or}\ x(0)= 1.001$$
is an example of the butterfly effect and chaos. Notice that solutions are of the form
$$x(t) = Ae^t$$ with \(A = 1\) or \(A=1.001\) respectively. This is clearly not chaotic, we can predict what \(x(t)\) will equal at any time. But equally clearly, it is very sensitive to the initial conditions; small changes in the initial condition lead to large changes at \(x(10)\) or \(x(15)\). Is this an example of the butterfly effect?

This example is not chaos. This is a demonstration of sensitive dependence on initial conditions. But since it is not in a chaotic system, it is not a demonstration of the butterfly effect. Now contrast that picture with what you see for the Lorenz attractor.

I hope running through these questions help them to figure out (mathematical) chaos, and just how cool the Lorenz attractor is.

————–

I am using MathJax to make the mathematics on this page!

Tense and angry

I had a tense and angry day at work today. I had a lot of meetings lined up this day, I still have 10 hours of grading to get finished before Tuesday, and probably ~3-5 days worth of miscellaneous required projects that should get done in the next 2 weeks in addition to my regular teaching/work schedule. I know. This is why I have a reduced teaching load. On the other hand, it’s still too much.

Part of me really wants to rant at you about that. Part of me doesn’t want to have that out on my blog.

Change of subject. Back to teaching.

The first challenging Matlab assignment was due yesterday in the modeling class. Many students rose to the challenge; I know a few learned a lot in the past week. Then there’s the vocal minority who plainly started late, discovered it was challenging, and then had problems completing their work. I was very disappointed in a few repeat offenders. I feel bad for them, but the usual late penalties will apply.

I fear for them (and their partners) for the first project. We start now, and they have two weeks to get it done. If you start early, it is doable to finish it all up. If you wait, however, once again, technology can (and will) bite you.

I know that I can’t fix my students. I can’t make them plan ahead. I can’t make them care. I can’t make this class and the work (and it is work) meaningful for them. They have to find the meaning themselves, and the desire to be here and succeed.

Sometimes all I can do is teach the lesson that, yes, it takes work. And that logical consequences will be administered if that work isn’t getting done on time.

I also got to spend time with a student talking about a math/programming (research) problem today. It is always a pleasure to take 45 minutes and spend it unpacking a problem and figuring out some ways to approach it. Knowing that while I didn’t solve it, I was able to provide some solid direction. Even though I’m not a tenure-track faculty, even though I don’t have a research program, even though, to many minds, I don’t do “important work”, I get to help my students do math that is important to them. They are important to me.