Optimal Control with Applications in Space and Quantum Dynamics door