how to make maxima create equation like i give in attachment



On Thu, Jan 6, 2011 at 9:40 PM, Leo Butler <l.butler at ed.ac.uk> wrote:

>
>
> On Thu, 6 Jan 2011, razif razali wrote:
>
> < Thanks for your reply,
> < so from your guide, here what I come through,
> < ------------------
> < df(n,k):=
> < block ([],
> <     if n=0
> <     then 0
> <   else
> <
>   'diff(f[2*n,k],s)=x*((k-1)*sqrt(n-k+2)*f[2*n,k-1]-k*sqrt(n-k+1)*f[2*n,k+1])
> < );
> < makelist(df(1,k),k,1,2);
> < ------------------------
> < I can get the equation for diff( f[2,1],s) and diff( f[2,2],s)
> respectively,
> <
> < so next thing is, how can i make diff( f[2,1],s) and diff( f[2,2]) hold
> it value?because when I type again diff( f[2,1],s) in maxima after give code
> above, it gives
> < zero. what i want do here is after i get equation diff( f[2,1],s) i want
> to solve with both equation using ode method to get function of f[2,1] and
> f[2,2] with
> < f[2*n,k](0)=A, and value of x and A are not zero...
>
>  The problem is that Maxima does not know that f[n,k] is a function of
>  s, too. Here is a solution:
>
>  depends(f,s);
>  df[n,k] := if n=0 then 0 else
> diff(f[2*n,k],s)=x*((k-1)*sqrt(n-k+2)*f[2*n,k-1]-k*sqrt(n-k+1)*f[2*n,k+1]);
>  .
>  .
>  .
>  Note that I do not use 'diff, because the first line tells Maxima
>  that f is a function of s.
>
> Leo
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
> by telling MAXIMA that f[n,k] is function of s to helped me without using
'diff but then it still not hold the function for next used?
the result still the same,

depends(f,s);
 df[n,k] := if n=0 then 0 else
diff(f[2*n,k],s)=x*((k-1)*sqrt(n-k+2)*f[2*n,k-1]-k*sqrt(n-k+1)*f[2*n,k+1]);
makelist(df[1,k],k,1,2);

then i got the diff(f [2,1],s) and diff( f[2,2],s)

so how to make diff(f [2,1],s) and diff( f[2,2],s) hold its function so that
I can solve it using ODE in MAXIMA?because when i type all command above and
get the result, when i type again diff( f[2,1],s) it give nothing...




-- 
Regards,

RAZIF RAZALI,
Tutor & Master Student,
Physics Department,
Faculty Of Science,
Universiti Teknologi Malaysia(UTM).
+60199393606