How do Trinitarians explain verses where Jesus claims to have a God? According to orthodox trinitarian doctrine, the Father is God, Jesus is God, and the Holy Spirit is God.  Jesus is co-eqaul, eternally begotten, not made.

With that in mind, how could Jesus have a God?  For instance, how do Trinitarians explain verses such as the following verses in a way which is consistent with their doctrine?

John 20:17 (KJV)


  Jesus saith unto her, Touch me not; for I am not yet ascended to my
  Father: but go to my brethren, and say unto them, I ascend unto my
  Father, and your Father; and to my God, and your God.


John 17:3 (KJV) 


  "And this is life eternal, that they might know thee the only true
  God, and Jesus Christ, whom thou hast sent."
Leo the Great wrote for the Council of Chalcedon in 451,


  It does not belong to the same nature to say, "I and the Father are one," and to say, "The Father is greater than I." For although there is in the Lord Jesus Christ a single person who is of God and of man, the insults shared by both have their source in one thing, and the glory that is shared in another. For it is from us that he gets a humanity which is less than the Father; it is from the Father that he gets a divinity which is equal to the Father.


The doctrine of the hypostatic union refers to the idea that in Christ there was both a divine and a human nature, simultaneously. This is essential for the work of Christ in our salvation, reconciling the human and divine in his own person, submitting to death on the cross. (Compare Paul in the second chapter of Philippians, for example.)

Your first quotation, from John 20, comes from after the resurrection: Christ declares that his Father is our Father. When he says "my God" he acknowledges the supremacy of God, but not as something distinct from himself; he presents himself as the link between God and humanity, through which God is made known to us. "My God" is also "your God". John Calvin's commentary on the passage says that the phrase 'my God' is "peculiar to his human nature, but is applied to his whole person, on account of the unity, because he is both God and Man."

Likewise, the quotation from John 17 does not imply separation between God and Jesus, but again positions Christ as essential to our knowledge or experience of God. It is possible to make too much of grammar, but the Greek word kai ("and" here) typically has a "positive" or "constructive" sense. So "A kai B" feels something like "not only A, but indeed also B". The import of the passage isn't that we know God, and also Jesus separately - as a student might say that they were majoring in Chemistry and minoring in Drama - but that how we come to know God is through knowing Jesus.