Thanks, that did it
But I am stuck again
I have two recursive functions:
f(n)=(2*f(n-1)+g(n-1))/3;
g(n)=(f(n-1)+g(n-1))/2;
where f(0)=x and g(0)=y
and I need to find f(inf)
It's obvious that f(inf)=(3*x+2*y)/5 , but I can't get Maxima to
calculate it:
load(solve_rec)$
f(n)=(2*f(n-1)+g(n-1))/3;
fn: solve_rec(%, f(n), f(0)=y);
g(n)=(f(n-1)+g(n-1))/2;
gn: solve_rec(%, g(n), g(0)=x);
and I get stuck at:
solve( [fn,gn], [f(n),g(n)] );
Andrej Vodopivec wrote:
> Find the explicit form for f(n) and then compute the limit:
>
> (%i1) load(solve_rec)$
> (%i2) f(n) = (f(n-1)+x)/2;
> (%o2) f(n)=(x+f(n-1))/2
> (%i3) solve_rec(%, f(n), f(0)=y);
> (%o3) f(n)=y/2^n-x/2^n+x
> (%i4) limit(rhs(%), n, inf), assume_pos=true;
> (%o4) x
>
> Andrej
>
> On 9/22/06, Angel Popov <geleto at geleto.com> wrote:
>> ... forgot to specify:
>> f(0) = y
>>
>> Angel Popov wrote:
>> > I need to find the limit of a recursive function at infinity
>> > For instance:
>> > f(n):= (f(n-1)+x)/2
>> > limit( f(n),n,inf )
>> > Is there a way to do this in maxima?
>> >
>> > Thanks
>> > _______________________________________________
>> > Maxima mailing list
>> > Maxima at math.utexas.edu
>> > http://www.math.utexas.edu/mailman/listinfo/maxima
>> >
>> >
>> > __________ NOD32 1.1768 (20060922) Information __________
>> >
>> > This message was checked by NOD32 antivirus system.
>> > http://www.eset.com
>> >
>> >
>> >
>> > __________ NOD32 1.1768 (20060922) Information __________
>> >
>> > This message was checked by NOD32 antivirus system.
>> > http://www.eset.com
>> >
>> >
>> >
>> >
>> _______________________________________________
>> Maxima mailing list
>> Maxima at math.utexas.edu
>> http://www.math.utexas.edu/mailman/listinfo/maxima
>>
>
>
>