If G_d has changed Yaacov's name to Yisrael, and that is the name he should be called, why then do we see both names being used in the same context. I had an explanation that he was called Yisrael when he lived in the land and Yaacov outside of the land (Mitzraim), but this dialogue takes place in Mitzraim. What is the explanation for this anomaly?
Another reason for the dual name is when he is being oppressed, in exile or in other similar circumstances. When he has ruach hakodesh or is on a higher level, he is referred to as Yisroel. In this situation, he is acting as both Yisroel and Yaakov. He knows that as Yisroel he will strengthen himself to meet his son and acknowledge him as a ruler. As Yaakov, he asks his son to do him a favor and act towards him as Yaakov, the patriarch who is in galus.
And [someone] told Jacob and said, "Behold, your son Joseph is coming to you." And Israel summoned his strength and sat up on the bed.
And Israel summoned his strength: He said, “Although he is my son, he is a king; [therefore,] I will bestow honor upon him” [Midrash Tanchuma Vayechi 6]. From here [we learn] that we must bestow honor upon royalty,
Similarly,there are times he acts as the father of his children (Yaakov), and times when he is acting as the progenitor and prototype of the nation (Yisroel).
Vay'chi 40:1 shows that he is about to die so he is Yaakov again as Rashi says.
Jacob called for his sons and said, "Gather and I will tell you what will happen to you at the end of days.
and I will tell you, etc.: He attempted to reveal the End, but the Shechinah withdrew from him. So he began to say other things. — [from Pesachim 56a, Gen. Rabbah 89:5]
He then turns to his grandchildren and dons the mantle of Yisroel, the one who has ruach hakodesh and will pass the blessing of Avraham and Yitzchok down to the next generations.
The notion that Torah is specifically trying to make us notice Ya’akov’s unusual double personality also helps us understand some of the strange juxtapositions of the two names, such as when he strengthens himself to bless Joseph’s children (Gen. 48:2-3). Though he is by now Yisrael, the text tells us that he is also still Ya’akov even when he acts like the former. The same occurs in reverse when Ya’akov offers his parting words to Shimon and Levi, telling them that his dislike of their militancy is not only true of Ya’akov but also of Yisrael (Gen. 49:7). Thus, though one personality will dominate at any given time, the other personality is always still with him.
It may be well be that if Ya’akov represents a more sheltered and passive approach to life embodied by his childhood, and Yisrael represents a bolder, confrontational approach embodied more in his later years, the reason for Ya’akov’s split personality may be rooted in his need to maintain the legacy of both his father and his grandfather – echoed by his appealing to the God of Avraham and the God of Yitzchak (Gen. 32:10). From this perspective, while Ya’akov’s youth resembles that of his passive and isolated Israel-constrained father, his adult life resembles the trials and tribulations of Avraham among the nations. In this sense, Avraham’s outgoing personality is also what Ya’akov took from his brother Esav which, as some have suggested, Yitzchak had hoped would have actually been embodied by Esav rather than Ya’akov. Yet for Ya’akov to successfully carry on both vastly differentiated legacies would likely require taking on a dual personality even during the latter period of his life. And this is apparently exactly what he did.