trig.mod 268 Bytes
Newer Older
Gianluca Frison's avatar
Gianluca Frison committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
reset;

param n := 10;

var x{i in 1..n} := 1/n;
#var x{i in 1..n} := 1/n*(-1)^i;

s.t. eq{i in 1..n} : n - sum{j in 1..n} cos(x[j]) + i*(1-cos(x[i])) - sin(x[i]) = 0;

option solver knitro;
option knitro_options "outlev=2 feastol=0 multistart=1";

solve;

display x;