# The Spectre of Math

## December 15, 2015

### Esperanto and Math Textbooks, #EsperantoLives

Filed under: Esperanto,Mathematics,Teaching — jlebl @ 12:01 am

I haven’t made a post in quite a long time, and I was thinking I’ll take the opportunity of the #EsperantoLives campaign to make one.  I want to focus on Esperanto’s usefulness for math, specifically for access to math education in the developing world (and some tangential topics).  Perhaps a longer post than most this is an informal essay on the subject.

What is Esperanto?  It is a created language, on purpose made very regular, easy to learn, and generally made to avoid ambiguities and idioms and things that make communication between cultures difficult.  It is also intended to be a second language for everyone, giving no one an unfair advantage.

Let’s talk a bit about math textbooks, something which those that know me, know is a favorite topic of mine.  This is really about college-level textbooks, though some of it applies to lower levels.  Nowadays if you look on Amazon to look for the new version of Stuart’s calculus, it is something like $300. It’s a great book, but while that price might be sort of OK for a middle class American or European, it doesn’t cut it when you talk about poorer students, and most definitely not students in developing countries. There has been quite a push recently for high quality free textbooks to partially attack the problem. That is, low cost books for the poor Americans and some Europeans; there’s quite a choice of math textbooks at the college level in English which are free. Even some poorer countries benefit. My textbooks are used in places like Tanzania or India. But what if you happen to live in a part of the world that does not speak English? The developing world where English is not spoken is at a huge disadvantage in terms of their education. It is very difficult to translate textbooks into every possible language and so those students from large rich countries will always have access to more. There are two choices. A short term (and far from ideal) solution is to push for say English education in the developing world so that they have better access to educational materials. A poor country that does not speak English nowadays is in a big disadvantage if it wishes to grow the ranks of its university educated. But, even if those students learn English, their command of the language is likely to be poor, and given that English (like any natural language) is prone to being vague, that compounds the problem. Especially for technical fields like math, science and engineering, where precision is paramount. The second choice (much more long term) is to move to Esperanto (or a similar language). There are several advantages. Since it is meant to be a second language for everyone, nobody is at a disadvantage. It can be mastered quickly and it avoids ambiguities, meaning understanding materials is less of a problem. This may seem to assume universal adoption as a second language which is probably not realistic even in a very far future. But we don’t need to get it perfect. We don’t even need to get close. We just need to get closer. If e.g. EU decides on starting to push Esperanto as a common language, it would be enough. Creating educational materials for higher education is sufficiently a niche, that it is hard for even smaller rich countries to cover all the bases. If majority of Europeans spoke Esperanto at some point, educational materials could be easily shared. But it would also mean that other developing countries get to use the work if they start teaching Esperanto. Just like currently countries where English is spoken to some degree are able to take advantage of the wealth of material now. You might say it is a naive unrealistic dream, … perhaps. You might say that English is the “lingua franca,” but that’s really only true in the western world. English is not even the most spoken language in the world. Furthermore, I am not talking about the next 10 years, not the next 50 years, and perhaps not the next 100 years. Around 70-80 years ago, there could be a good case made that French would not be displaced as the “lingua franca” by anyone. And 100 years ago, French was clearly the international language without an argument. 200 years ago, Latin was still used as the “lingua franca” in science and medicine. So things that might seem immutable, unchangeable, can in fact change in a few decades. Finally, perhaps more tangentially, Esperanto would be far better for science. Most international science is nowadays done in English, but from my own experience, there are many good even world renown mathematicians whose English is quite sub-par. Many mistakes enter the literature, many results are ignored or lost, because the right person couldn’t quite read or write English well enough. And remember up till 1800s, all math was done in Latin. Then up till the 1960s it was very common to see German and French. Russian was commonly used even later than that. And there are still many publications in national languages. The language used can change within a generation or two. Because Esperanto is easy to learn, if it starts making inroads into science it could take over much quicker than English did in the last half a century. What can we in the rich developed world do? We can learn Esperanto, and help create more texts and educational material in Esperanto (among other things). We have the luxury to do so. I myself plan to do some translating of my books to Esperanto at some point once I gain more confidence that I am writing good Esperanto, not just passable Esperanto. And long term, we will fare much better with a more connected and generally richer world if we do. Think about how much we are putting into medicine and technology, while large parts of the world are simply trying to survive. What if every country could produce and then employ great scientists and engineers in the same quantity as we do. So how did I get into Esperanto? I heard of Esperanto and the idea behind it a long time ago and was always thinking about learning it, but have only started learning recently once it came out on Duolingo. That seemed to be the only way to keep me motivated. I’ve been learning since end of May this year, and by now I can read books, magazines, hold an online conversation in Esperanto. I could probably hold a live conversation as well, though I’ve not tried yet. On the other hand I’ve been on and off learning French for basically let’s say the past two decades, including very actively the past year. I have so far failed to get to any sort of usable level. So, Esperanto definitely is a lot easier to learn. Both from a point of view of grammar (simple grammar with no exceptions), and from the point of view of vocabulary (lots of words are put together from fewer basic roots). Kaj tio estas ĉio. ## July 12, 2013 ### MAA reviews, HTML versions, new sections in RA book … Filed under: LaTeX,Mathematics,Teaching — jlebl @ 7:54 pm ## Reviews MAA has done reviews of both of my books: see here and here. By the way, now they have been downloaded (at least the PDF) each from over 40k distinct addresses (approximately 83k together now). Since it seems the web version of the diffyqs book is probably more popular than the PDF, there is probably another as many people who’ve used that. ## HTML version of the DiffyQs book Speaking of the HTML version. After last release of the diffyqs book, I’ve worked a bit on the HTML conversion. The result is using tex4ht for conversion and then a Perl script to clean up the HTML. This is very very hacky, but of course the main point is to make it work rather than do it cleanly. One of the things I’ve done was to render all math at double the resolution and let the browser scale it down. Then to make things go a bit faster I’ve made the code detect duplicate images of which there are quite a few. I’ve also been testing with data URIs for very small images, but they don’t quite work right everywhere yet. They would cut down on the number of requests needed per page and surely eventually I’ll do that. The supersampling has both positive and negative effects. Printed version of the HTML now looks a lot better. Not totally great since I currently have things render at around 200dpi rather than perhaps 300dpi, but it’s a reasonable compromise. Also high resolution displays give nicer rendering. The downside is that on a regular display the equations are fuzzier due to lack of hinting. Of course MathJax would be the ultimate answer to the math display and that’s the ultimate goal, but I can’t make it work with tex4ht reasonably nice. I am very picky about the display being 100% correct even if uglier, over being 90% correct and pretty. Every suggestion I’ve tried so far was very subpar on output. I can’t make tex4ht not touch all math. Even then MathJax does choke on a few expressions I have in the file so things would require more tweaking to make it all work. The requirements for math display I have is 1) I want to make sure that the same font is used on all math (that’s why I render all math as images). 2) I want the output to be correct and readable (which totally disqualifies MathML since even newest versions of all browsers do terrible jobs on all but the simplest equations, and even there). 3) I want the thing to be usable on as many browsers as possible. I think eventually the solution would be to write my own tex parser that can read the subset of latex I use for the book and output HTML pages using MathJax. This sounds simpler than it is. That is, getting this to work on 90% of the input is easy, then things like figures, and certain math constructions get in the way. Another possibility is to output svg instead of png for math using dvisvgm. This keeps the problem of fuzziness on standard displays, but is really pretty when printed or on high resolution displays . The downside is bad support (only very new chrome and firefox support this somewhat and even they have issues, and it crashes my android phone). I think MathJax is a better long term solution, but it will take some work and probably a move away from tex4ht. ## New sections in the analysis book Something I have not mentioned here when it happened is that the analysis book got a bunch of new sections recently (the May 29th version). These are all extra optional sections to fill up a longer version of the course (dependencies if any are marked in the notes at the beginning of each section). There is a section on • Diagonalization argument and decimal representation of real numbers (1.5) • More topics on series (2.5) • Limits at infinity and infinite limits (3.5) • Monotone functions and continuity (3.6) • Inverse function theorem in one variable (4.4) • The log and exp functions (5.4) • Improper integrals (5.5) I am currently working on multivariable chapter(s) that would come after chapter 7. This will take some time still, I have about half of the material in a very rough draft, having massaged bits of my Math 522 notes into something that more fits this book. My plan is for the book to be usable for a standard one year course on real analysis. ## December 19, 2012 ### Interesting calculation Filed under: Mathematics,Teaching — jlebl @ 5:02 pm An interesting back of the envelope calculation: UC Irvine is using the differential equations book as standard, that’s a couple of hundred students every quarter, and there are at least a few other places with large and small lectures using the book. A reasonable estimate at the current adoption, there are at least 1000 students every year who use the book. I recently checked on amazon how much does Boyce-DiPrima cost: the new edition is$184 (Yaikes!). It costs $110 just to rent for a semester (a used version was$165). That’s 110-184 thousand dollars a year saved by students, just because of one open book adopted in a couple of large lecture classes. Presumably, the adoption rate can only go up, so this number will go up, just from one of my books (savings from the real analysis book are going to be much smaller due to less students taking that kind of class).

Now I have nothing against the publishers, but they have their incentives wrong. Boyce-DiPrima is a fine book, but … There is really no reason to print big bulky books on expensive paper for these classes. Locally printed coursepacks or cheaply printed paperbacks are much more efficient. And the students might actually keep their books and they might help them along in other classes. Currently most students return their books as soon as they can to recover most of the cost. So if you’re teaching say a PDE class as I did this semester, you can hardly tell them to brush up on their calculus from their calculus book. They don’t have it anymore!

The incentive for me is to simply make the best book because I want to (makes me feel good, that’s I guess all I can expect). Since I make almost no money on it, I don’t really have to inflate page count just to make it more expensive, or add color and pretty pictures just for the hell of it (it would make the book quite a bit more expensive). Plus the book is more accessible. I already know students use the web version even from their phones.

So anyway, I guess I’m providing at least 2 to almost 4 times my salary in free books.

Anyway, if you do want to buy the books (and I make $2.50 on each, yay! I made almost$400 so far, it’s mostly for making me feel good rather than making money), here are the links to lulu:

Real Analysis, $13.09 + shipping Differential equations,$16.78 + shipping

Yes, I’m a fan of arbitrary looking prices. Actually the reason for those prices is that I simply set the price so that I get \$2.50 from the book, so it’s the (cost of printing)+2.50+(lulu’s cut).

## December 17, 2012

### New versions of books and new genius

Filed under: Hacking,Mathematics,Teaching — jlebl @ 11:47 pm

So in the last two days I’ve put up new versions of both the differential equations textbook (3 new sections, and of course some fixes) and the real analysis textbook (fixes, plus 4 new exercises). And also I’ve made a new release of genius. Actually two of those I just did today when my students were taking their final. The nice things about proctoring tests with small upper division classes is that you can get stuff done. There is no cheating going on. There’s only a few questions, so I had over two hours to burn. Next semester will be quite different. I’ll have two calculus lectures with 250+ students each. Proctoring an exam for that many students is not at all a relaxing exercise (and then there’s the grading … ugh!)

## December 9, 2012

### Yet another new section in DE book

Filed under: Hacking,Mathematics,Teaching — jlebl @ 7:31 am

In trying to avoid bad mood and keep stress level down, people turn to hobbies. One of my hobbies is working on my textbooks, so I have written a new section on the Dirichlet problem for the Laplace equation in the circle for the differential equations book. See the draft section. The previous section 4.9 is OK, but the solution is far more natural in the circle in polar coordinates than in a square, that is we obtain

$\displaystyle u(r,\theta) = \frac{a_0}{2} + \sum_{n=1}^\infty a_n r^n \cos(n\theta) + b_n r^n \sin(n\theta)$

And then we can derive the Poisson formula which is just cool. Also it’s a good example showing more complicated change of variables since we do it in polar, and also it shows a somewhat more complicated and different separation variables.

Part of the motivation was that I did this topic in my PDE class so I had lecture notes and it really felt right for that point in the book, even to leave it as reading to interested students. The other part is that I have been improving the graphing ability of genius so I can do polar coordinates for example:

That’s the graph of the solution $u(r,\theta) = r^{10} \cos(10\, \theta)$, showing that high frequency on the boundary means fast decay as you go closer to the center of your domain.

Though there is no UI for polar coordinates, there is just a function that allows you to plot arbitrary surface data now. Notice how it’s not graphed on a square grid, but above the disc. Also notice that internal rings have fewer points on them, that’s because I just compute fewer values at smaller radii, remember I am passing in arbitrary data, a list of tripples (x,y,z). This will be in version 1.0.16, which should come out end of next week sometime (have to let translators have a go at it). Actually the reason for doing this work on genius was not polar coordinates but showing numerical solutions in my PDE class. It’s just that one of my test cases was polar coordinates and so it just clicked and I thought: I have to write up this section, it’s just too cool to pass up and I can make the graphs now.

This brings the number of pages in the DE book to 315, and the number of exercises to 533. Yaikes! It’s become a beast. I’ll make the new version in a week or two so that it’s usuable for next semester (so if you have comments on the new section do let me know quickly).

I think now a two semester course could possibly be run out of the book. What’s going to be added in the new version is essentially about 5-6 lectures. At my speed the whole thing is now approximately 65 lectures, so a bit less than two semesters worth, but if you go just a tad slower (as many people do), do more examples, and if you factor in exams, reviews, quizzes, etc… it’s just right I think. You’ve got lots of room to spare if you want a two quarter course.

## November 27, 2012

### Frobenius method and Bessel functions

Filed under: Hacking,LaTeX,Mathematics,Teaching — jlebl @ 6:57 pm

I had occasion to talk about Bessel functions and mention the Frobenius method in my PDE class and I realized that I do not have any mention of this in the book. This was the section I did not quite get to when teaching at UCSD, so it never got written. Well, worry no more. I’ve written up a draft version of the section. This will appear in the next version of the book whenever I make it, though if you do have comments, do let me know. It’s good to catch typos or make changes now.

This brings the number of pages to 307 together with new delta function section and the number of exercises to 521. Yay!

This also made me realize that Genius did not have Bessel functions implemented. They were actually easy to implement as MPFR has them done. At least for integer orders and real values anyway. Then as my current working directory of genius was such a mess with trying to include LAPACK, I decided to remove LAPACK for now from the genius git. I think what I will do is link to the fortran version at some later point. It seems like the fortran LAPACK is available almost everywhere, so it should not be a bad new dependency. Much easier than trying to make the beast compile cleanly inside genius. Anyway, so Bessel functions will be in Genius, which I think I ought to make a release of soon as there are a bunch of other small changes to set upon the world.

## November 18, 2012

### News of Microsoft demise a bit premature and study habits of college students

Filed under: Teaching,Technology — jlebl @ 3:36 pm

There are apparently a number of people all excited about Microsoft now really destroying itself. Well it still remains to be seen. But I think a good indication of where things are headed are college students. Since I have google analytics now on the textbook pagess I can do some experiments. So for example essentially all the traffic from “Irvine” is from UCI students that look at the differential equations book. So I looked at the operating systems usage from Irvine. Here are the results (note that this is a small sample, very unscientific): 72.3% Windows, 10.6% Mac, 10.4% iOS (iPad + iPhone), 3.7% Linux, 3.1% Android. Now given if you watch what people use on campus it seems mostly Mac, I think that gut feeling might be a bit skewed. On the other hand there could be computer labs running that students use and have no choice over the OS. So what conclusions could one draw? Windows is still dominant, by far. Mac is doing better, but actually quite a bit worse than one would expect among college students. Linux is doing a bit better than I would expect, it’s where Mac was just a few years ago. The interesting thing is also the iOS vs Android. It seems from the news that Android phones have beat iPhones in terms of marketshare, but here it doesn’t look like it. So that would indicate tablets are being used and iPad still beats the android tablets. Interestingly 7.3% of visitors used 320×480 resolution, and that I guess means phone. I can’t figure out how to break that down in Google Analytics. By the way, this means 7.3% are reading their textbook on their phone. This number may spike during exams. Let’s test this theory.

I don’t know how to draw this graph for Irvine only, so it could be other places as well. But look at this graph for the number of visits from phone-like resolution:

But let’s stop that cynical thinking about cheating: There were two exams at UBC (University of British Columbia) for two classes using the differential equations book, but they were on the 14th, and the spike is on the 13th, so the students were studying hard, not cheating. Well maybe studying from a pub so they needed to look at the textbook from a phone, but still.

## November 15, 2012

### New section in differential equations book

Filed under: LaTeX,Mathematics,Teaching — jlebl @ 7:44 pm

I have recently finally finished a new section on the Dirac delta function for the differential equations textbook. Take a look at the draft version. Note that this is a draft, so it could have typos and could still change. If you have any comments, let me know. Especially if you want to teach with it and would like to mention some detail I don’t mention right now. I will make a new version of the book including this section sometime in December, after semester ends.

In other news, the differential equations textbook is now apparently the standard book for Math 3D at University of California at Irvine. It’s nice if people pick the book to teach out of for their class, but it’s even nicer if a department decides to standardize on the book. The real analysis book is for example the standard book at University of Pittsburgh, and they even made their own changes (adding some extra material), which is a really nice example of what can be done with free textbooks.

I also added Google Analytics to the pages so I can see where the traffic is coming from. If someone uses the books by printing out a copy for students or putting a PDF on their site, I can’t quite see it, but if they simply link to my site it’s fun to watch the traffic. As the differential equations book has an HTML version, a lot of students seem to use that rather than the PDF. I assume the PDF is just downloaded and I don’t see traffic afterwards, but when they are using the HTML version, then of course they keep hitting my site. So currently there are several classes at Irvine and two classes at University of British Columbia that simply link to my site and I get lots of traffic on the HTML version of the book. These students using the HTML version takes up a large proportion of hits to my site. If you look on the map of which cities hits are coming from, there are two big circles, one over Irvine and one over Vancouver, and then lots of other smaller circles mostly distributed all over, mostly over english speaking coutries.

I am thinking I should make an HTML version of the real analysis textbook, but it’s quite a bit of work to set things up for tex4ht, and always quite a bit of work when making a new version so I have not yet gotten around to do it. Also I am more worried about formulas coming out correctly. It would be nice to get something like mathjax working with tex4ht. Or some other solution, but I don’t want to maintain two versions so it would have to take the LaTeX source and produce the HTML perhaps with a different style file. Anyway, for now it is images for equations, which do look bad when printed, but look OK on screen.

## May 9, 2012

### Determinants

Filed under: Mathematics,Teaching — jlebl @ 8:51 pm

I just feel like ranting about determinant notation. I always get in this mood when preparing a lecture on determinants and I look through various books for ideas on better presentation and the somewhat standard notation makes my skin crawl. Many people think it is a good idea to use

$\left\lvert \begin{matrix} a & b \\ c & d \end{matrix} \right\rvert$

instead of the sane, and hardly any more verbose

$\det \left[ \begin{matrix} a & b \\ c & d \end{matrix} \right]$     or     $\det \left( \left[ \begin{matrix} a & b \\ c & d \end{matrix} \right] \right)$.

Now what’s the problem with the first one.

1) Unless you look carefully you might mistake the vertical lines for brackets and simply see a matrix, not its determinant.

2) vertical lines look like something positive while the determinant is negative.

3) What about 1 by 1 matrces. $|a|$ is a determinant of $[a]$ or is it the absolute value of $a$.

4) What if you want the absolute value of the determinant (something commonly done). Then if you’d write

$\left\lvert\left\lvert \begin{matrix} a & b \\ c & d \end{matrix} \right\rvert\right\rvert$

that looks more like the operator norm of the matrix rather than absolute value of its determinant. So in this case, even those calculus or linear algebra books that use the vertical lines will write:

$\left\lvert \det \left( \left[ \begin{matrix} a & b \\ c & d \end{matrix} \right] \right) \right\rvert$

So now the student might be confused because they don’t expect to see “det” used for determinant (consistency in notation is out the window).

So … if you are teaching linear algebra or writing a book on linear algebra, do the right thing: Don’t use vertical lines.