I can't figure out the subject of "to find" in this sentence from a book. It appears to me it should connect with Each habit demands appropriate conditions, making appropriate conditions its subject. But I recall that demand someone to do is wrong, as has been discussed here.
Each habit demands appropriate conditions for its exercise and when habits are numerous and complex, as with the human organism, to find these conditions involves search and experimentation.
I am inclined to say to find is short for "in order to find". Is that the case?