w corresponds to how much we can change our integral... Also called the variation of our solution function. If we know exact value of our solution function at any point, i.e. BCs, we cannot vary it. Hence we took w=del u every where, but at x=0, the BCs implied w=0 - which is still del u. Just del u =0 .