View Question
Q: How to use Maple to solve this question ( Answered,   0 Comments )
 Question
 Subject: How to use Maple to solve this question Category: Reference, Education and News > Education Asked by: spin_rgw-ga List Price: \$2.00 Posted: 02 Feb 2005 19:05 PST Expires: 04 Mar 2005 19:05 PST Question ID: 467866
 ```Consider the following linear system. x + ay + a^2z = d x + by + b^2z = e x + cy + c^2z = f Find conditions on x, y and z so that there is a unique solution to this linear system.``` Request for Question Clarification by mathtalk-ga on 02 Feb 2005 20:12 PST ```Hi, spin_rgw-ga: While the system is "linear" if the unknowns are x,y,z, it is not so clear what you would then mean in asking to "find conditions on x, y and z" that imply a unique solution. Please confirm x,y,z are the "unknowns" of the problem, and if so, that what you are really asking for are conditions on a,b,c that make the solution x,y,z unique (for any particular a,b,c,d,e,f). Also, is it essential to describe a use for Maple in solving the problem? The conditions on a,b,c can be stated and even proven "by hand". regards, mathtalk-ga``` Clarification of Question by spin_rgw-ga on 02 Feb 2005 21:22 PST ```The question is solve the following linear system and find conditions on a, b, c so that there is a unique solution to this linear system. Solve x, y, z in terms of a, b, c, d, e, f.``` Request for Question Clarification by mathtalk-ga on 03 Feb 2005 06:19 PST ```Thanks, spin_rgw-ga, for the prompt clarification. Can you give a rough "level" of mathematics at which you'd like the Answer to be presented? For example, high school, college, or "advanced"? regards, mathtalk-ga``` Clarification of Question by spin_rgw-ga on 03 Feb 2005 09:44 PST `I would like the advanced level to presented the answer. Thank you.`
 ```Hi, spin_rgw-ga: Since your problem involves (small) powers of a,b,c, we will have occasion below to refer them as "bases". The short answer is that the three by three linear system in unknowns x,y,z: x + ay + a^2z = d x + by + b^2z = e x + cy + c^2z = f has a unique solution precisely when the numbers a,b,c are all distinct. We will mention several ways to establish this. An elementary approach to showing this is by considering the equivalent matrix formulation: / 1 a a^2 \ / x \ / d \ | 1 b b^2 | | y | = | e | \ 1 c c^2 / \ z / \ f / which by standard results of linear algebra has a unique solution just when the matrix of coefficients, involving powers of a,b,c, is invertible (nonsingular), or equivalently when the determinant of that coefficient matrix is nonzero: | 1 a a^2 | | 1 b b^2 | = (b-a)(c-a)(c-b) | 1 c c^2 | as you can easily establish for yourself by expanding the determinant or using elementary row operations to put it in upper triangular form. [See below for one easy way to carry out this computation.] Vandermonde matrices: the general case ====================================== This 3x3 matrix is one case of a more general class of Vandermonde matrices, whose determinants are the always product of differences between the "bases" taken in an order corresponding to the order of the rows in which each appears: [The Vandermonde Matrix] http://www-math.cudenver.edu/~rrosterm/crypt_proj/node6.html It should be clear that the determinant is nonzero (and thus the matrix is invertible and the solution of the linear system is unique) exactly when all the bases are distinct (here a,b,c all different), for the product is zero if and only if one of the factors is zero (implying that two of the bases are equal). An equivalence with polynomial interpolation ============================================ There is an alternative way to think about the problem which leads to this same conclusion. Suppose you are asked to find coefficients of a polynomial p of degree at most 2: p(u) = z*u^2 + y*u + z such that p(a) = d, p(b) = e, p(c) = f. Such a problem, "interpolating" the values at three prescribed points u = a,b,c, will have a unique solution whenever the points a,b,c are all distinct. [Note that if two points out of a,b,c were the same, we could force no solution to exist by requiring the corresponding right hand sides out of d,e,f to differ. Likewise, if two "bases" and their right hands sides both agree, then we really have at most two independent conditions, not enough information to uniquely determine all three coefficients of polynomial p.] Computing the determinant ========================= You may wish to confirm the determinant calculation with Maple, which handles symbolic expressions. However the elementary row operations of adding a multiple of one row to another do not change the determinant. Therefore the following is easily carried out "by hand": | 1 a a^2 | | 1 a a^2 | | 1 b b^2 | = | 0 b-a b^2-a^2| [subtract top row from 2nd & 3rd rows] | 1 c c^2 | | 0 c-a c^2-a^2| Now remove a factor of (b-a) from the 2nd row and (c-a) from the 3rd: | 1 a a^2 | | 1 a a^2 | | 1 b b^2 | = (b-a)(c-a) | 0 1 b+a | | 1 c c^2 | | 0 1 c+a | | 1 a a^2 | = (b-a)(c-a) | 0 1 b+a | [sub. 2nd from 3rd row] | 0 0 c-b | = (b-a)(c-a)(c-b) regards, mathtalk-ga``` Clarification of Answer by mathtalk-ga on 05 Feb 2005 19:08 PST ```Some additional remarks about actually solving the linear system, versus showing under what conditions the solution is unique. When the determinant is nonzero, one can invert the coefficient matrix: / 1 a a^2 \ | 1 b b^2 | \ 1 c c^2 / symbolically (ie. with Maple or other computer algebra program) and get a result like this: / 2 2 2 2 2 2 \ | b c - b c a c - a c a b - a b | 1 | | --------------- | 2 2 2 2 2 2 | (b-a)(c-a)(c-b) | b - c c - a a - b | | | | | \ c - b a - c b - a / Then multiplying the "constant" terms of the right hand side: / d \ | e | \ f / by the above 3x3 matrix inverse gives the unique solution for x,y,z. As a practical matter, however, linear systems are rarely solved using a matrix inverse (though such a small system as this might be counted among those exceptions). In particular the matrix inverse approach to interpolation problems suffers from numerical disadvantages when "nodes" (bases) a,b,c are particularly close to one another (so that dividing by their product leads to large entries in the matrix inverse). Another approach is to take a sum of polynomials which are constructed for interpolating a fixed set of nodes (or bases, as we've been calling a,b,c). Consider for example these quadratics in variable u: (u-b)*(u-c) A(u) = --------------- (a-b)*(a-c) (u-a)*(u-c) B(u) = --------------- (b-a)*(b-c) (u-a)*(u-b) C(u) = --------------- (c-a)*(c-b) These three polynomials have the characteristics of being 1 at exactly one of the three nodes and 0 at the other two. Thus we can explicitly write the interpolating quadratic for our data this way: p(u) = d*A(u) + e*B(u) + f*C(u) The linear dependence of p(u) on the constant terms d,e,f is apparent. The general case of these is called Lagrange interpolating polynomials. See: [Lagrange Interpolating Polynomial -- from MathWorld] (Eric W. Weisstein -- A Wolfram Web Resource) http://mathworld.wolfram.com/LagrangeInterpolatingPolynomial.html regards, mathtalk-ga```