Answer:
The same sentence written in a more formal way could be:
The subjects did not find the task difficult.
Explanation:
This sentence does not require a lot of change to be made more formal. The main issue with the original sentence is the use of "have", which is quite a general verb. So we can make a small change to avoid using it: to have difficulty with something --> to find something difficult.
Another tip for making sentences a bit more formal is trying to write them in the passive voice. This particular sentence sounds better in the active voice, but other cases may be more efficiently formal in the passive:
- We used this software to analyze the data. --> This software was used to analyze the data.