The Dundee change should be ok as it's a small station so there's no real running around from one platform to another.
As for Edinburgh, should be ok but I agree , all a bit tight.
Cheers. Bit of a bugger cos the next one (18.09) is changing in Dundee with about 12 mins connection time. Getting visions of being stuck in Edinburgh. Edit to say I've just noticed there's a train between Arbroath and Dundee at 17.19 which would give us a more relaxed journey.