There are a few more things to get out of the way before we can really start exploring Mathematica's powerful features. The first is the naming convention. Mathematica's built-in functions always start with an uppercase letter, with each word flowing into the next and each word capitalized. Thus to find the integer part of Pi, you would use the function named IntegerPart. Asking Mathematica for the IntegerPart[Pi] will give us the expected result of 3. You may have noticed that every function we've used so far has been in the form FunctionName[function parameter, function parameter,...]. This is no accident. It is part of the Unifying Idea of Mathematica. Every object in Mathematica, no matter how elementary or complex, is built from functions in the form FunctionName[function parameter, function parameter,...]. You can see some examples of this in action on Wolfram's website.

Obviously some of the complex or abstract forms and ideas need to be represented as functions--we don't have a mathematical symbol for the integer part of an expression. But what about something simple like addition? How is 1+1 represented as a function with parameters? To answer this question, let us consider a+b, the general form of addition. Mathematica will display a+b and will happily work with anything entered in that format. But if you ask Mathematica how it sees a+b, via the function FullForm, you will find that Mathematica really sees a+b as Plus[a,b]. For another example, consider a+b^2. Asking Mathematica for FullForm[a+b^2] gives us:

Thus is really a added to b raised to the second power, or Plus[a,Power[b,2]].

 

Tutorial Home

Table of Contents

About this Site
Previous: Getting to know your notebook Next: How Exact is Exact?