I have the code

    Clear[distance, time, Vavg]; 
Solve[Quantity[Vavg, "Meters"/"Seconds"] == 
  Quantity[distance, "Meters"]/Quantity[time, "Seconds"], distance]

The Answer is

{{distance -> time Vavg}}

I wonder why doesnt it shows the units in meters ... Please help

  • $\begingroup$ Also tried Solve[Quantity[Vavg, "Meters"/"Seconds"] == Quantity[distance, "Meters"]/Quantity[time, "Seconds"], Quantity[distance, "Meters"]], which give {} as result... Lol wtf $\endgroup$ – TraceKira Jun 4 '17 at 15:05
  • $\begingroup$ Because the units are getting cancelled as solve sees it. What (v m/s) == (dist m)/(t s), when solved for dist simply gives v t because the units have cancelled. Use just dist without units and solve it. $\endgroup$ – Lotus Jun 4 '17 at 15:05
  • $\begingroup$ Units are not cancelled totally. Remains only meters. $\endgroup$ – TraceKira Jun 4 '17 at 15:07
  • 1
    $\begingroup$ Look at the equation (v m/s) == (dist m)/(t s) and tell me which unit remains Both m and s get cancelled don't they ? $\endgroup$ – Lotus Jun 4 '17 at 15:18

If you put distance inside Quantity[#,"Meters"]& you can think of it as a unitless number that you are multiplying by "Meters".


Clear[distance, time, Vavg];
Solve[Quantity[Vavg, "Meters"/"Seconds"] == distance/Quantity[time, "Seconds"], distance]

(* {{distance -> time Vavg (Quantity[1, "Meters"])}} *)

shows how you can an answer with units attached.

  • $\begingroup$ Looks nice , but before accepting the answer .... why it works if i dont put any units on distance. And another question , how do i apply to the solution the values 0.25 m/ s and 4.00 minutes ? $\endgroup$ – TraceKira Jun 4 '17 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.