Analytic methods for Diophantine equations and Diophantine inequalities