You are on page 1of 9

Mathematica

34/9Sin[6]
In[1]:=

49+79
11

Out[1]=

3.1415
N[]
In[2]:=
Out[2]=
In[3]:=

N@4 9D
0.444444
FullForm@%D

Out[3]//FullForm=

0.4444444444444444`

N[]
In[4]:=
Out[4]=

N@4 9, 50D
0.44444444444444444444444444444444444444444444444444

(Evaluation)
Enter+Return]

Sin[x], Abcd, Pi

a=. Clear[a]
Remove[a]

In[5]:=
Out[5]=
In[6]:=

list = 8a, b, c, d, e<


8a, b, c, d, e<
list = 8a, b, c, d, e<;

manual01b.nb

E, Pi, EulerGamma,
C
In[7]:=

?E
E is the exponential constant Hbase of natural logarithmsL, with numerical value > 2.71828.

In[8]:=

? Pi
Pi is p, with numerical value > 3.14159.

In[9]:=

? EulerGamma
EulerGamma is Eulers constant g, with numerical value > 0.577216.

In[10]:=

?C
C@iD is the default form for the ith parameter or constant
generated in representing the results of various symbolic computations.

In[11]:=
Out[11]=

a=2
2

:
:=
In[12]:=

b := 2

+,-,*,/
*

Sin[x]Cos[x]
7x

Mathematica[]
Sin[x],Do[.....], ..., etc

In[13]:=

func1@x_D := Sin@2 * xD

_
In[14]:=

func2@x_, y_D := Sin@2 * xD Cos@yD

__

manual01b.nb

In[15]:=

func2@x__D := x Length@xD

In[16]:=
Out[16]=

a = 881, 2<, 83, 4<, 85, 6<<


881, 2<, 83, 4<, 85, 6<<

In[17]:=
Out[17]=
In[18]:=

Length@aD
3
? Dimensions
Dimensions@exprD gives a list of the dimensions of expr.
Dimensions@expr, nD gives a list of the dimensions of expr down to level n.

(2)
In[19]:=
Out[19]=

Dimensions@aD
83, 2<

[[]]
In[20]:=

a@@1DD

Out[20]=

81, 2<

In[21]:=
Out[21]=

a@@3, 2DD
6

Table
In[22]:=
Out[22]=

Table@Sin@jD, 8j, 3<D


8Sin@1D, Sin@2D, Sin@3D<

In[23]:=
Out[23]=

Table@j * Sin@kD, 8j, 2, 4<, 8k, 2<D


882 Sin@1D, 2 Sin@2D<, 83 Sin@1D, 3 Sin@2D<, 84 Sin@1D, 4 Sin@2D<<

.
In[24]:=
Out[24]=
In[25]:=
Out[25]=
In[26]:=
Out[26]=
In[27]:=

Out[27]=

a = 88a0, b0<, 8c0, d0<<


88a0, b0<, 8c0, d0<<
v = 8v1, v2<
8v1, v2<
a.v
8a0 v1 + b0 v2, c0 v1 + d0 v2<
v.v
v12 + v22

Mathematica

manual01b.nb

In[28]:=
Out[28]=

v.a
8a0 v1 + c0 v2, b0 v1 + d0 v2<

In[29]:=

x = 15
1

Out[29]=

In[30]:=

5
Do@x = x ^ 2; Print@Sin@xDD, 8i, 5<D
SinB
SinB
SinB
SinB
SinB

1
25

1
625

1
390 625

1
152 587 890 625

1
23 283 064 365 386 962 890 625

;{...},

In[31]:=

Plot@Sin@4 xD, 8x, - Pi 2, Pi 2<D


1.0

0.5

Out[31]=

-1.5

-1.0

-0.5

0.5

-0.5

-1.0

1.0

1.5

manual01b.nb

In[32]:=

Plot3D@Sin@Pi xD Sin@Pi yD, 8x, - 1, 1<, 8y, - 1, 1<D

Out[32]=

In[33]:=

g1 = Plot@Sin@xD, 8x, 0, Pi<D


1.0

0.8

0.6
Out[33]=

0.4

0.2

0.5
In[34]:=

1.0

1.5

2.0

2.5

3.0

g2 = Plot@1 + Cos@xD, 8x, Pi, 2 Pi<D


2.0

1.5

Out[34]=

1.0

0.5

4.0

4.5

5.0

5.5

6.0

manual01b.nb

In[35]:=

Show@g1, g2, PlotRange AllD


2.0

1.5

Out[35]= 1.0

0.5

1
In[36]:=

Out[36]=

a = Table@Sin@Pi j 10D, 8j, 0, 10<D

:0,

1,
In[37]:=

1
4

J- 1 +

5
8

5 N,

5
8

1
4

5
8

J1 +

5
8

J1 +

5 N,

5 N,

1
4

5
8

J- 1 +

ListPlot@aD
1.0

0.8

0.6
Out[37]=

0.4

0.2

"PlotJoined->True"

10

5
8

5 N, 0>

manual01b.nb

In[38]:=

ListPlot@a, PlotJoined -> TrueD


1.0

0.8

0.6
Out[38]=

0.4

0.2

10

In[39]:=

Out[39]=

a = Table@8Cos@2 Pi j 10D, Sin@2 Pi j 10D<, 8j, 0, 10<D

:81, 0<, :

:
In[40]:=

1
4
1
4
1
4

J1 -

J1 +

5 N,

J- 1 -

5 N, -

J- 1 +

5 N, -

5 N,

5
8

5
8
5
8

8
5
8

>, :

5
8
5
8

>, :

1
4

1
4

J- 1 -

>, :

>, :

1
4
1
4

J- 1 +

5 N,

J1 -

5 N, -

J1 +

5 N, -

5 N,

5
8

5
8
5
8

8
5
8

5
8
5
8

ListPlot@aD

-1.0

-0.5

0.5

-0.5

"PlotJoined->True"

5
8

>,

>, 8- 1, 0<,

0.5

Out[40]=

1.0

>,

>, 81, 0<>

manual01b.nb

In[41]:=

ListPlot@a, PlotJoined -> TrueD

0.5

Out[41]=

-1.0

-0.5

0.5

-0.5

In[42]:=
Out[42]=
In[43]:=

Sum@Sin@nD, 8n, 5<D


Sin@1D + Sin@2D + Sin@3D + Sin@4D + Sin@5D
Sum@1 n ^ 2, 8n, Infinity<D
p2

Out[43]=

In[44]:=
Out[44]=
In[45]:=
Out[45]=

a = Table@i, 8i, 10<D


81, 2, 3, 4, 5, 6, 7, 8, 9, 10<
Plus a
55

In[46]:=

Clear@a, b, c, d, eD

In[47]:=
Out[47]=

list = 8a, b, c, d, e<


8a, b, c, d, e<

In[48]:=
Out[48]=

Table@RotateLeft@list, iD, 8i, 0, 5<D


88a, b, c, d, e<, 8b, c, d, e, a<, 8c, d, e, a, b<,
8d, e, a, b, c<, 8e, a, b, c, d<, 8a, b, c, d, e<<

In[49]:=
Out[49]=

Table@RotateRight@list, iD, 8i, 0, 5<D


88a, b, c, d, e<, 8e, a, b, c, d<, 8d, e, a, b, c<,
8c, d, e, a, b<, 8b, c, d, e, a<, 8a, b, c, d, e<<

1.0

manual01b.nb

In[50]:=

Out[50]=

a = Table@8Pi Hi - 1L 10, Sin@Pi Hi - 1L 10D<, 8i, 11<D

:80, 0<, :

:
In[51]:=
Out[51]=

3p
10
7p
10

4
1

p
10

p
5 N>, : ,
5

J- 1 +

J1 +

5 N>, :

J1 +

5 N>, :

2p
5
4p
5

8
5

8
5
8
5
8

5
8

>,

p
3p
>, : , 1>, :
,
2
5

>, :

9p
10

1
4

J- 1 +

5
8

5
8

>,

5 N>, 8p, 0<>

Length@aD
11

(1)index
In[52]:=

Out[52]=

Table@a@@iDD, 8i, 2, 11, 2<D


::

p
10

1
4

J- 1 +

5 N>, :

3p
10

1
4

J1 +

p
7p 1
5 N>, : , 1>, :
,
J1 +
2
10 4

5 N>, :

9p
10

1
4

J- 1 +

5 N>>

J- 1 +

5 N>>

(2)
Mathematica

In[53]:=
Out[53]=

n = Table@i, 8i, 2, 11, 2<D


82, 4, 6, 8, 10<

n
In[54]:=

Out[54]=

Map@a@@DD &, nD
::

p
10

1
4

2013, chibaf

J- 1 +

5 N>, :

3p
10

1
4

J1 +

p
7p 1
5 N>, : , 1>, :
,
J1 +
2
10 4

5 N>, :

9p
10

1
4

You might also like