Weighted Sobolev spaces applied to nonlinear Klein-Gordon equation