  We propose a method to tailor the potential experienced by a moveable end
mirror in a cavity optomechanical system by specifying the spectral properties
of the input field. We show that by engineering the power spectral density of
the cavity input field a desired force function can be approximated, with the
accuracy of the approximation limited only by the linewidth of the cavity. The
very general technique presented here could have applications in many kinds of
optomechanical systems, particularly those used for sensing and metrology. We
demonstrate the method by applying it to improve the sensitivity of a
particular gravity measurement.
