Getting Started with Mathematica - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

Getting Started with Mathematica

Description:

Getting Started with Mathematica. by. Hakan Kutucu. What is Mathematica ... Mathematica is a powerful desktop computer program capable of doing algebraic ... – PowerPoint PPT presentation

Number of Views:124
Avg rating:3.0/5.0
Slides: 33
Provided by: webIy
Category:

less

Transcript and Presenter's Notes

Title: Getting Started with Mathematica


1
Getting Started with Mathematica
by Hakan Kutucu
2
What is Mathematica
  • Mathematica is a computer program created by
    Wolfram Research Inc.(1988)
  • Mathematica is a powerful desktop computer
    program capable of doing algebraic calculations,
    numerical approximations, and computer graphics.
  • It is suitable for both numeric and symbolic
    work, and it has remarkable word-processing
    capabilities as well.

3
Some Graphical Examples
4
What is Mathematica
  • Mathematica has two parts the Kernel and the
    Front End.
  • The Kernel is the main part of the system, which
    accepts Mathematica commands, processes them and
    sends back results. This is called evaluating the
    command.
  • The Front End is the part of the system that
    handles such things as screen display, printing
    and the creation of Mathematica documents.

5
How does Mathematica work?
Mathematica documents are called Notebooks. A
Notebook is a bit like a word-processor document
you can type and edit commands, send them to the
Kernel for evaluation, display the results and
save your work.
6
How does Mathematica work?
  • You send commands to be evaluated by holding
    down the shift key and pressing the enter key
  • Another easy way to evaluate by pressing the
    enter key at the right hand side of keyboard.

7
Functionalities of Mathematica
  • Numerical Computation
  • Equation Solving
  • Symbolic calculation
  • Calculus
  • Graphics
  • Self-defined functions
  • List
  • Pattern Matching
  • Animation

8
Mathematica Syntax
  • Mathematica commands start with a CAPITAL
    letter, e.g. Sinx. If the command is really
    severalwords in English joined together then each
    one starts with a capital but WithNoSpacesInBetwee
    n.
  • Case Sensitive the word Fun is different from
    the word fun which is different from the word
    fuN.

9
Mathematica Syntax
  • Mathematica uses a lot of brackets and all the
    different sorts of them, ( ).
  • Arguments of functions are given in square
    brackets .
  • Curly brackets, called braces, are used to
    make a list, usually to allow several objects to
    be treated as one.
  • Expression are cascaded by () pairs.

10
SPECIAL CONSTANTS
Mathematica protects these names they cannot be
used as names for other quantities.
11
Arithmetic Operations
12
Arithmetic Operations
Order of operation is important . BEDMAS
13
N (Numerical)
  • (a) Nexpr displays 6 digits by default
  • (b) Nexpr, n displays 6 digits when nlt16
  • (c) Nexpr, n does not display more digits than
    n originally has.

14
Some Mathematical Functions
15
Graphics
Mathematica incorporates a wide range of two-and
three-dimensional graphics functions. The
simplest is Plot, which generates two-dimensional
Cartesian graphs
Plotf, x, xmin, xmax generates a plot of f
as a function of x from xmin to xmax. Plotf1,
f2, , x, xmin, xmax plots several
functions fi.
16
Graphics (Example)
17
Graphics(Options)
18
Graphics(Options)
For Other Options the command is OptionsPlot
19
3 Dimensional Plotting
Plot3D f, x,xmin,xmax, y,ymin,ymax will
draw the graph of z f(x,y) over the rectangle
xmin,xmaxymin,ymax in the xy-plane.
20
3 Dimensional Plotting(Options)
21
Three Dimensional Plotting(Options)
22
Defining Functions
  • A function may return a symbol, a real number, a
    complex matrix, another function....
  • Any mathematical object is an acceptable value
    for a function.
  • A function may be written using mathematical
    notation, it may be created using programming
    constructs (like for, if/then, etc.), or it could
    even be written in another language entirely
    (Fortran, C, etc.).

23
Function Variable Names
  • Mathematica variable names can be long, but they
    must not begin with a number,
  • Because Mathematica interprets, say, 2dimension
    as 2 dimension.
  • Names can end with a number, though x1 is a
    useful way of writing in Mathematica a
    subscripted variable like x1.
  • Note also that combinations of letters without
    spaces are interpreted as new variables ax does
    not mean ax.

24
Defining Functions
A function can be defined by using the following
form fx_ an expression involving x (no
underbar) Example fx_x23x f4 fa1 ?f
(This shows the definition you made for f. )
25
Equation solving
  • Use Solve to solve an equation with an exact
    solution, including a symbolic solution.
  • Use NSolve or FindRoot to obtain a numerical
    approximation to the solution.
  • To use solutions need to use expr/ .x y.

26
Matrix Defining
  • Entering a matrix
  • a1,2,3,4,5,6,7,8,9
  • Displays nicely only if told to

27
Menus exist but are harder to use than typing
28
Matrix Operations
29
Matrix Operations (Multiplication)
Matrix multiplication (also called dot or inner
product) is carried out in Mathematica with the
function Dot, typically entered with a dot
short-hand syntax.
30
Matrix Operations (Transpose)
31
Matrix Operations (Inverse)
32
Matrix Operations Exercises
  • By using Solve Commabd
  • By using The equation Axb
Write a Comment
User Comments (0)
About PowerShow.com