Math
posted by Neelambari .
A fly starts out 2 meters from a light bulb, flies closer to the light then farther away, 2 meters again. At this point the fly goes toward the bulb again but hits the bulb and flies away. Find a function (it may be piecewise) that gives the distance of the bug from the light as a function of time.

That makes it pretty easy
Let y = distance from light bulb
y =  1.5x + 2 ... for x = 0 to 1
y = 1.5x  1 ... for x = 1 to 2
y = 2x + 6 ... for x = 2 to 3
y = 2x  6 ... for x > 3