I am faced with an exercise text which is formulated as the folowing

"Implement an Inverse Kinematics Solver. Show that you can compute
joint positions according to a given wanted position and orientation
of an end-effector"

There are two ways of doing this. There are probably more, but currently I can think of two. One is to describe the links and joints as translations and rotations (Danavit-hartenberg) and solve a system of equations by minimization to go from pose0 to pose1, where pose0 is given and the position and orientation of the end effector is given for pose1. I can define an equation of the unknowns and thereby find what rotations (and possible translations) the joints need to have to put the end effector where is is wanted.

The other solution is to start at pose0 and then just move and rotate the end effector into the position and orientation that i want, and fix it there. Then I can do relaxiation of the whole system and it should fall into place. The links will have length constraints on them and the joints possible consttraints on the rotations. When first moving the end effector, the constraints will probably be broken, but the relaxation should give me a valid solution (if it exists) and everything is fine.

The thing is... for me the relaxation seems very very much simpler to implement. I am however worried that it somehow has its weaknesses since my textbook doesn't mention it but only the other solution. I have done something like this before when fiddint a skeleton to motioncaptured 3d points, and it works fine, as far as I can see, but... is it a valid solution for Ik and is it a valid solution to the given assignment, based on the text?

"Implement an Inverse Kinematics Solver. Show that you can compute

There are two ways of doing this. There are probably more, but currently I can think of two. One is to describe the links and joints as translations and rotations (Danavit-hartenberg) and solve a system of equations by minimization to go from pose0 to pose1, where pose0 is given and the position and orientation of the end effector is given for pose1. I can define an equation of the unknowns and thereby find what rotations (and possible translations) the joints need to have to put the end effector where is is wanted.

The other solution is to start at pose0 and then just move and rotate the end effector into the position and orientation that i want, and fix it there. Then I can do relaxiation of the whole system and it should fall into place. The links will have length constraints on them and the joints possible consttraints on the rotations. When first moving the end effector, the constraints will probably be broken, but the relaxation should give me a valid solution (if it exists) and everything is fine.

The thing is... for me the relaxation seems very very much simpler to implement. I am however worried that it somehow has its weaknesses since my textbook doesn't mention it but only the other solution. I have done something like this before when fiddint a skeleton to motioncaptured 3d points, and it works fine, as far as I can see, but... is it a valid solution for Ik and is it a valid solution to the given assignment, based on the text?