Re: Replace in recursive equations
- To: mathgroup at smc.vnet.net
- Subject: [mg54406] Re: [mg54371] Replace in recursive equations
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Sun, 20 Feb 2005 00:08:08 -0500 (EST)
- Reply-to: hanlonr at cox.net
- Sender: owner-wri-mathgroup at wolfram.com
eqn=f[n+1]==a*f[n];
eqn /. f[n__] :> ff[n]+Q
Q + ff[n + 1] == a*(Q + ff[n])
Needs["DiscreteMath`RSolve`"];
RSolve[{f[n+1]==a*f[n],f[0]==c},f[n],n]
{{f[n] -> a^n*c}}
Bob Hanlon
>
> From: skirmantas.janusonis at yale.edu (Skirmantas)
To: mathgroup at smc.vnet.net
> Date: 2005/02/19 Sat AM 02:32:32 EST
> To: mathgroup at smc.vnet.net
> Subject: [mg54406] [mg54371] Replace in recursive equations
>
> The last sentence of my previous message about Inverse got somehow
> scrambled. I meant "I have to re-input the output to get the result."
>
> One more quick question. Suppose I have a recursive equation F[n+1]==a
> F[n]. I want to replace F[n]->FF[n]+Q for _all_ n's. Q is a constant.
> What is the best way to do it? The left side should become FF[n+1]+Q
> and the right a(FF[n]+Q). Any help would be appreciated.
>
>