SOR-Newton method

Which case should be chosen?

Discretized version (with stepsize 1/(n+1)) of
y''(t) = γ sin(π y(t)) +t(1-t) , 0 <= t <= 1 , y(0) = 1 , y(1) = 2
(i.e. xi = y(i × h) , i=1,..,n, h=1/(n+1)
(initial value is zero)
n =
Important: n must be in {60,...,1200}
γ =

Please specify the dimension here in the range {4,..,1200}
n =

Please specify here the four components of x for which the development over the iteration will appear in a plot (must be in {1,..,n}, can be equal):
ind1 =
ind2 =
ind3 =
ind4 =

Input of a piece of code to compute the i-th component of F following FORTRAN rules. Your Input variables are n, i, x and f. Your code must use but not change n, i, x and deliver f as single variable (internally this becomes f(i)). You may use here the integers j,k (e.g. for counting or loops), real variables sum,x1h,x2h,x3h,x4h,x5h,x6h,x7h,x8h,x9h (e.g. for intermediate values), three vectors y,z,a each of length 1000 and the constants π , e1(=exp(1)) , sqrt2(=&radic 2) and three logicals bool1, bool2, bool3 (e.g. for results of arithmetic comparisons). All these variables are initalized by zero resp. .false., but if you changed their values then these changes are preserved for later use. For example you might store some constants in a for later use if bool1=.false. then set bool1=.true. and do not repeat these initializations as long as bool1 evaluates as .true. Remember of the special role of columns 1 to 6 here!

Input of the initial guess x0:

Please specify the relaxation parameter omega:
omega= Important: 0 < omega < 2 !

Please specify the required final precision: eps
||F(xk)|| < = eps × ||diag(JF(xk))||

eps = Important: 1.E-8 <= eps <= 1.E-3 !

Please specify the maximum number of steps (k):
maxiter = Important: 50 <= maxiter <= 1000000

Please specify the divergence indicator: we terminate if
||F(xk)|| >= C*||F(x0)|| .

C = Important: 2<= C !

Please specify whether to see a printed table of the intermediate results xI and ||F|| or not
no , graphics suffices
yes, want to see it

Please specify whether to see a printed table of the results x and ||F|| or not
no, graphics suffices
yes, print it

Please specify the output interval for graphics as well for table output:
k-step = Important: 1 <= k-step <= n !

Click on "evaluate", in order to submit your input.

Back to the theory page

 Back to the top!

22.08.2013