In Shakespeare's Hamlet, I don't believe that Claudius wants Hamlet to fore go his return to Wittenburg because he considers him a risk. Human nature is such that out of the company of his uncle and mother, Hamlet would adjust in time.
It would be much easier for Claudius to see Hamlet return to school for several reasons. First, Claudius wouldn't have to look at his brooding, dark looks. And he would not have to worry about Hamlet becoming suspicious. (And who would suspect that Old Hamlet's ghost would appear to his son?)
For Claudius, it would be better to see Hamlet gone, but I believe he really cares for Gertrude.
At the beginning, Claudius announces that it is time to put mourning behind them and move on. One might interpret that Claudius' marriage to the old King's wife may lend him credibility; but I believe he wants to please her. He speaks of their marriage in paradoxes—joy and sadness both warring within him:
Have we, as 'twere with a defeated joy,
With an auspicious, and a dropping eye,
With mirth in funeral, and with dirge in marriage,
In equal scale weighing delight and dole,
Taken to wife. (I.ii.10-14)
Claudius then tells Hamlet to pull himself together: he will be heir one day; until then, he shall be treated like a son. If Claudius really cares for Gertrude, his reasons for keeping Hamlet close by are revealed in Gertrude's words:
Let not thy mother lose her prayers, Hamlet.
I pray thee, stay with us, go not to Wittenberg. (121-122)
Gertrude lets her son know how much she wants him to stay—there is no doubt she loves her son. To keep Gertrude happy, Claudius may be encouraging Hamlet to remain at Elsinore.
Later, Hamlet meets the Ghost—the spirit of his dead father—who reveals his true cause of death. He also notes that Claudius, after Old Hamlet's death, wooed Gertrude until she gave in to him. The Ghost says:
O [his] wicked wit and gifts, that have the power
So to seduce!—won to his shameful lust
The will of my most seeming-virtuous queen. (I.v.49-51)
Claudius pursued the Queen—who was certainly devastated by the loss of her husband, perhaps lonely, fearful of the future, and naive.
In Act Three, Hamlet tells his mother to resist Claudius' advances to draw her into his bed; we can infer that Hamlet may have witnessed his uncle flirting and showing Gertrude affection at court. Hamlet warns her—do not...
Let the bloat King tempt you again to bed;
Pinch wanton on your cheek; call you his mouse... (III.iv.198-199)
Finally, Claudius' excuse to Laertes for not killing Hamlet himself could be true:
The Queen his mother
Lives almost by his looks; and for myself—
My virtue or my plague, be it either which—
She's so conjunctive to my life and soul
That, as the star moves not but in his sphere,
I could not but by her. (IV.vii.13-18)
Gertrude dotes on Hamlet; Claudius loves her and can't do anything to hurt her.
The King's capacity for warmth is seldom seen, but when Ophelia goes insane, Claudius is deeply distressed:
Follow her close; give her good watch, I pray you.
O, this is the poison of deep grief...
...O Gertrude, Gertrude,
When sorrows come, they come not single spies.
But in battalions! (IV.v.77-81)
This gentleness may be Claudius' one redeeming quality. If not for this brief glimpse into the King's heart, we might question his capacity to love Gertrude. But by letting Gertrude drink poisoned wine in the last scene, we know for certain that he loves his crown more than anyone.