(* SHM *)
(*=====*)

(*Clear all lower case variables*)
ClearAll["@"]        

(*Define and solve the de to get the general solution*)
de=  y''[x]+w^2y[x]==0
DSolve[de,y[x],x]

(*Solve an Initial Value Problem*)
ic1=  y[0]==1;
ic2=  y'[0]==1/2;
ans=DSolve[{de,ic1,ic2},y[x],x]  

(*Plot the solution for a given w*)
w=1;
Plot[y[x]/.ans,{x,0,10}]
