How to design filter for inverter for following cases?
You could try out this interactive LC low pass filter: -



I've selected some approximate values such as R = 10 ohms, C = 100 uF and L = 10 mH to get you started: -



The centre frequency is about 160 Hz and significantly above 60 Hz so as not to run into problems of resonance but the usual case is that you make it resonate at \$\sqrt{F_1\cdot F_2}\$ where F1 is 60 Hz and F2 is the switching frequency of 20 kHz. This would naturally mean a resonance of about 1100 Hz but, if you are looking for better sinewave quality you need to push it lower but not too low.

Having the cut-off at 160 Hz means that 20 kHz remnants are pretty much removed at the output - test it by moving the cursor. You could probably go as high as 500 Hz - you'd still get over 60 dB attenuation at 20 kHz.

Beware though - you can design an LC low pass filter that is fairly tame but that all depends on the load. Less load means a much peakier response but, providing you don't have your base frequency or switching frequency anywhere near it you'll be OK. But be aware of its presense: -



That peak is due to the load resistor becoming 1000 ohms form 10 ohms.

But, don't stop there - once you have some values experiment with a simulator to try out other scenarios. Resonant frequency is: -

$$\dfrac{1}{2\pi\sqrt{LC}}$$