Differentiation Strategies for Acoustic Inverse Problems: Admittance Estimation and Shape Optimization