Math adds up to a Google Valentine

Kudos to the math geniuses who came up with an equation that you can plug into Google search to create a little Valentine's Day surprise.

The magic math that makes the heart graph you see above is this: 

sqrt(cos(x))*cos(300x)+sqrt(abs(x))-0.7)*(4-x*x)^0.01, sqrt(6-x^2), -sqrt(6-x^2) from -4.5 to 4.5

Go ahead, give it a try. Just paste it into the search box and see what happens. 

Thanks to Mashable for dredging up the agony of high school math and giving us even more options on how to play with the graph.

The “cos(300x)” part of the formula was also written to make the line go quickly up and down as it traces out the interior of the heart. This creates the colored-in effect. Meanwhile, if you change the “300″ number in the equation to “500,” the color fills up the heart. That part of the formula is related to frequency.

You can also go to Wolfram MathWorld and try your hand at making a heart using one of the mathematical curves that produce these universal images for love. Or try this "Mathematische Basteleien" page, which gives you step-by-step equations to tailor your heart to your heart's desire. You don't need a fancy diamond necklace or a box of chocolates to make someone's day.

Weisstein, Eric W. "Heart Curve."

Heart-shaped mathematical curves

More Valentine's Day stories:

On Twitter, follow Athima Chansanchai, who is also trying to keep her head above water in the Google+ stream.

Discuss this post

Cut and pasted it, but it does not work. There must be some small difference in IE9. A lot of people, on various browsers, report that it does not work for them, so don't be surprised.

http://mashable.com/2012/02/09/google-valentine-surprise/

http://www.wolframalpha.com/input/?i=sqrt%28cos%28x%29%29*cos%28300x%29%2Bsqrt%28abs%28x%29%29-0.7%29*%284-x*x%29%5E0.01%2C+sqrt%286-x%5E2%29%2C+-sqrt%286-x%5E2%29+from+-4.5+to+4.5

  • 2 votes
Reply#1 - Fri Feb 10, 2012 1:06 PM EST

Works for me, Firefox with Vista.

    Reply#2 - Fri Feb 10, 2012 2:46 PM EST

    Just use a crayon ....

      Reply#3 - Fri Feb 10, 2012 4:00 PM EST

      Did not work in Google search. Did work in Bing on the second layer of search.

      • 1 vote
      Reply#4 - Fri Feb 10, 2012 6:34 PM EST

      Your search - sqrt(cos(x))*cos(300x)+sqrt(abs(x))-0.7)*(4-x*x)^0.01, sqrt(6-x^2), -sqrt(6-x^2) from -4.5 to 4.5 - did not match any documents.

      Well, so much for that genius idea!

      • 1 vote
      Reply#5 - Fri Feb 10, 2012 7:31 PM EST

      scam on resale of a timeshare out of las vegas nv how do you get them to stop or how can you get someone to track them down and to not continuing scaming other people I am 66 yrs old a us army veteran I have contacted several agency but don't think they will be do anything

        Reply#6 - Thu Feb 16, 2012 11:23 AM EST
        You're in Easy Mode. If you prefer, you can use XHTML Mode instead.
        As a new user, you may notice a few temporary content restrictions. Click here for more info.