Thanks for putting up your question on Just Answer.
Mild to moderate pain that lasts up to a week following a root canal can be considered as normal. However, you have a swelling as well, which is increasing in size. I think the tooth needs to be opened up again.
The reasons for your pain could be :
1. Over instrumentation (going beyond the root canals during the cleaning procedure)
2. Forceful irrigation (injecting the irrigant solution which pushes it past the root canals)
3. Contact of opposing tooth on the tooth being treated between appointments (ideally there should be no contact even on biting until the crown is cemented in place)
4. Inadequate instrumentation (some amount of pulp tissue is still left , which can be the source of pain)
5. An entire root canal missed (not picked up on an X ray and hence not cleaned)
6. A broken instrument being left inside the root canal which forms a nidus for infection leading to failure of the root canal.
7. The root canal is not filled entirely, which leads to an incomplete seal at the apex of the root, from which leakage of microbial products occurs and thus infection.
Discuss all these possibilities with your dentist. Im sure one of these is the reason why it is hurting. This is not likely to stop on its own. Moreover, since you have a swelling, you need antibiotics, not just painkillers.
Also, keep icing the swelling as much as possible. remember npt to put any heat on it.
Hope this answers your question. Feel free to contact me again for more information. Please leave a positive rating for me if this answer has helped you. I do not get credit for it otherwise.
Good Luck !