Begin by preheating your oven to 425°F (220°C). While the oven heats, prepare your vegetables. Take 2 large fennel bulbs and cut each one lengthwise in half, then cut each half lengthwise into 3 pieces, making sure to keep the root ends intact so the pieces hold together during cooking.
Peel 1 lb (500g) of sweet potatoes and cut the flesh into 1½-inch (3.5cm) cubes. Bring a saucepan of salted water to a boil, add the fennel pieces, and boil for 7 minutes. Then add the sweet potato cubes to the same pot and continue boiling for another 3 minutes.
Drain the vegetables thoroughly, rinse them under cold running water, and dry them well to remove excess moisture.
While the vegetables are still slightly warm, melt 4 tbsp of butter in the saucepan and return the drained vegetables to the pan. Toss everything gently to coat evenly in the melted butter, then season with salt and black pepper to taste.
Transfer this mixture into a shallow ovenproof dish, spreading it in an even layer across the bottom. Sprinkle 3 oz (90g) of grated Parmesan cheese over the top, ensuring it's distributed evenly for consistent browning.
Place the gratin in the preheated oven and roast for 20–25 minutes until the top is golden brown and the vegetables are tender. The cheese should form a beautiful golden crust while the fennel and sweet potato underneath become soft and infused with buttery flavor. Remove from the oven and serve hot as an elegant side dish.