un'utile funzione è deg2rad:
http://it.php.net/manual/it/function.deg2rad.php

codice:
$x=cos(deg2rad($num1));