How old are you? And which gender do you belong to?
Was the trimethoprim prescribed after a urine culture sensitivity report?
You need to have at least 2000 ml (8 glasses) of fluid intake per day. It is better if you can increase your fluid intake even beyond this.
Any decrease in fluid intake can predispose you to infections and development of kidney stones.
If you have had any family history of renal stones, and if your life style has seen any recent stressful changes, it is possible that you could have developed new kidney stones that are predisposing you to UTIs. Have you had any imaging done to rule out kidney stones since this infection started?
It is also possible that abnormalities in urine flow, such as vesicoureteral reflux, can predispose one to UTIs.
You can follow a few measures to manage your condition and help speed up recovery.
Drink at least 2000 ml of fluids per day.
Start consuming citrus juices daily.
Do keep us posted on your doubts and progress.