Does Jesus contradict Himself in these verses? Just to state, I don't necessarily believe Jesus contradicted Himself. But these parts of Scripture sound like a contradiction, and I would like to hear any thoughts on how this can be reconciled.
I thought of this question after reading this post and these verses:

He said to them, “But now if you have a purse, take it, and also a bag; and if you don’t have a sword, sell your cloak and buy one. It is written: ‘And he was numbered with the transgressors’; and I tell you that this must be fulfilled in me. Yes, what is written about me is reaching its fulfillment.”
The disciples said, “See, Lord, here are two swords.”
“That is enough,” he replied.

Luke 22:36-38
But then when they come to seize Jesus, after Judas betrays Him with a kiss, this happens:

51 And behold, one of those who were with Jesus reached out his hand and drew his sword and, striking the body servant of the high priest, cut off his ear.
52 Then Jesus said to him, Put your sword back into its place, for all who draw the sword will die by the sword.

Matt. 26:51-52
As per the answers in the linked post, Jesus had them get swords so the prophecies could be fulfilled: That He would be counted amongst the transgressors, and His arrest would be certain. But then why would Jesus reprove Peter of using his sword the way he did in the latter verses, when that is what He wanted to happen? Perhaps &quot;contradiction&quot; wasn't the best choice of wording, feel free to edit if you can word it better for me :)
I should preface my answer by saying this is entirely educated guesswork, as is any answer to this question. Don't take it as divine revelation, but as just one of many views on the events of the time.

Some have mentioned that maybe he was being metaphorical, and that the disciples were having one of their (quite frequent) blond moments in taking him literally. You think they would learn... anyway, this is very possible.

If you prefer to take it literally, my guess would be that Jesus wanted them to have swords for a short time. My reasoning is that Jesus has prefaced this with a comparison. Previously, they had gone out, preaching love, repentance and righteousness under the authority of their rabbi, their teacher / mentor / religious authority. 

Having a rabbi was quite common. Many rabbis were radical, hard-hitting, slightly nutty and often very wrong (just read some of their recorded theories. One I read recently: http://www.sacred-texts.com/jud/hl/index.htm). While Jesus was "just another rabbi", they had little to fear.

Yet for the next few weeks, "Jesus" was synonymous with "criminal". People who wanted to get in the good books with the religious leaders might want to present the head of one of his disciples, and people who might have once given them free stuff as a thank you for their wisdom and guidance would now be treating them as scum. 

This crowd that came with the temple guards might consider it a good idea to take Jesus' collaborators as well - but when they arrive they are faced with a dillema. They could take an unarmed and willing Jesus without any fuss - which is all they really came for - or they could try and take an armed and unwilling 12 disciples. It's a no-brainer.

P.S: I find it interesting that Jesus doesn't say "You shouldn't have done that", but instead says, "That's enough of that, you won't actually need to draw the sword unless you want to be killed by it" (paraphrased and liberties taken!). I imagine he was secretly glad they cut off the guard's ear, because it showed the crowd that the disciples meant business. 

Also, to counter any potential arguments that God could have protected the disciples without resorting to swords, yes, you are correct. But that doesn't mean that the disciples were not more confident knowing that they had swords with them, and it meant that the legacy of focus was solely on Jesus. Remember that "the punishment that brought us peace was on him, and by his wounds we are healed." Isaiah 53:5