# Discover, Manipulate, and Compare Formulas

Find equations for the Doppler shift in frequency using a natural-language query.

 In[1]:= XFormulaLookup["doppler shift frequency"]
 Out[1]=

Get a specific equation.

 Out[2]=

Define functions that solve for specific quantity variables.

 In[3]:= Xdoppler[v_] := Last@FormulaData[{"DopplerShift", "Frequency"}, {QuantityVariable[ \!\(\*SubscriptBox[\("f"\), \("s"\)]\),"Frequency"] -> Quantity[400, "Megahertz"], QuantityVariable[ \!\(\*SubscriptBox[\("v"\), \("s"\)]\),"Speed"] -> v, "c" -> Quantity[1, "SpeedOfLight"]}]
 In[4]:= Xdopplerrelativistic[v_] := Last@FormulaData[{"DopplerShiftRelativistic", "Frequency"}, {QuantityVariable[ \!\(\*SubscriptBox[\("f"\), \("s"\)]\),"Frequency"] -> Quantity[400, "Megahertz"], QuantityVariable[ \!\(\*SubscriptBox[\("v"\), \("s"\)]\),"Speed"] -> v}]

Compare relativistic and nonrelativistic formulas.

 In[5]:= XPlot[{doppler[Quantity[v, "SpeedOfLight"]], dopplerrelativistic[Quantity[v, "SpeedOfLight"]]}, {v, 0, 0.9}, Frame -> True, FrameLabel -> Automatic]
 Out[5]=

## Mathematica

Questions? Comments? Contact a Wolfram expert »