cosine sq traj function under construction