Question: Do someone tell me how can I solve this exersise using a created procedure?

Do someone tell me how can I solve this exersise using a created procedure? Also I would like to know if using a procedure is useful and if in that form code lines will be reduce. If procedures are not useful. What is the best aproach?

Here the exercise and the code:

Before to begin to learn Maple, I used to do math with python. I usually built function and classes in order to reduce code lines and to generalize the problem, but I don't know if this aproach is useful with Maple. In fact, I have another question. Is it possible to write in a document some codeblocks using Maple and another using python? If answer is yes, how can I do it?

Thank you for helping me;
Greetings;
Lic. Marcus Vinicio Mora Salas
Chemist

Please Wait...