Periodic behaviour and Differential Equations
A second order equation and its solutions
UBC Calculus Online Course Notes

A Love-Hate Relationship

Applications of the Trigonometric Functions

In our investigation of the trigonometric functions so far, we saw that from the pattern of derivatives that the pair of functions $ y(t)=\sin(t), x(t)=\cos(t) $ satisfied the following connected relationships:


\[ 
\frac{dx}{dt} = -y 
\] 
\[ 
\frac{dy}{dt} = x 
\]

We will now investigate an example of a situation to which this example applies.


Jack and Jill

A modern story based on the classic Romeo and Juliet by Steven Strogatz (1988). You can read about this and other marvelous mathematical ideas in his delightful book: Nonlinear Dynamics and Chaos Addison Wesley, 1994.

Jack and Jill are having a rocky relationship. Jack thinks he loves Jill, but whenever she gets too interested, he avoids making a committment, and loses interest, starting to dislike her more and more. As soon as Jill cools off, he starts to find her more attractive, and falls back in love. Jill, on the other hand, just follows Jack's lead. When he likes her, her interest increases, but when he dislikes her, her interest wanes. What will happen to these unfortunate lovers?


Let's suppose we are psychologists, and assign some rating to the emotional state of each of the lovers. The rating system might look something like this:

Rating System

-101
HateNeutralLove

We also define the two lover's emotional states by denoting:

$ x(t) $ = Jack's emotional state at time t,
$ y(t) $ = Jill's emotional state at time t,

It is understood that both these variables can take on any value in the range {-1,1). For example, if $ x=0.5 $ , Jack is quite interested in his partner, but not at the extreme of his passionate love for her.

Now we turn to trying to model the relationship by using mathematical ideas.

Since the two people are continually changing their minds, clearly, our description should involve changes, and rates of change. We might expect to make statements involving $ dx/dt,~~dy/dt $ . Since the way that each person's feelings change depends on the current state of their partner, we would expect that the relationship would be linked. Indeed, we might anticipate that some differential equations are lurking in this example.

To be more precise, we can make the following observations about:

Jack's changing mood

Jack loses interestifJill loves him
$ x(t) $ decreasesif $ y(t) $ is positive
$ dx/dt<0 $ if $ y(t)>0 $
Jack gains interestifJill hates him
$ x(t) $ increasesif $ y(t) $ is negative
$ dx/dt>0 $ if $ y(t)<0 $

This suggests that we might try out the relationship


\[ 
\frac{dx}{dt} = -y 
\]

We observe that the correct sign pattern is preserved by this relationship.

A similar analysis can be done for Jill's side of the story. Indeed, you might want to fill in the entries in the table for Jill


For your consideration:

Use the information provided to fill in the entries of the following table

Jill's changing mood

Jill loses interestifJack hates her
$ y(t) $ _________ if $ x(t) $ is ______
$ dy/dt $ _______if________
Jill gains interestifJack loves her
$ y(t) $ _______if $ x(t) $ ______
$ dy/dt $ _______if________

This table should lead us to a relationship of the form


\[ 
\frac{dy}{dt} = x 
\]

(Check to make sure that you understand the connection between the derivative of one variable and the value of the other variable.) Putting together the two equations, we have:


\[ 
\frac{dx}{dt} = -y 
\] 
\[ 
\frac{dy}{dt} = x 
\]

You will perhaps notice that these equations are familiar ! Indeed we started with these equations at the top of this page, and reminded you that they arose in our investigation of the trigonometric functions. Since we are already familiar with these equations, we know that a pair of functions that satisfy this set of coupled differential equations are


\[ 
x(t)=\cos(t) 
\] 
\[ 
y(t)=\sin(t) 
\]

The ups and downs of the relationship is shown below. Jack is shown in blue, and Jill in pink.

It turns out, however, that a much wider variety of functions also satisfy the same linked relationship. Indeed, it can be shown that the functions below are also solutions to the same set of equations:


\[ 
x(t)=A \sin(t) + B \cos(t) 
\] 
\[ 
y(t)=B \sin(t) - A \cos(t) 
\]

Here $ A, B $ are any real constants, so that this is a much larger class of functions which include the choice we made above as a special case.. (It turns out that this class of functions represents the most general form of solutions to the above system of equations. We have not left out or forgotten any functions that might also "work". However, to understand why this is true, further work, beyond the scope of this first introduction is required.) We can see that these more elaborate functions are also solutions by taking derivatives and plugging into the differential equations. For example, we note that the derivative of the first function is:


\[ 
\frac{dx}{dt}=\frac{d}{dt} \left(A \sin(t) + B \cos(t)\right) = 
A \frac{d \sin(t)}{dt} + B \frac{d \cos(t)}{dt} 
=A \cos(t) - B \sin(t) = -y(t) 
\]

This verifies that the first equation is satisfied. You are asked to verify that the second equation is also satisfied below.

For your consideration:

  • Take the derivatives of the function $ y(t) $ above and show that it satisfies the second differential equation.


Back to the first meeting: initial values

Since we have encountered a differential equation in previous work on the exponential functions, it is perhaps not completely surprizing that there is a whole family of functions which can be solutions to the differential equation(s). Again, these equations only make statements about the way that a function or a set of functions are changing, not where they start off. We saw in our previous work that by adding more information about starting values of the functions at time $ t=0 $ , we can completely specify one member of the family. This is true also in the example we are discussiong at present. However, we see that since there are two unspecified constants, $ A, B $ , we will need two pieces of informations.

Suppose that when Jack and Jill first met at $ t=0 $ , Jill was quite neutral $ y(0)=0 $ but Jack instantly fell madly in love $ x(0)=1 $ . We will use this initial condition to determine the values of the two constants $ A, B $ . We simply plug in $ t=0 $ and set $ x(0)=1,~~~y(0)=0 $ to get:


\[ 
1=x(0)=A \sin(0) + B \cos(0) = B 
\] 
\[ 
0=y(0)=B \sin(0) - A \cos(0) = - A 
\]

where we have used the fact that $  \cos(0)=1,~~\sin(0)=0 $ above. From these equations, it is easy to see that the constants should have values $  A=0, ~~~B=1 $ .


For your consideration:

  1. (1) If the first meeting between our couple is different, namely, if both are mildly interested, $  x(0)=0.5, y(0)=0.5 $ , show that the values of the constants are $  A=B=0.5 $

  2. (2) Sketch the solutions in this case, i.e. draw a picture of $ x(t) = 0.5( \sin(t) + \cos(t), $ and $ y(t) = 0.5(\sin(t)-\cos(t)) $
In general, as we have seen in this example, the values of the arbitrary constants that appear in the most general form of the solutions to a differential equation (or a set of differential equations) can be found once the initial values of the variables are specified.