<html>
<head>
<script src="taramath.js"></script>
</head>
<body>
<textarea id="output"></textarea>
<script>
function f (x) {
return x[0]*x[0] + (x[1]-2)*(x[1]-2) + (x[2]+3)*(x[2]+3);
};
var z = [1,1,1];
NonlinearProgramming.set_maximal_iterations(40);
var S = NonlinearProgramming.minimize(f, z);
Print.init("output");
if (typeof(S) == "string") {
Print.object(S);
} else {
Print.object("Optimalloesung:");
Print.object(S[0]);
Print.object("Zielfunktionswert:");
Print.object(S[1]);
Print.object("Anzahl der Iterationen:");
Print.object(NonlinearProgramming.get_number_of_iterations());
};
</script>
</body>