iterations, recursions and derivatives
- To: mathgroup at smc.vnet.net
- Subject: [mg22544] iterations, recursions and derivatives
- From: Otto Linsuain <linsuain+ at andrew.cmu.edu>
- Date: Thu, 9 Mar 2000 03:24:29 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Hello. I find it hard to define a sequence of functions recursively and be able to differenciate them at the same time. For example f[x_,1]:=x^2 Try to differentiate Derivative[1,0][f][2,1] will not work. Changing := for = doesn't help. Can do: f[x_,1_]:=x^2 Notice the _ after the 1 (Kind of wierd, isn't it?) Now, however, can differentiate: Derivative[1,0][f][2,1] works fine. But cannot work recursions: f[x_,m_]:= SomeOperation[f[x,m-1]] confuses the recursion process. I have tried defining f[x_,m_]:=If[m==1,x^2,SomeOperation[f[x,m-1]], but the recursion again crashes. I have tried Which, Switch, Condition, Dt, D, etc, but to no avail. When I can take the derivative, I can't update m to m+1. Any suggestions? Thanks, Otto Linsuain.
- Follow-Ups:
- Re: iterations, recursions and derivatives
- From: Hartmut Wolf <hwolf@debis.com>
- Re: iterations, recursions and derivatives
- From: Otto Linsuain <linsuain+@andrew.cmu.edu>
- Re: iterations, recursions and derivatives