A series \$\text{R}\$ and \$\text{C}\$ circuit
Yes, your method and result are correct.  A quick way to check is to see if your result gives the correct result at t=0 and infinity while assuming 0 initial condition.  At t=0 the the exponential term is 1 and you have Uc=Vin-Vin=0, good.  At infinity, the exponential term is 0 and you have Uc=Vin.  These two values are connected by an exponential function which we know is correct for a first order RC.