Monday, February 23, 2015

On Monte Carlo Simulations



I was recently quizzed on the application of Monte Carlo Uncertainty/Probabilistic techniques for Engineering applications of turbomachinery, and that deserves some thought here. While there are several practical applications of the MC technique for various facets of the Sciences, perhaps the one that has fascinated me the most is its use for the estimation of pi.

Pi needs no definition whatsoever. Several centuries ago, Archimedes had spent a lifetime working on the geometric properties of circles and had stumbled upon the elegant fact that all circles hold a constant ratio between its perimeter and diameter, irrespective of the size of the circle. Archimedes had used the concept of inscribing and superscribing circles of various sizes in polygons of increasing number of sides to arrive at an estimate for pi. His estimation was based on a limit at approximating the curved line as a series of straight lines. Legend has it that Archimedes was able to scribe a 180-sided polygon to arrive at the estimation that we use to date. (Legend also has it that he was so obsessed with is circles that when the Romans came to take him to the King, Archimedes enraged the soldier by telling him to not disturb his circles. The enraged soldier ended up killing Archimedes with his sword).

Monte Carlo techniques work on the premise of allocating randomized probabilities for occurrences of events, and then studying the behavior of the system with these perturbed inputs. An underlying assumption in implementing this technique is that the system under scrutiny can be represented as a mathematical model. Given such a model, randomized perturbations can be supplied as inputs, and the outputs can be obtained to understand the sensitivity and uncertainties of the system. 

To be cont'd

Monday, February 16, 2015

Taylor’s series expansion and the Finite Difference Method


Perhaps the easiest interpretation for a Finite Difference formulation of numerical integration comes from the Taylor’s series expansion. Given a continuous function f(x), the discretized locations on the curve of f(x) that are separated by a distance ‘h’ can be expanded as a Taylor’s series. If the  are  and  , the function at i+1 can be represented in terms of the value at i. Mathematically
 


Stated in simpler terms, the first order Taylor’s series expansion is a literal translation of the definition of the first derivative of a continuous function f(x). Having stated thusly, the expansion can be pursued on both the forward and backward directions. That is, the expansion at a location can also be defined. Such an expansion thus becomes




Rearranging the above two equations in an ODE format, one arrives at the Forward and Backward Finite Difference formulations. By eliminating from the above equations (by simply subtracting one from the other), the Central Difference formulation can be derived.

But what if the higher order terms are put to practical use with the Taylor’s expansion series? Inclusion of higher order terms results in

 
and
 
                 
By ignoring the triple-differential term and adding the above equations, a formulation can be derived for the 2nd derivative, which turns out to be


To state the obvious, a Finite Difference formulation for a 2nd order differential has been derived starting from the Taylor’s expansion series.