Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

Discrete Dynamical Systems: Stability, Cobweb Diagram, Time Series Diagram, Phase Diagram, Bifurcation Diagram

Project: Home
Views: 2615
####################### #Stability 1D #by Sinan Kapcak #2017 #www.k-interact.net/dds ####################### x,y=var('x y') @interact def _( funct=input_box(label='Function $f(x)$',default=x-x^2,width=50), fipo=input_box(label='Fixed point $x^*$',default=0,width=50 )): if bool(fipo == funct(x=fipo))==False: show (' $x=$' , fipo , ' is not a fixed point.') else: if abs( diff(funct,x).substitute(x=fipo))<1: show (' $x^*=$' , fipo , ' is an asymptotically stable fixed point.') if abs( diff(funct,x).substitute(x=fipo))>1: show (' $x^*=$' , fipo , ' is an unstable fixed point.') if diff(funct,x).substitute(x=fipo)==1: A=0 n=2 while A==0: A=diff(funct,x,n).substitute(x=fipo) n=n+1 if is_odd(n)==True: show (' $x^*=$' , fipo , ' is an unstable (semistable) fixed point.') else: if A<0: show (' $x^*=$' , fipo , ' is an asymptotically stable fixed point.') if A>0: show (' $x^*=$' , fipo , ' is an unstable fixed point.') if diff(funct,x).substitute(x=fipo)==-1: funct1=funct(x=funct) A=0 n=2 while A==0: A=diff(funct1,x,n).substitute(x=fipo) n=n+1 if A<0: show (' $x^*=$' , fipo , ' is an asymptotically stable fixed point.') if A>0: show (' $x^*=$' , fipo , ' is an unstable fixed point.')
Interact: please open in CoCalc