I'm trying to plot a recursive sequence namely x(1)=1, x(n+1)=1/2[x(n)+2/x(n)]. I've tried messing around with the \tikzmath library but so far I'm not really successfull. My main issue is properly defining the function, not sure how or even what tool to use to do so. Plotting it is the easy part though.
I'd appreciate any help.
Asked
Active
Viewed 121 times
0
t_kln
- 345
-
1What about recursive functions in pgfplots using 'declare function'? – frougon Feb 01 '20 at 12:06
-
1There is also this solution using LuaTeX (the recursion is coded in Lua). – frougon Feb 01 '20 at 12:20
-
@frougon That should work thanks, I'll give it a go when I have time. – t_kln Feb 01 '20 at 12:21