||'''Book'''|| Advanced Engineering Mathematics || ||'''Author'''|| Erwin Kreyszig || ||'''Edition'''|| 8th Edition || /* code_begins */ /* P0 is the vector representation of co-ordinates of object of mass 'M' P1 is the vector representation of co-ordinates of object of mass 'm' x0,y0,z0 are the co-ordinates similarly x1,y1,z1 G=gravitational constant mag_r is the magnitude of displacement vactor r between abject 'M' and object 'm' force_mag is the magnitude of the gravitational force between them and its negative because it direction is towards P0 force_dir is the unit vector along the direction of force */ {{{ var('x0');var('y0');var('z0');var('x1');var('y1');var('z1');var('M');var('m'); P0 = vector([x0,y0,z0]); P1 = vector([x1,y1,z1]); c = G*M*m; mag_r = sqrt(((x1-x0)**2)+((y1-y0)**2)+((z1-z0)**2)); r = vector([x1-x0,y1-y0,z1-z0]); force_mag = c/(mag_r)**2; G = (6.67*(10**-8)); force_dir = -(r/mag_r); }}} /* code_ends */ * '''Solution by''': * Yogesh Agrawal, Student, IIIT-Hyderabad * , ,