Capped pressure vessel - strength and stability

Summary:
What are the formulas for calculation of strengtg and stability of capped cylndrical pressure vessel?
Hi,
in mechanics of materials books one may easily find fomulas for stress and strain in thin- and thick-walled cylindrical pressure vessels subjected to internal pressure. However, it is assumed that they are open. So what are the formulas for stress and strain in capped vessels (with flat or hemi-spherical end caps)?

My second question is also related to cylindrical pressure vessels but subjected to axial compression. Again, books provide equations for critical buckling load in such case but can it be calculated for closed-end vessels too (like a soda can)?