Yes, it can be difficult but it is all part of learning a language.
You'll just have to see a lot of usage examples, and practice using them yourself.
For your first example, I think the first one can have two possibilities.
1. As has been demonstrated .. BY materials OF this type, small cracks pose..
2. As has been demonstrated .. IN materials OF this type, small cracks pose..
BY is more common in general, but since cracks develop IN something, #2 may work too (".. demonstrated (to happen) IN materials OF this type..")
The second example:
An axis is an imaginary line ABOUT which a body is said to rotate.
The "to rotate" is the keyword here. If it was "to move", the answer would be ALONG.
For example, Dictionary.com has this definition on "axis":
"the line ABOUT which a rotating body, such as the earth, turns."