The portrayal of the Ben Kingsley Mandarin was actually one of the parts of the movie that I liked. The only part of the Mandarin story that I didn't care for in the movie was the reveal at the end that Aldrich Killian had been the real Mandarin all along.
Usually I am all for adapting characters as close to the source as possible but the Mandarin really is one of those tricky characters that would be difficult to successfully pull off. You go too much in one direction and he can be extremely offensive, you go too much in another direction and his back story is too convoluted to explain in one movie. If they were going to use the real Mandarin from the comics, they really should have quietly built him up during the first two movies. They didn't ever really have to show him in those movies but they should have acknowledged the fact that he was in the background quietly guiding events in the direction he wanted them to go, before fully integrating him in the third.
I respectfully disagree here as there was so much they could have done with the character if they had chosen to do it right. I mean I already had gripes with the acting choice as I felt like Ken Watanabe, Collin Chou, Russell Wong or Cary Tagawa would have been preferable. However you did a make a good point by saying that he should have appeared before the third film as the Mandarin should have been in the second one instead of a shitty villain like Whiplash.
It just felt like the writers and director of the third film decided just to add him because of the fans demand but didn't know jack squat about the character and just turned him into a generic terrorist as their iteration of the villain didn't really do anything. Heck, even Bane from the Dark Knight Rises actually did something despite being the pawn for a female villain nobody cared about in the film. I would have loved to have seen Iron Man and the Mandarin square off in the end as that fight would have been way better.