A monocromatic 1D wave is described by the formula 
y[x,t]=Sin[k x+ωt], ω=((2π)/λ) is the wave number; ω = angular frequency.
Let (Subscript[k, i])=(Subscript[k, 0])+i Δk, Δk << 1, say 0.05. We assume (Subscript[k, 0])=1.

We ask Mathematica to show the wave form Y[x,t]=(∑_(i=0)^(i=(Subscript[N, k])))Sin[(Subscript[k, i])x+ωt] at t=0 for i=0, 5, ... ,(Subscript[N, k])=200. You will observe that the large the number of wave we add to form Y[x,t], the more localise it becomes.

(* Nk Number of wave to add *)
Nk=200;
xmax=100;
Deltak=0.05;
k[0]=1.0;omega=0.1;
k[i_]:=k[0]+i*Deltak;
y[i_,x_,t_]:=Sin[k[i]*x-omega*t];(* y is a monochromatic wave with wavenumber k[i] *)
Y[Nk_,x_,t_]:=Sum[y[i,x,t],{i,0,Nk}];
(*Y i;s the wavepacket formed by superiposing Nk waves *)

YM[Nk_]:=Module[{MY,nconst,lyy},
MY[x_]:=Sum[Sin[k[i]*x],{i,0,Nk}];
nconst:=1.0/Sqrt[NIntegrate[MY[x]^2,{x,-4.0Pi,4.0Pi}] ];
Deltax=8.0Pi/200.0;
lly=Table[MY[i*Deltax],{i,-400,400}];
Amax=Max[lly];
lyy=Table[{(i-400)*Deltax,lly[[i]]/Amax},{i,0,800}];
lyy
];(*end module*)

For[i=0,i≤Nk,i+=5,
YM[i];
];

(*
Here we askMathematicato show the wave formy[x,t]=Sin[k x+ωt]fork=(Subscript[k, 0])andk=(Subscript[k, 0])+(Subscript[N, k])Δk =2.0,(Subscript[N, k])=1000.
*)
i=0;
Manipulate[
Plot[y[i,x,t],{x,-xmax/8,xmax/8},AxesLabel->{"\!\(\*
StyleBox[\"x\",\nFontSlant->\"Italic\"]\)","Sin[\!\(\*
StyleBox[\"kx\",\nFontSlant->\"Italic\"]\)+\!\(\*
StyleBox[\(ω\*
 StyleBox[\"t\",\nFontSlant->\"Italic\"]\)]\)]"},
PlotLabel->"\!\(\*
StyleBox[\"k\",\nFontSlant->\"Italic\"]\)="<>ToString[k[i]]<>" ;\!\(\*
StyleBox[\"t\",\nFontSlant->\"Italic\"]\)="<>ToString[t]],{t,0,100,0.1}
]

ii=20;
Manipulate[
Plot[y[ii,x,t],{x,-xmax/8,xmax/8},AxesLabel->{"\!\(\*
StyleBox[\"x\",\nFontSlant->\"Italic\"]\)","Sin[\!\(\*
StyleBox[\"kx\",\nFontSlant->\"Italic\"]\)\!\(\*
StyleBox[\"+\",\nFontSlant->\"Italic\"]\)ω\!\(\*
StyleBox[\"t\",\nFontSlant->\"Italic\"]\)]"},
PlotLabel->"\!\(\*
StyleBox[\"k\",\nFontSlant->\"Italic\"]\)="<>ToString[k[ii]]<>" ;\!\(\*
StyleBox[\"t\",\nFontSlant->\"Italic\"]\)="<>ToString[t]],{t,0,100,0.1}
]
(*
Here we askMathematicato show the wave formY[x,t]=(∑_(i=0)^(i=(Subscript[N, k])))Sin[(Subscript[k, i])x+ωt]at t=0 for(Subscript[N, k])=50,100,200,500. You will observe that the large the number of wave we add to form Y[x,t],the more localise it becomes.
*)
Print[Manipulate[
ListPlot[YM[i],AxesLabel->{"\!\(\*
StyleBox[\"x\",\nFontSlant->\"Italic\"]\)","Y[x,\!\(\*
StyleBox[\"t\",\nFontSlant->\"Italic\"]\)=0]"},
PlotLabel->{"Nk=",i},Joined->True,Mesh->All,PlotRange->{{-4Pi,4Pi},{-1.05,1.05}}],{i,0,200,5}
]];(*end manipulate*)

(*
In the following,we askMathematicato display a vidoe showing the progressive motion of the wave formY[x,t]for an extensive period of time,from t=0 to t=500.
*)
Manipulate[Nk=100;
Plot[Y[Nk,x,t],{x,-xmax,xmax},PlotRange->{{-50,50},{-50,50}},PlotLabel->{"Y[x,t] with Nk = ",Nk}]
,{t,0,500,0.5}]