Wolfram Computation Meets Knowledge

Best of Blog

Code Length Measured in 14 Languages

Update: See our latest post on How the Wolfram Language Measures Up. I stumbled upon a nice project called Rosetta Code. Their stated aim is "to present solutions to the same task in as many different languages as possible, to demonstrate how languages are similar and different, and to aid a person with a grounding in one approach to a problem in learning another." After amusing myself by contributing a few solutions (Flood filling, Mean angle, and Sum digits of an integer being some of mine), I realized that the data hidden in the site provided an opportunity to quantify a claim that I have often made over the years—that Mathematica code tends to be shorter than equivalent code in other languages. This is due to both its high-level nature and built-in computational knowledge. Here is what I found. Mathematica code is typically less than a third of the length of the same tasks written in other languages, and often much better.
Education & Academic

Wolfram Research and American Education Week

This week is American Education Week (November 11–17), and in a very fundamental way, our goal as a company is to improve educational standards and accessibility around the world with our technology. For over 20 years, Wolfram Research has been at the forefront of combining technology with education. It started with Mathematica and grew with Wolfram|Alpha, mobile apps, the Wolfram Demonstrations Project, Wolfram SystemModeler, and much more. From simple elementary math to highly complex physics, Wolfram's tools are used not only around the nation, but around the whole world. Next year marks the 25th anniversary of Mathematica. Today, Mathematica is a staple at both research universities and smaller liberal arts colleges. In fact, Mathematica has been adopted by many school systems throughout the country, including SUNY, CUNY, and the Minnesota State Colleges and Universities System (MnSCU). We've partnered with MnSCU to make Mathematica available to Minnesota public high schools through an outreach program. And the government of Panama, having recognized the importance of investing in its future, has recently focused on teaching Mathematica to professors, researchers, and students in all computer-accessible high schools and universities countrywide.
Education & Academic

Join The Computer-Based Math™ Education Forum

The computerbasedmath.org community has been growing steadily since the project first started in 2010. Several thousand of you have signed up to show your support, share your ideas, and help spread the word. The Computer-Based Math™ Education Summit has been a great tool for bringing the community together, but we wanted a central hub where the community can gather more than just once a year. So we've launched the The Computer-Based Math Education Forum. Whatever your background, join the conversation and share your experiences.
Announcements & Events

Developing Light Microscopy Techniques with Mathematica

For Daniel Zicha, head of Light Microscopy at Cancer Research UK, Mathematica is the ultimate tool for biomedical research because it's "quick to develop and then quick to test and visualize the results conveniently and interactively." Zicha uses Mathematica in the development of light microscopy techniques as well as in collaborative research in applications of image processing and analysis methods. Within his collaborative research work in the area of metastasis, Zicha's use of Mathematica to visualize and qualitatively analyze cell morphology led to the discovery of a novel metastasis suppressor. In this video, he describes Mathematica's role in the project and the advantages of having one environment for rapid prototyping, qualitative analysis, and interactive visualization.
Products

Dose Selection for Drug Trials Using Wolfram SystemModeler and Mathematica

Explore the contents of this article with a free Wolfram SystemModeler trial. During the last decades, the development and use of therapeutic monoclonal antibodies (mAbs) have grown rapidly. Today, more than 30 different mAbs are successfully used in the clinic—playing important roles in treating complex diseases such as cancers and auto-immune disorders—and more than 200 are in clinical trials. The history of mAbs has, however, not been without problems. In 2006, a first-in-human clinical trial of an mAb, aimed at treating leukemia and rheumatoid arthritis, went terribly wrong. Although the trial was run according to an approved protocol, all volunteers receiving the drug had severe inflammatory reactions and multiple organ failure. The tragic event shocked the medical community and highlighted a very important issue: how do you select a safe starting dose in first-in-human trials? Now, as you may guess, the complete answer to this question is not an easy one. It's also beyond the scope of this blog post. However, as a consequence of the dramatic happenings in 2006, the European Medicines Agency (EMEA) recently published new guidelines to address the issue of starting dose selection in first-in-human trials. Interestingly, the guidelines recommend that the use of modeling and simulation should play an integral part in the selection process, and in this post I thought we would study what such an approach might look like using Wolfram SystemModeler and Mathematica.
Education & Academic

Falling Faster than the Speed of Sound

Earlier this month, on a nice day, Felix Baumgartner jumped from 39,045 meters, or 24.26 miles, above the Earth from a capsule lifted by a 334-foot-tall helium filled balloon (twice the height of Nelson's column and 2.5 times the diameter of the Hindenberg). Wolfram|Alpha tells us the jump was equivalent to a fall from 4.4 Mount Everests stacked on top of each other, or falling 93% of the length of a marathon. At 24.26 miles above the Earth, the atmosphere is very thin and cold, only about -14 degrees Fahrenheit on average. The temperature, unlike air pressure, does not change linearly with altitude at such heights. As Wolfram|Alpha shows us, it rises and falls depending on factors such as the decreased density of air with rising altitude, but also the absorption of UV light by the ozone layer. At 39 kilometers, the horizon is roughly 439 miles away. At this layer of the atmosphere, called the stratosphere, the air pressure is only 3.3 millibars, equivalent to 0.33% of the air pressure at sea level. To put it another way, the mass of the air above 39 kilometers is only 0.32851% of the total air mass. Given this knowledge, we know that 99.67% of the world's atmosphere lay beneath him. This information was important to Felix's goal to break the sound barrier in free fall because the rate of drag is directly related to air pressure. With less air around him, there would be less drag, and thus he could reach a higher maximum speed. Of course, this would require him to wear an oxygenated suit to allow him to breathe, in addition to keeping him warm.
Education & Academic

Calculating the Energy between Two Cubes

In my last blog post, we discussed 3D charge configurations that have sharp edges. Reader Rich Heart commented on it and asked whether Mathematica can calculate the force between two charged cubes, as done by Bengt Fornberg and Nick Hale and in the appendix of Lloyd N. Trefethen's book chapter. The answer to the question from the post is: Yes, we can; I mean, yes, Mathematica can. Actually, it is quite straightforward to treat a more general problem than two just-touching cubes of equal size: We can deal with two cubes of different edge lengths L1 L2 We can calculate the force for any separation X, where X is the distance between the two cube centers (including the case of penetrating cubes; think plasma) We will use a method that can be generalized to higher-dimensional cubes without having to do more nested integrals Instead of calculating the force between the two cubes, we will calculate the total electrostatic energy of the system of the two cubes. The force is then simply the negative gradient of the total energy with respect to X. The electrostatic energy (in appropriate units) is given by: (In the following calculations, we will skip the constant [with respect to X] prefactors Q1 L1-3 Q2 L2-3 or Q1 Q2 if not needed.) Approaching this integral head-on doing one integral after another is possible, but a very tedious and time-consuming operation. Instead, to avoid having to carry out a nested six-dimensional integral, we remember the Laplace transform of 1 / √s.
Announcements & Events

Presentations from the Wolfram Mathematica Virtual Conference 2012 Now Available

The recent Wolfram Mathematica Virtual Conference was a tremendous success! The free event included two tracks of talks covering applications of Mathematica in industry and research and in education, Q&A with experts, and access to virtual networking. From building graphics and dynamic visualizations to learning creative ways for using the Computable Document Format (CDF) in the classroom, attendees of all experience levels gained new insights to help them get the most out of the Mathematica platform.
Best of Blog

Automating xkcd Diagrams: Transforming Serious to Funny

On early Monday morning I noticed an interesting question posted on Mathematica Stack Exchange titled quite innocently "xkcd-style graphs." Due to the popularity of Randall Munroe's xkcd web comic, I expected a bit more than average of about ten or so up-votes, a few bookmarks. Little did I know. Spontaneously emerging viral events are hard to predict, so if you are lucky to catch one, it is fascinating to watch its propagation across the web and the growth of its ranks. In a matter of two days, this post received more than 100,000 views, 200 up-votes, and 150 bookmarks; produced responses and similar posts across other Stack Exchange communities; triggered a small tornado on Twitter; and was discussed on Hacker News and reddit. For convenience, I repeat Amatya's original post and example xkcd image here: "I received an email to which I wanted to respond with a xkcd-style graph, but I couldn't manage it. Everything I drew looked perfect, and I don't have enough command over Plot Legends to have these pieces of text floating around. Any tips on how one can create xkcd-style graphs? Where things look hand-drawn and imprecise. I guess drawing weird curves must be especially hard in Mathematica."