Section 4.4: Love affairs

So, this is the last section of the notes, for now. If you carry on next year with applied maths you may find me teaching you Second Year Non-Linear Dynamics, in which case I will be carrying on with the notes then...but for now, let’s look at love affairs.
This example is adapted from Strogatz, and is based on a paper of his from 1988.
​
This is a tale of two penguins who can be found in Simon’s Town, just down the coast from here. Thando and Marsha are two penguins, and their relationship is...complicated. We will be modeling their love for one another.
T(t)measures
Thando’s love for Marsha and
M(t)
measures Marsha’s love for Thando. These variables can be positive (loving) or negative (hating). A nearby mathematically minded penguin named Erdös has come up with a model for the couple’s dynamics. Erdös the penguin claims that an appropriate model for what she has seen is:

T
(t)=aM(t)

M
(t)=-bT(t)
where
a
and
b
are positive real numbers. This says that Thando’s love goes up when Marsha’s love is positive, and goes down when Marsha’s love is negative (let’s call it what it is...hate). Unfortunately Marsha’s love goes down when Thando’s is positive and vice versa. This is a tricky stage of their relationship because as soon as Thando sees that Marsha is keen, Marsha loses interest and then so does Thando, and then Marsha gets into the now disinterested Thando, and so it goes on without end. Here we have a cycle. If
a=b=1,wehave:
In[]:=
{T[t],M[t]}/.DSolve[{T'[t]M[t],M'[t]-T[t],T[0]#Cos[0],M[0]#Sin[0]},{T,M},t][[1]]&/@{1};​​Show[ParametricPlot[%,{t,0,10},AspectRatio1,PlotRange{{-1.2,1.2},{-1.2,1.2}},PlotStyleBlue],Graphics[Arrow[{#/.t2,#/.t2.1}]&/@%],AxesLabel(Style[#,20]&/@{"T","M"})]
Out[]=
​
A really toxic relationship!
​
Now how about if we had

T
(t)=aT(t)+bM(t)
. If both parameters are greater than zero, then Thando is an eager beaver! Thando gets punch drunk on their own love and also on Marsha’s love! If
a<0andb>0
then we have a cautious lover. When their own love goes up, Thando gets nervous and this cools off their love for Marsha, but Marsha’s love is like rocket fuel for Thando and causes T(t) to go up.
​
What if we have two equally cautious lovers?

T
(t)=aT(t)+bM(t)

M
(t)=bT(t)+aM(t)
so
a<0andb>0
. There are a couple of possibilities here. Remember that we have our eigenvalues as:
λ
1,2
=
τ±
2
τ
-4Δ
2
Now
τ=2aandΔ=
2
a
-
2
b
,so:
λ
1,2
=a±b
Remember that a is less than zero, so we have a couple of possibilities. If
2
a
<
2
b
thena+b>0anda-b<0
. This tells us that we will have one positive eigenvalue and one negative eigenvalue. This leads to the saddle point situation:
In[]:=
​​findflow[startingpoints_]:=Module[{x0,y0},​​{x0,y0}=startingpoints;​​c1c2vals=Solve[{x0==c1+c2,y0c1-1c2}][[1]];​​flowpoints=c1
#
E
{1,1}+c2
-#
E
{1,-1}/.c1c2vals&/@Range[0,5,0.01]​​]​​ShowShowListPlot[{{0,0}},PlotRange{{-3,3},{-3,3}},AspectRatio1],Graphics[#]&/@(Arrow[{{0,0},#{1,1}}]&/@{1,-1}),Graphics[#]&/@Arrow#
{1,-1}
2
,{0,0}&/@{-2,2},{ListLinePlot[Evaluate[findflow[#]],PlotRange{-3,3.5}],Graphics[Arrow[{findflow[#][[100]],findflow[#][[101]]}]]}&/@{{-1,1+0.1},{-1,1-0.1},{1,-1+0.1},{1,-1-0.1}},PlotRange{{-1,1},{-1,1}},AxesLabel(Style[#,20]&/@{"T","M"})
Out[]=
​
Depending on where we start, we are either going to have a love fest, or an all out war, neither of which looks great for penguin society.
​
How about if both
a+banda-b<0.Well,thenweendupwith
a stable node at (0,0) which means that independent of how much they start loving or hating each other, there will be complete indifference in the end.
In[]:=
pl2=Show[ListPlot[{{0,0}},PlotRange{{-1,1},{-1,1}},AspectRatio1],Graphics[{Thick,#}]&/@(Arrow[{#{1,1},{0,0}}]&/@{1,-1}),Graphics[{Thick,#}]&/@(Arrow[{#{1,-1},{0,0}}]&/@{-1,1})];​​flowin[st_]:={T[t],M[t]}/.NDSolve[{T'[t]==-2T[t]+M[t],M'[t]==T[t]-2M[t],T[0]==st[[1]],M[0]==st[[2]]},{T,M},{t,0,2}]​​Show[pl2,ParametricPlot[Evaluate[flowin[#]],{t,0,2},PlotStyle->Blue]&/@{{0.5,1},{1,0.5},{1,-0.5},{0.5,-1},{-0.5,-1},{-1,-0.5},{-1,0.5},{-0.5,1}},Graphics[Arrow[{flowin[#][[1]]/.t->0.5,flowin[#][[1]]/.t->0.51}]]&/@{{0.5,1},{1,0.5},{1,-0.5},{0.5,-1},{-0.5,-1},{-1,-0.5},{-1,0.5},{-0.5,1}},AxesLabel(Style[#,20]&/@{"T","M"})]
Out[]=
We have looked at only a very small part of the parameter space for the tale of this pair of lovers. Can you see if there are any parameters which will lead to a good outcome?
Homepage

​​JonathanShock,UniversityofCapeTown2021​​jon.shock@gmail.com