0% found this document useful (0 votes)
4 views1 page

Introduction 7

The document explains how to use Mathematica for evaluating mathematical expressions, including creating new cells and using the shift + enter key for evaluation. It introduces the percent symbol (%) for referencing previous outputs and discusses the implications of line numbers changing upon re-evaluation. The text emphasizes the importance of focusing on the overall problem-solving process while Mathematica handles the details.

Uploaded by

designer.mar.44
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Introduction 7

The document explains how to use Mathematica for evaluating mathematical expressions, including creating new cells and using the shift + enter key for evaluation. It introduces the percent symbol (%) for referencing previous outputs and discusses the implications of line numbers changing upon re-evaluation. The text emphasizes the importance of focusing on the overall problem-solving process while Mathematica handles the details.

Uploaded by

designer.mar.44
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Chapter00.

nb 7
Finally, if you simply start typing, Mathematica will automatically create a new cell for you. The kind
of cell depends on options set in the software and on the particular Notebook’s style, but for a brand
new Notebook with the default options, an input cell should be created if you start typing with the
cursor not in an existing cell.
Evaluating Expressions
To have Mathematica evaluate a mathematical expression, first make sure that the cursor is somewhere
in the input cell containing the expression you wish to evaluate. Then press shift together with the enter
or return key on the keyboard. Or press the enter key on the numeric keypad. Try this with the input
below.
In[1]:= 2+3
Out[1]= 5
Here are a few more expressions. Try entering them on your computer.
In[2]:= Sum@i^2, 8i, 1, 10<D
Out[2]= 385
In[3]:= Integrate@Hx - 1L^3, xD
1
Out[3]= H-1 + xL4
4
In[4]:= Expand@%D
1 3 x2 3
x4
Out[4]= -x+ -x +
4 2 4
The percent symbol, referred to in Mathematica as Out (%), is used to refer to the contents of the most
recent output cell. It does not always refer to the value immediately above it, as evaluation can be done
out of order.
The line numbers, which are automatically attached to the input and output cells, can be used to refer
to specific results by following the Out (%) with the line number. For example, to use the value from
output line 3, you would enter %3.
In[5]:= %3 + 1
1
Out[5]= 1+ H-1 + xL4
4
Note that Out (%) is useful when working interactively, but line numbers change every time you
evaluate cells. In particular, if you save a Notebook and quit Mathematica and then reopen the same
Notebook later, the line numbers may not refer to the same expressions, particularly if you do not
evaluate the same cells in the same order. Except in this chapter, we tend to avoid using Out (%) in this
manual, but you should keep it in mind for your own computations.

A First Encounter with Mathematica


As already indicated, working with Mathematica is like working with an expert mathematical assistant.
This requires a subtle change in the way you think about a problem. When working on an exercise by
hand, your attention is focused on the details and quite often you can lose sight of the “big picture.”
Mathematica takes care of the details for you and frees you to focus on deciding what needs to be done
next. This is not to say that the details are not important, nor does it imply that you should forgo learn-
ing how to solve the problems by hand.

You might also like