I should hope so as it is much better than ending the sentence with the preposition. Especially without a "that".
Can somebody explain why "der" is used here? i thought maybe because stadt is feminine that it would be "in die du lebst"? abit like the example "das ist das Bier, DAS ich mag"
It’s der because the female relative pronoun assumes dative case since that is what is required by the preposition in (at least here it is because we’re talking about a position rather than a direction).
Maybe this makes it clearer:
- Wo ist die Stadt (nominative)? Du lebst in der Stadt (dative).
Replace the double noun phrase with the according demonstrative (the one which almost always looks like the article):
- Wo ist die Stadt? Du lebst in der.
Move the phrase with the demonstrative to the front to form the relative clause:
- Wo ist die Stadt, in der du lebst.
“Wo ist die Stadt, worin du lebst?”. Should be accepted if you ask me, but it isn’t very idiomatic in Standard German. I normally use use worin only when it expresses a question (i.e. “Weißt du, worin…?”) When you only want a normal relative clause with “in which, in that”, I almost always use in + relative pronoun”. Worin is acceptable in some cases, but I feel that’s only when you’re talking about actual containment (“die Dose, worin die Kekse aufbewahrt werden”), and even then worin sounds like a rather high register to me.