Assume we are given a system of ordinary differential equations x 0 = f(x, p) depending on a parameter p ∈ R pe . In this dissertation we consider the problem of locating a parameter p and an initial condition ξ that give rise to a heteroclinic orbit. In the case that such p and ξ are not unique we can introduce a cost function in the parameter space and ask for the parameters generating heteroclinic orbits that also minimize the cost function. We provide optimization problems to solve the mentioned issues. We also provide formulas to solve the optimization problems accurately. The advantage of approaching these problems using techniques from optimization is the conceptual simplicity of the formulations that appear combined with the robustness of the solvers available in standard packages. This approach can be easily extended to situations in which the properties of the orbits can be seen as optimums of optimization problems. All technical difficulties are concentrated in the accurate estimation of first and second order derivatives of solutions and equilibria of ordinary differential equations. Our methods can be used if we obtain parametrizations of equilibria. The equilibria can be non-hyperbolic and the multiplicities of eigenvalues at equilibria do not matter. The dimensions of the stable and unstable spaces can change. As an application of our main method we considered the problem of finding travelling waves in a system of partial differential equations modelling combustion studied in [13]. The corresponding heteroclinic orbit approaches a nonhyperbolic equilibrium and the ordinary differential equation has solutions very sensitive to initial conditions and parameters. The orbits are very slow in the positive direction and very fast in the negative direction. The analytical velocity of the travelling wave is found in [13]. The analytical and numerical results are shown.