why does it end up in minus when i do like this cos(20*5). But not cos(20)*5
Assuming the angels are in degrees:
because the first one is cos(100) which is in the second quadrant so it is negative.
the second one is 5cos(20) = pos since cos(20) is positive.