# relativistic_energy¶

plasmapy.formulary.relativistic_energy(m: Unit("kg"), v: Unit("m / s")) -> Unit("J")

Calculate the relativistic energy (in Joules) of an object of mass m and velocity v.

$E = \gamma m c^{2}$

where $$\gamma$$ is the Lorentz_factor.

Parameters: m (Quantity) – The mass in units convertible to kilograms. v (Quantity) – The velocity in units convertible to meters per second. The relativistic energy (in Joules) of an object of mass m moving at velocity v. Quantity TypeError – If input arguments are not instances Quantity or convertible to a Quantity. UnitConversionError – If the v is not in appropriate units. ValueError – If the magnitude of m is negative or arguments are complex. RelativityError – If the velocity v is greater than the speed of light. UnitsWarning – If units are not provided, SI units are assumed.

Examples

>>> from astropy import units as u
>>> velocity = 1.4e8 * u.m / u.s
>>> mass = 1 * u.kg
>>> relativistic_energy(mass, velocity)
<Quantity 1.01638929e+17 J>
>>> relativistic_energy(mass, 299792458*u.m / u.s)
<Quantity inf J>
>>> relativistic_energy(1 * u.mg, 1.4e8 * u.m / u.s)
<Quantity 1.01638929e+11 J>
>>> relativistic_energy(-mass, velocity)
Traceback (most recent call last):
...
ValueError: The argument 'm' to function relativistic_energy() can not contain negative numbers.