//Example 28.3 v=0.5;//Speed of spaceship (in terms of c) u_1=1;//Speed of the signal as observed from spaceship (in terms of c) c=1;//Speed of light (in terms of c) u=(v+u_1)/(1+v*u_1/c^2);//Speed at which the signal approaches the Earth (in terms of c) printf('Speed at which the signal approaches the Earth = %0.1fc',u) //Openstax - College Physics //Download for free at http://cnx.org/content/col11406/latest