Valentine’s Day is special to sweethearts around the world. While Wolfram|Alpha can’t come close to replacing a thoughtful card or gourmet box of chocolates, there are a surprisingly large number of things related to Valentine’s Day (and in particular, to its central icon) that Wolfram|Alpha can compute.
Let’s start with the holiday itself. Just typing in “valentine’s day” gives the expected calendrical information, from which we learn that Valentine’s Day falls on a Sunday this year. For the procrastinators among us, we can also find out how many days we have remaining to acquire an appropriate token of affection for our loved one (or by how many days we’ve already blown our chance). Wolfram|Alpha also shows various other useful data, including the interesting fact that Valentine’s Day coincides with Chinese New Year this year.
While Wolfram|Alpha can’t (yet) tell you how many calories are in your box of holiday chocolates or package of Valentine’s Day Sweethearts candy, there are plenty of computational objects related to that most-famous Valentine’s Day icon—the heart—that it can tell you something interesting and/or useful about. For instance, do you know the average weight of a human heart? The typical resting heart rate? The Unicode point for the heart symbol character? Or perhaps you’ve forgotten the ASCII keystrokes needed to insert a love emoticon at the end of an email to your Sweet Baboo?
On the mathematical side, typing in “heart curve” gives you a number of mathematical curves resembling the heart shape. The default (and probably most famous) of these is the cardioid, whose name after all means “heart-shaped” in Latin (and about which we all have fond memories dating back to our introductory calculus courses):
A curve more closely resembling the conventional schematic (if not physiological) heart shape is the so-called “first heart curve“, which is an algebraic curve described by a beautifully simple sextic Cartesian equation:
If you don’t care for any of the heart curves Wolfram|Alpha knows about (or even if you do), you’re also of course also free to experiment with your own. For example, a particularly attractive curve can be obtained using the relatively simple input “polar plot 2 – 2 sin t + sin t sqrt (abs(cos t))/(sin t + 1.4)“.
As Wolfram|Alpha knows about plane curves with special relationship to Valentine’s Day, you might next think to try surfaces. After typing in “heart surface“, you are indeed rewarded with the following image (for which we’ll perhaps give Wolfram|Alpha a small demerit for its lack of bright red pigmentation):
Another unexpected computable object related to Valentine’s Day is the map projection known as the Bonne projection, which mathematically maps the surface of a globe onto a heart-shaped region:
I could go on, but you get the idea. While it’s certainly true that Wolfram|Alpha can never take the place of your real Valentine, it does do the best it can on the computational side of things. So, if that’s where your affections lie—and if you let it—Wolfram|Alpha will do everything it can, from being happy to be your Valentine to sharing philosophical musings on the meaning of love. :)