Analyzing displacement term's memory effect in a nonlinear boundary value problem to prove chaotic vibration of the wave equation