National and Kapodistrian University of Athens

Department of Economics
Division of Mathematics and Informatics
MATH302 Dynamical Mathematics with Mathematica
T.A. PhD candidate Nick Poulios
Email: npoulios@econ.uoa.gr
Solutions to Problem Set 3

Exercise 1

listaTarget={2,4,b,d};

lista0={1,2,3,4};

lista1={a,b,c,d};

lista3=lista0[[2;;4;;2]]

lista4=lista1[[2;;4;;2]]

lista5=lista3⋃lista4

listaTarget==lista5 (*to check if your result is matching with your list target*)

Exercise 2

Table[i j k,{i,2},{j,4},{k,3}]

Exercise 3 - Fibonacci

Clear[f]
f[0]=1;
f[1]=1;
f[n_]:=f[n]=f[n-1]+f[n-2]

Table[f[n],{n,0,20}]

?Fibonacci

Table[Fibonacci[n],{n,1,21}]

Exercise 4 - Trigonometric Table

t1=Table[((v π)/4),{v,0,8}];

t2=Table[((u π)/6),{u,0,12}];

angles= t1 ⋃ t2

Clear[f]

f[x_]={x,Sin[x],Cos[x],Tan[x],Cot[x]};

values=Map[f,angles];

values1=f/@angles; (*2os tropos*)

TableForm[values,TableHeadings->{None,{"x","Sin(x)","Cos(x)","Tan(x)","Cot(x)"}}]