The thesis addresses optimal control problems where the dynamics is given by differential equations with memory. For these optimization problems, optimality conditions are provided; second order conditions constitute an important part of the results of the thesis. In the case - without memory - of ordinary differential equations, standard optimality conditions are strengthened by involving only the Lagrange multipliers for which Pontryagin's principle is satisfied. This restriction to a subset of multipliers represents a challenge in the establishment of necessary conditions and enables sufficient conditions to assure local optimality in a stronger sense. Standard conditions are on the other hand extended to the case - with memory - of integral equations. Pure state constraints of the previous problem have been kept and require a specific study due to the integral dynamics. Another form of memory in the state equation of an optimal control problem comes from a modeling work with therapeutic optimization as a medical application in view. Cancer cells populations dynamics under the action of a treatment is reduced to delay differential equations; the long time asymptotics of the age-structured model is also studied.