Now, obviouslly, for all the terms to cancel out as above, atleast some of them should be negative and some positive. Sp, g(x) changes sign atleast once in the interval . hence by mean value theorem, it has atleast one zero in the given interval.
Guide to latex:
http://www.goiit.com/posts/list/community-shelf-a-guide-to-latex-48056.htm