Nonlinear Theory of Electroelastic and Magnetoelastic Interactions