x-elements of solve and the list "x"



? What do you mean by "the list x"?  There is no list x -- there are
subscripted formal variables called x[1], x[2], etc.  And solve correctly
finds 2 solutions for each equation -- so there is not one list of
solutions.  Setting globalsolve:true will assign values to solved-for
variables, but only for *linear* equations where the solutions are unique.

If you want to construct a list of (say) the positive solutions to your
equations, you will have to do a little more programming work....

               -s

On Mon, Apr 2, 2012 at 07:35, Sara Pashmin <sarapashm at googlemail.com> wrote:

> Hello,
>
> I try to make a list like "x" from the solve function as the following:
>
> for i:1 thru 3 step 1 do
> ( K: solve([ i*x[i]^2+y[i]=2, i*x[i]^2+z[i]=2,
> x[i]+2*i*y[i]=4],[x[i],y[i],z[i]]),
> display(K),
> display(x[i]));
>
> The answer of Maxima is:
> (%o27)
> K=[[x[1]=1/2,y[1]=7/4,z[1]=7/4],[x[1]=0,y[1]=2,z[1]=2]]
> x[1]=x[1]
>
> K=[[x[2]=(sqrt(129)+1)/16,y[2]=-(sqrt(3)*sqrt(43)-63)/64,z[2]=-(sqrt(3)*sqrt(43)-63)/64],[x[2]=-(sqrt(129)-1)/16,y[2]=(sqrt(3)*sqrt(43)+63)/64,z[2]=(sqrt(3)*sqrt(43)+63)/64]]
> x[2]=x[2]
>
> K=[[x[3]=(sqrt(577)+1)/36,y[3]=-(sqrt(577)-143)/216,z[3]=-(sqrt(577)-143)/216],[x[3]=-(sqrt(577)-1)/36,y[3]=(sqrt(577)+143)/216,z[3]=(sqrt(577)+143)/216]]
> x[3]=x[3]
>
>
> What I expected is:
> x[1]=1/2
> x[2]=(sqrt(129)+1)/16
> x[3]=sqrt(577)+1)/36
> But the list "x" does not contain any x-elements of solve and I don't know
> why.
>
> I would be happy for any help.
>
> Thanks
> Sara
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>