Mandarins can be done in smaller than the accepted 50+ gallon tank. I've had one in my 9 gallon since November/early December and it's definitely not starving. But a LOT of details had to line up to make it doable:
1. Choose a smaller specimen, preferably female (they tend to stay smaller & seem to take to prepared food more readily than males). As mentioned, spotted mandarins and the "scooters" seem to be the "easiest" of the lot.
2. Build your tank's rockscape to cater to their swimming preferences... i.e. lots of ledges, overhangs/outcroppings - dragonets hunt & peck constantly at rock surfaces throughout the day and even when target fed will graze an area of rock rather than pluck food out of the water column.
3. NO competitive tankmates - that sixline is a much more voracious predator of your tank's copepods and may even attack the dragonet if it perceives competition for the same food.
4. LUCK - as JennM and other point out, few dragonets will accept prepared foods from the get-go and you'll likely have to train it. This time may be days, weeks or head into month(s) - your fish's initial condition and temperament + your own time and ability + foods available may not end successfully with a happy healthy fish... and it is disheartening to see all your efforts fail "just because". Be picky is about the only advice that'll get you through this.
5. TIME - it took me almost six weeks to get my mandarin to reliably eat prepared foods... if your specimen is not particularly well nourished on arrival it may pass the point of no return before you can get it eating. I went the progression of dosed pods > newly hatched brine shrimp > nutramar (now somewhat scarce) > "other foods" (currently a mix of NLS pellets, Larry's Reef Frenzy and a bare scraping of nutramar or Rod's Fish Eggs). It worked but took a serious toll on my tank's water quality until the fish got the hang of eating where the baster pointed & I got the hang of completely cutting the pumps, target feeding it and changing out the filter pads twice as often than previously required. So who trained who, I wonder?
5. MONEY - I still supplement monthly with the bottled copepods from the Coral Conservatory sold at several local sponsors. Even with prepared foods as the mainstay of my mandarin's diet, I regard that pods are still essential for nutrition and healthy foraging. Plus if I have to go out of town on a trip/vacation its far kinder to the fish and tank-sitter to not leave instructions for target feeding something this finicky and simply huck in an extra bottle. Since my tank build was intended to house this particular fish first & foremost I personally don't mind the $12-15 every 3-4 weeks. As said above - it's the $20 fish that costs about $200 a year to keep.
Do I love seeing my little girl cruising the tank every evening when I get home? Yep! Do my kids love to watch "The Stripey Fish!!!" before bed? Also Yep! Would I do it all over again if I truly, truly understood ALL of the work that would be required for this particular fish up front, especially in a non-conventional tank footprint? Yep! (albeit a bit less enthusiastically than the other parts). But it's not for everyone. One of the key things in this hobby is to carefully choose where you want your challenges to come from, and be OK with it. For some it's collecting boutique zoas that cost $10's to $100's a polyp, are randomly named & unpredictably melt; others it's maintaining a spectacular garden of stony corals each one of which costs more than my entire tank and demand the most pristine water conditions & rigorous dosing schedules. For me it's providing this d@mn stubborn, delicate, beautiful & awesome fish an improbable home on my coffee table.
