In addition to lots of smaller local libraries, edinburgh has one very large central library, plus the scottish national library.
Edinburgh Central Library on George IV Bridge (7-9 George IV Bridge, Edinburgh EH1 3EG) is well-stocked, with a good reference section, reading room and internet access.
The Scottish National Library is on George IV Bridge and Causewayside (Edinburgh EH1 1EW), opposite the Scottish National Library. It is a 'copyright' library, with copiesof everything published in the UK. Ask at the counter for the book you want.