“Guessing” a Function

This is my physics professor’s favorite line.

So I am going to do this while I am still stationary in LeConte, before I go out and about and delay this to time t=infinity.

A few weeks ago, I got obsessed with an idea, which was to track the views/likes/dislikes of popular YouTube videos with time, and also the U-Ratio/U-Value (=ln(likes/dislikes), see post here). The motive was to figure out how YT views fit to mathematical relations. I was going to continue doing this, but a friend said YouTube keeps stats so I didn’t have to track.

Well, I couldn’t find those stats, so my interest has been piqued again. As such, let’s start. My belief is that while guessing the function is hard, guessing the rate of CHANGE of the function is easy. Let the function of views versus time be Y(t), in the spirit of YT HAHAHA. And the time derivative would be dY/dt.

Whatever Y(t) and dY/dt is, it will have to follow a set of principles derived from intuition, prior observations, and a little thinking. From these, we can start formulating guesses. They are as follows:

1) After a very long time, dY/dt approaches zero as people forget about the video. But dY/dt never hits zero, and Y(t) remains strictly increasing, because new people will still stumble upon the video. Nor will Y ever approach any asymptote; there is no limit on how many views a given video can get.
–> The only function that satisfies these conditions is the logarithm, with the derivative proportional to 1/t.

2) The number of views varies between night and day. More people would view the video during daytime than during nighttime; thus the rate of change of views dY/dt is larger during the day. dY/dt would thus be periodic with a period of 24 hours, as would Y(t).
–> A sinusoidal or cosinusoidal wave would work here. Since dY/dt is not zero at t=0, cos(t) would be a preferred form for dY/dt. To prevent possible problems with negative values of dY/dt, we take the square of the cosine… it doesn’t affect anything since the cosine outputs a dimensionless number and we can adjust the period as needed.

3) The rate of change of views is never really zero for finite times, so a pure cosine-squared does not work (since its minima are at zero). Additionally, the relative minima in the periodic wave varies with time — near the beginning, the nightly minima are greater since the video has more momentum.
–> Thus, we must add a correction to whatever we have for dY/dt — a shift that introduces the time-dependence of the minima. Since the rate of change of views is follows 1/t, this shift will also be of that form.

4) We must introduce a horizontal shift to the dY/dt to avoid discontinuous derivatives for t [greater than or equal to] 0.

Now we incorporate all components of the guesses.

For (1) and (2): multiplying one function by another function stretches one by the other for all ranges other than zero. So for dY/dt, we can take the cosine-squared and the 1/t and multiply the two, because we want a periodic function “stretched” by the overall trend of the video having a high popularity initially followed by decreasing interest as time increases. We don’t want the minima to be at zero though, so….

…For (3): we take whatever we have and append something of the form 1/t to the end of it. This shifts all the minima by such.

Finally, for (4) we insert (t+b) for t’s in the denominator, where b is a positive constant, to relegate the unrealistic divide-by-zeroes to a trivial quadrant.

And so, here’s the function!



A is the amplitude of oscillation (mostly constant for all videos, perhaps dependent on the spread of views across time zones to dampen the oscillation), and ω relates to the period (fixed to make the period 24 hr). The ratio of constants c/b relates to the initial momentum of the video — the magnitude of the initial shift.

A plot of dY/dt, w/o the horizontal shift:

We can find Y(t) given that the initial condition of Y(0)=0. However, it is a little complicated, and involves the function Ci(x) – the cosine integral. Nevertheless, a quick Wolfram Alpha integration and subsequent plot indicates a logarithm that oscillates – pretty much what we want.