<p>You have calculated the value of <span class="math-container">$\mu$</span> in units of AU-cubed over days-squared.</p>
<p>The quoted value (which should be <span class="math-container">$1.32712440018\times 10^{20}$</span>) has units of metres-cubed over seconds-squared.</p>
<p>However, you may want to work in units of au and years.  This makes the calculations particularly simple.</p>
<p>You have the correct value, but in different units.  This is no more than saying &quot;I measured Joe and he was 183 tall, but he tells me that he is 6&quot;.</p>

CC BY-SA 4.0
2021-11-28T09:17:25.160Z
Just the comments converted to CW
James K
CC BY-SA 4.0
2021-11-28T09:16:58.747Z
2021-11-28T09:16:58.747Z
James K
<p>I'm trying to calculate <span class="math-container">$\mu$</span> (the <a href="https://en.wikipedia.org/wiki/Standard_gravitational_parameter" rel="nofollow noreferrer">standard gravitational parameter</a>) with this formula</p>
<p><span class="math-container">$\mu = 4\pi^2a^3/T^2$</span></p>
<p>I'm using Earth's orbit is <span class="math-container">$a=1$</span> and <span class="math-container">$T = 365.2564$</span></p>
<p>for <span class="math-container">$a^3/T^2$</span> I'm getting <span class="math-container">$\approx7.496$</span> and I've looked that up and know that it's right.</p>
<p>When I multiply it by <span class="math-container">$4\pi^2$</span> I'm getting <span class="math-container">$0.0002959130157235706$</span></p>
<p>but from what I've read I should be getting <span class="math-container">$ 1.32712440018$</span></p>
<p>I suspect I'm ending up with the wrong units, but I haven't had any luck trying to figure that out.</p>

CC BY-SA 4.0
2021-11-27T21:18:10.320Z
Your current units are AU-cubed over days-squared.  Convert your units to meters-cubed over seconds-squared and you will have the answer you are looking for.
Connor Garcia
CC BY-SA 4.0
2021-11-27T21:54:49.387Z
I think you mean $a^3/T^2 = 7.496×10^{-6}$ and $u=1.327×10^{20} $
James K
CC BY-SA 4.0
2021-11-27T21:55:23.007Z
You have omitted powers of ten. Your value of $7.496$ should be $7.496\times10^{-6}$. Don't omit those powers of ten. Even more importantly, you have omitted units. That value of $7.496\times10^{-6}$ has units of $\text{au}^3/\text{days}^2$. Do not omit units.
David Hammen
CC BY-SA 4.0
2021-11-27T21:58:53.770Z
yeah, my old physics teacher would be yelling at me. your responses have helped. now I just need to find a programming language that allows units to be stored along with the values.
kdubs
CC BY-SA 4.0
2021-11-27T22:08:00.813Z
@kdubs : Mathematica (Wolfram Alpha) does that. For example, [this question](https://www.wolframalpha.com/input/?i=convert+4*pi%5E2+*%281+au%29%5E3%2F%28365.2564+days%29%5E2+to+m%5E3%2Fs%5E2).
David Hammen
CC BY-SA 4.0
2021-11-27T22:17:10.403Z
@DavidHammen - that was really useful. I've used that site before, but never tired it for that.
kdubs
CC BY-SA 4.0
2021-11-28T08:16:12.907Z
BTW, if you want >6 digits of precision you can't use $a=1$ au. The  [astronomical unit](https://en.wikipedia.org/wiki/Astronomical_unit) was previously defined in terms of an idealised circular orbit, but now it's just defined as exactly $149597870700$ m. The Earth's $a\approx1.000001018$ au. Also, rather than using the sidereal year, you should use the [anomalistic year](https://en.wikipedia.org/wiki/Year#Sidereal,_tropical,_and_anomalistic_years), the period between successive perihelion passages.
PM 2Ring
CC BY-SA 4.0
2021-11-28T08:32:37.323Z
I see you use Python. SymPy can handle [units](https://docs.sympy.org/latest/modules/physics/units/quantities.html), it can also do algebra & calculus. But for a simple program, I find it easiest to just work in sensible units (like metres & seconds), and define a few multiplier constants for when I need to convert input & output data.
PM 2Ring
CC BY-SA 4.0
2021-11-28T09:08:54.857Z
You should notice something is wrong when you wrote 7.4 multiplied by 4π2 is 0.0002... Never,and obviously never. Always write powers, they are part of a number. And use units,too, especially when you geht strange results which don't seem to make sense
planetmaker
<gravity><orbital-elements>
Using Kepler's 3rd law to calculate $\mu$ (standard gravitational parameter)
kdubs
# Using Kepler's 3rd law to calculate $\mu$ (standard gravitational parameter)

(Asked by: username_0 on 2021-11-27)

I'm trying to calculate $\mu$ (the [standard gravitational parameter](https://en.wikipedia.org/wiki/Standard_gravitational_parameter)) with this formula

$\mu = 4\pi^2a^3/T^2$

I'm using Earth's orbit is $a=1$ and $T = 365.2564$

for $a^3/T^2$ I'm getting $\approx7.496$ and I've looked that up and know that it's right.

When I multiply it by $4\pi^2$ I'm getting $0.0002959130157235706$

but from what I've read I should be getting $ 1.32712440018$

I suspect I'm ending up with the wrong units, but I haven't had any luck trying to figure that out.

**Tags:** gravity, orbital-elements

> **Comments:**
> **username_1**: Your current units are AU-cubed over days-squared.  Convert your units to meters-cubed over seconds-squared and you will have the answer you are looking for.  
> **username_2**: I think you mean $a^3/T^2 = 7.496×10^{-6}$ and $u=1.327×10^{20} $  
> **username_3**: You have omitted powers of ten. Your value of $7.496$ should be $7.496\times10^{-6}$. Don't omit those powers of ten. Even more importantly, you have omitted units. That value of $7.496\times10^{-6}$ has units of $\text{au}^3/\text{days}^2$. Do not omit units.  
> **username_0**: yeah, my old physics teacher would be yelling at me. your responses have helped. now I just need to find a programming language that allows units to be stored along with the values.  
> **username_3**: @username_0 : Mathematica (Wolfram Alpha) does that. For example, [this question](https://www.wolframalpha.com/input/?i=convert+4*pi%5E2+*%281+au%29%5E3%2F%28365.2564+days%29%5E2+to+m%5E3%2Fs%5E2).  
> **username_0**: @username_3 - that was really useful. I've used that site before, but never tired it for that.  
> **username_4**: BTW, if you want >6 digits of precision you can't use $a=1$ au. The  [astronomical unit](https://en.wikipedia.org/wiki/Astronomical_unit) was previously defined in terms of an idealised circular orbit, but now it's just defined as exactly $149597870700$ m. The Earth's $a\approx1.000001018$ au. Also, rather than using the sidereal year, you should use the [anomalistic year](https://en.wikipedia.org/wiki/Year#Sidereal,_tropical,_and_anomalistic_years), the period between successive perihelion passages.  
> **username_4**: I see you use Python. SymPy can handle [units](https://docs.sympy.org/latest/modules/physics/units/quantities.html), it can also do algebra & calculus. But for a simple program, I find it easiest to just work in sensible units (like metres & seconds), and define a few multiplier constants for when I need to convert input & output data.  
> **username_5**: You should notice something is wrong when you wrote 7.4 multiplied by 4π2 is 0.0002... Never,and obviously never. Always write powers, they are part of a number. And use units,too, especially when you geht strange results which don't seem to make sense  

---

## 1 answers

### Answer by username_2 on 2021-11-28. Score: 2 | Accepted answer

You have calculated the value of $\mu$ in units of AU-cubed over days-squared.

The quoted value (which should be $1.32712440018\times 10^{20}$) has units of metres-cubed over seconds-squared.

However, you may want to work in units of au and years. This makes the calculations particularly simple.

You have the correct value, but in different units. This is no more than saying "I measured Joe and he was 183 tall, but he tells me that he is 6".

> **Comments:**
> **username_2**: Just the comments converted to CW  

---

