Introduction of a mathematical model for optimizing the drug release in the patient’s body