Hi,
I think some selective cases, the word 'by' is optional as in these ones:
He did it himself/by himself.
He made the toy truck himself/by himself.
He took care of the problem himself/by himself.
If I am correct, then when is it not optional?