The Wolfram|Alpha Blog is now part of the Wolfram Blog. Join us there for the latest on Wolfram|Alpha and other Wolfram offerings »
Eric Weisstein

Computing Valentine’s Day with Wolfram|Alpha

February 12, 2010 —
Comments Off

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):

The heart curve in Wolfram|Alpha

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:

The first heart curve in Wolfram|Alpha

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):

The heart surface in Wolfram|Alpha

(Incidentally, for many more details on heart-related curves and surfaces, see their respective MathWorld articles.)

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:

The Bonne Projection in Wolfram|Alpha

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. 🙂

6 Comments

Hey Eric, is it possible to make wolframalpha print letters? I want to have ‘Will you be my valentine? (name here)’ in the middle of the third heart curve for my gf.

Posted by ///M February 13, 2010 at 2:51 am

    You can turn it into a CAPTCHA…

    Posted by JAK February 14, 2011 at 4:03 pm

this is why I love your site! It’s the on-line version of Geeks Gone Wild. Thanks for a laugh on Valentines.

Posted by Jill February 14, 2010 at 6:27 pm

Nice, thanks! 🙂

Posted by Alex Dedul February 15, 2010 at 7:09 am

wolfram is the best everything is on it =)

Posted by mandy February 25, 2010 at 12:13 am

[…] my blog post last month, I wrote about Valentine’s Day in Wolfram|Alpha. Strangely, we received a number of comments indicating that the computational power of […]

Posted by Wolfram|Alpha Blog : Pi Day in Wolfram|Alpha June 7, 2011 at 10:36 am