how to make maxima create equation like i give in attachment



Razif,

In Maxima, you do not assign values to derivatives etc.  You write equations
and can store the equations in variables or lists.

Let me give an example with ordinary (not differential) equations.

eq1:  x = y+3$
eq2:  x*5=2*y-7$

solve( [eq1, eq2], [x,y]);

OR

eqs: [ x = y+3,  x*5=2*y-7 ]$
vars: [x,y]$
solve(eqs,vars);

You can do the same thing for systems of equations using 'makelist':

eqs: makelist( x[ i ] = x[ i+1 ] + x[ i-1 ] + 1, i , 1, 5 )$
solve(    append([x[0]=x[8],x[3]=1],eqs),      << add some extra equations
             makelist(x[i],i,0,8));                       << list of
variables

I have not worked with the differential equation solvers for a long time, so
I don't know whether they can solve your equations.

           -s




On Wed, Jan 12, 2011 at 22:46, razif razali <razif66 at gmail.com> wrote:

>
>
> 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
>
>
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>