Arduino AnalogWrite and its frequency and effectiveness
Changing PWM frequency is not directly supported by Arduino command set, but it can be done. For this you need to know a couple of things:


find the datasheet for the exact microcontroller (ATmega..) that is on your Arduino
which Arduino pin you want PWM frequency to change;
which pin on the controller it is connected to (this is described on http://arduino.cc/ );
find the chapter on PWM in the datasheet that discusses the controller pins you are interested in.


On top of that, some of the PWM pins are attached to timer0, which is heavily relied upon for other system tasks (like delay();). So fiddling with PWM may change the execution speed of some code.