Can Differential Equations Capture the Dynamics of Love? A Case Study with a TV Romance
This article explores how differential equations can model romantic relationships, using a Chinese drama as a case study, presents the underlying mathematical formulation, demonstrates numerical simulations with Python, and discusses the impact of random plot twists on emotional dynamics.
Love
Mathematical models are used to quantify phenomena; the author wonders how to model love, inspired by the drama "Floating Tower Fate".
In the drama, the emotional relationship between the two protagonists can be abstracted as a function of time.
The author suggests differential equations to describe emotional change.
Model
Since 1988 Strogatz proposed a love model for Romeo and Juliet; later Spott and Rinaldi extended it. Rinaldi divided love into response, oblivion, and instinct, providing a general differential equation.
Based on Rinaldi, the factors are oblivion, response, and instinct. Symbols represent the two partners, love/hatred at time t, oblivion function, response function, and instinct function. Combining them yields the love equation, assuming love decays without reinforcement, with oblivion coefficient α, linear response with coefficient β, and constant instinct A.
Example parameters: α1=0.05, α2=0.03, β1=0.4, β2=0.3, γ1=γ2=1, A1=A2=1, initial values 0.5.
Python code solves the system and plots the trajectories.
<code>import matplotlib.pyplot as plt
import numpy as np
from scipy.integrate import odeint
# parameters
alpha1,alpha2=0.05,0.03
beta1,beta2=0.4,0.3
gamma1,gamma2=1,1
A1,A2=1,1
x10,x20=0.5,0.5
steps=1000
t=range(steps)
def love1(x,t):
x1,x2=x
dx1=-alpha1*x1+beta1*x2/(1+gamma2*x2**2)+A1
dx2=-alpha2*x2+beta2*x1/(1+gamma1*x1**2)+A2
return np.array([dx1,dx2])
X1,X2=odeint(love1,[x10,x20],t).T
plt.plot(t,X1,label='X1')
plt.plot(t,X2,label='X2')
plt.legend()
</code>The plot shows both emotions converge to stable values around 20 and 34, with the slower‑forgetting side attaining higher love.
The phase‑plane diagram confirms the stable equilibrium at (20,34).
Back to the Drama
The model is reasonable, but writers do not follow such smooth trends; sudden plot twists act as random shocks.
To incorporate such events, an impulse term ε(t) is added, causing abrupt drops at specific times (e.g., -30 at t=60 for the male, -20 at t=40 for the female).
<code>alpha1,alpha2=0.05,0.03
beta1,beta2=0.4,0.3
gamma1,gamma2=1,1
A1,A2=1,1
x10,x20=0.5,0.5
steps=300
tarray=range(1,steps)
cris_1,cris_2=-30,-20
def epsilon1(t,t0=60):
if t==t0:
return cris_1
else:
return 0
def epsilon2(t,t0=40):
if t==t0:
return cris_2
else:
return 0
def love3(x,t):
x1,x2=x
dx1=-alpha1*x1+beta1*x2/(1+gamma2*x2**2)+A1+epsilon1(t)
dx2=-alpha2*x2+beta2*x1/(1+gamma1*x1**2)+A2+epsilon2(t)
return np.array([dx1,dx2])
xlist=[[x10,x20]]
for t in tarray:
dx1,dx2=love3(xlist[-1],t)
x1,x2=xlist[-1][0]+dx1,xlist[-1][1]+dx2
xlist.append([x1,x2])
X=np.array(xlist)
X1,X2=X.T
plt.plot(range(0,steps),X1,label='X1')
plt.plot(range(0,steps),X2,label='X2')
plt.legend()
</code>The resulting plot shows a temporary dip, even negative love for the male, before both settle again near (20,34).
The analysis illustrates how oblivion and response factors shape emotional dynamics, and how random shocks can model dramatic plot twists.
Model Perspective
Insights, knowledge, and enjoyment from a mathematical modeling researcher and educator. Hosted by Haihua Wang, a modeling instructor and author of "Clever Use of Chat for Mathematical Modeling", "Modeling: The Mathematics of Thinking", "Mathematical Modeling Practice: A Hands‑On Guide to Competitions", and co‑author of "Mathematical Modeling: Teaching Design and Cases".
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.