Monday, February 14, 2011

The Love Function

Typically, my semesters are spent teaching Physics courses.  The past two semesters have been a little bit different for me, with some Mathematics courses thrown into the mix.  A few weeks ago, in my Calculus course, one student, we will call “Jimmy”, asked if math could be used for something useful.

I explained that math was the language of science, and science affects us every day.  Also, business requires math to predict where it will go based on where it has been and other factors.  The social sciences require a deep understanding of statistics to make sense of our lives.

Jimmy said that business and science are good, but not all that important to him at this stage of his life.  “Can math help us find love?” he asked.  What an excellent question.

The students from my Calculus course would like
to wish you a happy Valentine's Day!

Together, the classroom of 18-year-old students and I began to investigate if we could use functions and calculus as a tool to help us find love.  The process took some time, and in the end, we did not answer this question to its full extent, but we did answer a different one: “What is the likelihood of finding love?”

With some chalk, a blackboard, and our brains, we determined what the class endearingly named “The Love Function”.  A function is a relationship between variables.  The love function outputs the probability, as a percentage, of a person to have fallen in love at least once at some point in their past given their current age in years.  The kind of love we are talking about here is the intimate kind (every child loves their parents; they are biologically programmed to do so).

For the love function to work, all one must do is input their age in years into the function, and out comes the likelihood that they are in love or have been at some point in the past.  The probability is dependent on time, the independent variable.

Several steps were taken to come up with an appropriate function to describe this probability.  First, a model, or function type needed to be determined.

The odds of finding someone to love vary as we go through life.  A baby cannot fall for someone intimately, and even a young adolescent is unlikely to do so in a meaningful way.  The twenties are definitely the high point for falling in love, as most first marriages occur when people reach their late twenties.  We decided that if someone has never fallen in love by the time they are 30 years old, it is still possible for it to happen, though less likely.

The probability for cupid to strike at least once increases for the entire domain of time that is a person’s life.  Those that know calculus realize that the function must therefore have a positive derivative at all times.  The function model we elected to use for the love function took the form: L(t) = A/(1+BCt-D).  A function of this type increases slowly for some time, then increases dramatically, and then increases slowly again, as long as C is a value between zero and one.  To fully define the function, we now needed to determine the values of constants A, B, C, D.

We made three assumptions that enabled us to complete the love function.  The first one was that 90% of people who live beyond 80 years of age fall in love at least once.  This allowed us to seek the end behaviour of the function, which showed that A = 90.

The second assumption is that just 4% of 16-year-olds have found love at least once.  This may seem low, but we agreed as a class that it is hard to find true love until you know yourself fairly well, and few teenagers can make that claim.  This data point allowed us to solve for two unknowns: D = 16 and B = 21.5.

The final constant took some thinking to solve for.  The third assumption we made was that the maximum opportunity to fall in love occurred when one is towards the end of school or at the start of their first real job.  This moment in time, we assumed, occurs when someone is, on average, 24 years old.  The moment of maximum opportunity coincides with the maximum slope of the love function.  The students in the class, with some guidance from me, realized that the maximum slope occurs when the concavity of the function is zero.

So, we took two derivatives of the function.  We then set that function equal to zero, and input the time of maximum opportunity, t = 24.  This enabled us to solve for the final constant, C = 0.625.  With the constants all solved for, we could present the completed love function as follows:

L(t) = 90/[1+21.5(0.625)t-16] [%]

If you replace the t in the equation above with your age in years, the calculation will output the likelihood that you are in love now, or have been in love at least once in your life, as a percentage.  The graph below is a plot of the love function.  What is the likelihood that you have found love?

The accuracy of this probability function is related to the correctness of our three assumptions as well as the validity of the function model we chose.  The use of some statistical data would allow the love function to be a bit more accurate.  As a first guess, I think this is a reasonably accurate result.

Of course, the true definition of love sits in the category of philosophy – a place where math has difficulty to swim.  The meaning of love is on the minds of many of you as I post this article today, the 14th of February, Valentine’s Day.

If nothing else, the exercise was useful for the math class as it provided a meaningful backdrop for mathematical modeling and calculus.  Still, I think that the results of the love function are worth considering. 

The love function tells us that Valentine’s Day is or has been an important day to the vast majority of us fortunate enough to live a full life.  Also, the fact that the function is always increasing indicates that it is never too late to fall in love for the first time.

I present to you, "The Love Function"
Finally, I think that the steep slope of L(t) that we see in our twenties is representative of the turbulent period of time that this tends to be: a time when we are both stressed and swept away by the all-encompassing powerful entity that is love.


Stranger said...

What a awesome class !!!!!!

Anonymous said...

I LOVE THIS... great work, class! ❤