# Volume 10, Issue 4

## The Return of the Riemann Surface » NB   CDF   PDF

### T R O T T ' S C O R N E R

Published November 14, 2008

My favorite subject—Riemann surfaces—is revisited through the eyes (functions) of Mathematica 6. Old friends will appear in a new light(ing) and new acquaintances with untreated surfaces will be made. Read More »

## Classic Puzzles in Wolfram Demonstrations » NB   CDF   PDF

### B E Y O N D S U D O K U

Published November 14, 2008

Sudoku, today’s most well-known grid-solving puzzle, was originally invented by Howard Garns in 1978. Almost 30 years later, its popularity suddenly exploded. This column presents logic puzzles of various sorts and challenges readers to solve the puzzles in two ways: by hand and with Mathematica. Solvers are invited to send their code to edp@wolfram.com. Read More »

## Dynamic Integration of Interpolating Functions and Some Concrete Optimal Stopping Problems » NB   CDF   PDF

Published November 14, 2008

This article describes a streamlined method for simultaneous integration of an entire family of interpolating functions that uses one and the same interpolation grid in one or more dimensions. A method for creating customized quadrature/cubature rules that takes advantage of certain special features of Mathematica‘s InterpolatingFunction objects is presented. The use of such rules leads to a new and more efficient implementation of the method for optimal stopping of stochastic systems that was developed in [1]. In particular, this new implementation allows one to extend the scope of the method to free boundary optimal stopping problems in higher dimensions. Concrete applications to finance—mainly to American-style financial derivatives—are presented. In particular, the price of an American put option that can be exercised with any one of two uncorrelated underlying assets is calculated as a function of the observed prices. This method is similar in nature to the well-known Longstaff-Schwartz algorithm, but does not involve Monte-Carlo simulation of any kind. Read More »

## Making Holes and Windows in Surfaces » NB   CDF   PDF

Published November 14, 2008

In this article, we demonstrate , a program which removes points from any or picture whose coordinates satisfy a stated condition. We also demonstrate and , programs which make an entire or a specific portion of an opaque surface into a transparent mesh. We use these programs to view the region of integration for a triple integral. This article uses Mathematica 5.2, but with minor modifications all three programs work in Mathematica 6, as well as earlier versions. The program duplicates some of the functionality of the command and option of the command in Version 6, while the program behaves like the option of the command (see Editor’s Note for a demonstration of the Mathematica 6 code). Read More »

## Graphing on the Riemann Sphere » NB   CDF   PDF

Published November 14, 2008

We give a procedure to plot parametric curves on the sphere whose advantages over classical graphs in the Cartesian plane are obvious whenever the graph involves infinite domains or infinite branches. Read More »

## Airfoil Aerodynamics Using Panel Methods » NB   CDF   PDF

Published November 14, 2008

Potential flow over an airfoil plays an important historical role in the theory of flight. The governing equation for potential flow is Laplace’s equation, a widely studied linear partial differential equation. One of Green’s identities can be used to write a solution to Laplace’s equation as a boundary integral. Numerical models based on this approach are known as panel methods in the aerodynamics community. This article introduces the availability of a collection of computational tools for constructing numerical models for potential flow over an airfoil based on panel methods. Use of the software is illustrated by implementing a specific model using vortex panels of linearly varying strength to compute the flow over a member of the NACA four-digit family of airfoils. Read More »

## MathCode: A System for C++ or Fortran Code Generation from Mathematica » NB   CDF   PDF

Published November 14, 2008

MathCode is a package that translates a subset of Mathematica into a compiled language like Fortran or C++. The chief goal of the design of MathCode is to add extra performance and portability to the symbolic prototyping capabilities offered by Mathematica. This article discusses several important features of MathCode, such as adding type declarations, examples of functions that can be translated, ways to extend the compilable subset, and generating a stand-alone executable, and presents a few application examples. Read More »