Equations describing thin accretion disks can be solved using a traditional perturbation methods when taking the ratio of disk thickness to the radial distance as a small parameter. This approach fails near disk boundaries, where some quantities start to diverge and singular perturbation theory should be applied. I will discuss this approach in the context of accretion on a black hole and star rotating stars. In the former case, one this way reveals a structure of the flow near the innermost stable circular orbit (ISCO) and in the plunging region between ISCO and black-hole horizon. In the latter case, one obtains structure of the boundary layer between the disk and the accreting star.