After reading the comments and answer for this post, I have realized that the best (and/or maybe the only) way to master elliptical structure is seeing and examining more examples in this subject.
I have read somewhere that in the following typical examples the infinitival to must be retained and such examples without it are grammatically incorrect:
He wants to answer the question, and she wants to answer the question as well.
I like to study math, and you like to study math as well.
(Please note that the elided words are indicated with subscripts.)
But, I have seen the following typical examples without the infinitival to:
He tried to go, and she tried to go as well.
I asked you to help, but you refused to help .
Can any one explain to me whether I should elide the infinitival to in such elliptical structures or not (in formal writing)?