This problem is related to the particle in a box or in an infinite potential well. Particle representation by a wave function that is mathematical function no physical significance of…