Why does where its defined on matter?

for example i have the wave equation defined between 0< = x <= inf

then i have to do it again but between 0< = x <= pi

The first one only has inital conidtions and no boundary conditions, is this the reason?