The energy is proportional to the amplitude squared. Intensity, by definition, is just the average power (or energy/over time) per unit area.
The formulas are slightly different for transverse and longitudinal waves, since the setups are slightly different. For transverse, you usually talk about energy distributed over a length and that's E=0.5μω^2.A^2.L. For longitudinal waves (in 3D), you'd talk about energy per volume and you have Ε=0.5ρω^2.s0^2.V.