It is illegal tax wise to loan a social or a child as a dependant to anyone that is not taking care of the child. However, if your ex and you cant agree to let you claim your child and you claim your child; then you will be getting your ex and her parents and possibly yourself (if you cant prove the time you claimed the child lived with you), in a great deal of trouble.