# Discover, Manipulate, and Compare Formulas

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

 In:= XFormulaLookup["doppler shift frequency"]
 Out= Get a specific equation.

 In:= XFormulaData[{"DopplerShift", "Frequency"}]
 Out= Define functions that solve for specific quantity variables.

 In:= 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:= 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:= XPlot[{doppler[Quantity[v, "SpeedOfLight"]], dopplerrelativistic[Quantity[v, "SpeedOfLight"]]}, {v, 0, 0.9}, Frame -> True, FrameLabel -> Automatic]
 Out= ## Mathematica

Questions? Comments? Contact a Wolfram expert »