Wolfram Computation Meets Knowledge

Announcements & Events

Mathematica as a Tool in the Sexy World of ebooks

Touch Press, the digital publishing company founded by Stephen Wolfram, Theodore Gray, and Max Whitby, continues to push the boundaries of what's possible in the world of ebooks. A big part of the company's success is due to its use of Mathematica. Touch Press developers have used Mathematica in the production of nearly all of its highly popular titles, including The Elements, Solar System, and its latest title, March of the Dinosaurs. At the Wolfram Technology Conference 2011, Gray gave an inside look at the Mathematica tools used in the company's current and future ebooks and described why Mathematica makes Touch Press perfectly positioned to redefine the future of publishing.
Best of Blog

10 Tips for Writing Fast Mathematica Code

When people tell me that Mathematica isn't fast enough, I usually ask to see the offending code and often find that the problem isn't a lack in Mathematica's performance, but sub-optimal use of Mathematica. I thought I would share the list of things that I look for first when trying to optimize Mathematica code. 1. Use floating-point numbers if you can, and use them early. Of the most common issues that I see when I review slow code is that the programmer has inadvertently asked Mathematica to do things more carefully than needed. Unnecessary use of exact arithmetic is the most common case. In most numerical software, there is no such thing as exact arithmetic. 1/3 is the same thing as 0.33333333333333. That difference can be pretty important when you hit nasty, numerically unstable problems, but in the majority of tasks, floating-point numbers are good enough and, importantly, much faster. In Mathematica any number with a decimal point and less than 16 digits of input is automatically treated as a machine float, so always use the decimal point if you want speed ahead of accuracy (e.g. enter a third as 1./3.). Here is a simple example where working with floating-point numbers is nearly 50.6 times faster than doing the computation exactly and then converting the result to a decimal afterward. And in this case it gets the same result.
Announcements & Events

The 2011 Mathematica One-Liner Competition

The Mathematica One-Liner Competition at last year's Wolfram Technology Conference was such a popular success that we did it again this year. As readers of this blog may recall, last year's winning entry, submitted by Stephan Leibbrandt, was a complete, animated simulation of particles coalescing under gravitational and repulsive forces. This year's winner takes advantage of the integration of Mathematica and Wolfram|Alpha that debuted in Version 8. The rules were the same this year as last: produce the most stunning output you can with 140 or fewer input characters, typeset 2D expressions are allowed, and white space doesn't count. The entries were once again all over the place, from anagrams and fractals to abstract graphics and astronomical charts. Eighteen participants submitted 33 one-liner entries. Five of those merited Honorable Mentions. One got a Dishonorable Mention. And of course, prizes went to Third, Second, First-and-a-Half, and First Places.
Education & Academic

The First Computer-Based Math Education Summit

Having worked on content development for computer-based math over the past few months, I am excited to share a quick report on our lively summit at The Royal Institution. The purpose was to address the question "In an era of ubiquitous computing, how should we rebuild math education from the ground up, to keep pace with and drive progress in the real world?" Attendees included people from government, education, assessment, industry, technology, STEM, and publishing, which I believe proved to make a very interesting crowd. The talks from speakers were insightful as anticipated and, at times, amusing; however, what I enjoyed most were the natural discussions and debates that happened after these talks and throughout the summit.
Design & Visualization

Detecting Kinship from a Pair of Images

We just attended the International Conference on Image Processing (ICIP) in Brussels and the 14th International Conference on Medical Image Computing and Computer Assisted Intervention (MICCAI) in Toronto. Both events proved to be great occasions to demonstrate how Mathematica can aid research in image processing, from investigation and prototyping to deployment. Last but not least, we seized the opportunity to listen to the experts in the field to extend the functionality of Mathematica in the right direction. Last year, Ruogu Fang, Kevin D. Tang, Noah Snavely, and Tsuhan Chen received the best paper award at ICIP for their study of kinship detection from pairs of images. I decided to build a detector by following their proposed framework with Mathematica. A lot has been said and studied about our human ability to recognize faces; computer programs can be quite good at it, too. Similarly, when looking at faces, we may display a canny ability to detect an ancestry relationship, or kinship. In these pictures, is the person on the left the father of the person on the right? Yes, and we can figure it out with Mathematica.
Education & Academic

Minnesota State Colleges and Universities Use Mathematica to Collaborate with High Schools

After a few meetings during the past few weeks with Mark Thomas, Software Contracts Specialist for the Minnesota State Colleges and Universities System (MnSCU), Wolfram and MnSCU have finalized a plan that will provide Mathematica to Minnesota public high schools through a new outreach program. Any of the roughly 400 public high schools in Minnesota can request a license for Mathematica at MnSCU-offer@wolfram.com, and Wolfram will provide up to five local licenses per school for the duration of the 2011–2012 academic year. Wolfram and MnSCU intend to extend this partnership in the future.
Computation & Analysis

11/11/11 11:11:11—The Right Time to Look at a Number

World War I officially ended in 1918 at the 11th hour of the 11th day of the 11th month. Remembrance Day is observed in Commonwealth countries to recall the end of the war and to remember the members of the armed forces who gave their lives for the cause. This year we observe Remembrance Day on 11/11/11. Beyond the somberness of this memorial day, those of us who are mathematically inclined consider the surprising ways we can combine 1s to achieve beautiful results. Some of these combinations involve rather unpleasant calculations, so we'll let Mathematica do the heavy lifting while we marvel at the results! Today I'll share 11 interesting places in which 1 appears. Let's jump in. 1. Can anything of interest come from combining the humble digit 1 with the square root and plus symbol? As the demonstration below suggests, given the right nesting, you get an infinite series that converges to φ = 1.61803..., the golden ratio.
Products

Mathematica Q&A Series: Surprises in Differentiation and Integration

Got questions about Mathematica? The Wolfram Blog has answers! We'll regularly answer selected questions from users around the web. You can submit your question directly to the Q&A Team. This week's question comes from Kutha, a math lecturer: Why doesn't differentiating after integrating always return the original function? Read below or watch this screencast for the answer (we recommend viewing it in full-screen mode): The derivative of a definite integral with respect to its upper bound (with a constant lower bound) is equal to the integrand:
Education & Academic

The Ongoing Stock Market Crash

The ongoing gyrations of the stock market over the past few months have spread panic not just throughout the markets, but into the rest of the economy and the political sphere. There are some who assert that this is due to the recent downgrade of the American credit rating by Standard & Poor's (S&P), but an analysis with Mathematica suggests that other factors may be at play. Using the FinancialBond function for a zero-coupon continuously compounding bond price, we discover the inverse relation between bond prices and yields (y) given below. As the bond price increases, the yield y decreases. As bonds are bought, their prices go up and the corresponding yields drop. Looking at the U.S. yield curve using Wolfram|Alpha at the end of July and eight weeks later below, the yields on long-term 10-year treasury bonds have dropped from 2.82% to 1.84%, which is a historic 50-year low. This shows that investors are now more likely to buy long-term U.S. government debt, which is puzzling behavior if they are panicked by the S&P downgrade.