He must acknowledge the firstborn, the son of the unloved wife, by giving him a double portion of everything that belongs to him, for he is the firstfruits of his virility; he has the rights of the firstborn.
References for Deuteronomy 21:17
"If a man has a stubborn and rebellious son who does not obey his father or mother and doesn't listen to them even after they discipline him,
References for Deuteronomy 21:18
his father and mother must take hold of him and bring him to the elders of his city, to the gate of his hometown.
References for Deuteronomy 21:19
They will say to the elders of his city, 'This son of ours is stubborn and rebellious; he doesn't obey us. He's a glutton and a drunkard.'
Then all the men of his city will stone him to death. You must purge the evil from you, and all Israel will hear and be afraid.
References for Deuteronomy 21:21
"If anyone is found guilty of an offense deserving the death penalty and is executed, and you hang his body on a tree,
References for Deuteronomy 21:22
you are not to leave his corpse on the tree overnight but are to bury him that day, for anyone hung [on a tree] is under God's curse. You must not defile the land the Lord your God is giving you as an inheritance.
References for Deuteronomy 21:23