There's an old theory about how Tyrion could be the bastard son of the Mad King. This however is mostly meant as a means of backing up the possibility that Tyrion could be the "third head of the dragon".
The books mention several times that Aerys fancied Tywin's wive, much to the dismay to Tywin himself. For instance Aerys was supposedly being quite the groper just before the consummation of Tywin's and Joanna's wedding (remember before the bedding the men strip the bride and the women the groom) and at one point during the wedding he also said it was a shame the tradition of the First Night had been abolished. On another occasion he made remarks about Joanna's breasts after she gave birth to her twins.
Now while Tywin was acting as Hand, Joanna was also in Kingslanding in the service of the queen. But at one point she suddenly discharged Joanna and sent her back to Casterly Rock and the reason for this was, so the rumor goes, that the queen was afraid that Aerys was planning to make her his mistress (pretty much rape her). Aerys was known for his sexual escapades. According to the theory though Aerys did succeed in raping Joanna and of this Tyrion was the result, which would also serve as an explanation of Tywin's hatred towards Tyrion.
In the TV series they also use the dialogue Tyrion and Tywin had before the former killed the latter. Tywin said that he was not his son and some people interpreted that literally. That Tyrion then was able to calm Viserion and Rhaegal in Mereen was seen as additional proof that he had Targaryen blood.
Personally though I don't buy it. Chronologically it's not entirely impossible, but Tywin's behavior doesn't make much sense as there is no way he would have reacted like that if he knew Aerys had raped and impregnated his wive, indirectly also killing her. Unless Tywin didn't know this, but how could he have not? That would also contradict the theory partially. It's also bares too much of a resemblance to Jon's character.