Atomic Force Microscopy (AFM) probes the surface features of specimens using an extremely sharp tip scanning the sample surface while the force is applied. AFM is also widely used for investigating the electrically non-conductive materials by applying an electric potential on the tip. Piezoresponse Force Microscopy (PFM) and Electrochemical Strain Microscopy (ESM) are variants of AFM for different materials. Both PFM and ESM signals are obtained by observing the displacement of the tip when applying electric fields during the scanning process. The PFM technique is based on converse piezoelectric effect of ferroelectrics and the ESM technique is based on electrochemical coupling in solid ionic conductors. In this work, two continuum-mechanical formulations for simulation of PFM and ESM are discussed.In the first model, for PFM simulation, a phase field approach based on the Allen-Cahn equation for non-conserved order parameters is employed for ferroelectrics. Here, the polarization vector is chosen as order parameter. Since ferroelectrics have highly anisotropic properties, this model accounts for transversely isotropic symmetry using an invariant formulation. The polarization switching behavior under the electric field will be discussed with some numerical examples.In the simulation of ESM, we employ a constitutive model based on the work of Bohn et al. [8] for the modeling of lithium manganese dioxide LiMn 2 O 4 (LMO). It simulates the deformation of the LMO particle according to an applied voltage and the evolution of lithium concentration after removing a DC pulse. The modeling results are compared to experimental data.