Archive for April, 2005

Smooth functions

Thursday, April 14th, 2005

I’ve been spending way too much time this week thinking about smooth functions. We covered the theorem that says a partition of unity exists for every compact subset of a Euclidean space. One of the homework problems was to extend this theorem to show that the partition functions could be chosen to be smooth. It wasn’t until I started trying to do the problem that I realized that the book doesn’t define what smooth means. For instance, if f: \R^2 \rightarrow \R, what does it mean to say f \in \C^\infty(\R^2)? I get the impression that that is equivalent to saying

\displaystyle \frac{\partial^n f}{\partial x_1^{j_1} \partial x_2^{j_2}} \quad j_1 +j_2 = n

exist for all n. But what does this mean really? I can think of differentiation in terms of linear algebra (matrices, really) up to the Hessian, but what happens when you try to define e.g. f^{(3)}? Most books I’ve flipped through either only define smooth functions on \R, the obvious case, or in Banach spaces, which I don’t understand how to apply to my situation. I’m still looking for a reasonable motivation for my intuitive understanding of smooth.

LaTeXRender Perl Port

Wednesday, April 13th, 2005

I ported LaTeXRender— software that lets you use the power of LaTeX in a blog or other web-based application— (originally PHP) to Perl; the port is available here. The port doesn’t currently support MimeTeX; if you need it, let me know, and I’ll work it in. Direct any questions to the comments of this entry, or to the email address in the archive.

Note: I just realized the file has a .gz extension; treat it instead as a .tgz file.

A delicious approximation of e

Tuesday, April 12th, 2005

Here’s a delicious :) approximation of e, as gotten off a t-shirt stating “You can have your \pi and e it too!”:

(\pi^4 + \pi^5)^{\frac{1}{6}} \approx e

I wonder how that approximation was observed, and if the accuracy can be improved (currently the error according to Mathematica is around 10^{-8})

Totally unrelated issues:

  • The mysql problem seems to have resolved itself– troubling, but I’ll take it as I get it.
  • At least one person other than William Wu is interested in the LaTeXRender port to Perl, so I’m going to make the changes to the code William suggested and then send it off to Steve, or maintain it here… something official, at any rate.
  • The ‘proof’ I posted earlier about \int_a^b f \, dg existing if f continuous and g B.V. has so many holes in it, I’m surprised my computer didn’t laugh at me entering it. The good news is all those holes have been fixed, at least in my head :)

Wattage?

Monday, April 11th, 2005

I’m sitting here next to a Chem E friend, trying not to laugh out loud: she’s doing a spreadsheet with some numbers in it, and several cells are labeled ‘Wattage’!

That’s like saying, ’secondage’ instead of time. Come on… just say, power.

MySQL Memory Problems

Saturday, April 2nd, 2005

I think I’ve discovered why the site keeps crashing. It seems that Mysql is not getting enough memory to operate. I’m working on figuring out exactly why that is, and how to remedy it without paying an extra $20/month for more memory.

Here’s a little trick for monitoring memory usage that I got from the FAQ pages at rimuhosting.com:


# create a memmon.sh script that tracks the current date, memory usage and running processes
echo '#!/bin/bash' > /root/memmon.sh
echo "
date;
uptime
free -m
vmstat 1 5
ps auxf --width=200
" >> /root/memmon.sh

chmod +x /root/memmon.sh

# create a cronjob that runs every few minutes to log the memory usage
echo '0-59/10 * * * * root /root/memmon.sh >> /root/memmon.txt' > /etc/cron.d/memmon
/etc/init.d/cron* restart 

# create a logrotate entry so the log file does not get too large
echo '/root/memmon.txt {}' > /etc/logrotate.d/memmon