As you can tell just by looking, these phrases are very similar. Only the particle within the phrases are different, and they're still not that different. Nevertheless, these patterns are not quite the same.
～ようにする shows that you carry something out willfully in the sense of making a serious attempt. ～ようにしてください can be used to indirectly tell someone to do something by telling them what they need to try to do either for an on-off occasion or for a habitual change. It can't be used for an on-the-spot request. This よう is a noun and the pattern follows the non-past affirmative or negative forms.
I am trying not to eat meat.
I'll attend to that.
Please try not to be late.
They plundered the town by snatching.
Word Note: 引っ手繰る means "to grab at". You can figuratively see the things of the town being drawn towards the bandits with this example. Remember that the よう used in this pattern is 様. Plundering a town is serious work, so this is a great example.
～（よ）うとする shows that one tries to materialize something, not just attempt something. This is a present action and isn't continuous for any considerable duration. What is being expressed is that you're trying to realize something.
I tried to get up, but I couldn't.
It may also show something right as something is about to happen. So, it's "right as...is about to try to do..., then...".
Just as I was about to eat breakfast, I got a telephone call.
In this example, the phone call came in before the speaker could ever actually start eating breakfast.
When an attempt is continuous, meaning that it has a measurable duration, conscious in the sense that you are willfully trying to do it, or a non-momentous effort (such an action could have a negligible duration), ～ようにする must be used instead. Remember that ～ようにする actions have a longer duration and it is often the case that one is trying to change a habit.
This is attached to verbs of volition, and ～よう and ～う attach to the 未然形. As the class of verb determines which one you use, here is a conjugation chart for this pattern.
|五段||飲む||飲む ＋ う ＋とする →||飲もうとする|
|カ変||来る||来る＋よう ＋とする →||来（こ）ようとする|
I tried to drink wine.
Just as I was about to get onto the elevator, I was pushed by a man who came running from behind.
After that, just as I tried to take out my wallet in the store, nothing was in it.
There is a time restraint to ～ようとする that makes its non-past form ungrammatical in many instances. ～ようとする is right before an action/change occurs, namely the beginning of the "trial", but the action is meant to be right after when one says it. The moment you utter the phrase is the "base period" for the action implied. If say you are going abroad to Japan like in Ex. 40. You're trying to put into action some sort of change, and that change consequently is about to happen, but in doing so your attempt has already begun as you are consciously planning its execution. All of this is implied with this phrase, which is why we usually see it in the past tense or the progressive. With that in mind, Ex. 40 should sound weird. The "try" in English should clearly not match the "try" phrase being used in the Japanese.
Take note in what makes the following sentences grammatical.
10. 私は日本へ留学しようとするんです。X → 私は日本へ留学しようと思います。〇
Intended: I will try to study abroad in Japan.
11. 友子、すぐ出かけようとするんですか。X → 友子、すぐ出かけようとしていますか。〇
Intended: Is she going to try to leave immediately?
Ants are trying to carry food that is larger than themselves to their hill.
I was trying to go abroad to get into graduate school.
I tried to save a dog that had fallen from an ice crack into a river in an area that was cold with ice.
3rd Person Restraints
[Xは + Verb of volition A + とする] when trying to speak figuratively, an object third person's pose or feeling right before a trial can be captured by the speaker. In actual dialogue this becomes unnatural. When in conversation, in other words, in the present time of the speaker, there is no explanation for why the speaker would conjecture definitely about the feelings of the third person. This is un-Japanese to do, and bad Japanese grammar to try. In other words, in this situation, there is no shutter chance to be able to grasp the instant before X (the third person) does A. Consider this passage.
The sun rose and shined on the man's face. The man opened his eyes and tried to get up. Then, he felt a sharp pain in his chest. He was dizzy. The man was afraid of the sun. For some reason the figure of his baby trying to walk was pleasing.
This shows a lot of features about Japanese literature. For one, literary past can be expressed with the non-past form. This enables the passage to capture the exact moment before the trial as mentioned above. You can make conjectures about third person feeling when writing a novel or when definitively talking about someone.
Why are you trying to take the efforts to go to such a place!? Quit it.
In this situation it is appropriate to use this without an evidential phrase like ～ようだ or ～らしいin dialogue because you are being critical about something that you're watching fold out in front of your eyes. Note that this pattern is actually a contraction of [Verb A＋（よ）うとして＋Verb B]. So, you will see examples where all of this applies in a complex sentence.
When ～ようとする is used with verbs of non-volition, it shows foreboding of a situation.
Lightning was striking, thunder was roaring, and it was going to rain at any moment.
About to be eaten by an alligator, his eyes opened, but his body was rigid out of fear.
漢字 Note: The 漢字 for ワニ is 鰐.