Newton’s Law of Universal Gravitation

Yaser Rahmati | یاسر رحمتی

Definition

According to Newton’s law of universal gravitation, a body of mass m1m_{1} attracts another body of mass m2m_{2} with an amount of force FF according to the formula:

F=Gm1m2r2F=G\frac{m_{1}m_{2}}{r^{2}}

where rr is the distance between the two bodies and GG is the gravitational constant.

Example

Let’s take the masses of two bodies:

  • The mass of the first body (m1m_{1}) is 0.5 kg,

  • The mass of the second body (m2m_{2}) is 1.5 kg.

  • The value of the gravitational constant is 6.674×1011N.m2.kg26.674\times10^{-11} N.m^2.kg^{-2} .

  • ow we’re ready to calculate the gravitational force in the ow we’re ready to calculate the gravitational force between between 10m to 500 m.

import sympy as sp

# Define the symbolic variable
r = sp.symbols('r')

# Constant, G
G = 6.674*(10**-11)

# Two masses
m1 = 0.5
m2 = 1.5

# Define the function symbolically
F=G*m1*m2/(r**2)

sp.plot(F , (r, 10, 500), axis_center= (0,0))

We want to see what happens to the force as the distance between the two bodies increases.

My Training Video

My Youtube Channel
My Aparat Channel

Keywords

Web Development (Django, Flask) , Data Science (Pandas, NumPy, Matplotlib) , Machine Learning (Scikit-learn, TensorFlow, PyTorch) , Artificial Intelligence , Automation , GUI Development (Tkinter, PyQt) , Game Development (Pygame) , Scientific Computing , Financial Analysis (Pandas, NumPy) , Network Programming , Image Processing (OpenCV) , Web Scraping (Beautiful Soup, Scrapy) , Internet of Things (IoT) Development , Robotics , Cybersecurity , Mobile App Development (Kivy) , Cloud Computing (Boto3, AWS Lambda) , Big Data Analysis (PySpark) , Geographical Information Systems , Natural Language Processing (NLTK, spaCy) , Data Visualization (Seaborn, Plotly) , Bioinformatics (Biopython) , Multimedia Applications , Education and Teaching

Last updated