Jim Schott wrote:
>
> I have a rather lengthy function of several variables that I know
> simplifies
> into a particular form. An over-simplified version of the problem goes like
> this. Suppose I know a function of x and y simplifies into the form
>
> a*(x + y)^2 + b*(x^2 + y^2)
>
> where a and b are constants. If maxima has the function in the form
>
> 2*(x^2 + y^2 + x*y)
>
> how can I get it to give me it in the desired form? That is, how do I
> get maxima to tell me that a=1 and b=1?
>
> Any suggestions would be appreciated.
>
> Jim Schott
>
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
Let k1=x^2+y^2
k2=x+y
Then try ratsubst(k1,x^2+y^2,Expression);
ratsubst(k2, x+y,%);
etc.
This will not, in general, get you exactly what you
are looking for, but may get closer.
I think that what you are looking for, finding the smallest form
using dependent expressions, cannot be done without
an exponential time search, in general.
RJF