home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 June / Chip_2002-06_cd1.bin / zkuste / derive / download / Setup.exe / %MAINDIR% / Users / Subst.dmo < prev    next >
Encoding:
Text File  |  2002-05-15  |  2.8 KB  |  52 lines

  1. "== Equations System Solving by Substitution == SUBST.DMO = 30.03.00"
  2. "Multiple Solutions Supported.    Copyright (C) 2000 by S.V.Biryukov"
  3. "                         Email: ciprel@cityline.ru  Subject: DERIVE"
  4. " uses SUBST.MTH.          For DERIVE v.5.00 & later. See SUBST.DOC "
  5. "                                                                   "
  6. "SOLVE_(m,v):=solves matrix of eq. m for variables v by substitution"
  7. "           m - 1 column matrix of equations,                       "
  8. "           v - vector (or 1 col. matrix) of solve variables.       "
  9. "           Eq. & variables order in m & v define substitution order"
  10. "                    Use ONLY in EXACT mode !!!                     "
  11. " ******* Use SOLVE_() function  ONLY in EXACT Mode !!! ************"
  12. LOAD(["subst.mth","..\users\subst.mth"])
  13. " SOLVE_() can solve simple nonlinear eq. systems by substitution.  "
  14. SOLVE_([[c=a/b],[b-1=c],[2*c=a-2]],[a,b,c])=
  15. "One column matrix of variables is also supported.                  "
  16. SOLVE_([[c=a/b],[b-1=c],[2*c=a-2]],[[a],[b],[c]])=
  17. "Other variables (& thus substitutions) order, but the same solution"
  18. SOLVE_([[c=a/b],[b-1=c],[2*c=a-2]],[[b],[c],[a]])=
  19. "APPEND(RHS()) combination returns a vector of variables' values.   "
  20. APPEND(RHS([[a=6],[b=3],[c=2]]))=
  21. "You can use SBST() to test solutions. SBST(u,x,x0) substitutes x=x0"
  22. "in u. x & x0 - vectors or 1 column matrices of variables & values. "
  23. SBST([[c=a/b],[b-1=c],[2*c=a-2]],[b;c;a],[3;2;6])=
  24. "Linear eq. systems. can be also solved                             "
  25. SOLVE_([[2*a+3*b+4*c=12],[4*a+5*b-7*c=-7],[9*a+4*b+3*c=14.5]],[[a],[b],[c]])=
  26. "===================  Inside the Utility  ======================    "
  27.  
  28. "Forward substitutions. A tree of solutions & reduced eq. systems.  "
  29. SOLF([[c=a/b],[b-1=c],[2*c=a-2]],[[a],[b],[c]])
  30.  
  31. "Forward substitutions. A part of a tree for 2 first variables.     "
  32. SOLF([[c=a/b],[b-1=c],[2*c=a-2]],[[a],[b],[c]],2)
  33.  
  34. "2 solution vectors returned by forward/back substitutions          "
  35. SOLB(SOLF([[c=a/b],[b-1=c],[2*c=a-2]],[[a],[b],[c]]))=
  36.  
  37. "1st vector test. Substitute it in the eq. system.   NOT a Solution!"
  38. SBST([[c=a/b],[b-1=c],[2*c=a-2]],[[a],[b],[c]],[[0],[0],[-1]])=
  39.  
  40. "2nd vector test. Valid Solution !                                 "
  41. SBST([[c=a/b],[b-1=c],[2*c=a-2]],[[a],[b],[c]],[[6],[3],[2]])=
  42.  
  43. "SOLVE_() returns only valid solutions.                            "
  44. SOLVE_([[c=a/b],[b-1=c],[2*c=a-2]],[[a],[b],[c]])=
  45. "****** Use SOLVE_() function  ONLY in EXACT Mode !!! *************"
  46. "                                                                  "
  47. ".................................................................."
  48. "            Additional Information is in SUBST.DOC                "
  49. ".................................................................."
  50. "======================== SUBST.DMO   END  ========================"
  51. 
  52.