What is an example sentence for legitimate?

Are you the legitimate heir?
The marriage was not legitimate because he was still married to his first wife.

My dog ate my homework is not legitimate. :0)