Newtons Second Law#
- pyquations.physics.newtons_second_law.newtons_second_law(*, mass: float, acceleration: float, force: float) float [source]
Solve for one variable in Newton’s second law of motion given the other two.
The acceleration of an object depends on the mass of the object and the amount of force applied. [1]
\[F = m \cdot a\]Where:
\(F\) is the force in newtons (N).
\(m\) is the mass in kilograms (kg).
\(a\) is the acceleration in meters per second squared (m/s²).
Newton’s second law of motion pertains to the behavior of objects for which all existing forces are not balanced. The second law states that the acceleration of an object is dependent upon two variables - the net force acting upon the object and the mass of the object. The acceleration of an object depends directly upon the net force acting upon the object, and inversely upon the mass of the object. As the force acting upon an object is increased, the acceleration of the object is increased. As the mass of an object is increased, the acceleration of the object is decreased. [2]
Note
Provide 2 of the 3 parameters. The method will solve for the third.
- Parameters:
mass (float) – The mass of the object in kilograms. Must be non-negative.
acceleration (float) – The acceleration of the object in meters per second squared.
force (float) – The force exerted on the object in newtons. Must be non-negative.
- Returns:
The force exerted on the object in newtons (N).
- Return type:
float
- Raises:
ValueError – If there aren’t exactly 2 parameters provided.
ValueError – If mass is provided and is not greater than zero.
ValueError – If acceleration is provided and is not greater than zero.
ValueError – If force is provided and is negative.
Examples
Solve for Force
>>> newtons_second_law(mass=10, acceleration=2) 20.0
Solve for Mass
>>> newtons_second_law(force=20, acceleration=2) 10.0
Solve for Acceleration
>>> newtons_second_law(force=20, mass=10) 2.0
References