Here is the main source of the explanation below of when to use to, when not to use to.
Must use to
By default we must use
to between any two verbs:
- I want to sleep
- He want me to buy
- I was about to give up
After some verbs like help:
- Could you help me to look for my car keys?
- Could you help me look for my car keys?
In pseudoclefting in phrases like:
- I hate shopping so what I've done is (to) order a new computer over the Internet.
- All I did was (to) suggest that she should lend him no more money. I didn't insist on it.
Must not use to
After modal verbs, including need.
After some causative verbs (to be precise, all of them, except get: My friends get me to take the test.):
- She lets me borrow her book.
- I will have someone cut my hair.
- My English teacher has me do the homework in a week.
- My mother made me do my homework., but not in passive(!):
- I was made to cry a lot by the film.
- A professional player would be made to shudder by these odds.
After the object after certain verbs, such as hear, see there is no to:
- I saw him pour the medicine down the loo and I heard him laugh to himself.
After verbal idioms would rather and had better there is no to:
- I'd rather swim in the pool than go down to the beach.
- You'd better see what he wants.
According to this tool, was invest is a type of VP (Verb Phrase):
NP V VP
NP S was V
what S/NP V
NP VP/NP V
NP V/NP invest.
Indeed, here is a relevant excerpt from Wiki article on VP and Pseudoclefting:
Dependency grammars point to the results of many standard constituency tests to back up their stance. For instance, topicalization, pseudoclefting, and answer ellipsis suggest that non-finite VP does, but finite VP does not, exist as a constituent:
These data must be compared to the results for non-finite VP:
- ...and finished the work, John (certainly) has. – Topicalization
- What John has done is finished the work. – Pseudoclefting
- What has John done? – Finished the work. – Answer ellipsis
There is an unanswered question, though - is there any difference in style (more formal / informal, for example) between using to and not using to in pseudoclefting.