With proper care tulips should last about 10-12 days after they have opened, how?
Firstly buy tulips with flower heads that are just starting to open and showing the flower colour. Don’t buy buds that are still green or fully coloured and open.
If buying your flowers online then buy from a source where you can ask for tulips just showing colour, or better still buy farm fresh online flowers where your grower picks flowers optimally for you not a wholesaler or other intermediary. Don’t buy flowers from a source where you have no choice in quality.
Prior to placing your tulips in a vase check the stems, unless you have purchased from a grower who has picked the flowers in the last 24 hours you will need to condition them by re-cutting the base of the stem with a clean sharp knife to allow flower to better drink the water to reduce shock and reduce wilting.
Flower food is not necessary for tulips, but they are very thirsty so maintain the vase water level and ideally replace it everyday.
Tulips are cold weather flowers and will last longer in a cool room and away from direct sunlight, heaters, air conditioners, electronic equipment etc. You can even drop an ice cube in the water, to help keep the temperature down. Some go to extremes and put ice cube in the vase, a bit extreme but hopefully you get the picture!