Deuteronomy 21 [10.] When you go out to battle against your enemies, and Yahweh your God delivers them into your hands, and you carry them away captive, and see among the captives a beautiful woman, and you have a desire to her, and desire to take her as your wife; then you shall bring her home to your house. She shall shave her head and trim her nails. She shall take the clothing of her captivity off of herself, and shall remain in your house, and bewail her father and her mother a full month. After that you shall go in to her and be her husband, and she shall be your wife. It shall be, if you have no delight in her, then you shall let her go where she desires; but you shall not sell her at all for money. You shall not deal with her as a slave, because you have humbled her.
Deuteronomy 21 [15.] If a man has two wives, the one beloved, and the other hated, and they have borne him children, both the beloved and the hated; and if the firstborn son is hers who was hated; then it shall be, in the day that he causes his sons to inherit that which he has, that he may not give the son of the beloved the rights of the firstborn before the son of the hated, who is the firstborn; but he shall acknowledge the firstborn, the son of the hated, by giving him a double portion of all that he has; for he is the beginning of his strength. The right of the firstborn is his. If a man has a stubborn and rebellious son, who will not obey the voice of his father or the voice of his mother, and though they chasten him, will not listen to them; then his father and his mother shall take hold of him and bring him out to the elders of his city, and to the gate of his place.