Sei sulla pagina 1di 73

Prima Lezione 08/04/2016

Plot[ArcSin[Sin[x]], {x, - 10, 10}]

1.5

1.0

0.5

-10 -5 5 10

-0.5

-1.0

-1.5

Plot[ArcSin[Sin[x]], {x, - 10, 10}, AspectRatio Automatic]


1.5
1.0
0.5
-10 -5 -0.5 5 10
-1.0
-1.5

100 !
93 326 215 443 944 152 681 699 238 856 266 700 490 715 968 264 381 621 468 592 963 895 217 599
993 229 915 608 941 463 976 156 518 286 253 697 920 827 223 758 251 185 210 916 864 000 000 000
000 000 000 000 000

N[%, 20]
9.33262 10157

N[Sqrt[2], 500]
1.4142135623730950488016887242096980785696718753769480731766797379907324784621070
38850387534327641572735013846230912297024924836055850737212644121497099935831413
22266592750559275579995050115278206057147010955997160597027453459686201472851741
86408891986095523292304843087143214508397626036279952514079896872533965463318088
29640620615258352395054745750287759961729835575220337531857011354374603408498847
16038689997069900481503054402779031645424782306849293691862158057846311159666871
30130156185689872372

Printed by Wolfram Mathematica Student Edition


2 Untitled-1.nb

a=%
1.4142135623730950488016887242096980785696718753769480731766797379907324784621070
38850387534327641572735013846230912297024924836055850737212644121497099935831413
22266592750559275579995050115278206057147010955997160597027453459686201472851741
86408891986095523292304843087143214508397626036279952514079896872533965463318088
29640620615258352395054745750287759961729835575220337531857011354374603408498847
16038689997069900481503054402779031645424782306849293691862158057846311159666871
30130156185689872372

a =.

a=3
b=4
a^2 + b^2

25

c = 1 + x ^ 10
(1 + x)10

Expand[%]
1 + 10 x + 45 x2 + 120 x3 + 210 x4 + 252 x5 + 210 x6 + 120 x7 + 45 x8 + 10 x9 + x10

b=a
3

c := a

{a, b, c}
{7, 3, 7}

a=7

7.
7.

fib[2] = 1
1

fib[n_] := fib[n - 1] + fib[n - 2]

fib[5]
5

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 3

Table[fib[n], {n, 1, 10}]

{1, 1, 2, 3, 5, 8, 13, 21, 34, 55}

Seconda Lezione 02/05/2016


Solve[a x ^ 2 + b x + c 0, x]
-b - b2 - 4 a c -b + b2 - 4 a c
x , x
2a 2a

Solve[ x ^ 2 + 2 x + 10 0, x]
{{x - 1 - 3 }, {x - 1 + 3 }}

Solve[x ^ 5 + 2 x + 10 0, x]
x Root10 + 2 #1 + #15 &, 1,
x Root10 + 2 #1 + #15 &, 2, x Root10 + 2 #1 + #15 &, 3,
x Root10 + 2 #1 + #15 &, 4, x Root10 + 2 #1 + #15 &, 5

Printed by Wolfram Mathematica Student Edition


4 Untitled-1.nb

Solve[x ^ 4 + 2 x + 10 0, x]
1/3
1 2 9 + 47 919 20 22/3
x + -
2 32/3 3 9 + 47 919
1/3

1/3
1 2 9 + 47 919 20 22/3
- - -
2 32/3 3 9 + 47 919
1/3

1 1/3 1/3
4 2 9 + 47 919 + 20 22/3 3 9 + 47 919 ,
32/3

1/3
1 2 9 + 47 919 20 22/3
x + +
2 32/3 3 9 + 47 919
1/3

1/3
1 2 9 + 47 919 20 22/3
- - -
2 32/3 3 9 + 47 919
1/3

1 1/3 1/3
4 2 9 + 47 919 + 20 22/3 3 9 + 47 919 ,
32/3

1/3
1 2 9 + 47 919 20 22/3
x - + -
2 32/3 3 9 + 47 919
1/3

1/3
1 2 9 + 47 919 20 22/3
- - +
2 32/3 3 9 + 47 919
1/3

1 1/3 1/3
4 2 9 + 47 919 + 20 22/3 3 9 + 47 919 ,
32/3

1/3
1 2 9 + 47 919 20 22/3
x - + +
2 32/3 3 9 + 47 919
1/3

1/3
1 2 9 + 47 919 20 22/3
- - +
2 32/3 3 9 + 47 919
1/3

1 1/3 1/3
4 2 9 + 47 919 + 20 22/3 3 9 + 47 919
32/3

N[%]
{{x 1.26234 - 1.41053 }, {x 1.26234 + 1.41053 },
{x - 1.26234 - 1.09426 }, {x - 1.26234 + 1.09426 }}

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 5

Solve[x ^ 3 + 2 x + 10 0, x]
1/3
- 45 + 2049 2
x - ,
32/3 3 - 45 + 2049
1/3

1/3
1 + 3 - 45 + 2049 1- 3
x - + ,
2 32/3 3 - 45 + 2049
1/3

1/3
1 - 3 - 45 + 2049 1+ 3
x - +
2 32/3 3 - 45 + 2049
1/3

N[%]
{{x - 1.84742}, {x 0.92371 - 2.13535 }, {x 0.92371 + 2.13535 }}

lungh[_, a_, b_] := Integrate[Norm[D[, t]], {t, a, b}]

= {t, t ^ 2}
t, t2

lungh[, 0, 3]
1
6 37 + ArcSinh[6]
4

N[%]
9.74709

= {Cos[t], Sin[t], t / 4}
t
Cos[t], Sin[t],
4

lungh[, 0, 2 ]
17
2

ParametricPlot3D[, {t, 0, 2 }]

Printed by Wolfram Mathematica Student Edition


6 Untitled-1.nb

= {t, t ^ 2}
t, t2

ParametricPlot[, {t, 0, 3}]

0.5 1.0 1.5 2.0 2.5 3.0

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 7

Plot[x ^ 2, {x, 0, 3}]

0.5 1.0 1.5 2.0 2.5 3.0

Plot[x ^ 2, {x, 0, 3}, AspectRatio Automatic]

0.5 1.0 1.5 2.0 2.5 3.0

x + 1 x + 2 x + 3 (x + 4)
(1 + x) (2 + x) (4 + x)
3+x

x + 1 x + 2 x + 3 (x + 4)
(1 + x) (2 + x)
(3 + x) (4 + x)

Printed by Wolfram Mathematica Student Edition


8 Untitled-1.nb

Expand[%]
2 3x x2
+ +
(3 + x) (4 + x) (3 + x) (4 + x) (3 + x) (4 + x)

x + 1 x + 2 x + 3 (x + 4)
(1 + x) (2 + x)
(3 + x) (4 + x)

Expand[%]
2 3x x2
+ +
(3 + x) (4 + x) (3 + x) (4 + x) (3 + x) (4 + x)

Together[%]
2 + 3 x + x2
(3 + x) (4 + x)

Denominator[%]
1

x + 1 x + 2 x + 3 (x + 4)
(1 + x) (2 + x)
(3 + x) (4 + x)

Expand[%]
2 3x x2
+ +
(3 + x) (4 + x) (3 + x) (4 + x) (3 + x) (4 + x)

Together[%]
2 + 3 x + x2
(3 + x) (4 + x)

Denominator[%]
(3 + x) (4 + x)

Expand[%]
12 + 7 x + x2

Expand
Expand

ExpandAll[%]
Expand

x + 1 x + 2 x + 3 (x + 4)
(1 + x) (2 + x)
(3 + x) (4 + x)

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 9

ExpandAll[%]
2 3x x2
+ +
12 + 7 x + x2 12 + 7 x + x2 12 + 7 x + x2

Apart[%]
2 6
1+ -
3+x 4+x

b = {1, 2, 3}
{1, 2, 3}

Plot[{Sin[x], Sin[2 x], Sin[3 x]}, {x, 0 , 2 }, AspectRatio Automatic]


1.0

0.5

1 2 3 4 5 6

-0.5

-1.0

M = {{5, 1, - 2}, {2, 4, - 3}, {1, 2, 6}}


{{5, 1, - 2}, {2, 4, - 3}, {1, 2, 6}}

MatrixForm[%]
5 1 -2
2 4 -3
1 2 6

Printed by Wolfram Mathematica Student Edition


10 Untitled-1.nb

MatrixPlot[%]
1 2 3

1 1

2 2

3 3

1 2 3

Det[%]
1 2 3

1 1

Det2 2

3 3

1 2 3

M = {{5, 1, - 2}, {2, 4, - 3}, {1, 2, 6}}


{{5, 1, - 2}, {2, 4, - 3}, {1, 2, 6}}

MatrixForm[%]
5 1 -2
2 4 -3
1 2 6

Det[%]
135

M.{x, y, z}
{5 x + y - 2 z, 2 x + 4 y - 3 z, x + 2 y + 6 z}

LinearSolve[M, b]
5 82 4
, ,
27 135 15

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 11

n=%
5 82 4
, ,
27 135 15

M.n
{1, 2, 3}

n.n
1729
3645

b.b
14

n.M
65 85 16
, ,-
27 27 27

M
{{5, 1, - 2}, {2, 4, - 3}, {1, 2, 6}}

M[[1]]
{5, 1, - 2}

M[[1, 3]]
-2

M[[{1, 3}]]
{{5, 1, - 2}, {1, 2, 6}}

Terza Lezione 06/05/2016


Table[h, {h, 1, 10}]
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}

Table[h ^ 2, {h, 1, 10}]


{1, 4, 9, 16, 25, 36, 49, 64, 81, 100}

Table[h k, {h, 1, 10}, {k, 1 , 10}]


{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {2, 4, 6, 8, 10, 12, 14, 16, 18, 20},
{3, 6, 9, 12, 15, 18, 21, 24, 27, 30}, {4, 8, 12, 16, 20, 24, 28, 32, 36, 40},
{5, 10, 15, 20, 25, 30, 35, 40, 45, 50}, {6, 12, 18, 24, 30, 36, 42, 48, 54, 60},
{7, 14, 21, 28, 35, 42, 49, 56, 63, 70}, {8, 16, 24, 32, 40, 48, 56, 64, 72, 80},
{9, 18, 27, 36, 45, 54, 63, 72, 81, 90}, {10, 20, 30, 40, 50, 60, 70, 80, 90, 100}}

Printed by Wolfram Mathematica Student Edition


12 Untitled-1.nb

MatrixForm[%]
1 2 3 4 5 6 7 8 9 10
2 4 6 8 10 12 14 16 18 20
3 6 9 12 15 18 21 24 27 30
4 8 12 16 20 24 28 32 36 40
5 10 15 20 25 30 35 40 45 50
6 12 18 24 30 36 42 48 54 60
7 14 21 28 35 42 49 56 63 70
8 16 24 32 40 48 56 64 72 80
9 18 27 36 45 54 63 72 81 90
10 20 30 40 50 60 70 80 90 100

Table[h k, {h, 1, 10}, {k, 1 , 10}] // MatrixForm


1 2 3 4 5 6 7 8 9 10
2 4 6 8 10 12 14 16 18 20
3 6 9 12 15 18 21 24 27 30
4 8 12 16 20 24 28 32 36 40
5 10 15 20 25 30 35 40 45 50
6 12 18 24 30 36 42 48 54 60
7 14 21 28 35 42 49 56 63 70
8 16 24 32 40 48 56 64 72 80
9 18 27 36 45 54 63 72 81 90
10 20 30 40 50 60 70 80 90 100

(* Matrice di Hilbert *)

Table1 h + k - 1, {h, 1, 10}, {k, 1 , 10} // MatrixForm


1 1 1 1 1 1 1 1 1
1 2 3 4 5 6 7 8 9 10
1 1 1 1 1 1 1 1 1 1
2 3 4 5 6 7 8 9 10 11
1 1 1 1 1 1 1 1 1 1
3 4 5 6 7 8 9 10 11 12
1 1 1 1 1 1 1 1 1 1
4 5 6 7 8 9 10 11 12 13
1 1 1 1 1 1 1 1 1 1
5 6 7 8 9 10 11 12 13 14
1 1 1 1 1 1 1 1 1 1
6 7 8 9 10 11 12 13 14 15
1 1 1 1 1 1 1 1 1 1
7 8 9 10 11 12 13 14 15 16
1 1 1 1 1 1 1 1 1 1
8 9 10 11 12 13 14 15 16 17
1 1 1 1 1 1 1 1 1 1
9 10 11 12 13 14 15 16 17 18
1 1 1 1 1 1 1 1 1 1
10 11 12 13 14 15 16 17 18 19

Det[%]
1 / 46 206 893 947 914 691 316 295 628 839 036 278 726 983 680 000 000 000

N[%]
2.16418 10-53

f[x_] = AbsLogx x ^ 2 - 1
x
AbsLog
- 1 + x2

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 13

Plot[f[x], {x, - 5, 5}]


8

-4 -2 2 4

f[x_] = Logx x ^ 2 - 1
x
Log
- 1 + x2

Plot[f[x], {x, - 5, 5}]

-4 -2 2 4

-1

-2

-3

-4

(* studio di funzione *)

f[x_] = x ^ 3 x ^ 2 - 1
x3
- 1 + x2

Printed by Wolfram Mathematica Student Edition


14 Untitled-1.nb

Plot[f[x], {x, - 5, 5}]

15

10

-4 -2 2 4

-5

-10

-15

(* asintoto verticale *)

Limit[f[x], x 1]

Limit[f[x], x 1, Direction 1]
-

(* asintoto obliquo *)

Limit[f[x] / x, x + ]
1

Limit[f[x] - x, x + ]
0

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 15

Plot[{f[x], x}, {x, - 5, 5}, AspectRatio Automatic]

15

10

-4 -2 2 4

-5

-10

-15

Plot[{f[x], x}, {x, - 5, 5}, AspectRatio Automatic, PlotRange {- 5, 5}]

-4 -2 2 4

-2

-4

(* derivata prima *)

Printed by Wolfram Mathematica Student Edition


16 Untitled-1.nb

fp = D[f[x], x]
2 x4 3 x2
- +
- 1 + x2 2 - 1 + x2

Together[% ]
- 3 x2 + x4
- 1 + x2 2

(* punti critici *)

Solve[fp 0, x]
{x 0}, {x 0}, x - 3 , x 3

(* valori critici *)

f[x] /. %
3 3 3 3
0, 0, - ,
2 2

(* crescenza *)

Reduce[fp > 0, x]
x<- 3 || x > 3

Reduce[fp < 0, x]
- 3 < x < - 1 || - 1 < x < 0 || 0 < x < 1 || 1 < x < 3

Reduce[fp 0, x]
- 3 x < - 1 || - 1 < x < 1 || 1 < x 3

fs = D[fp, x]
8 x5 14 x3 6x
- +
- 1 + x 2 3 - 1 + x 2 2 - 1 + x2

Together[%]
2 3 x + x3
- 1 + x2 3

(* convessit *)

Reduce[fs > 0, x]
- 1 < x < 0 || x > 1

Reduce[fs < 0, x]
x < - 1 || 0 < x < 1

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 17

Series[f[x], {x, 0, 8}]


- x3 - x5 - x7 + O[x]9

T = Normal[%]
- x3 - x5 - x7

Plot[{f[x], x, T}, {x, - 2, 2}, AspectRatio Automatic, PlotRange {- 3, 3}]


3

-2 -1 1 2

-1

-2

-3

Sum1 k, {k, 1, + }
Sum::div : Sum does not converge.
1

k=1 k

Sum1 k ^ 2, {k, 1, + }
2
6

Sum1 k ^ 4, {k, 1, + }
4
90

Printed by Wolfram Mathematica Student Edition


18 Untitled-1.nb

N[%]
1.08232

Sum1 k ^ 3, {k, 1, + }
Zeta[3]

Plot3D[Abs[Zeta[x + I y]], {x, - 6, 6}, {y, - 6, 6}, PlotRange {0, 6}]

Plot3D[Abs[Zeta[x + I y]], {x, - 16, 16}, {y, - 16, 16}, PlotRange {0, 16}]

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 19

PlotAbsZeta1 2 + I y , {y, - 125, 125}, PlotRange {- 10, 10}


10

-100 -50 50 100

-5

-10

PlotReZeta1 2 + I y , {y, - 125, 125}, PlotRange {- 10, 10}


10

-100 -50 50 100

-5

-10

Plot[Abs[Zeta[0.6 + I y ]], {y, - 125, 125}, PlotRange {- 10, 10}]


10

-100 -50 50 100

-5

-10

Printed by Wolfram Mathematica Student Edition


20 Untitled-1.nb

Plot[Abs[Zeta[0.8 + I y ]], {y, - 125, 125}, PlotRange {- 10, 10}]


10

-100 -50 50 100

-5

-10

Quarta Lezione 10/05/2016


(* generiamo un po' di polinomi di Taylor *)
Table[Series[Sin[x], {x, 0, n}], {n, 1, 11}] (* passo due da 1 a 11*)
x3 x3
x + O[x]2 , x + O[x]3 , x - + O[x]4 , x - + O[x]5 ,
6 6
x3 x5 x3 x5 x3 x5 x7
x- + + O[x]6 , x - + + O[x]7 , x -
+ O[x]8 , + -
6 120 120 66 120 5040
x3 x7 x5 x3 x5 x7 x9
x- + - + O[x]9 , x - + - + + O[x]10 ,
6 120 5040 6 120 5040 362 880
x3 x5 x7 x9 x3 x5 x7 x9 x11
x- + - + + O[x]11 , x - + - + - + O[x]12
6 120 5040 362 880 6 120 5040 362 880 39 916 800

Table[Series[Sin[x], {x, 0, n}], {n, 1, 11, 2}]


x3 x3 x5 x3 x5 x7
x + O[x]2 , x - + O[x]4 , x - + + O[x]6 , x - + - + O[x]8 ,
6 6 120 6 120 5040
x3 x5 x7 x9 x3 x5 x7 x9 x11
x- + - + + O[x]10 , x - + - + - + O[x]12
6 120 5040 362 880 6 120 5040 362 880 39 916 800

Normal[%]
x3 x3 x5 x3 x5 x7
x, x - , x- + , , x- + -
6 6 120 5040120 6
x3 x5 x7 x9 x3 x5 x7 x9 x11
x- + - + , x- + - + -
6 120 5040 362 880 6 120 5040 362 880 39 916 800

T=%
x3 x3 x5 x3 x5 x7
x, x - , x- + , , x- + -
6 6 120 5040120 6
x3 x5 x7 x9 x3 x5 x7 x9 x11
x- + - + , x- + - + -
6 120 5040 362 880 6 120 5040 362 880 39 916 800

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 21

Plot{Sin[x], T}, x, - 2, 2

1.5

1.0

0.5

-1.5 -1.0 -0.5 0.5 1.0 1.5

-0.5

-1.0

-1.5

Plot[{Sin[x], T}, {x, - , }]

-3 -2 -1 1 2 3

-1

-2

-3

Plot[{Sin[x], T}, {x, - 2 , 2 }]

-6 -4 -2 2 4 6

-2

-4

(* serie *)

Sum1 n ^ 2, {n, 1, }
2
6

Printed by Wolfram Mathematica Student Edition


22 Untitled-1.nb

(* sommiamo solo i dispari *)

Sum1 n ^ 2, {n, 1, , 2}
2
8

(* sommiamo solo i pari*)

Sum1 n ^ 2, {n, 2, , 2}
2
24

Sum1 n ^ 3, {n, 1, }
Zeta[3]

(* integrale indefinito *)

Integratex + 2 x ^ 3 + 2 x ^ 2 + 5 x, x
3 1+x 2 Log[x] 1
ArcTan + - Log5 + 2 x + x2
10 2 5 5

(* fratti semplici *)

Apartx + 2 x ^ 3 + 2 x ^ 2 + 5 x
2 1-2x
+
5x 5 5 + 2 x + x2

(* integrale definito *)

Integratex + 2 x ^ 3 + 2 x ^ 2 + 5 x, {x, 0, 3}
2+x
Integrate::idiv : Integral of does not converge on {0, 3}.
5 x + 2 x 2 + x3
3 2+x
x
0 5 x + 2 x2 + x3

Integratex + 2 x ^ 3 + 2 x ^ 2 + 5 x, {x, 1, 3}
1 324
- 3 + 4 3 ArcTan[2] + Log
40 25

N[%]
0.352712

Integratex + 2 x ^ 3 + 2 x ^ 2 + 5 x, {x, 1, + }
3
( + Log[256])
40

N[%]
0.651508

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 23

Plotx + 2 x ^ 3 + 2 x ^ 2 + 5 x, {x, 0, 6}, Filling Axis

0.8

0.6

0.4

0.2

1 2 3 4 5 6

Plot[Sin[x], {x, 0, 10}, Filling Axis]


1.0

0.5

2 4 6 8 10

-0.5

-1.0

D[Sin[x], x]
Cos[x]

D[Sin[x], {x, 2}]


- Sin[x]

(* Esercizio di Analisi Complessa *)

LimitDx ^ 3 (Sin[x]) ^ 3, x, x, x 0
1

LimitDx ^ 3 (Sin[x]) ^ 3, {x, 2}, x 0


1

(* funzione in due variabili *)

f = x^2 - y^2
x2 - y2

Printed by Wolfram Mathematica Student Edition


24 Untitled-1.nb

Plot3D[f, {x, - 1, 1}, {y, - 1, 1}]

dx = D[f, x]
2x

dy = D[f, y]
-2 y

f = x^2 - y^2 + x - 2 y
x + x2 - 2 y - y 2

Plot3D[f, {x, - 1, 1}, {y, - 1, 1}]

dx = D[f, x]
1+2x

dy = D[f, y]
-2 - 2 y

Solve[{dx 0, dy 0}, {x, y}]


1
x - , y - 1
2

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 25

{{D[f, x, x], D[f, x, y]}, {D[f, x, y], D[f, y, y]}}


{{2, 0}, {0, - 2}}

MatrixForm[%]
2 0
0 -2

Maximize[{f, - 1 x 1, - 1 y 1}, {x, y}]


{3, {x 1, y - 1}}

Minimize[{f, - 1 x 1, - 1 y 1}, {x, y}]


13 1
- , x - , y 1
4 2

f = x^2 - y^2
x2 - y2

(*interseca f con il cilindro scritto*)

Plot3D[f, {x, - 2, 2}, {y, - 2, 2},


RegionFunction Function[{x, y, z}, x ^ 2 + y ^ 2 4]]

(* interseca f con la sfera scritta*)

Printed by Wolfram Mathematica Student Edition


26 Untitled-1.nb

g = Plot3D[f, {x, - 2, 2}, {y, - 2, 2},


RegionFunction Function[{x, y, z}, x ^ 2 + y ^ 2 + z ^ 2 4]]

h = Graphics3D[Sphere[]]

(* senza niente raggio 1 e centro O *)

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 27

h = Graphics3D[{Opacity[0.5], Sphere[]}]

Show[{g, h}]

(* centro O e raggio 2 *)

Printed by Wolfram Mathematica Student Edition


28 Untitled-1.nb

k = Graphics3D[{Opacity[0.5], Sphere[{0, 0, 0}, 2]}]

Show[{g, k}]

(* Automatic per 2 variabili, 1 per 3 variabili*)

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 29

g = Plot3D[f, {x, - 2, 2}, {y, - 2, 2},


RegionFunction Function[{x, y, z}, x ^ 2 + y ^ 2 + z ^ 2 4], AspectRatio 1]

Show[{g, k}]

Printed by Wolfram Mathematica Student Edition


30 Untitled-1.nb

Show[{k, g}]

Quinta Lezione 13/05/2016


(* piano tangente *)

f = x^2 - y^2
x2 - y2

Plot3D[f, {x, - 2, 2}, {y, - 2, 2}]

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 31

fx = D[f, x]
2x

fy = D[f, y]
-2 y

f[x_, y_] = x ^ 2 - y ^ 2
x2 - y2

Plot3D[f[x, y], {x, - 2, 2}, {y, - 2, 2}]

fx[x_, y_] = D[f[x, y], x]


2x

fy[x_, y_] = D[f[x, y], y]


-2 y

p = f[1, 0] + fx[1, 0] x - 1 + fy[1, 0] y


1 + 2 (- 1 + x)

Plot3D[{f[x, y], p}, {x, - 2, 2}, {y, - 2, 2}]

Printed by Wolfram Mathematica Student Edition


32 Untitled-1.nb

Plot3D[{f[x, y], p}, {x, - 2, 2}, {y, - 2, 2}, PlotStyle {Pink, Yellow}]

f[x_, y_] = x ^ 2 + y ^ 2
x2 + y2

fx[x_, y_] = D[f[x, y], x]


2x

fy[x_, y_] = D[f[x, y], y]


2y

p = f[1, 0] + fx[1, 0] x - 1 + fy[1, 0] y


1 + 2 (- 1 + x)

Plot3D[{f[x, y], p}, {x, - 2, 2}, {y, - 2, 2}]

q = f[1, 1] + fx[1, 1] x - 1 + fy[1, 1] y - 1


2 + 2 (- 1 + x) + 2 (- 1 + y)

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 33

Plot3D[{f[x, y], q}, {x, - 2, 2}, {y, - 2, 2}]

Plot3D[{f[x, y], p, q}, {x, - 2, 2}, {y, - 2, 2}]

(* curve di livello, f pressione *)

f[x_, y_] = x ^ 2 + y ^ 2
x2 + y2

Printed by Wolfram Mathematica Student Edition


34 Untitled-1.nb

ContourPlot[f[x, y], {x, - 2, 2}, {y, - 2, 2}]


2

-1

-2
-2 -1 0 1 2

f[x_, y_] = x ^ 2 - y ^ 2
x2 - y2

ContourPlot[f[x, y], {x, - 2, 2}, {y, - 2, 2}]


2

-1

-2
-2 -1 0 1 2

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 35

ContourPlot[f[x, y] 1, {x, - 2, 2}, {y, - 2, 2}]


2

-1

-2
-2 -1 0 1 2

ContourPlot[f[x, y] 0.5, {x, - 2, 2}, {y, - 2, 2}]


2

-1

-2
-2 -1 0 1 2

Printed by Wolfram Mathematica Student Edition


36 Untitled-1.nb

ContourPlot[f[x, y] 0, {x, - 2, 2}, {y, - 2, 2}]


2

-1

-2
-2 -1 0 1 2

DensityPlot[f[x, y], {x, - 2, 2}, {y, - 2, 2}]

f[x_, y_, z_] = x ^ 2 + y ^ 2 + z ^ 2


x2 + y2 + z2

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 37

ContourPlot3D[f[x, y, z], {x, - 10, 10}, {y, - 10, 10}, {z, - 10, 10}]

DensityPlot[Sin[x] Sin[y], {x, 0, 2 }, {y, 0, 2 }]

Printed by Wolfram Mathematica Student Edition


38 Untitled-1.nb

ContourPlot[Sin[x] Sin[y], {x, 0, 2 }, {y, 0, 2 }]

0
0 1 2 3 4 5 6

DensityPlot[Sin[x] Sin[y], {x, 0, 20 }, {y, 0, 20 }]

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 39

ContourPlot[Sin[x] Sin[y], {x, 0, 20 }, {y, 0, 20 }]

60

50

40

30

20

10

0
0 10 20 30 40 50 60

DensityPlot[Sin[2 x] Sin[y], {x, 0, 20 }, {y, 0, 20 }]

Printed by Wolfram Mathematica Student Edition


40 Untitled-1.nb

DensityPlot[Sin[2 x] Sin[2 y], {x, 0, 20 }, {y, 0, 20 }]

(* manipolazione *)

Manipulate[Series[Sin[x], {x, 0, n}], {n, 1, 10, 1}]

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 41

Animate[Series[Sin[x], {x, 0, n}], {n, 1, 10, 1}]

Printed by Wolfram Mathematica Student Edition


42 Untitled-1.nb

ManipulatePlot{Sin[x], Normal[Series[Sin[x], {x, 0, n}]]},


{x, 0, }, PlotRange 0, 2, {n, 1, 10, 1}

General::ivar : 0.00006417824992333434` is not a valid variable.

General::ivar : 0.00006417824992333434` is not a valid variable.

General::ivar : 0.00006417824992333434` is not a valid variable.

General::stop : Further output of General::ivar will be suppressed during this calculation.

General::ivar : 0.00006417824992333434` is not a valid variable.

General::ivar : 0.00006417824992333434` is not a valid variable.

General::ivar : 0.00006417824992333434` is not a valid variable.

General::stop : Further output of General::ivar will be suppressed during this calculation.

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 43

Manipulate[Plot[{Sin[3 x + t]}, {x, 0, }, PlotRange {- 1.2, 1.12}], {t, 1, 10}]

Printed by Wolfram Mathematica Student Edition


44 Untitled-1.nb

Manipulate[Plot[{Sin[3 * 2 x + t]}, {x, 0, 2}, PlotRange {- 1.2, 1.12}], {t, 1, 10}]

a = ParametricPlot[{Cos[], Sin[]}, {, 0, 2 }]

1.0

0.5

-1.0 -0.5 0.5 1.0

-0.5

-1.0

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 45

Manipulate[
Show[{a, Graphics[{Red, PointSize[0.02], Point[{Cos[t], Sin[t]}]}]}], {t, 0, 2 }]

Printed by Wolfram Mathematica Student Edition


46 Untitled-1.nb

Manipulate[Show[{a, Graphics[{Red, PointSize[0.02],


Point[{Cos[t], Sin[t]}], Line[{{0, 0}, {Cos[t], Sin[t]}}]}]}], {t, 0, 2 }]

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 47

Sesta Lezione 20/05/2016


a = ParametricPlot[{Cos[], Sin[]}, {, 0, 2 }]

1.0

0.5

-1.0 -0.5 0.5 1.0

-0.5

-1.0

(* discontinuit da 5 a 0 *)

Printed by Wolfram Mathematica Student Edition


48 Untitled-1.nb

Manipulate[Show[{a, Graphics[{Red, PointSize[0.02],


Point[{Cos[t], Sin[t]}], Line[{{0, 0}, {Cos[t], Sin[t]}}]}]}], {t, 0, 5}]

(* moto armonico per la proiezione *)

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 49

Manipulate[Show[{a, Graphics[{Red, PointSize[0.02], Point[{Cos[t], Sin[t]}],


Line[{{0, 0}, {Cos[t], Sin[t]}}], Blue, Point[{Cos[t], 0}],
Dashed, Line[{{Cos[t], 0}, {Cos[t], Sin[t]}}]}]}], {t, 0, 2 }]

Show::gcomb : Could not combine the graphics objects in Showa, .

c = ParametricPlot3D[{Cos[], Sin[], z}, {, 0, 2 }, {z, 0, 1}]

Printed by Wolfram Mathematica Student Edition


50 Untitled-1.nb

(*scatola vuota*)

b = Plot3D[v, {x, 0, }, {y, 0, }, PlotRange {- 1.2, 1.2}]

Manipulate[Show[{b, Plot3D[Sin[x] Sin[y] Sin[t],


{x, 0 , }, {y, 0 , }, PerformanceGoal "Quality"]}], {t, 0, 2 }]

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 51

Manipulate[Show[{b, Plot3D[Sin[x] Sin[y] Sin[t], {x, 0 , }, {y, 0 , },


PerformanceGoal "Quality", ColorFunction Hue]}], {t, 0, 2 }]

Show::gcomb : Could not combine the graphics objects in Showb, .

Show::gcomb : Could not combine the graphics objects in Showb, .

Printed by Wolfram Mathematica Student Edition


52 Untitled-1.nb

Manipulate[Show[{b, Plot3D[Sin[2 x] Sin[2 y] Sin[t], {x, 0 , }, {y, 0 , },


PerformanceGoal "Quality", ColorFunction "Rainbow"]}], {t, 0, 2 }]

Show::gcomb : Could not combine the graphics objects in Showb, .

Manipulate[Show[{b, Plot3D[Sin[2 x] Sin[y] Sin[t], {x, 0 , }, {y, 0 , },


PerformanceGoal "Quality", ColorFunction "Rainbow"]}], {t, 0, 2 }]

Show::gcomb : Could not combine the graphics objects in Showb, .

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 53

(*equazioni differenziali ordinarie con DSolve*)


(*equazione differenziale primo ordine*)
DSolve[y '[t] y[t], y[t], t]
{{y[t] t C[1]}}

(* cauchy relativo*)
DSolve[{y '[t] y[t], y[0] 2}, y[t], t]
{{y[t] 2 t }}

DSolve[{y '[t] - y[t], y[0] 2}, y[t], t]


{{y[t] 2 -t }}

(* /.% usa la regola di sostituzione appena ottenuta *)

Plot[y[t] /. %, {t, 0, 4}]

2.0

1.5

1.0 (* decadimento *)

0.5

1 2 3 4

DSolve[{y '[t] - 0.5 y[t], y[0] 2}, y[t], t]


y[t] 2. -0.5 t

Plot[y[t] /. %, {t, 0, 4}]


2.0

1.5

1.0

0.5

1 2 3 4

sol = DSolve[{y ''[t] - y[t], y[0] 2, y '[0] 0}, y[t], t]


{{y[t] 2 Cos[t]}}

Printed by Wolfram Mathematica Student Edition


54 Untitled-1.nb

Plot[y[t] /. sol, {t, 0, 20}]

5 10 15 20

-1

-2

(* abbiamo aggiunto l'attrito*)

sol = DSolve[{y ''[t] - y '[t] - y[t], y[0] 2, y '[0] 0}, y[t], t]


2 3 t 3 t
y[t] -t/2 3 Cos + 3 Sin
3 2 2

(* venuto un pasticcio*)

Plot[y[t] /. sol, {t, 0, 20}]

0.10

0.05

5 10 15 20

-0.05

-0.10

(* si smorza subito *)

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 55

Plot[y[t] /. sol, {t, 0, 20}, PlotRange All]


2.0

1.5

1.0

0.5

5 10 15 20

sol = DSolvey ''[t] - y '[t] 10 - y[t], y[0] 2, y '[0] 0, y[t], t


2 399 t 399 t
y[t] -t/20 399 Cos + 399 Sin
399 20 20

(* ci uscito un pasticcio *)

Plot[y[t] /. sol, {t, 0, 40}, PlotRange All]


2

10 20 30 40

-1

k = Plot[v, {x, - 2.1, 2.1}, PlotRange {- 0.2, 0.2}]


0.2

0.1

-1.0 -0.5 0.5 1.0

-0.1

-0.2

Printed by Wolfram Mathematica Student Edition


56 Untitled-1.nb

q[t_] = y[t] /. sol[[1]].


Syntax::tsntxi : "sol[[1]]." is incomplete; more input is needed.

Settima Lezione 26/05/2016


(* Pendolo *)

(* Soluzione esatta *)

DSolve[{x ''[t] + 2 ^ 2 * x[t] 0, x[0] / 4, x '[0] 0}, x[t], t]


1
x[t] Cos[2 t]
4

p[t_] = x[t] /. %[[1]]


1
Cos[2 t]
4

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 57

Plot[p[t], {t, 0, 4 }]

0.5

2 4 6 8 10 12

-0.5

(* Soluzione per 20 secondi*)

NDSolve [{x ''[t] + 4 Sin[x[t]] 0, x[0] / 4, x '[0] 0}, x, {t, 0, 20}]

Domain: {{0., 20.}}


x InterpolatingFunction
Output: scalar

q[t_] = x[t] /. %[[1]]

Domain: {{0., 20.}}


InterpolatingFunction [t]
Output: scalar

Plot[{p[t], q[t]}, {t, 0, 4 }]

0.5

2 4 6 8 10 12

-0.5

Animate[ParametricPlot[{{Sin[q[t]], 1 - Cos[q[t]]},
{Sin[q[f]] t / f, 1 - Cos[q[f]] t / f}, {Sin[p[f]] t / f, 1 - Cos[p[f]] t / f}},
{t, 0, f}, PlotRange {{- 1.2, 1.2}, {- 1.2, 1.2}}], {f, 0.01, 6 , 0.1}]

Printed by Wolfram Mathematica Student Edition


58 Untitled-1.nb

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 59

Manipulate[ParametricPlot[{{Sin[q[t]], 1 - Cos[q[t]]},
{Sin[q[f]] t / f, 1 - Cos[q[f]] t / f}, {Sin[p[f]] t / f, 1 - Cos[p[f]] t / f}},
{t, 0, f}, PlotRange {{- 1.2, 1.2}, {- 1.2, 1.2}}], {f, 0.01, 6 , 0.1}]

Printed by Wolfram Mathematica Student Edition


60 Untitled-1.nb

(* Fibonacci *)

fib[0] = 1
fib[1] = 1
1

fib[n_] := fib[n - 1] + fib[n - 2]

(* troppo lenta *)

fib[n_] := fib[n] = fib[n - 1] + fib[n - 2]

(* pi veloce *)

Table[fib[n], {n, 0, 100}] // Timing


{0., {1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584,
4181, 6765, 10 946, 17 711, 28 657, 46 368, 75 025, 121 393, 196 418, 317 811,
514 229, 832 040, 1 346 269, 2 178 309, 3 524 578, 5 702 887, 9 227 465, 14 930 352,
24 157 817, 39 088 169, 63 245 986, 102 334 155, 165 580 141, 267 914 296, 433 494 437,
701 408 733, 1 134 903 170, 1 836 311 903, 2 971 215 073, 4 807 526 976, 7 778 742 049,
12 586 269 025, 20 365 011 074, 32 951 280 099, 53 316 291 173, 86 267 571 272,
139 583 862 445, 225 851 433 717, 365 435 296 162, 591 286 729 879, 956 722 026 041,
1 548 008 755 920, 2 504 730 781 961, 4 052 739 537 881, 6 557 470 319 842,
10 610 209 857 723, 17 167 680 177 565, 27 777 890 035 288, 44 945 570 212 853,
72 723 460 248 141, 117 669 030 460 994, 190 392 490 709 135, 308 061 521 170 129,
498 454 011 879 264, 806 515 533 049 393, 1 304 969 544 928 657, 2 111 485 077 978 050,
3 416 454 622 906 707, 5 527 939 700 884 757, 8 944 394 323 791 464, 14 472 334 024 676 221,
23 416 728 348 467 685, 37 889 062 373 143 906, 61 305 790 721 611 591, 99 194 853 094 755 497,
160 500 643 816 367 088, 259 695 496 911 122 585, 420 196 140 727 489 673,
679 891 637 638 612 258, 1 100 087 778 366 101 931, 1 779 979 416 004 714 189,
2 880 067 194 370 816 120, 4 660 046 610 375 530 309, 7 540 113 804 746 346 429,
12 200 160 415 121 876 738, 19 740 274 219 868 223 167, 31 940 434 634 990 099 905,
51 680 708 854 858 323 072, 83 621 143 489 848 422 977, 135 301 852 344 706 746 049,
218 922 995 834 555 169 026, 354 224 848 179 261 915 075, 573 147 844 013 817 084 101}}

fib[1000] // Timing
{0.,
70 330 367 711 422 815 821 835 254 877 183 549 770 181 269 836 358 732 742 604 905 087 154 537
118 196 933 579 742 249 494 562 611 733 487 750 449 241 765 991 088 186 363 265 450 223 647
106 012 053 374 121 273 867 339 111 198 139 373 125 598 767 690 091 902 245 245 323 403 501}

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 61

fib[2000] // Timing
{0.015600,
6 835 702 259 575 806 647 045 396 549 170 580 107 055 408 029 365 524 565 407 553 367 798 082
454 408 054 014 954 534 318 953 113 802 726 603 726 769 523 447 478 238 192 192 714 526 677
939 943 338 306 101 405 105 414 819 705 664 090 901 813 637 296 453 767 095 528 104 868 264
704 914 433 529 355 579 148 731 044 685 634 135 487 735 897 954 629 842 516 947 101 494 253
575 869 699 893 400 976 539 545 740 214 819 819 151 952 085 089 538 422 954 565 146 720 383
752 121 972 115 725 761 141 759 114 990 448 978 941 370 030 912 401 573 418 221 496 592 822 626}

fib[3000] // Timing
{0.015600,
664 390 460 366 960 072 280 217 847 866 028 384 244 163 512 452 783 259 405 579 765 542 621 214
161 219 257 396 449 810 982 999 820 391 132 226 802 809 465 132 446 349 331 994 409 434 926
019 045 342 723 749 188 530 316 994 678 473 551 320 635 101 099 619 382 973 181 622 585 687
336 939 784 373 527 897 555 489 486 841 726 131 733 814 340 129 175 622 450 421 605 101 025
897 173 235 990 662 770 203 756 438 786 517 530 547 101 123 748 849 140 252 686 120 104 032
647 025 145 598 956 675 902 135 010 566 909 783 124 959 436 469 825 558 314 289 701 354 227
151 784 602 865 710 780 624 675 107 056 569 822 820 542 846 660 321 813 838 896 275 819 753
281 371 491 809 004 412 219 124 856 375 121 694 811 728 724 213 667 814 577 326 618 521 478
357 661 859 018 967 313 354 840 178 403 197 559 969 056 510 791 709 859 144 173 304 364 898 001}

fib[10 000] // Timing


$RecursionLimit::reclim : Recursion depth of 1024 exceeded.

{0.046800, Hold[fib[8979 - 1] + fib[8979 - 2]]}

a=1
1

b=1
1

fibo[n_] := {Do[{c = a + b, a = b, b = c}, {j, n - 1}], c}

fib[10]
89

fibo[10]
{Null, 89}

fibo[n_] := {Do[{c = a + b, a = b, b = c}, {j, n - 1}], c}[[2]]

(* doppia quadra prende quella componente del vettore *)

(* rimandare a e b sempre *)

Printed by Wolfram Mathematica Student Edition


62 Untitled-1.nb

fibo[10]
89

fibo[n_] := {Do[{c = a + b, a = b, b = c}, {j, n - 1}], a = 1, b = 1, c}[[4]]

fibo[10]
89

Fibonacci[10]
55

Fibonacci[11]
89

(* Fibonacci parte da 1, noi da 0 *)

FactorInteger[%]
{{89, 1}}

Fibonacci[102]
927 372 692 193 078 999 176

FactorInteger[%]
{{2, 3}, {919, 1}, {1597, 1}, {3469, 1}, {3571, 1}, {6 376 021, 1}}

(* Grafica *)

(* Non si pu mischiare 2D e 3D *)

GraphicsRed, Thickness[0.005], Line[{{0, 0}, {2, 0}, {1, 1}, {0, 0}}],
{RGBColor[0.5, 0.5, 0.9], Polygon[{{2, 2}, {4, 2}, {3, 3}, {2, 2}}]},
Disk[{1, 2}, {0.5, 0.3}], Blue, Thickness[0.01],
Arrow4, 3 2, 0, 3 2, {0, 0}, Text["Prova di grafica", {3, 0.5}]

Prova di grafica

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 63

Ottava Lezione 27/05/2016


(*solo per noi di ANALISI IV*)

1 2 !

2

Integrate [Exp[- t] / Sqrt[t], {t, 0, + }]


(*Figure*)

GraphicsRed, Thickness[0.005], Line[{{0, 0}, {2, 0}, {1, 1}, {0, 0}}],
{RGBColor[0.8, 0.8, 0.1], Polygon[{{2, 2}, {4, 2}, {3, 3}, {2, 2}}]},
Disk[{1, 2}, {0.5, 0.3}], Blue, Thickness[0.01],
Arrow4, 3 2, 0, 3 2, {0, 0}, {1.8, 1.2},
Text["Prova di grafica", {3, 1}]

Prova di grafica

Printed by Wolfram Mathematica Student Edition


64 Untitled-1.nb

GraphicsRed, Thickness[0.005], Line[{{0, 0}, {2, 0}, {1, 1}, {0, 0}}],
{RGBColor[0.8, 0.8, 0.1], Polygon[{{2, 2}, {4, 2}, {3, 3}, {2, 2}}]},
Disk[{1, 2}, {0.5, 0.3}], Blue, Thickness[0.01],
Arrow4, 3 2, 0, 3 2, {0, 0}, {1.8, 1.2},
Text["Prova di grafica", {3, 0}]

Prova di grafica

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 65

Graphics3DRed, Thickness[0.005],
Line[{{0, 0, 0}, {2, 0, 1}, {3, 1, 2}, {1, 3, 2}, {0, 0, 0}}], {Opacity[1],
RGBColor[0.8, 0.5, 0.9], Polygon[{{2, 2, 4}, {4, 2, 4}, {3, 3, 6}, {2, 2, 4}}]},
Opacity[1], Sphere[{1, 2, 3}, {1}], Blue, Thickness[0.01],
Dashed, Arrow4, 3 2, 1, 0, 3 2, 2, {0, 0, 5},
Text["Prova di grafica", {3, 0.5, 1}]

Printed by Wolfram Mathematica Student Edition


66 Untitled-1.nb

Graphics3D
Red, Thickness[0.005], Line[{{0, 0, 0}, {2, 0, 1}, {3, 1, 2}, {1, 3, 2}, {0, 0, 0}}],
{Opacity[0.1], RGBColor[0.8, 0.5, 0.9],
Polygon[{{2, 2, 4}, {4, 2, 4}, {3, 3, 6}, {2, 2, 4}}]},
Opacity[0.01], Sphere[{1, 2, 3}, {1}], Blue, Thickness[0.01],
Dashed, Arrow4, 3 2, 1, 0, 3 2, 2, {0, 0, 5},
Text["Prova di grafica", {3, 0.5, 1}]

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 67

Graphics3D
Red, Thickness[0.005], Line[{{0, 0, 0}, {2, 0, 1}, {3, 1, 2}, {1, 3, 2}, {0, 0, 0}}],
{Opacity[0.9], RGBColor[0.2, 0.9, 0.2],
Polygon[{{2, 2, 4}, {4, 2, 4}, {3, 3, 6}, {6, 5, 4}, {2, 2, 4}}]},
Opacity[0.9], Sphere[{1, 2, 3}, {1}], Blue, Thickness[0.01],
Dashed, Arrow4, 3 2, 1, 0, 3 2, 2, {0, 0, 5},
Text["Prova di grafica", {3, 0.5, 1}]

(*Triangolo di Sierpinski*)

{L, R, T} = {{0, 0}, {1, 0}, {0.5, 1}}


{{0, 0}, {1, 0}, {0.5, 1}}

sierp[1, L_, T_, R_] := Polygon[{L, T, R, L}]

sierp[n_, L_, T_, R_] :=


sierpn - 1, L, (L + T) 2, (L + R) 2,
sierpn - 1, (L + T) 2, T, (R + T) 2,
sierpn - 1, (L + R) 2, (T + R) 2, R

Printed by Wolfram Mathematica Student Edition


68 Untitled-1.nb

Graphics[{Red, sierp[3, L, T, R]}]

Graphics[{Red, sierp[10, L, T, R]}]

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 69

Graphics[{Red, sierp[1, L, T, R]}]

Graphics[{Red, sierp[2, L, T, R]}]

{L, R, T} = {{0, 0}, {1, 0}, {0, 1}}


{{0, 0}, {1, 0}, {0, 1}}

Printed by Wolfram Mathematica Student Edition


70 Untitled-1.nb

Graphics[{Red, sierp[3, L, T, R]}]

Graphics[{Red, sierp[2, L, T, R]}]

sierp[1, L_, T_, R_] := Line[{L, T, R, L}]

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 71

Graphics[{Red, sierp[2, L, T, R]}]

Graphics[{Blue, sierp[10, L, T, R]}]

{L, R, T} = {{0, 0}, {1, 0}, {0.5, 1}}


{{0, 0}, {1, 0}, {0.5, 1}}

Printed by Wolfram Mathematica Student Edition


72 Untitled-1.nb

Graphics[{Green, sierp[6, L, T, R]}]

(*Concoide*)
a = ParametricPlot[{t - Sin[t], 1 - Cos[t]}, {t, 0, 2 }]
2.0

1.5

1.0

0.5

1 2 3 4 5 6

Printed by Wolfram Mathematica Student Edition


Untitled-1.nb 73

Manipulate[Show[a, Graphics[{Red, PointSize[0.02],


Point[{s - Sin[s], 1 - Cos[s]}], Black, Circle[{s, 1}, 1]}]], {s, 0, 2 }]

Printed by Wolfram Mathematica Student Edition

Potrebbero piacerti anche