Homework # 1:  Syntax in Mathematica

Below are some simple exercises that will be of great help to you throughout this class.  If you have trouble answering any of these questions, look in the Documentation Center or go back and take another look at Module 1.

You may use the Documentation Center to assist you with these problems, but you should not copy your answers verbatim from the Documentation Center.  After you understand the solution in the Documentation Center, you should present the solution in your own words.  Try to avoid jargon and special notation;  use standard English and classical Mathematical notation.  Also you should not copy examples from the Documentation Center;  rather you should provide your own examples to ensure that you understand the concepts.

Please format your solutions appropriately.  Use text format, not input format, when you are typing text.  Write coherent sentences and paragraphs;  part of your grade will depend on how clearly you present your ideas.

You must work on these exercises by yourself, not in pairs;  if you get stuck and cannot find the solution in the Documentation Center, you may consult the labbie or the instructor during their office hours.

Equal Signs

In Module 1 you encountered two types of equal signs:
a.  =
b.  == 
Explain how each of these equals signs is used, and how they differ semantically from each other.  Give several explicit examples to illustrate your explanations.

Parentheses and Brackets

1.  There are four different types of parentheses or brackets in Mathematica:
a.  Round parentheses -- ( )
b.  Square brackets -- [ ]
c.  Curly brackets -- { }
d.  Double brackets -- [[  ]]
Explain how each of these parentheses or brackets is used in Mathematica, and how they differ semantically from each other.  Give several explicit examples to illustrate your explanations .

2.  What does Mathematica return when you type each of the following expressions in input form:
a. (2)
b.  [2]
c.  {2}
d. [[ 2]]
In each case explain the reason for the result that Mathematica returns.

Juxtaposition

Suppose that you have defined a=10 and b=2.  What does Mathematica return when you type each of the following expressions in input form:
a. ab
b.(a)(b)
c.  a*b
d. a b
In each case explain the reason for the result that Mathematica returns.

Numerical Computation

Explain the use of the function N in Mathematica.  Give some examples to show how the function N works in practice.