       Re: A basic question about RecurrenceTable - warning messages

• To: mathgroup at smc.vnet.net
• Subject: [mg122321] Re: A basic question about RecurrenceTable - warning messages
• From: victorphy <vbapst at gmail.com>
• Date: Tue, 25 Oct 2011 06:16:49 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <j80qk9\$ag5\$1@smc.vnet.net>

```On 23 oct, 12:34, Dana DeLouis <dan... at me.com> wrote:
> Hi.  I see you found a solution.
>
> f[x_,a_]:=-(x-a)^3+(x-a)
>
> soltest[a_?NumericQ,b_?NumericQ]:=x/.FindRoot[f[x,a],{x,b}]
>
> eqns =
>  {a[n+1]==soltest[n/10,a[n]],
>   a==-1};
>
> RecurrenceTable[eqns, a, {n,10}]
> {-1,-1.,-0.9,-0.8,-0.7,-0.6,-0.5,-0.4,-0.3,-0.2,-0.1}
>
> I may be wrong, but I noticed you have two -1's in the beginning.
> In the Recurrence table, n goes from 1 to 10.
> However, there is no a[n-1] to refer to your initial a = -1.
> Again, I may be wrong, but I -think- it should be  a== -1.
>
> If we did that, then...
>
> eqns =
>  {a[n+1]==soltest[n/10,a[n]],
>  a==-1};
>
> RecurrenceTable[eqns,a,{n,10}]
> {-1,-0.9,-0.8,-0.7,-0.6,-0.5,-0.4,-0.3,-0.2,-0.1}
>
> If we take your initial equation, and substitute z for (x-a), then we get:
>
> -(x-a)^3+(x-a)    //.(x-a)->z
> z-z^3
>
> We Factor to get the 3 solution for the zero function:
>
> Factor[%]
> -(-1+z) z (1+z)
>
> I believe you are using FindRoot to solve for the 3rd equation (1+z).
> If we substitute back in:
>
> (1+z)/.z -> x-a
> 1-a+x
>
> And solve for x.  Basically we get that x is a - 1.
>
> Solve[%==0,x]
> {{x-> a - 1}}
>
> So, at 0, we have -1, and then as your numbers increase linearly...
>
> Range[0,9]/10.   - 1
>
> {-1.,-0.9,-0.8,-0.7,-0.6,-0.5,-0.4,-0.3,-0.2,-0.1}
>
> Again, I may be wrong.  :>(
>

Hello Dana,

thank you for your detailled answer. As a matter of fact this was just
a silly example to test things and explain my problem !
But thank you for the advices you gave me anyway !

Best regards,

victor

```

• Prev by Date: Re: Integral points on elliptic curves
• Next by Date: Re: how do you prevent numerator expansion when using 'Together'?
• Previous by thread: Re: A basic question about RecurrenceTable - warning messages
• Next by thread: count the number of sub-list in a list