Using Mathematica’s Around[ ] function for Uncertainties

Clear["Global`*"]; SetDirectory[NotebookDirectory[]]; DateString[]

Consider this data from the Torsional Oscillator Experiment.

{ω0, δω0} = {4.41458, 3*10^(-5)}; 
{ωv, δωv} = {4.40803, 2*10^(-5)};
{γ, δγ} = {0.4359, 1*10^(-4)};

You can use the Around function to express the number with its uncertainty.

Around[ω0, δω0]

Here is the function for computing Q

Q[ω0_, γ_] := ω0/γ

You can also use the ‘Around’ function to do calculations with uncertainty.

Q[Around[ω0, δω0], Around[γ, δγ]]

Or, calculating the uncertainty the long way:

Q[ω0, γ] * Sqrt[(((((δω0)/(ω0))))^2) + (((((δγ)/γ)))^2)]

This also works for messier equations, such as that for finding Q from the difference of the two frequencies as long as the uncertainties are all “small”.

Clear[Q1]
Q1[ω0_, ωv_] :=  ((ω0)/(2 Sqrt[((ω0)^2) - ((ωv)^2)]))

Q1[ω0, ωv]

myQ = Q1[Around[ω0, δω0], Around[ωv, δωv]]

You can extract parts of an Around object with the “Value” and “Uncertainty” keys:

myQ

myQ["Value"]

myQ["Uncertainty"]