For laptops which use muxless Nvidia Optimus, there's a new way to support officially on Ubuntu 12.04 LTS.

 #sudo apt-get install nvidia-319-updates nvidia-prime xserver-xorg-lts-raring 

The command will upgrade
 * kernel to 3.8 ,
 * X server RandR to 1.4
 * Install Nvidia driver version 319.

After reboot, it will use nvidia driver by default.
There is no need to upgrade to 13.10 if you prefer 12.04 LTS.