I want help to calculate the fourier coefficient (fundamental only) of square wave function described in figure attached.
Welcome to the forum! You will find lots of helpful stuff here, and you will find that if you put down what you do know or some kind of attempt then you will be much more likely to get someone to help.
The formula for the Sin components is:
so if you only want the fundamental component then
I moved the interval of integration to match your problem better.
Now for your problem f(x) =1, 0 or -1 depending on the interval being considered this gives
If you solve this integral you will get the magnitude of the fundamental sin component. There will of course be higher order sin components and for this particular problem there will also be cosine components.