January 7, 2016 — Devendra Kapadia, Kernel Developer, Algorithms R&D

PDEs word cloud

Partial differential equations (PDEs) play a vital role in mathematics and its applications. They can be used to model real-world phenomena such as the vibrations of a stretched string, the flow of heat in a bar, or the change in values of financial options. My aim in writing this post is to give you a brief glimpse into the fascinating world of PDEs using the improvements for boundary value problems in DSolve and the new DEigensystem function in Version 10.3 of the Wolfram Language.

The history of PDEs goes back to the works of famous eighteenth-century mathematicians such as Euler, d’Alembert, and Laplace, but the development of this field has continued unabated during the last three centuries. I have, therefore, chosen examples of both classical as well as modern PDEs in order to give you a taste of this vast and beautiful subject.

Read More »

November 13, 2015 — Oleksandr Pavlyk, Manager of Probability and Statistics, Mathematica Algorithm R&D

Picking random points on the surface of a sphere so that the points are uniformly distributed is not as straightforward as you might think. Naively picking random spherical coordinates ϕ and θ will not give a uniform distribution of points. The problem is important enough to warrant a dedicated article in encyclopedias, such as Wolfram MathWorld (see Sphere Point Picking). Uniform sampling from Sphere[] is now available in the Wolfram Language with the RandomPoint function:

RandomPoint on a Sphere

Finding if the point is on the sphere

In fact, RandomPoint can be used to uniformly sample from any bounded geometric region, in any dimension. In 2D:

Uniformly sample geometric region in 2D

Read More »

September 2, 2015 — Giulio Alessandrini, Mathematica Algorithm R&D

I’ve taken pictures numerous times, either with a camera or with my phone, only to find out that the colors were completely off—they had bluish, reddish, or even greenish tints. Before I started working on image and color processing, this was quite mysterious to me. Moreover, I’d always noticed on my cameras a white balance setting that, when played with, produced results very much like my skewed-color photographs. Could it be these two were related?

That camera setting is indeed the key to correcting a color cast, and it has been added to the Wolfram Language with the ColorBalance function.

Here is a simple example of how it works:

Applying ColorBalance to photos

Read More »

August 12, 2015 — Gopal Sarma, Advanced Research Group

The Wolfram Language has had extensive support for string manipulation since Mathematica 5, and in Version 10 it provided uniform symbolic access to a huge repository of computable data via the Wolfram Knowledgebase. Taking advantage of both of these fundamental capabilities, along with new machine learning functionality with Classify and Predict, we’re excited to be making further inroads into the rich domains of natural language processing and text analytics with TextCases, new in Version 10.2.

TextCases, like its sister functions Cases and StringCases, finds instances of patterns in a given input. Whereas Cases operates on Wolfram Language expressions and StringCases on strings, TextCases assumes that the input is human understandable text, from which one can extract known syntactic and semantic entities. These include basic textual types such as words, sentences, and paragraphs, but also more sophisticated semantic types such as countries, cities, and numbers.

As a simple example, let’s use TextCases to find instances of countries in a sentence:

Finding countries in a sentence using TextCases

Read More »

July 16, 2015 — Bob Sandheinrich, Software Engineer, Connectivity Group

Despite the ever-growing list of tools I have for communication, email remains one of the most important. I depend on email to find out about all sorts of things: my ultimate Frisbee game is rained out, flights to Denver are only $80, my Dropbox account is almost full, my neighbor’s cat is missing (again). While filters are able to hide the pure junk and sort everything else into reasonable categories, reading and responding to email still requires a lot of manual interaction. The new mail receivers in the Wolfram Language finally let me automatically interact with email.

MailReceiverFunction is a Wolfram Language function that I deploy to the cloud to operate on incoming emails. When I deploy a function, I get an email address. Emails sent to that address will be processed by the function.

Read More »

July 9, 2015 — Nick Lariviere, Kernel Developer, Core Mathematica Engineering

A classic problem in numerical date notation is that various countries list year, month, and day in different orders, which was one of the motivations for the introduction of the ISO-8601 date element and interchange formats (Randall Monroe has a nice summary in this xkcd comic). In the upcoming release of the Wolfram Language, we’ve added built-in support for these ISO date formats:

DateString ISODate; DateString ISODateTime

The ISO specification also provides some alternative date representations, such as week dates (year, week of year, and day of week) and ordinal dates (year and day of year):

DateString ISOWeekDate; DateString ISOOrdinalDate

Read More »

May 21, 2015 — José Martín-García, Research Staff Member

A brilliant aspect of the Wolfram Language is that not only you can do virtually anything with it, you can also do whatever you want in many different ways. You can choose the method you prefer, or even better, try several methods to understand your problem from different perspectives.

For example, when drawing a graphic, we usually specify the coordinates of its points or elements. But sometimes it’s simpler to express the graphic as a collection of relative displacements: move a distance r in a direction forming an angle θ with respect to the direction of the segment constructed in the previous step. This is known as turtle graphics in computer graphics, and is basically what the new function AnglePath does. If all steps have the same length, use AnglePath[{θ1,θ2,...}] to specify the angles. If each step has a different length, use AnglePath[{{r1,θ1},{r2,θ2}, ...}] to give the pairs {length, angle}. That’s it. Let’s see some results.

Read More »

May 15, 2015 — Christopher Wolfram, Connectivity Group

Cryptography has existed for thousands of years, but before serious computers came around, only specific kinds of messages were worth encrypting. Now that computers routinely manage a huge amount of communication, there is little downside to invisibly applying cryptography to almost everything, from verifying where information comes from to exchanging information securely. Because of cryptography’s widespread use, we added the basic building blocks of modern cryptography to the Wolfram Language with functions using OpenSSL for key generation, symmetric encryption/decryption, and asymmetric encryption/decryption.

The notion of a key in cryptography is similar to the way we use keys in everyday life, in that only someone with a certain key can perform a certain action. One very simple way of arranging this is to have a single key that is used to encrypt as well as decrypt, much like the locking and unlocking of a door:

Making one key to encrypt and decrypt

Read More »

April 10, 2015 — Jeremy Michelson, Manager of Data and Semantics Engineering

The Wolfram Language provides tools for programmatic handling of free-form input. For example, Interpreter, which was introduced in Version 10.0, converts snippets of text into computable Wolfram Language expressions. In smart form fields, this functionality can automatically translate input like “forty-two” into a Wolfram Language expression like “42.”

But what does it take to perform more complicated operations or customize responses and actions? For that you need a grammar. The grammar indicates the structure that should be matched and the action that should be taken using information extracted from the match.

A grammar gives you natural language control over your computer so that you can process language snippets to yield functions that perform commands. For example, telling your computer to “open a website” requires mapping snippets like “open” and “a website” to the Open command and the URL of a website.

Read More »

March 27, 2015 — Tim Shedelbower, Visualization Developer

Array of gauges

The first gauge I remember was a blue wrist watch I received from my parents as a child. Their hope was probably to correct my tardiness, but it proved valuable for more important tasks such as timing bicycle races. Today digital gauges help us analyze a variety of data on smart phones and laptops. Battery level, signal strength, network speed, and temperature are some of the common data elements constantly monitored.

Read More »