You are on page 1of 15

SUBMITTED TO:

SIR IRFAN SAHYB


ASSIGNMENT: SBMITTED BY:
COMPUTATIONAL PHYSICS
HASNAIN MOAAVIA

ROLL NO:320

ASSIGNMENT TOPIC:

MATHAMATICA
MATHAMATICA
 DEFINATION
Mathematica is a symbolic mathematical computation program, sometimes
called a computer algebra program, used in many scientific, engineering,
mathematical, and computing fields.

 HISTORY
It was conceived by Stephen Wolfram and is developed by Wolfram Research
of Champaign, Illinois.

• Mathematica is based on the breakthrough Wolfram Language.


Wolfram Language or Mathamatica :
• The Wolfram Language was a part of the initial version of Mathematica
in 1988
• The Wolfram language was previously known as Mathematica,
which is the main platform for the Wolfram language, besides the
Wolfram Cloud and Wolfram Script, Wolfram is widely used in
academia, especially in physics and financial analytics.
• The language can perform integration, differentiation, matrix
manipulations, and solve differential equations using a set of rules.
• Also in 1988 was the notebook model and the ability to embed sound
and images, according to Theodore Gray patent.
• The Wolfram Language is the programming language used in
Mathematica.
Getting Started
(1) Launching Mathematica
• The first task you will face is opening your copy of Mathematica or Wolfram|
One™. If you are using a desktop version of Mathematica, you are looking for
an icon that looks something like this:

• Just click it to launch. A window titled “Welcome to Wolfram Mathematica”


will appear. In the top left corner there is a “New Document” button. Click it
and an empty document window will appear. This is your Mathematica
notebook, where you will carry out your work.
(2) The Basic Technique for Using Mathematica
• A Mathematica notebook is an interactive environment. You type a command (such
as 2 + 2) and instruct Mathematica to execute it. Mathematica responds with the
answer on the next line. You then type another command, and so on. Each
command you type will appear on the screen in a boldface font. Mathematica’s
output will appear in a plain font.
(3 )The First Computation
Notice the gray bar that appeared just below the output.
For your first computation type
This is the “Suggestions Bar.” Mathematica is trying to be 2+2
helpful by providing a few suggestions related to your input then hit the shift & Enter combination
that you may want to explore. Feel free to follow its In[1]= 2 + 2
suggestions to create and evaluate new inputs, or feel free
Out[1]= 4
to ignore them. A new Suggestions Bar will appear every
time you enter a command.
(4) Commands for Basic Arithmetic
FOR EXAMPLE
Mathematica works much like a calculator for
basic arithmetic. Just use the +, –, *, and / keys INPUT(1)=17-1
OUTPUT(1)=16
on the keyboard for addition, subtraction,
multiplication, and division.
(5) Input and Output
You’ve surely noticed that Mathematica is
FOR EXAMPLE
keeping close tabs on your work. Each time you
enter an expression, Mathematica gives it a name INPUT(1) =(4)3
such as In[1]:=, In[2]:=, In[3]:=. The OUTPUT(1) =64
corresponding output comes with the labels
Out[1]=, Out[2]=, Out[3]=.
(6) The Basic Math Assistant Palette
There may already be a narrow, light-gray window
full of mathematical symbols along the side of your
screen. If so, you are looking at one of
Mathematica’s palettes, and chances are that it is
the Basic Math Assistant palette. If you see no such
window, go to the Palettes dropdown menu at the
top of your screen and select Basic Math Assistant
to open it.
is currently available only on desktop versions of
Mathematica. If you are using Mathematica Online,
look in the menu for Insert ⊳Special Characters.
Working with Mathematica
(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 into Mathematica. FOR EXAMPLE

INPUT(1)=log(1)
You provide an input, or argument, and Mathematica OUTPUT(1)=0

produces the output .


Follow these rules when defining a function:
(I) The name of the function (such as f or inv) should be a
lowercase letter, or a word that begins with a lowercase
letter
(II) The function argument (in these examples x) must be
followed by an underscore_ on the left side of the
definition.
(III) Use square brackets[ ] to enclose the function
argument.
(IV) Use the colon-equal combination := to separate the
(2) Plotting a Function :
• Plot command takes two
arguments, separated (as
always) by a comma. The first
(in this case f[x]) is the
function to be graphed, and the
second (in this case {x, -1, 3})
is called an iterator.
(3) Investigating Functions with Manipulate :
The Manipulate command is used to manipulate an expression in real time using the
mouse or trackpad. On the Basic Math Assistant palette, the Manipulate button can be
found in the 2D Plot Commands tab in the section titled Interactive Tools just below
the rainbow of Color Names. But as always, one may type directly from the keyboard
instead. One of the most basic uses of Manipulate is to evaluate a function defined
over interval, say 1 ≤ x ≤ 10. In such a case, the syntax is identical to that of the
Plocommand:
(4) Producing a Table of Values :
It is often handy to produce a table of function FOR EXAMPLE
values for various inputs. The Table command can
be found on the Basic Math Assistant palette in the INPUT(1)=Table[x2, {x, 1, 10}]
Basic Commands section by clicking on the List
button. Alternately, it’s a simple matter to enter the OUTPUT(1)={1, 4, 9, 16, 25, 36, 49, 64, 81, 100}
input below directly from the keyboard. Here is a
table of the squares of the first ten positive whole
numbers:
(5)Working with Piecewise Defined Functions :
FOR EXAMPLE
Certain functions are defined differently over
various disjoint pieces of their domain, so-called
x0≤x≤1
piecewise defined functions. For instance, a F(X)= -x -1 < x <
function may be defined by the rule f(x) = x when x 0
is between 0 and 1, inclusive; by the rule f(x) = -x 1 otherwise
when x is strictly between -1 and 0; and by f(x) = 1
for all other values of x. In standard mathematical
notation we write:
(6) 3D Printing :
Mathematica is not a CAD program, nor was it
designed with 3D printing in mind. But its intrinsic
capabilities make it well suited to creating a wide
variety of 3D-printable objects, especially those of a
mathematical nature and those accessible in the
Wolfram Knowledgebase. In this chapter we will
provide an introduction to the commands that are most
useful for this purpose, and give you a sense of how
they can be used together to produce a quality print.
We provide numerous examples with the goal of
allowing you to pursue your own projects.
In[1]:= paraboloid = Plot3D[x2 + y2, {x, y} ∈ Disk],
PlotTheme → "ThickSurface", BoxRatios →
Automatic]
Multivariable Calculus
(1) Vectors :
In Mathematica, a vector in the plane is expressed as a list of length two,
such as {2, 5}. Vector addition and scalar multiplication work exactly as
you would expect: In[1]:= {2, 5} + {17, -4}
Out[1]= {19, 1}
(2) Real-Valued Functions of Two or More Variables
One may define a real-valued function with two (or more) variables
exactly as we did in Section 3.1,but with an additional variable, like this:
In[1]:= f[x_, y_] := Sin(x2 - y2)
TOOLS
(1) Opening Saved Notebooks
You can open any Mathematica notebook stored on your computer or in
the cloud by double- clicking its icon. It will appear on your screen
exactly as it was when it was saved.You can open several notebooks at the
same time if you wish.
(2) Printing
As long as your computer is connected to a printer (and the printer has
ink and paper and is turned on!) you can print your current notebook by
going to the File menu and choosing Print. If your notebook contains
graphics or two dimensional input using special math fonts, it may take
a moment to start printing, so be patient.
(3) Creating Presentations
To get started, select File⊳New⊳Presenter Notebook... in the menus. A window will
appear where you can choose theme and a colour scheme for your presentation.
Check the box “Prefill slides with sample content” and then click the Create button to
open your Presenter Notebook, which will have several sample pages for you to
peruse. Use these as templates, editing the content rather than creating new cells from
scratch.
(4) Mathematica’s Kernel
When you enter a command in Mathematica, it is processed by an essentially separate
computational engine, called the kernel. In the early days, the kernel was a
completely separate program and this client–server relationship was explicit: You
typed and entered a command in a notebook window,32 Working with Mathematica
and once entered your input was whisked away to the kernel, where it was processed,
and the output was then returned to your notebook for display .
THANK YOU!

You might also like