Maxima not returning any solutions for simultaneous equations.

1k Views Asked by At

Maxima returns no results for the following:

 solve ([a = (p-x)*c, b = (q-x)*d, a + b = 0], [x]);

I think it should return:

                       d q + c p
                  [x = ---------]
                         d + c

What am I doing wrong?

1

There are 1 best solutions below

2
On BEST ANSWER

You have a system of 3 equations of one variable x. Such a system can be overdetermined. Even

solve ([a = (p-x)*c, b = (q-x)*d, a + b = 0], [x]);

results in an empty solution

[]

because a+b=0 isn't true except for special values of the constants a and b. A constant expression will be true in this context only if it can be proved that is true for all possible assignment to the parameters.

I think you actually wanted to solve the system

solve ([a = (p-x)*c, b = (q-x)*d, a + b = 0], [x, a, b])

with three variables x, a, b and the constants c,d,p,q.

Maxima calculates the solution

[[x = (d*q+c*p)/(d+c),a = (c*d*p-c*d*q)/(d+c),b = -(c*d*p-c*d*q)/(d+c)]]

where x has the value you expected.