Mandarins are fairly hardy fish, but few will eat prepared foods unless trained, which isn't easy IME. They naturally only eat live fauna like copepods which is what makes them difficult to keep in small and/or unestablished systems.
Do you have a refugium? If you don't have a place that is predator free for pods to reproduce and thrive, you will starve out a mandarin in a fairly short amount of time in a tank that size.
I put one in my 55 gallon, but I have a 29 gallon sump/fuge that is full of macro algae and live rock rubble. I seeded the fuge with live copepods as well for good measure. My tank was over 2 years old when I added it.
My recommendation though, is that if you don't have an established fuge, don't do it.