If $(\mathbb{R},|.|)$ is a real line, $C$ a subset of $\mathbb{R}$ and $K(C)$ denote set of a compact subset of $C$. Define a multivalued mapping $T:C\rightarrow K(C)$. We know that a point $p\in C$ is called an enpoint of $T$ if $Tp=\{p\}$. Suppose for $x\in X$, we set $R(x,C)=\max\{|x-y|:y\in C\}$. Now let $C=[0,1]$ and $T:C\rightarrow K(C)$ be $Tx=[0,1]$. Then $p=0$ is a unique endpoint of $T$. I want to find the value by the following iteration method: $x_{0}=0.5\in C$, $a_{n}=0.8$ and set $x_{n+1}=(1-\alpha_{n})x_{n}+\alpha_{n}u_{n},$
where $u_{n}\in Tx_{n}$ such that $|u_{n}-x_{n}|=R(x_{n},Tx_{n})$. I set the following code in mathmetica:
T[x_] := T[x] = [0, x]
a[n_] := a[n] = 0.8;
x[0] = 0.5;
D(x,T[x])=max{Abs[x-y]:y\[Epsilon] T[x]};
u[n]\[Epsilon] Tx[n] such that Abs[u[n]-x[n]]=R(x[n],T[x[n]]);
x[n_] := x[n] = (1 - a[n - 1]) x[n - 1] + a[n - 1] u[n-1]
NumberForm[a1 = {Table[x[i],{i, 0, 9}]}, 5]
I know there will be several mistakes in my code to which doest run the code because Im not too much expert in mathemtica. I will thank if any one improve my code (or suggest a new method to define it) too achieve my target.
Dis a system symbol for the (partial) derivative.( ... , ... )is a syntax error.[0, x]is a syntax error.Abs[x, y]makes no sense to me. The colon following it is improper use ofPattern. The phrasesuch thatin the code suggests you need to proofread the question, unlesssuchandthatare variables being multiplied. In short, you need to spend some time with an introduction to Mathematica and learn the basic syntax and features of the language — maybe you have since Feb 28, in which case you should post revised code. Or hire a programmer to do the coding for you. – Michael E2 Apr 14 '22 at 20:40