Newbie question re: finding an equation for a set of known variables?



If you know the *form* of equation you're looking for, you can solve
for its coefficients using Maxima.

v1: [a=5,b=3,c=1,d=7]$
v2: [a=10,b=5,c=2,d=13]$
eq: a*x+b*y+c*z=d$

solve( [ subst(v1,eq), subst(v2,eq) ], [x,y,z] ) =>
     [[x = -(%r1-4)/5,y = 1,z = %r1]]

So there is an infinity of solutions, including
       b+4*c=d   (%r1=4)
       -a+b+9*z=d  (%r1=9)
       a+b-c=d     (%r1=-1)
       2*c/3+b+2*a/3 = d     == 2*c+3*b+2*a=3*d
etc.

Of course, other forms of equation are possible, too.  For example,
your conditions are satisfied by 155*c-a*b=20*d.

          -s

On 9/13/07, Phil <pbpublist at comcast.net> wrote:
> Rather than solving an equation for a variable(s), I'm wondering if it's
> possible to find (simple) equations provided all of the variable values?
>   For example, given the values:
>
> a=5, b=3, c=1, d=7
> a=10, b=5, c=2, d=13
>
> where the variables provided are identified as either LHS (a, b, c) or
> RHS (d) for Maxima to determine the equation that fits the variables.
> In this example the result I would be looking for is a+b-c=d.