Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Greetings,
This is a constraint optimization about finding the point on a sphere surface close as possible to the point (1,2,3)
So function to minimize :
f(x,y,z) = (x-1)² + (y-2)² + (z-3)²
Constraint to :
g(x,y,z) = x² + y² + z² - 1
System need to be solve using Newton, with a tolerance of 10^-7 and a maximum of 1000 iterations.
Two initial guess are required : (0.5,0.5,0.5,1.0) and (-0.5,-0.5,-0.5,1.0)
Determine the convergence or the non-convergence of the method. If method converge determine its order. If method diverge determine the type of divergence (oscillatory or explosion).
Since its been almost 7 years I havent been a student...I first used the built-in Mathcad minimization function before starting programming the Newton algorithm...
Now I need your help to complete my Mathcad sheet for evaluating the convergence/divergence part...as I remember on this forum we have very skillfull user...salutations à jmG and greetings to Sir Gutman!!!
Thanks,
Dany
Looks like they both converge.
I'm not sure about the order, but I assume you do something like plotting error at iteration n+1 against error at iteration n on a log-log plot and take the slope of the best-fit straight line through it. This is based on the assumption that error(n+1) = lambda*error(n)^order. I guess the last column of your solutionA (and solutionB) matrix is the measure of error here.
I re-iterate, I'm guessing here! I have no expertise in this area.
Alan
PS Sadly, jmg and Tom Gutman no longer take part in this forum.