Experimental Verification of the NKT Law Interpolating the Masses of 8 Planets Using NASA Data as of 30–31/12/2024 (Scala-lang Implementation)

This experiment applies the NKTg Law of Variable Inertia to interpolate the masses of the 8 planets in our Solar System using NASA’s real-time data (30–31/12/2024).
The core formula is simple:

m = NKTg1 / (x * v)

where:

  • x = position (km)
  • v = velocity (km/s)
  • NKTg1 = x * (m * v)

By using this interpolation, the masses of the planets match NASA’s official values with almost zero error. Below is a Scala-lang implementation of the experiment.


// File: NKTgExperiment.scala
// Author: Nguyễn Khánh Tùng (adapted for Scala-lang Forum)
// Purpose: Experimental Verification of the NKTg Law using NASA Data 2024
// Formula: m = NKTg1 / (x * v)

case class Planet(
  name: String,
  x_km: Double,
  v_kms: Double,
  NKTg1: Double,
  nasaMass: Double
)

object NKTgExperiment {
  def main(args: Array[String]): Unit = {
    // Input data (NASA real-time 30/12/2024)
    val planets = Seq(
      Planet("Mercury", 6.9817930e7, 38.86, 8.951e32, 3.301e23),
      Planet("Venus",   1.0893900e8, 35.02, 1.858e34, 4.867e24),
      Planet("Earth",   1.4710000e8, 29.29, 2.571e34, 5.972e24),
      Planet("Mars",    2.4923000e8, 24.07, 3.850e33, 6.417e23),
      Planet("Jupiter", 8.1662000e8, 13.06, 2.024e37, 1.898e27),
      Planet("Saturn",  1.5065300e9, 9.69,  8.303e36, 5.683e26),
      Planet("Uranus",  3.0013900e9, 6.8,   1.772e36, 8.681e25),
      Planet("Neptune", 4.5589000e9, 5.43,  2.534e36, 1.024e26)
    )

    // Compute interpolated mass, delta, and relative error
    val results = planets.map { p =>
      val interpolatedMass = p.NKTg1 / (p.x_km * p.v_kms)
      val delta = p.nasaMass - interpolatedMass
      val relError = (delta / p.nasaMass) * 100.0
      (p.name, p.nasaMass, interpolatedMass, delta, relError)
    }

    // Print header
    println(f"${"Planet"}%-10s ${"NASA_m"}%-15s ${"Interpolated_m"}%-15s ${"Delta_m"}%-15s ${"RelError(%)"}%-15s")

    // Print results
    results.foreach { case (name, nasa, interp, delta, err) =>
      println(f"$name%-10s $nasa%-15.5e $interp%-15.5e $delta%-15.5e $err%-15.5e")
    }

    // Find max error
    val maxError = results.map(_._5.abs).max
    println(f"\nMax relative error: $maxError%.5e %%")
  }
}

:pushpin: Run:

scalac NKTgExperiment.scala
scala NKTgExperiment

Equations of motion are often written with momentum, p = m*v, rather than velocity, and dp/dt = F if you do it that way. This is the standard in relativity, for instance, where the distinction between rest mass and total mass becomes important, and it’s convenient to keep track of them together. For instance, while velocity is limited by the speed of light, momentum is not limited. Importantly, the F = dp/dt relationship holds true even as F = m * dv/dt does not.

Because everything you’re doing is algebraic rearrangements of existing mechanics, you should simply derive everything you want to use in terms of know formulas. There is no need to have “experimental verification” because fundamental mechanics is one of the most comprehensively verified phenomena known to humankind. All you need is math.

The question then is–what are these sorts of things good for? What can you measure and what do you have to calculate?

For instance, NKTg1 = m * x * v. This makes it dependent on choice of origin. If you change the origin so that x -> x - x0 then you have NKTg1 -> m * x * v - m * x0 * v. Is that a desirable property? I don’t know. It seems a little awkward to me, but maybe it depends on how you’re going to use it. Regardless, if it’s positive it’s going away from the origin (not “equilibrium” unless you have in some other way determined where the equilibrium point is and set x=0 at that point).

Because you aren’t using directly measured NKTg1 here, but rather are calculating it from inputs, calculating anything back is only a measure of how accurate IEEE754 math is, not anything about any physical principle. Mathematically (m * (x * v)) / (x * v) == m so any discrepancy is in the calculation, not telling you anything about whether NKTg1 is useful for anything or not.

Anyway, the thing to do is math, not experiments, to document that the quantities have the properties you desire.

1 Like