This is a good question. Boundary layers is a complex concept and hard to obtained analytically, especially for most real world applications. However, under certain assumptions, it is possible to simplify the equations so that we are able to mathematically solve them to obtain an analytical solution. One such example would be the laminar flow over a flat plate. An analytical solution, which was provided by Blasius, describes the boudary layer solution for a semi-infinite flat plate help parallel to a fluid flowing at a constant velocity. The obtained profile is based on similarity solutions of boundary layer equations with assumptions of constant velocity and zero velocity gradients in the direction of the flow.

In a similar manner, there are other analytical solutions that are available in literature which simplify the flow physics and tailor the mathematical formulation so that we can solve them analytically or numerically to obtain a solution. These solutions were especially powerful when we did not the necessary advancements in numerical techniques and computational power that is currently available at our disposal today.

I hope this answers your question.

Thank you.