Vari­able elim­i­na­tions and equa­tion solv­ing

OpenSource For You - - FOR U & ME -

Very of­ten, we come across ‘N’ sets of equa­tions in ‘M’ sets of un­knowns, where M >= N. If M = N, then it’s most likely that a unique so­lu­tion ex­ists. How­ever, if M > N, then there may be many pos­si­ble so­lu­tions, but with some con­straints. In such a case, it would be help­ful to de­duce some sim­pler set of ex­pres­sions. This can be achieved us­ing elim­i­nate() of Max­ima. Let’s have two poly­no­mial ex­pres­sions in the three vari­ables x, y and z to demon­strate this: $ max­ima -q (%i1) p1: x^2 + 2*x*y + z^2$ (%i2) p2: x + y + z$ (%i3) string(elim­i­nate([p1, p2], [x])); (%o3) [2*z^2-y^2] (%i4) string(elim­i­nate([p1, p2], [y])); (%o4) [-z^2+2*x*z+x^2] (%i5) string(elim­i­nate([p1, p2], [z])); (%o5) [y^2+4*x*y+2*x^2] (%i6) quit();

Note that in all the above poly­no­mial ex­pres­sions, the ex­pres­sions are as­sumed to be equated to zero. A beau­ti­ful ap­pli­ca­tion of the above is solv­ing re­cur­rence re­la­tions. Let’s as­sume that we have a non-lin­ear equa­tion given by Y =r * Y * (1 – Y ). And, we want to solve it for a sce­nario where as ‘n’ tends to in­fin­ity, the value of ‘Y’ os­cil­lates be­tween two dis­tinct val­ues. This means that Y = Y . Hence, we would have two ex­pres­sions with three un­knowns to solve, namely: 1) Y 2) Y

=r*Y =r*Y * (1 – Y ) * (1 – Y ) So, rep­re­sent­ing Y with yn1 and Y by yn, we may use

n+1 n solve() to solve for yn and yn1 in terms of r. But, if we want to get a feel of the equa­tion which pops up, in terms of yn, we would have to use elim­i­nate() to elim­i­nate yn1. $ max­ima -q (%i1) p1: yn1 = r * yn * (1 - yn)$ (%i2) p2: yn = r * yn1 * (1 – yn1)$ (%i3) string(elim­i­nate([p1, p2], [yn1])); (%o3) [yn*(r^3*yn^3-2*r^3*yn^2+(r^3+r^2)*yn-r^2+1)] (%i4) string(solve([p1, p2], [yn, yn1])); /* Just to show the so­lu­tion */ (%o4) [[yn = (r-1)/r,yn1 = (r-1)/r],[yn = -(sqrt(r^2-2*r-3)-r-1)/ (2*r),yn1 = (sqrt(r-3)*sqrt(r+1)+r+1)/(2*r)],[yn = (sqrt(r^2-2*r3)+r+1)/(2*r),yn1 = -(sqrt(r-3)*sqrt(r+1)-r-1)/(2*r)],[yn = 0,yn1 = 0]] (%i5) quit();

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.