% SIMIODE-TeacherStudent-Template.tex and simiode.cls for LaTeX2e
% Version 22 November 2016.
% 
% This template is to be used with the  class file "simiode.cls". 
%  
% The latest version of this class and template files 
% can be found at
% 
%       <http://www.SIMIODE.org> in the Author section.
%
% A "Quick Start Guide" appears below.
%
% This file must be processed with version LaTeX2e or higher.
% Appreciation to Mark Frantz, IUPUI; John Thoo, Yuba College; and Eric Sullivan, Carroll College.
%
\documentclass{simiode}
%
% With this version of the tex file and the associated SIMIODE.cls file you can produce BOTH a Student Version and a Teacher Version of your modeling scenario or technique narrative.
%
% Student Version contains the title STUDENT VERSION along with the NAME OF SCENARIO, with no abstract, no keywords, no tags, no author identifiers, and no COMMENTS section. The Student Version contains only the STATEMENT of the modeling scenario only with appropriate figures, data, instructions, and perhaps a bibliography appropriate for student resourcing, but nothing in the bibliography which would "give away" the nature of the modeling scenario, etc.
%
%The Teacher Version contains the material in the Student Version, namely the title NAME OF SCENARIO, now headed with   TEACHER VERSION, but also full author  identification, abstract, key words, tag words, and, following the STATEMENT, a section of COMMENTS which can be discussion of presentation  ideas, "solutions," techniques, etc.
%
% Authors can prepare a full Teacher Version using the notions immediately below  to create a pdf for review, but in review please eliminate all information about the author as we use a double-blind referee system. Such information will be restored when accepted and published in SIMIODE at www.simiode.org.
%
%***********   Toggle the following line to turn the teacher version on (1) or off (0). ***********
%
\def\TeacherEdition{0} % Toggle this line's value.
\newcommand{\teacher}[1]{\ifnum\TeacherEdition=1 #1 \fi}
%
% The \teacher{ } command wraps any text that will appear only in the teacher version of
% the document. See this file for examples. This has been done for you in the document below.   
% Rename the pdf after you compile each final version.
%
\usepackage{amsmath,amssymb, amsthm}
\usepackage{color}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{url}
%
\renewcommand{\baselinestretch}{1.3}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{proposition}[theorem]{Proposition}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{question}[theorem]{Question}

%
% NOTE regarding macros %%
%
% Any macros defined for your paper should be contained in 
% the top matter. Likewise, any environment definitions such 
% as \newtheorem or \newenvironment should also go in the 
% top matter. 
% 
% Do not \input your macros as separate files within your 
% final version because more files make it harder for the 
% editors and users to keep track of and/or modify and 
% append your paper.
%
% Top matter is above and the beginning of the document below.
%
\begin{document}

\newpage
%
% You only need to change the NAME OF SCENARIO in the next line and delete the footnote. 
% See above for instructions on toggling from Teacher Version to Student Version.
%
\title{\ifnum\TeacherEdition=1 TEACHER VERSION \else STUDENT VERSION \fi\\Modeling the Dynamics of the \\Internet Platform Users' Volume}



\markboth{Modeling the Dynamics of the Internet Platform Users' Volume}{Modeling the Dynamics of the Internet Platform Users' Volume}

\author{Victoria Rayskin\\
New York Institute of Technology\\
New York City NY USA\\
vrayskin@nyit.edu
}

\makeStitlePDFLaTex


\begin{abstract}
A model estimating the volume of users interacting through a two-sided Internet platform (allowing interaction of two types of users) will teach students how to analyze a 2-dimensional dynamical system. The model will illustrate how the question of existence of closed orbits can be investigated. With the help of Excel spreadsheets, students will simulate the model or will enter real-life Internet platform data. The software will generate the pictures of the corresponding vector fields, which students will analyze and then use the theory of dynamical systems to justify their findings. The software does not require any installation, it can be opened with MSExcel.
\end{abstract}


\section*{SCENARIO DESCRIPTION}
Digital platforms enter many domains of our life. The platforms range from gigantic Amazon to small platforms, such as Cooper Hewitt Museum of Design (which counts all its visitors, and provides opportunity to re-visit the museum on-line and the platform users can virtually meet their favorite designers again).


Let $X$ be the number of all people that can potentially play $X$-role. Let $Y$ be the number of people that can play $Y$-role. For example, $X$-role can be seller's role on E-Bay, and $Y$-role can be buyer's role on E-Bay. The set of $X$-people and the set of $Y$-people can have non-empty intersection, i.e.  the same person can be a seller and a buyer on E-Bay. 

Consider an Internet platform that allows interaction of two kinds of users: those that can play $X$-role and $Y$-role. Denote by $x$ and $y$ the fraction of $X$ and $Y$ correspondingly, so that $0\leq x \leq 1$ and $0\leq y \leq 1$. We will study how the fraction of users interacting through some particular platform (for example, Amazon, E-Bay or Match.com) changes with time. We will consider the dynamics of users in the unit square.

For instance, $X$-users might be buyers, and $Y$-users sellers on Amazon, or $X$-users might be male, and $Y$-users female on Match.com. In these cases, we can assume that $X$-users are attracted by $Y$-users, and repelled by other $X$-users, and vice versa. Further, for simplicity we assume that repelling is linear and attracting is represented by some functions $V$ and $W$. The functions $V$ and $W$ are called {\it attachment functions}. $V(y)$ shows how strongly $X$-users of a particular platform are interested (attached) to $Y$-users. And $W(x)$ shows how strongly $Y$-users of a particular platform are interested (attached) to $X$-users. 

The attachment can be linear: $V(y)=y$ and $W(x)=x$. It can be much stronger: $V(y)=\sqrt y$ and $W(x)=\sqrt x$. This stronger attachment can be associated with a very popular platform, like Amazon. (Since, $x$ and $y$ are between $0$ and $1$, the square root function has a more rapid rate of growth than the linear function.) Weaker attachments (characteristics of  less popular platforms) can be expressed, for example, as $V(x)=x^2$ and $W(y)=y^5$.

The initial conditions of the model represent the initial fraction of $X$- and $Y$-users on the platform right now. When we follow the flow of the system, we move in time along the trajectory with the specific initial volume of users. However, the platform owners may change this ``trip,'' if they introduce some incentives to attract a different number of $X$- or $Y$-users. In this case we will ``jump" from our trajectory to a new trajectory, that corresponds to some different initial conditions. Also, a similar ``jump" may happen if external conditions (some economic changes, for example) affect the system.




\section{A MODEL OF AN INTERNET PLATFORM}
Based upon the assumption of attracting and repelling user pairs, let us summarize the rate of change of the volume of Internet users in the following model:
\begin{equation}\label{the-model}
\begin{array}{l}
\frac{dx}{dt} = V(y) -x,\\
\frac{dy}{dt} = W(x) - y.
\end{array}
\end{equation}
In this model we must assume that $V$ and $W$ are non-negative. 

\begin{question} Can you explain why we need this restriction?\end{question}

\teacher{{\em 
Note to Teacher: Throughout the Teacher Version of this Modeling Scenario we offer comments in italics which are visible ONLY in the Teacher Version and NOT in the Student Version.

$X$-users are attracted by $Y$-users and vice versa. So, the rate of growth of $X$-users is positively influenced by $Y$-users. The same for the reverse roles.}}

Also, in this model we must assume that on the unit square, the range of $V$ and $W$ is not greater than $1$. 

\begin{question} Recall that the fraction of users is a number between $0$ and $1$. Using  Figure~\ref{square}, can you explain why we need the restriction on $V$ and $W$?\end{question}

\teacher{{\em Suppose at some point $y^*\in [0,1]$ we have $V(y^*)>1$. Consider the point $(y^*, 1)$ on the boundary of the unit square. At this point (on the right side of the square) the vector field $\frac{dx}{dt}>0$ and this component of the vector field is pointing outside of the square. So, the flow, following this vector field will leave the unit square, i.e. the fraction of $X$-users will exceed $1$! This is impossible. Therefore, $V(y)$ must be $\leq 1$. Similar arguments hold for $W(X)$.}}

We constructed a good generic model. It is good, because the flow is always contained in the unit square. 

\begin{question} Using the Figure~\ref{square}, can you explain why the vector field of the system~(\ref{the-model}) points inside of the unit square (so that the flow is conserved in the unit square)?\end{question}

\teacher{{\em Suppose the flow brought us close to the boundary $y=1$. Take a point on the boundary, say $(x^*, 1)$. Can the vector field at this point take the flow outside of the unit square? No, it cannot, because $\frac{dy}{dt} = W(x^*) -1 \leq 1-1=0$. Similar arguments apply for the other 3 sides of the unit square.
\begin{figure}
\begin{center}\includegraphics[height=50mm]{quadrant.jpg}

\parbox{12 true cm}{\caption{The system~(\ref{the-model}) is defined on the unit square and cannot be defined outside of the square, because the fraction of users cannot exceed $1$. On the boundary of the square, the vector field of the system points inwards. This means that the flow is conserved and cannot escape the square.}}
\end{center}
\label{square}
\end{figure}
}}

\section{PROPERTIES OF THE DYNAMICAL SYSTEM MODEL}
In this section we will study the properties of the Internet platform dynamics. At the same time we will explore some of the most important questions in the theory of Dynamical Systems:
\begin{itemize}
\item Fixed points of a flow.
\item Linear approximation of a flow, and eigenvalues of linearized system.
\item Existence of periodic solutions (cycles).
\end{itemize}

\subsection{RULING OUT PERIODIC SOLUTIONS AND CLOSED LOOPS}
In this section we will talk about geometric properties of a planar (two-dimensional) flow. Fixed points and closed loops are landmarks that organize the behavior of the whole flow in the phase space.

A {\it fixed point} of the system is a point, where the vector field vanishes (or is equal to $0$). If a trajectory starts at the fixed point, it remains at this point forever. Fixed points can attract or repel other trajectories, or can have a hyperbolic behavior.

If a trajectory starts on an {\it orbit}, it also remains on the orbit forever. Similarly to fixed points, periodic orbits can attract or repel the flow, in which case they are called {\it limit cycles}.

A {\it heteroclinic orbit} (sometimes called a {\it heteroclinic connection}) is a path in phase space which joins two different fixed points. If the equilibrium points at the start and end of the orbit are the same, the orbit is called a {\it homoclinic orbit}. A chain of heteroclinic orbits may form a closed loop. See, for example, Figure~\ref{loop}.


\begin{figure}[h]
\begin{center}{\includegraphics[height=30mm]{orbit-pic.jpg}}

\parbox{10 true cm}{\caption{A chain of heteroclinic connections forms a closed loop. This behavior cannot be produced by System~(\ref{the-model})}}
\end{center}
\label{loop}
\end{figure}
Now we will show that the system~(\ref{the-model}) cannot have closed loops or periodic orbits. In the examples of the next sections we will see that all trajectories of the system eventually approach fixed points. Moreover, it can be shown that in the model~(\ref{the-model}) nothing more complicated than this can happen!

The divergence of a two-dimensional system, $$F(x,y)=\left\{
\begin{array}{l}
x'=f_1(x,y)\\
y'=f_2(x,y),\\
\end{array}
\right. 
$$
is defined as 
$$
{\rm div}F(x,y)=\frac{df_1(x,y)}{dx}+\frac{df_2(x,y)}{dy}.
$$
\\
\begin{question} Calculate the divergence of the model (\ref{the-model}).\end{question}
\teacher{{\em The divergence of our model is $-1-1<0$ everywhere.}}


\begin{question} Explain why negative divergence implies that there are no periodic solutions or closed loops in the model~(\ref{the-model}).\end{question}
\teacher{{\em 
Assume that the system (\ref{the-model}) has a periodic solution $\gamma$. Let $\Gamma$ be a simply connected region bounded by the loop $\gamma_1\subset \gamma$ Then, the integration along the loop $\gamma_1$ evaluates to $0$:
$$
\int_{\gamma_1} f_1(x,y)dy  - f_2(x,y)dx= 0.
$$

On the other hand, by Green's theorem
$$
\int_{\gamma_1} f_1(x,y)dy  - f_2(x,y)dx= \iint_{\Gamma}{\rm div} F(x,y)dxdy.
$$

Here, $\iint_{\Gamma}{\rm div} F(x,y)dxdy<0$, because ${\rm div} F(x,y,)<0$ for all $x$ and $y$.

We obtained the contradiction, which proves the absence of closed orbits.
}}

What does this all mean for the Internet platform owners? Trajectories representing the number of users will not cycle for an infinitely long time. They also will not wander inside of the unit square. All trajectories have ``a goal" -- each of them will converge to the trajectory-specific stationary (fixed) point, i.e. eventually the volume of platform users will stabilize around one of the platform-specific numbers.

\subsection{FIXED POINTS AND THEIR CLASSIFICATION}
Now we know that in our Internet platform model all solutions
converge to fixed points.

\begin{question} Where are the fixed points located?\end{question}

\teacher{{\em Set $x=V(y)$ and $y=W(x)$}}

\begin{question} What are the types of  fixed points in this case?\end{question}
Let $(x^*, y^*)$ be a fixed point. We want to consider the simplest approximation of the dynamics near the fixed point. This is the linear approximation. For the linear right side of the system of equations (\ref{the-model}) we can calculate the Jacobi matrix and calculate its eigenvectors, which govern local (near the fixed point) dynamics.
The Jacobi matrix at $(x^*,y^*)$ is
$$
J=\left[
\begin{array}{cc}
-1 & V'(y^*)\\
W'(x^*) & -1
\end{array}
\right]
$$

Thus the characteristic polynomial is 
$\lambda^2 + 2\lambda +1 -V'(y^*)W'(x^*)$

The eigenvalues are
$\lambda_{\pm} = -1\pm\sqrt{V'(y^*)W'(x^*)}$

This formula rules out repelling fixed points: At least one
eigenvalue has negative real part. Stable nodes, saddles, stable
spirals are all possible.

The role of the eigenvalues is to direct the flow. The two-dimensional eigenvector points to where the flow should go. If eigenvectors have imaginary parts, they allow the trajectory to spiral, and in a spiraling way to converge (because they come in conjugate pairs and have negative real part) towards the fixed point.

\begin{example}
The simplest example of the model can be illustrated with $V(y)=.5$ and $W(x)=.3$. The attachments do not satisfy the common assumption $V(0)=W(0)=0$ and $V(1)=W(1)=1$, but this example is not impossible in platform dynamics, and it clearly illustrates the local behavior of the flow near the fixed point. 

The model 
$$\left\{
\begin{array}{l}
x'=.5 -x\\
y'=.3-y.\\
\end{array}
\right. 
$$
has one fixed point: $(.5,.3)$. What are the eigenvalues of the system at this fixed point?
The Jacobian matrix at $(.5,.3)$ is
$$
J=\left[
\begin{array}{cc}
-1 & 0\\
0 & -1
\end{array}
\right]
$$
 The eigenvalues are both $-1$. This implies that $(.5,.3)$ is the attractor. All trajectories (started at any initial condition) are directed by the vector field towards the attractor. See Figure~\ref{simple-const-pic}.
\begin{figure}
\center\includegraphics[height=70mm]{simple-const-excel2.jpg}
\begin{center}\parbox{12 true cm}{\caption{The vector field is shown with the colored errors and the flow is indicated with the black lines. The fixed point is located at $(.5,..3)$. The Jacobian matrix of this linear model has negative eigenvalues at the fixed point. Therefore, it is the attracting fixed point. It attracts all trajectories started inside of the square.}}
\end{center}
\label{simple-const-pic}
\end{figure}
\end{example}

\begin{example}
A more interesting attractor is defined by $V(y)=4(y-.5)^3+.5$ and $W(x)=x$. The model takes the following form:
$$\left\{
\begin{array}{l}
x'=4(y-.5)^3+.5 -x\\
y'=x-y.\\
\end{array}
\right. 
$$
This system has three fixed points: $(0,0)$, $(.5,.5)$ and $(1,1)$. The corner points are both hyperbolic fixed points (i.e.  they have one positive and one negative eigenvalue) with repelling eigenvectors in the interior of the unit square. This can be verified via calculation of the eigenvalues and eigenvectors of the Jacobian matrix. Here, we will demonstrate that the point $(.5,.5)$ is an attractor. 
The Jacobian matrix at $(.5,.5)$ is
$$
J=\left[
\begin{array}{cc}
-1 & 12(.5-.5)^2\\
1 & -1
\end{array}
\right]\, .
$$
Both eigenvalues of this matrix are negative ($-1$ and $-1$). This means that $(.5,.5)$ is an attractor. See Figure~\ref{sink-pic}.
\begin{figure}
\center\includegraphics[height=70mm]{sink-excel2.jpg}
\begin{center}\parbox{12 true cm}{\caption{The vector field is shown with the colored errors and the flow is indicated with the black lines. The Jacobian matrix of this model has negative eigenvalues at the fixed point $(.5,.5)$. Therefore, it is the attracting fixed point.  It attracts all trajectories towards the center of the square. The origin and $(1,1)$ are hyperbolic fixed points, and they direct all the square interior's trajectories towards the attracting fixed point.}}
\end{center}
\label{sink-pic}
\end{figure}
\end{example}

\begin{example}
Next let us  change the shape of $V(y)$ for $V(y)=\sin(2\pi y)+y$ slightly. The new model
$$\left\{
\begin{array}{l}
x'=\sin(2\pi y)+y -x\\
y'=x-y\, ,\\
\end{array}
\right. 
$$
still has three fixed points $(0,0)$, $(.5,.5)$ and $(1,1)$ and hyperbolic fixed points at the corners. But the new system has an attracting spiral in the center. The latter can be verified via calculation of the eigenvalues at the point $(.5,.5)$. 
The Jacobian matrix at $(.5,.5)$ is
$$
J=\left[
\begin{array}{cc}
-1 & 2\pi\cos(\pi)+1\\
1 & -1
\end{array}
\right]\, .
$$
The eigenvalues of this matrix are complex conjugates with negative real part: $-1\pm i\sqrt{1-2\pi}$. This means that $(.5,.5)$ is attracting all trajectories in a spiraling way. See Figure~\ref{spiral-pic}.
\begin{figure}
\center\includegraphics[height=70mm]{spiral-excel2.jpg}
\begin{center}\parbox{12 true cm}{\caption{The vector field is shown with the colored errors and the flow is indicated with the black lines. The Jacobian matrix of this model has eigenvalues with negative real part at the fixed point $(.5,.5)$. Therefore, it is the attracting fixed point.  It attracts all trajectories towards the center of the square in a spiraling way. The origin and $(1,1)$ are hyperbolic fixed points, and they direct all the square interior's trajectories towards the attracting fixed point.}}
\end{center}
\label{spiral-pic}
\end{figure}
\end{example}

\begin{example}\label{example-two-basins}
In the next example, the spiraling region in the center breaks into two {\it basins of attraction}, because in this example the fixed point in the center is hyperbolic. Each basin of attraction (in the upper-right part and in the lower-left part) has an attractor in the corner (at $(1,1)$ and $(0,0)$ correspondingly). This example is constructed with $V(y)=-\sin(2\pi y)+y$. The system
$$\left\{
\begin{array}{l}
x'=-\sin(2\pi y)+y -x\\
y'=x-y.\\
\end{array}
\right. 
$$
has three  hyperbolic fixed points $(0,0)$, $(.5,.5)$ and $(1,1)$. Let us study the point $(.5,.5)$. The Jacobian matrix at $(.5,.5)$ is
$$
J=\left[
\begin{array}{cc}
-1 & -2\pi\cos(\pi)+1\\
1 & -1
\end{array}
\right]
$$
The eigenvalues of this matrix are: $-1\pm \sqrt{1+2\pi}$. This fixed point $(.5,.5)$ defines the location of separatrix line, which divides the region into 2 basins of attraction. See Figure~\ref{saddle-pic}.
\begin{figure}
\center\includegraphics[height=70mm]{saddle-excel2.jpg}
\begin{center}\parbox{12 true cm}{\caption{The vector field is shown with the colored errors and the flow is indicated with the black lines. The Jacobian matrix of this model has negative and positive eigenvalues at the fixed point $(.5,.5)$. Therefore, it is a hyperbolic fixed point. It defines the location of the separatrix (approximately indicated by the red line), which separates the two basins of attraction. Each basin of attraction has its own attractor (the origin and $(1,1)$). The hyperbolic fixed point directs the flow towards the attractor.}}
\end{center}
\label{saddle-pic}
\end{figure}
\end{example}

Please note, all the examples discussed in this section can be simulated with the help of our software, discussed in Section~\ref{chapter-data}.

\section{SETTING $x(0)$ AND $y(0)$ TO OPTIMIZE THE OUTCOME}
Other questions that may interest a platform  owner are: ``How to maximize the volume of users interacting through the platform?" or ``How to optimize the outcome of the platform for the platform owners?'' These questions are of a different nature, and we will not discuss them here in detail. 

The platform owner gets to set $x(0)$ and $y(0)$ with incentive programs, for instance.
We write $x_0 = x(0)$ and $y_0 = y(0)$. Once $x_0$ and $y_0$ have been
chosen, this determines a trajectory $(x(t), y(t))$, $t \geq 0$, which
eventually will converge to a fixed point $(x_{\infty}(x_0,y_0)), y_{\infty}(x_0,y_0))$.

We can
assign to this trajectory some sort of desirability measure.\footnote{We thank  Christoph Borgers for his help to improve the idea discussed in \cite{R2} of optimization of outcome.} In the
simplest case, that would depend on $x_{\infty}(x_0, y_0)$ and $y_{\infty}(x_0, y_0)$, and
the cost, $C(x_0, y_0)$, of achieving the initial point $(x_0, y_0)$. 
Assume $C$ is normalized so that $C \in [0, 1]$. Set
$$
G(x_0, y_0) = 1 -C(x_0, y_0).
$$
Our goal is then to maximize $x_{\infty}, y_{\infty}$, and $G$.
That's like saying you want to go to the grocery store that has the
highest quality, the lowest prices, and is the shortest distance from
your house. You usually can't have all three.


\section{CONSTRUCTING PLATFORM MODEL WITH DATA}\label{chapter-data}
In this section we will use our Model~(\ref{the-model}) for the analysis of some specific platforms.  Section~\ref{sec-data} is devoted to analysis of the platform dynamics with the help of our software, for data collected from a real-life platform. In Sections~\ref{sec-linear} and \ref{sec-other-models} we describe how to simulate data with the help of our software and how to analyze the dynamics of the platform with specific attachment functions.  

Please note that there are multiple publications on the analysis of Internet users behavior  with the help of game theory. We are not using these ideas, but you can read about them in \cite{ASS}, \cite{E}, \cite{EPA}, \cite{RT}.

\subsection{USING DATA FROM  A PLATFORM}\label{sec-data}
We collect the data representing the fraction of all theoretically possible $X$- and $Y$-users in the following way. During a long time period we collect $n$ sets of data representing the fraction of all theoretically possible $X$- and $Y$-users at times  $t_i$ and at times $t_i +\epsilon$, which is immediately after $t_i$. At each of the time segments $[t_i, t_i+\epsilon]$ we have $x_i^b$ fraction of $X$-users at the beginning of the time segment and $x_i^e$ fraction of $X$-users at the end of the time segment; and we have $y_i^b$ at the beginning of the time segment and $y_i^e$ at the end of the time segment. 

The vector $((x_i^e-x_i^b)/\epsilon, (y_i^e-y_i^b)/\epsilon)$ approximates the vector field of the users volume dynamics on the platform. It defines the dynamics, which we want to analyze. You can collect the data from some platforms and analyze its dynamics (using the method described above). 

\begin{question} Try to collect real platform data and  model the volume of users interacting through the platform. There various data resources. For example, you can collect various users statistics from Amazon platform: \\
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/getting-metric-statistics.html. Also, Yahoo! Web Analytics, Google Analytics and IBM Digital Analytics are available for collecting web-pages traffic.


\end{question}

You can enter the data and use our software for the analysis as described below.

Your  data must be entered in cells P2:S197 of the ``enter-data-set.xls" file found in Supplemental Docs. Each component of each data point must be in $[0,1]$. Then, for drawing the vector field of the 2-sided platform dynamics, you need to press the button of the same file, which says ``Draw the vector field of the 2-sided platform dynamics for your data from cells P2:S197", as shown in Figure~\ref{excel-data}. It is not necessary to enter all 196 rows of data. This 4-dimensional data set can have fewer data points and can have some missing points, but it cannot have more than 196 points:
\begin{figure}
\center\includegraphics[height=70mm]{excel-pic.jpg}
\begin{center}\parbox{12 true cm}{\caption{The screen-shot of the spread-sheet of ``enter-data-set.xls'' file. Here you can enter your data in the columns P, Q R and S. Then, you can generate the corresponding vector field with one click of the upper-left hand corner button.}}
\end{center}
\label{excel-data}
\end{figure}

\subsection{MODEL OF THE PLATFORM WITH  LINEAR ATTACHMENT FUNCTIONS}\label{sec-linear}
Here is the first example constructed with the simulated data and its visualization (please open the Excel file ``specify-attachments.xls'' to simulate this example).

In the spread-sheet of the file, click the button in the right upper corner, which says ``Simulate the data for 2-sided platform; Draw the vector field of the 2-sided platform dynamics".

You will be prompted to enter $V(y)$ and $W(x)$ functions. The default functions are $V(y)=\sqrt y$ and $W(x)=\sqrt x$. If you want to use these functions -- just click ``OK".

If you want to create new data and new dynamics of a new 2-sided platform model, you need to enter new $V(y)$ and $W(x)$ functions.  The syntax is the following:
\begin{itemize}
\item For $V(y)$ enter the following text \textcolor{blue}{=any-excel-function(M2)}
\item For $W(x)$ enter the following text \textcolor{blue}{=any-excel-function(L2)}
\end{itemize}

For example, you can enter \textcolor{blue}{=M2} for linear $V(y)$. You can enter \textcolor{blue}{=L2\,\^\,2} for quadratic $W(x)$.

Please remember, that $V$ and $W$ must be continuously differentiable on $(0,1)$ functions from $[0,1]$ to $[0,1]$ (the range cannot be negative or $>1$). Also, it is natural (although not necessary) to assume that $V(0)=W(0)=0$, because if no buyers or sellers are present, there is $0$ interest in such platform from users of the other kind. Similarly, if all $100\%$ of buyers or sellers are on-board, than the users of the other kind are very interested in such platform, i.e. $V(1)=W(1)=1$.

\begin{figure}
\center\includegraphics[height=70mm]{lin-excel.jpg}
\begin{center}\parbox{12 true cm}{\caption{This vector field can be simulated in ``specify-attachments.xls" file with some specific $V(y)$ and $W(x)$ attachment functions, entered at the prompt. In the question~\ref{question-lin} you are asked to determine what these functions are.}}
\end{center}
\label{lin-excel-figure}
\end{figure}

\begin{question}Suppose your simulation produced the vector field shown in Figure~\ref{lin-excel-figure}. Can you reconstruct the flow that corresponds to this vector field?\end{question}

\teacher{{\em The flow consists of straight lines, connecting initial condition with the ``nearest'' limit point on the diagonal line $x=y$. Here, the ``nearest'' point on the diagonal is such that the each trajectory approaching this point is perpendicular to the diagonal line.   
\begin{figure}
\center\includegraphics[height=60mm]{pictureLINEAR.jpg}
\begin{center}\parbox{12 true cm}{\caption{This is the flow (corresponding to the linear attachments) generated by vector field shown in Figure~\ref{lin-excel-figure}. The green dots are the initial conditions. Each trajectory converges to a point on the diagonal line $x=y$.}}
\end{center}
\label{line-flow-figure}
\end{figure}
}}


\begin{question}\label{question-lin-fixed-pts}What are the limit points of this flow? What are the fixed points of the flow? Can you see that there are no cycles in this flow?\end{question}

\teacher{{\em The limit points form the diagonal line $x=y$. The fixed points also form the diagonal line $x=y$. There are no cycles.}}

\begin{question}\label{question-lin} In this case, can you reconstruct the functions $V(y)$ and $W(x)$? Using the formal definition of the fixed point, find all the fixed points. Verify that you identified the fixed points correctly in the Question~\ref{question-lin-fixed-pts}. Compute the eigenvalues of the system at the fixed points. Now, write the general solution of this linear system of differential equations, and show that each trajectory converges towards the diagonal $x=y$. The attraction towards the fixed points is caused by the negative eigenvalue, which you have just computed.\end{question}

\teacher{{\em Since the flow consists of straight lines, we have linear differential equations. Then, the differences $V(y)-x$ and $W(x)-y$ must be linear functions of $x$ and $y$. Therefore, $V(y)=\alpha y + \beta$.  Also, the picture suggests that on the diagonal $x=y$ the vector field is $0$. I.e. when $y=x$, we must have $V(y) -x =0$ for any $y$ and $x$. This means that $\alpha x +\beta = x$ for all $x$. Consequently, $\beta=0,\ \alpha = 1$. So, $V(y)= y$. Similar arguments show that $W(x)=x$.}}

The fixed points of the system
$$
\left\{
\begin{array}{c}
x'=y-x\\
y'=x-y
\end{array}
\right.
$$
are along the line $x=y$.

The Jacobi matrix in $(x,y)$ is
$$
J=\left[
\begin{array}{cc}
-1 & 1\\
1 & -1
\end{array}
\right].
$$

Thus the characteristic polynomial is 
$\lambda^2 + 2\lambda$.

The eigenvalues are
$\lambda_{\pm} = -1\pm 1$. So, one eigenvalue is negative and another one is $0$. 

We can solve the system of these linear equations in the following way. The sum $x'+y'=0$. Which means that 
$$
y=-x+k.
$$
Also, along the diagonal $x=y$, both $x'$ and $y'$ are $0$. Above the diagonal, $x'>0$ and $y'<0$. This implies that $y=-x+k$ is attracted to the diagonal from above. Below the diagonal, we have a mirror image of the above behavior. 

Thus, we can see that the negative eigenvalue turns the diagonal line into the attractor.
\subsection{SIMULATE OTHER MODELS, AND READ ABOUT OTHER MODELS}\label{sec-other-models}

\begin{question}Use the Excel file to simulate the data, corresponding to the attachment functions $V(y)=\sqrt y$ and $W(x)=\sqrt x$.\end{question}

\begin{question}Using only the picture obtained with the help of our software, analyze the dynamics of the platform with the square-root attachments: find fixed point(s); characterize the fixed point(s) (attractor, repellor, hyperbolic fixed point); describe the behavior of the flow.\end{question}

\begin{question}\label{question-sqrt}In the same case of square root attachment, employ the theory and calculations for finding fixed points and describing their types (repeller, attractor or saddle point).\end{question}

\teacher{{\em The vector field for question~\ref{question-sqrt} is shown in Figure~\ref{sqrt-fig}.

\begin{figure}
\center\includegraphics[height=70mm]{sqrt-excel.jpg}
\begin{center}\parbox{12 true cm}{\caption{This vector field can be simulated in ``specify-attachments.xls" file with $V(y)=\sqrt{y}$ and $W(x)=\sqrt{x}$ attachment functions. }}
\end{center}
\label{sqrt-fig}
\end{figure}

The flow for question~\ref{question-sqrt} is shown in Figure~\ref{sqrt-flow-fig}.

\begin{figure}
\center\includegraphics[height=60mm]{pictureSQRT.jpg}
\begin{center}\parbox{12 true cm}{\caption{This is the flow (which corresponds to the square root attachments) generated by vector field shown in Figure~\ref{sqrt-fig}. The green dots are the initial conditions. Each trajectory converges to the attracting fixed point $(1,1)$ in the upper right corner. The square root attachment is much ``bigger'' than the linear attachment (for $x<1$ and $y<1$). This strong binding between $x$ and $y$ users causes growth of the number of users toward the maximum.}}
\end{center}
\label{sqrt-flow-fig}
\end{figure}

The fixed points must satisfy the equations:
$$
\sqrt{y}=x \mbox{  and } \sqrt{x}=y,
$$
This implies that the fixed points are $(0,0)$ and $(1,1)$. However, $(0,0)$ is not a point of smooth differentiability, so we will not discuss it here.

The characteristic polynomial at $(1,1)$ is 
$$
(1+\lambda)^2 -1/4,
$$
and the eigenvalues are $-1/2$ and $-3/2$. All eigenvalues are negative. This means that $(1,1)$ is an attractor. As we observed above, from any initial position $(x,y)\neq (0,0)$ in the unit square, the flow converges to $(1,1)$.

}}

\begin{question}\label{question-quadratic}Use the Excel file for the simulation of the data corresponding to the attachment functions $V(y)= y^2$ and $W(x)= x^3$.\end{question}

\begin{question}Analyze the simulated dynamics of the platform using the picture, obtained with the help of our macro. To generate this picture, we ran our macro of the ``specify-attachments.xls" file, and sett $V(y)=y^2$ and $W(x)=x^3$ at the prompt.\end{question}

\teacher{{\em The vector field in Figure~\ref{quadratic-fig} directs all trajectories toward the corner $(0,0)$, which is the attracting fixed point. The only exception is the trajectory with the initial condition in the corner $(0,0)$ itself. We can see the the vector field vanishes when approaches this corner. This means that $(0,0)$ is another fixed point (which is not an attractor).}}

\begin{question}Analyze the simulated dynamics of the platform using the theory and calculations.\end{question}

\teacher{{\em The vector field for question~\ref{question-quadratic} is shown in Figure~\ref{quadratic-fig}.

\begin{figure}
\center\includegraphics[height=70mm]{quadratic-excel.jpg}
\begin{center}\parbox{12 true cm}{\caption{This vector field can be simulated in ``specify-attachments.xls" file with $V(y)=y^2$ and $W(x)=x^3$ attachment functions. These attachments are very weak (for $x<1$ and $y<1$ attachment is ``small''), and the flow of users vanishes eventually.}}
\end{center}
\label{quadratic-fig}
\end{figure}

The fixed points must satisfy the equations:
$$
y^2=x \mbox{  and } x^3=y,
$$
This implies that the fixed points are $(0,0)$ and $(1,1)$.

For the origin  the characteristic polynomial is 
$$
(1+\lambda)^2,
$$
and both eigenvalues are $-1$. All eigenvalues are negative. This means that all trajectories near $(0,0)$ converge to $(0,0)$.

For the fixed point $(1,1)$  the characteristic polynomial is 
$$
(1+\lambda)^2-6,
$$
and the eigenvalues are $-1\pm \sqrt{6}$. One eigenvalue is positive and another one is negative. This is a hyperbolic fixed point. Trajectories may come close to $(1,1)$, but will flow away and converge to $(0,0)$.
}}



You can read more about ordinary differential equation models of the volume of users interacting through digital platforms in \cite{R1} and \cite{R2}. Some models described in these publications may have the following dynamics:
\begin{figure}
\center\includegraphics[height=60mm]{pictureSMOOTHEDstairs3.jpg}
\begin{center}\parbox{12 true cm}{\caption{This flow has 3 basins of attraction and 3 attracting fixed points: $(0,0)$, $(.5,.5)$ and $(1,1)$. The other 2 hyperbolic fixed points belong to separatrices. This flow was generated with the smooth attachment functions $V(y)$ and $W(x)$ that intersect (crossing each other) at 5 different points. These 5 points correspond to the fixed points of the flow.}}
\end{center}
\label{basins-figure}
\end{figure}
This dynamical system has 5 fixed points (2 hyperbolic fixed points and 3 attractors). All fixed points are located along the diagonal $x=y$. The attractors are at $(0,0)$, $(.5,.5)$ and $(1,1)$. They attract the trajectories inside of their own basin of attraction. The 2 hyperbolic points are located on the diagonal, between the attractors $(0,0)$ and $(.5,.5)$, and between $(.5,.5)$ and $(1,1)$. They are landmarks that indicate the location of separatrices.  The behavior of the flow inside of different basins is different. Here we have 3 basins, separated by 2 separatrices. The separatrices run through 2 hyperbolic fixed points. This example is similar to the Example~\ref{example-two-basins}.

If the initial volume of users belongs to the basin with attractor $(x_0,y_0)$, eventually the flow of users will converge to the point $(x_0,y_0)$,  unless there are significant changes in policies, economics, or incentives, which allow the flow of users to ``jump'' into another basin of attraction.

%\section*{Submission Version}For submission to the manuscript management system, \url{https://simiode.expressacademic.org} authors should submit a Teacher Version with all author identifying information stripped out. This should be a pdf version of the material. Authors may also submit supporting documents such as pdf's of code files, e.g., MatLab, Mathematica, Maple, SAGE, etc. and spreadsheets and data files.  

\begin{thebibliography}{98}
\bibitem{ASS} Antoci, A., F. Sabatini, and  M. Sodini. 2012.  {\it See you on Facebook! A framework for
analyzing the role of computer-mediated
interaction in the evolution of social capital}. {\it Journal of Socio-Economics}. 41(5): 541-547.

\bibitem{AS} Araujoa, R.A. and N.A. de Souza. 2010. An evolutionary game theory approach to the dynamics of the labour
market: A formal and informal perspective.  {\it Structural Change and Economic Dynamics}.  21: 101--110.

\bibitem{E}Easley, D. and  J. Kleinberg. 2010. {\it  Networks, Crowds, and Markets: Reasoning about
a Highly Connected World, Cambridge University Press, Cambridge\/}.

\bibitem{EPA} Eisenmann, T.R., G. Parker,  and M. van Alstyne. 2006.  Strategies for Two-Sided Markets. {\it Harvard Business Review\/}. 84(10): 92-101.

\bibitem{R1} Rayskin, V. 2016. Dynamics of Two-Sided Markets. \href{http://dx.doi.org/10.1515/roms-2015-0001}{http://dx.doi.org/10.1515/roms-2015-0001}. {\em Review of Marketing Science}. 14(1): 1-19. 


\bibitem{R2} Rayskin, V. 2017. Users' dynamics on digital platforms. \url{https://doi.org/10.1016/j.matcom.2017.04.007}. {\em Mathematics and Computers in Simulation}. 142: 82-97.

\bibitem{RT}Rochet,  J.-C.  and J. Tirole. 2003. Platform competition in two-sided markets. {\it Journal of the European Economic Association}. 1(4): 990-1029.

\bibitem{W} Wiggins, S. 1990. {\it Introduction to Applied Nonlinear Dynamical Systems and Chaos}. Berlin etc., Springer‐Verlag.

\end{thebibliography}

\teacher{
\section*{NOTES FOR TEACHERS}
Digital platforms are among the most important economic and social developments of our time. They bring together people, organizations, and resources for information, services, and other exchanges. In this module, we introduce a new -- dynamical systems -- approach to the study of digital platforms. The game-theoretic approach (\cite{ASS}, \cite{AS}, \cite{RT}), which is currently the most popular approach, helps practitioners to optimize their pricing and other short-term strategies. The dynamical systems approach allows the study of some fundamental properties that govern dynamics of platform users and helps platform owners to analyze platforms in several critically important directions discussed below.

One of the main factors of a platform's effectiveness is the volume of users interacting through the platform. The central subject of the analysis performed with our model is the global picture of the dynamics of the volume of platform users. The dynamical approach allows the prediction of future behavior and the tendency of the trajectories of each group of platform users. These dynamics can be viewed from the platform owner's point of view. Understanding the properties of the system helps practitioners to optimize the platform effectiveness via incentives adjustment. Furthermore, platforms are becoming increasingly complex. This complexity is influenced by the growing number of distinct groups of users (sides of the platform) that interact with each other through the platform. For example, after establishing the trading platform for sellers and buyer, Amazon announced three new product offerings: Elastic Compute Cloud, which lets programmers rent computing capacity on Amazon's systems; Simple Storage Service (S3), which provides cheap access to on-line storage; and Mechanical Turk, which connects firms with people who perform small tasks that are difficult to automate. The multi-dimensional dynamical systems technique is suitable for extension of the study of two-sided platforms, which were more common previously,  to  multi-sided platforms, which are becoming increasingly more common now.

Using the examples of digital platforms, students will learn some ideas of a model construction and some qualitative characteristics of differential equations. After a brief review of the divergence of a vector field, they will learn how it influences the existence of closed orbits. Students will also learn the ideas of fixed points and how they organize the dynamics. They will review the construction of  the Jacobian and the calculation of the eigenvalues of a linear system. Then, they will explore how these eigenvalues direct the flow. With the help of the software simulations, they will observe how various differential equations define the types of fixed points (sinks, hyperbolic points and spiral nodes) and how this affects the flow.

%\begin{thebibliography}{99}

%\bibitem{R1} Rayskin 1971. {\it The Struggle for Existence}. New York:  Dover Publications, Inc. First published in 1934 by The Williams \& Wilkins Company and available completely on the world wide web at \url{http://www.ggause.com/Contgau.htm}. Accessed  31 March 2008.

%\bibitem{Wiggins} Wiggins

%\bibitem{R2} Rayskin. %1978. {\it Introduction to Population Ecology\/}. New Haven CT:  Yale University Press.
%\end{thebibliography}

}





\end{document}
