Skip to main content
added 1 character in body
Source Link
Stelios
  • 1.4k
  • 1
  • 12
  • 17

The previous answers correspond to the recursive model of the form $$[x_n,y_n]=[f(x_{n-1},y_{n-1}),g(x_{n-1},y_{n-1})]$$. However, the state-space model of the question is of the form \begin{align} [x_n,y_n]&=[f(x_{n-1},y_{n-1}),g(x_{n-1},y_{n-1},x_n)]\\ &=[f(x_{n-1},y_{n-1}),g(x_{n-1},y_{n-1},f(x_{n-1},y_{n-1}))] \end{align} The latter equation is the correct form that should be applied with the methods proposed by the previous answers. Another method could be to use NestList

h[{x_, y_}] := {x + 1/2 (Sqrt[1 - y^2] - x), y + 1/2 (Sqrt[1 - (x + 1/2 (Sqrt[1 - y^2] - x))^2] - y)}; NestList[h,x0 {= N[0 + 1/2 (Sqrt[1 - 0^2] - 0)], ]; y0 = N[0 + 1/2 (Sqrt[1 - (0 + 1/2 (Sqrt[1 - 0^2]x0^2] - 0))^2]]; NestList[h, -{x0, 0)]y0}, 10] 
{{0.5, 0.433013}, {0.700694, 0.573237}, {0.760042, 0.611556}, {0.775621, 0.621377}, {0.779567, 0.623848}, {0.780556, 0.624467}, {0.780804, 0.624622}, {0.780865, 0.624661}, {0.780881, 0.62467}, {0.780885, 0.624673}, {0.780886, 0.624673}} 

The previous answers correspond to the recursive model of the form $$[x_n,y_n]=[f(x_{n-1},y_{n-1}),g(x_{n-1},y_{n-1})]$$. However, the state-space model of the question is of the form \begin{align} [x_n,y_n]&=[f(x_{n-1},y_{n-1}),g(x_{n-1},y_{n-1},x_n)]\\ &=[f(x_{n-1},y_{n-1}),g(x_{n-1},y_{n-1},f(x_{n-1},y_{n-1}))] \end{align} The latter equation is the correct form that should be applied with the methods proposed by the previous answers. Another method could be to use NestList

h[{x_, y_}] := {x + 1/2 (Sqrt[1 - y^2] - x), y + 1/2 (Sqrt[1 - (x + 1/2 (Sqrt[1 - y^2] - x))^2] - y)}; NestList[h, {N[0 + 1/2 (Sqrt[1 - 0^2] - 0)],  N[0 + 1/2 (Sqrt[1 - (0 + 1/2 (Sqrt[1 - 0^2] - 0))^2] - 0)]}, 10] 
{{0.5, 0.433013}, {0.700694, 0.573237}, {0.760042, 0.611556}, {0.775621, 0.621377}, {0.779567, 0.623848}, {0.780556, 0.624467}, {0.780804, 0.624622}, {0.780865, 0.624661}, {0.780881, 0.62467}, {0.780885, 0.624673}, {0.780886, 0.624673}} 

The previous answers correspond to the recursive model of the form $$[x_n,y_n]=[f(x_{n-1},y_{n-1}),g(x_{n-1},y_{n-1})]$$. However, the state-space model of the question is of the form \begin{align} [x_n,y_n]&=[f(x_{n-1},y_{n-1}),g(x_{n-1},y_{n-1},x_n)]\\ &=[f(x_{n-1},y_{n-1}),g(x_{n-1},y_{n-1},f(x_{n-1},y_{n-1}))] \end{align} The latter equation is the correct form that should be applied with the methods proposed by the previous answers. Another method could be to use NestList

h[{x_, y_}] := {x + 1/2 (Sqrt[1 - y^2] - x), y + 1/2 (Sqrt[1 - (x + 1/2 (Sqrt[1 - y^2] - x))^2] - y)}; x0 = N[0 + 1/2 (Sqrt[1 - 0^2] - 0)]; y0 = N[0 + 1/2 (Sqrt[1 - x0^2] - 0)]; NestList[h, {x0, y0}, 10] 
{{0.5, 0.433013}, {0.700694, 0.573237}, {0.760042, 0.611556}, {0.775621, 0.621377}, {0.779567, 0.623848}, {0.780556, 0.624467}, {0.780804, 0.624622}, {0.780865, 0.624661}, {0.780881, 0.62467}, {0.780885, 0.624673}, {0.780886, 0.624673}} 
Post Undeleted by Stelios
added 637 characters in body
Source Link
Stelios
  • 1.4k
  • 1
  • 12
  • 17

The previous answers correspond to the recursive model of the form $$[x_n,y_n]=[f(x_{n-1},y_{n-1}),g(x_{n-1},y_{n-1})]$$. However, the state-space model of the question is of the form \begin{align} [x_n,y_n]&=[f(x_{n-1},y_{n-1}),g(x_{n-1},y_{n-1},x_n)]\\ &=[f(x_{n-1},y_{n-1}),g(x_{n-1},y_{n-1},f(x_{n-1},y_{n-1}))] \end{align} The latter equation is the correct form that should be applied with the methods proposed by the previous answers. Another method could be to use NestList

NestList[h[{#[[1]]x_, y_}] := {x + 1/2 (Sqrt[1 - #[[2]]^2]y^2] - #[[1]]x), #[[2]]  y +   1/2 (Sqrt[1 - #[[1]]^2](x + 1/2 (Sqrt[1 - #[[2]]y^2] - x)})^2] &- y)}; NestList[h, {N[0 + 1/2 (Sqrt[1 - 0^2] - 0.5)],  N[0 + 1/2 (Sqrt[1 - (0.5 + 1/2 (Sqrt[1 - 0^2] - 0))^2] - 0)]}, 10] 

{{0.5, 0.5}, {0.683013, 0.683013}, {0.70671, 0.70671}, {0.707107, 0.707107}, {0.707107, 0.707107}, {0.707107, 0.707107}, {0.707107, 0.707107}, {0.707107, 0.707107}, {0.707107, 0.707107}, {0.707107, 0.707107}, {0.707107, 0.707107}}

{{0.5, 0.433013}, {0.700694, 0.573237}, {0.760042, 0.611556}, {0.775621, 0.621377}, {0.779567, 0.623848}, {0.780556, 0.624467}, {0.780804, 0.624622}, {0.780865, 0.624661}, {0.780881, 0.62467}, {0.780885, 0.624673}, {0.780886, 0.624673}} 
NestList[{#[[1]] + 1/2 (Sqrt[1 - #[[2]]^2] - #[[1]]), #[[2]] +   1/2 (Sqrt[1 - #[[1]]^2] - #[[2]])} &, {0.5, 0.5}, 10] 

{{0.5, 0.5}, {0.683013, 0.683013}, {0.70671, 0.70671}, {0.707107, 0.707107}, {0.707107, 0.707107}, {0.707107, 0.707107}, {0.707107, 0.707107}, {0.707107, 0.707107}, {0.707107, 0.707107}, {0.707107, 0.707107}, {0.707107, 0.707107}}

The previous answers correspond to the recursive model of the form $$[x_n,y_n]=[f(x_{n-1},y_{n-1}),g(x_{n-1},y_{n-1})]$$. However, the state-space model of the question is of the form \begin{align} [x_n,y_n]&=[f(x_{n-1},y_{n-1}),g(x_{n-1},y_{n-1},x_n)]\\ &=[f(x_{n-1},y_{n-1}),g(x_{n-1},y_{n-1},f(x_{n-1},y_{n-1}))] \end{align} The latter equation is the correct form that should be applied with the methods proposed by the previous answers. Another method could be to use NestList

h[{x_, y_}] := {x + 1/2 (Sqrt[1 - y^2] - x),   y + 1/2 (Sqrt[1 - (x + 1/2 (Sqrt[1 - y^2] - x))^2] - y)}; NestList[h, {N[0 + 1/2 (Sqrt[1 - 0^2] - 0)],  N[0 + 1/2 (Sqrt[1 - (0 + 1/2 (Sqrt[1 - 0^2] - 0))^2] - 0)]}, 10] 
{{0.5, 0.433013}, {0.700694, 0.573237}, {0.760042, 0.611556}, {0.775621, 0.621377}, {0.779567, 0.623848}, {0.780556, 0.624467}, {0.780804, 0.624622}, {0.780865, 0.624661}, {0.780881, 0.62467}, {0.780885, 0.624673}, {0.780886, 0.624673}} 
Post Deleted by Stelios
Source Link
Stelios
  • 1.4k
  • 1
  • 12
  • 17

NestList[{#[[1]] + 1/2 (Sqrt[1 - #[[2]]^2] - #[[1]]), #[[2]] + 1/2 (Sqrt[1 - #[[1]]^2] - #[[2]])} &, {0.5, 0.5}, 10] 

{{0.5, 0.5}, {0.683013, 0.683013}, {0.70671, 0.70671}, {0.707107, 0.707107}, {0.707107, 0.707107}, {0.707107, 0.707107}, {0.707107, 0.707107}, {0.707107, 0.707107}, {0.707107, 0.707107}, {0.707107, 0.707107}, {0.707107, 0.707107}}