A pendulum is connected to a rope 4 m long, which is connected to a ceiling 5 m high. The angle between its widest swing and vertical hanging position is π/3. If the pendulum swings out to its widest position in 3 seconds, model the height of the pendulum using a cosine function, considering vertical to be t = 0.