40 gallon might be okay for a baby but he will quickly outgrow that size home (they eat like maniacs when they are little!)
Beardies run like mad to get to full size and will be 20 inches before you know it feeding the way they do. Get ready to witness cricket genocide on a daily basis, they eat an astonishing amount per sitting!
As far as heating sources go for do not use the heat rocks that many snake owners have, beardies can be burned by them. Beardies prefer basking in a nice hot light so you will need an overhead spotlight with the beam focused on a nice basking spot on one side of the enclosure and a cool end opposite so they can thermoregulate. You'll want to have a digital thermometer in the basking spot so you can be sure of a temp in the 100 degree farenheit range up to 110 or so. The beardie will pick the spot he's happiest in, I've seen mine perfectly happy in up to 118 for short stretches. They are desert animals so they need pretty warm temps.
I'm sure others wil follow with more advice. Beardies are super cool little animals with lots of personality. If properly cared for they are super pets.
QB