i use a 150w heat bulb in my 36"x24"x20" custom made wooden enclosure and it heats the whole thing up to perfect temps.
i dont know the dimensions of your 40 gal but if your using a 150w bulb, it should heat it.
are you sure its 150w??