Hi, after solving HW6, I get a solution that "kind of" matches the reference solution from lab files. However, there is clearly a difference: in figures below, the scatter plot is the reference solution while the continuous plot is my solution.
I've spent north of 20 minutes fiddling with the initial guess. I did manage to break it completely (to a trajectory which satisfies the boundaries but takes amplitude of several hundreads in the middle) but I never managed to get it to fit the reference solution perfectly. I guess I could try parametrizing the ref. solution exactly and using that as the guess, but that seems pointless.
Is this solution good enough or is this indicative of an error in my code somewhere else than in the choice of initial guess?