"if you were" vs. "if you did"

In the following two sentences "did" and "were" seem to be conveying the same meaning. If that's the case, what is the difference between the two and which one is more preferred?

If you studied, you would pass the exam.

If you were to study, you would pass the exam.


Solution 1:

These two boil down to nearly the same thing and are often interchangeable. However if you really examine them closely you will find that

If you studied, you would pass the exam

is speaking of studying in the broad scope. Meaning: If you were in the habit of studying you would pass the exam.

While

If you were to study, you would pass the exam

is speaking about this specific instance: If you were to study [for your upcoming exam] you would pass [it].

Having said that, in informal speech, people often say, "If you X'd, you would Y" when they actually mean "If you were to X, you would Y"

Bottom line, the meaning are so similar that it really doesn't much matter.