From Introduction to Programming with Mathematica, Third Edition
Mathematica is a very large and seemingly complex system. It contains hundreds of functions for performing various tasks in science, mathematics, and engineering, including computing, programming, data analysis, knowledge representation, and visualization of information. In this introductory chapter, we introduce the elementary operations in Mathematica and give a sense of its computational and programming breadth and depth. In addition, we give some basic information that users of Mathematica need to know, such as how to start Mathematica, how to get out of it, how to enter simple inputs and get answers, and finally how to use Mathematica's documentation to get answers to questions about the system.
1.1 A brief overview of Mathematica
Numerical computations
Mathematica has been aptly described as a sophisticated calculator. With it you can enter mathematical expressions and compute their values.

You can store values in memory.
<i class="emphasis">In[2]:=</i> <b class="bold">rent = 350</b> <i class="emphasis">Out[2]=</i> 350 <i class="emphasis">In[3]:=</i> <b class="bold">food =175</b> <i class="emphasis">Out[3]=</i> 175 <i class="emphasis">In[4]:=</i> <b class="bold">heat = 83</b> <i class="emphasis">Out[4]=</i> 83<a name="26"></a><a name="page2"></a> <i class="emphasis">In[5]:=</i> <b class="bold">rent + food + heat</b> <i class="emphasis">Out[5]=</i> 608
Yet Mathematica differs from calculators and simple computer programs in its ability to calculate exact results and to compute to an arbitrary degree of precision.
<span class="inlinequation"><span class="inlinemediaobject"><img alt="Image from book"> border="0"> height="74"> id="IMG_2"> src="http://images.books24x7.com/bookimages/id_10817/figu2_1.jpg"> title=""> width="161"></span></span> ...
Products & Services
Topics of Interest
Expressions are the basic building blocks from which everything is built. Their structure, internal representation, and how they are evaluated are essential to understanding Mathematica. In this...
4.2 Functions for manipulating expressions Three of the most powerful and commonly used functions by experienced Mathematica programmers are Map, Apply, and Thread. They provide very sophisticated...
3.1 Defining a Function A function is a rule that assigns to each input exactly one output. Many functions, such as the natural logarithm function Log, are built in to Mathematica. You provide an...
7.5 Exercises Exercise 7.1 We call strong prime an odd prime n such that is prime as well. Prove that we can (heuristically) generate -bit strong primes within a time complexity of...
Programming in Mathematica is essentially a matter of writing user-defined functions that work like mathematical functions; when applied to specific values, they perform computations producing...