I think the 40 gallon suggestion is based on that Goldfish are poop generators and probably for a setting without aquaponics in mind. ( i.e. you'll need to clean small tank quite frequently)
In aquaponics you filter the water with sufficient grow beds & aeration - I'm sure you'll have a very happy gold fish indeed in a 20 gallon fish tank in an aquaponic set up
You've got to be kidding. I saw one yesterday in a 2-gallon tank and he wasn't complaining.
Aquaponics will save you the trouble of doing water changes since the water will be cleaned by the biofilter. Too, the water will be cleaned continuously, so that should make the fish happier, if it (he/she) actually experiences such emotions.
that is a good way to start your good w the fishtank size at 1st. i have a 110 gal. feed trough in my living room for koi and goldfish. and several other fish tanks, including a 21 year old african cichid, running on the system. a feed barrel(trashcan size) with 4 medium goldfish in it this feeds a 55 gal drum cut in 1/2 as a grow bed w lava rock and 2 kitty liter buckets w lava rock in them as well. growing tomatoes chocolatte mint, cucumbers, aloe vera, bay leavers, basil and of course the all too comon spider plant just cause. this is on my front porch. so beware once you get started you too may evict your living room furniture. lol
use a grow bed tray above the tank and get a small fountain pump . IE: a 1.5 foot pump. meaning it is made to pump water 1 and 1/2 feet high. I have found that pumps made for fountains are much more durable than ones made for fishtanks. (bought at fish stores) try to use a tray that is at least 6" deep for your plants. use a non dirt media. I like lava rock. many types are available just dont use any rock that has limestone in it. (bad ph problems) your rocks or grow media should be about 1" to 1 1/2" in size and preferably porous material for bacterial groth. the secret ingredient to change amonia from fish into nitrates then nitrites to feed the plants. find a cat liter pan type tray to place above your tank. drill a hole in the bottom of tray and insert a tube then use aquarium grade silicone to seal it. I made a tube from a pop can. cut the top and bottom off and you have a thin sheet of metal. household scissors will cut it. roll it into a tube.the tube should allow water to hit the surface of fishtank causeing a slight splash as it drains back into fishtank. You can grow small herbs like chocolate mint :) parsley, bay leaves, etc. these grow well with a shallow root system and limited light. a window w good sun combined with a little help from lights will work nicely. flourescent lights are made to loose their effiency over time. i use twin bulb flourescent lights (shop lights) one bulb warm spectrum the other bulb cool spectrum. usualy the labels have a red and blue color on the package. this is not great but works for me keeping plants indoors in the winter. better grow lights are needed if the only light is from you, not sun from a window. the tube drain should be set up so that all the water drains out when the pump stops. you may want a simple timer to run pump for 15 min each hour. water enters at one end of tray and exits the other or center , but while pump is on should flood the tray effectively. the hose coming from pump can be hung in a 1/2 loop so it has to travel higher to enter tray if the risk of overflowing the tray becomes a issue. the higher the hose travels the less volume of water.
a hint for fish filter floss is the fabric department..pillow and toy stuffing as long as the label staes hypo alergenic. is guess what!? ...Your right! poly fiber the exact same poly fiber they sell for 10 times the cost.
hope this helps you and not confuses you good luck and welcome to your new addiction :)