# Simplify units

**URL:** <https://community.wolfram.com/t/simplify-units/4552>\
**Category:** Questions\
**Tags:** mathematica, units\
**Created:** [January 16, 2015, 8:37pm UTC](https://community.wolfram.com/t/simplify-units/4552 "2015-01-16T20:37:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![safnhd](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@safnhd](https://community.wolfram.com/u/safnhd)\
**Post date:** [January 16, 2015, 8:37pm UTC](https://community.wolfram.com/t/simplify-units/4552/1 "2015-01-16T20:37:50Z")

</div>

Hi,

I was trying to solve a simple equation using variables with units as follows:

```
UnitConvert[
  Module[{n = 1.46, \[Lambda] = Quantity[630 10^-9, "Meters"], 
    Tf = Quantity[1400, "Kalvin"], \[Beta]T = 
     UnitConvert[Quantity[6.8 10^-12, "Centimeters" ^2/"Dynes"], 
      "Meters" ^2/(("Kilograms" "Meters")/("Seconds")^2)], 
    Kb = UnitConvert[Quantity[1, "Poltzmann constant"]]},
   \[Alpha]Scat = (8 \[Pi]^3)/(
     3 \[Lambda]^4) (n^2 - 1) Kb Tf \[Beta]T], (
  "Kilometers")^-1] // UnitSimplify

```

When the previous code is executed, it seems that UnitSimplify can’t cancel the Kalvin dimension in the resulting unit. It would be helpful if somebody can explain this.

Regards

---

<div class="post-metadata">

**Author:** ![andersongaudio](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/andersongaudio/32/17298_2.png) [@andersongaudio](https://community.wolfram.com/u/andersongaudio)\
**Post date:** [January 16, 2015, 8:45pm UTC](https://community.wolfram.com/t/simplify-units/4552/2 "2015-01-16T20:45:16Z")

</div>

Try to use “Kelvin” instead of “Kalvin”. If you use “Boltzmann” in the place of “Poltzmann”, this will help you even more.

---

<div class="post-metadata">

**Author:** ![safnhd](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@safnhd](https://community.wolfram.com/u/safnhd)\
**Post date:** [January 17, 2015, 4:29am UTC](https://community.wolfram.com/t/simplify-units/4552/3 "2015-01-17T04:29:27Z")

</div>

My bad. However. It seems that Mathematica is kind of broad minded, when it comes to “Poltzmann” instead of “Boltzmann”, That’s to say, it shows the same constant with the same dimensions. Thanks for the answer.

---

<div class="post-metadata">

**Author:** ![andersongaudio](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/andersongaudio/32/17298_2.png) [@andersongaudio](https://community.wolfram.com/u/andersongaudio)\
**Post date:** [January 17, 2015, 11:21am UTC](https://community.wolfram.com/t/simplify-units/4552/4 "2015-01-17T11:21:30Z")

</div>

You are right. Mathematica has some tolerance when dealing with units and constants. Unfortunately it was not true in the case of Kalvin. Mathematica interpreted “Kalvin” as “Kelvins difference” (DeltaK) and, as a consequence, it was unable to cancel the the Ks. Look at the codes below.

```
t1 = Quantity[1400, "Kelvin"]
t2 = Quantity[1400, "Kalvin"]
t1 == t2

1400 K
1400 K
Quantity::compat: Kelvins and KelvinsDifference are incompatible units >>
Quantity::compat: Kelvins and KelvinsDifference are incompatible units >>
1400 K == 1400 K

```

and

```
t1 = Quantity[1400, "KelvinsDifference"]
t2 = Quantity[1400, "Kalvin"]
t1 == t2

1400 K
1400 K
True

```

Regards.

---

<div class="post-metadata">

**Author:** ![safnhd](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@safnhd](https://community.wolfram.com/u/safnhd)\
**Post date:** [January 21, 2015, 5:23am UTC](https://community.wolfram.com/t/simplify-units/4552/5 "2015-01-21T05:23:57Z")

</div>

I see. Thanks for the clarification.
