home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / utility / sm22a.zip / SYMBMATH.H13 < prev    next >
Text File  |  1993-03-30  |  7KB  |  228 lines

  1.                     13.18 Learning from Users
  2.  
  3.     One of the most important feature of SymbMath is its ability 
  4. to deduce and expand its knowledge. If the user provides it with the 
  5. necessary facts, SymbMath can solve many problems that it was unable 
  6. to solve before. The followings are several ways in which SymbMath is 
  7. able to learn from the user.
  8.  
  9.  
  10. 13.8.1 Learning indefinite and definite integrals from a derivative
  11.  
  12.     If the user provides the derivative of a known or unknown 
  13. function, SymbMath can deduce the indefinite and definite integrals of 
  14. that function. Usually finding derivative of the function are much 
  15. easier than finding integral of that function.
  16.  
  17.  
  18. Example 13.18.1.1 :
  19.  
  20.     If we know a derivative of an function f(x) (f(x) is a known or 
  21. unknown function), SymbMath can learn the integrals of that function 
  22. from its derivative.
  23.     First check SymbMath wether or not it had already known 
  24. indefinite and definite integrals of an unknown function f(x).
  25.  
  26. In the input window type :
  27.  
  28. inte(f(x), x)
  29. inte(f(x), x, 1, 2)
  30. end
  31.  
  32. In the output window you'll see :
  33.  
  34. inte(f(x), x)
  35. inte(f(x), x, 1, 2)
  36. end
  37.  
  38. As the output windows displayed only what was typed in the input 
  39. windows without any computed results, imply that SymbMath has no 
  40. knowlege of the indefinite and definite integrals of the functions 
  41. in question. Now teach SymbMath the derivative of f(x) on the first 
  42. line, and then run the program again.
  43.  
  44.     Input:
  45. d(f(x_), x_) = exp(x)/x
  46. inte(f(x), x)
  47. inte(f(x), x, 1, 2)
  48. end
  49.     Output:
  50. d(f(x_), x_) = e^x/x
  51. constant + x*f(x) - e^x
  52. e - f(1) + 2*f(2) - e^2
  53.  
  54. As demonstrated, the user only supplied the derivative of the function
  55. and in exchange SymbMath logically deduced its integral.
  56.  
  57. Example 13.18.1.2 :
  58.  
  59. Integrate asin(x). First check if the integral or the derivative
  60. of asin(x) had already been stored in the memory of SymbMath.
  61.  
  62.     Input window :
  63. d(asin(x), x)
  64. inte(asin(x), x)
  65. end
  66.     Output window :
  67. d(asin(x), x)
  68. inte(asin(x), x)
  69.  
  70. As the output window displayed no results, provide the derivative of the
  71. function on the first line, and run the program.
  72.  
  73.     Input window :
  74. d(asin(x_), x_) = 1/sqrt(1-x^2)
  75. inte(asin(x), x)
  76. end
  77.     Output window :
  78. d(asin(x_), x_) = 1/sqrt(1-x^2)
  79. constant + x*asin(x) +1/sqrt(1 - x^2)
  80.  
  81.  
  82. 13.18.2 Learning complicated indefinite integrals from a simple 
  83.     indefinite integral
  84.  
  85. The user supplies a simple indefinite integral, and in return, SymbMath 
  86. will perform the related complicated integrals.
  87.  
  88. Example 13.8.2.1 :
  89.  
  90. Check whether SymbMath already knowns the following integrals or not.
  91.  
  92.     Input window :
  93. inte(tan(x)^2, x)
  94. inte((2*tan(x)^2+x), x)
  95. inte(inte(tan(x)^2+y), x), y)
  96. end
  97.     Output window :
  98. inte(tan(x)^2, x)
  99. inte((2*tan(x)^2+x), x)
  100. inte(inte(tan(x)^2+y), x), y)
  101.  
  102. Supply like in the previous examples the following in information
  103. integral of tan (x) is tan (x) - x; then ask the indefinite integral 
  104. of 2*tan(x)^2+x, and a double indefinite integral of 2*tan (x)^2 + x, 
  105. and a double indefinite integral of respect to both x and y. Change 
  106. the first line, and then the program again.
  107.  
  108.     Input window :
  109. inte(tan(x)^2, x) = tan(x) - x
  110. inte((2*tan(x)^2+x), x)
  111. inte(inte(tan(x)^2+y), x), y)
  112. end
  113.     Output window :
  114. inte(tan(x)^2, x) = tan(x) - x
  115. 2 (tan(x) - x) + 1/2*x^2
  116. tan(x)*y - x*y + x*y^2
  117.  
  118.     The User can also ask SymbMath to perform the following 
  119. integrals: inte(inte(tan(x)^2+y^2), x), y), 
  120. inte(inte(tan(x)^2*y), x), y), inte(x*tan(x)^2, x), 
  121. triple integral of tan(x)^2-y+z, or others.
  122.  
  123.  
  124.     13.18.3 Learning definite integral from indefinite integral
  125.  
  126.     The user continues to ask indefinite integral.
  127.  
  128.     Input window :
  129. inte(inte(tan(x)^2+y, x from 0 to 1), y from 0 to 2)
  130. end
  131.     Output:
  132. 2 tan(1)
  133.  
  134.  
  135.     13.18.4 Learning complicated derivative from simple derivative
  136.  
  137. SymbMath can learn complicated derivatives from a simple derivative
  138. even thought the function to be differentiated is any function, not
  139. standard function.
  140.  
  141. Example 13.8.4.1 :
  142.  
  143. Differentiate ci(x^2)^6, where ci(x) is a cosine integral function 
  144. instead of a standard function.
  145.  
  146.     Input:
  147. d(ci(x^2)^6, x)
  148. end
  149.     Output:
  150. 12*x*ci(x^2)^5*d(ci(x^2), x^2)
  151.  
  152. It output only the part derivative. d(ci(x^2), x^2) in the output 
  153. suggest that the user should teach SymbMath d(ci(x_), x_) = cos(x)/x, 
  154. do so and run it again.
  155.  
  156.     Input:
  157. d(ci(x_), x_) = cos(x)/x
  158. d(ci(x^2)^6, x)
  159. end
  160.     Output:
  161. d(ci(x_), x_) = cos(x)/x
  162. 12*ci(x^2)^5*cos(x)
  163.  
  164. This time we get complete derivative.
  165.  
  166.     13.18.5 Learning integration from algebra
  167.  
  168. If the user shows SymbMath algebra, SymbMath can learn integrals.
  169.  
  170.  
  171. Example 13.8.5.1 :
  172.  
  173. Input sin(x)^2=1/2-1/2*cos(2*x), then ask for the integral of sin(x)^2.
  174.  
  175.     Input window :
  176. sin(x)^2=1/2-1/2*cos(2*x)
  177. inte(sin(x)^2, x)
  178. end
  179.     Output window :
  180. sin(x)^2 = 1/2 - 1/2*cos(2*x)
  181. 1/2*x - 1/4*sin(2*x)
  182.  
  183. SymbMath is very flexible, It learned to solve these problems, even though
  184. the types of problems are different, e.g. learning integrals from
  185. derivatives or algebra.
  186.  
  187.  
  188.     13.18.6 Learning complicated algebra from simple algebra
  189.  
  190. SymbMath has the ability to learn complicated algebra from simple algebra.
  191.  
  192. Example F1 :
  193.  
  194. Transform sin(x)/cos(x) into tan(x) in an expression.
  195.  
  196. input window:
  197.  
  198. sin(x)/cos(x) = tan(x)
  199. x+sin(x)/cos(x)+a
  200.  
  201. Output window :
  202. sin(x)/cos(x) = tan(x)
  203. a + x + tan(x)
  204.  
  205.  
  206.     The difference between learning and programming is as follows : 
  207. the learning process of SymbMath is very similar to the way human 
  208. beings learn, and that is accomplished by knowing certain rule that 
  209. can be applied to several problems. Programming is diffrent in the way 
  210. that the programmer have to accomplish many tasks before he can begin 
  211. to solve a problem. First, the programmer defines many subroutines for 
  212. the individual integrands (e.g. tan(x)^2, tan(x)^2+y^2, 2*tan(x)^2+x,
  213. x*tan(x)^2, etc.), and for individual integrals (e.g. the indefinite
  214. integral, definite integral, the indefinite double integrals,
  215. indefinite triple integrals, definite double integrals, definite
  216. triple integrals, etc.), second, write many lines of program for the
  217. individual subroutines, (i.e. to tell the computer how to calculate
  218. these integrals), third, load these subroutines, finally, call these
  219. subroutines. That is precisely what SymbMath do not ask the user to do.
  220.     In one word, programming means that programmers must
  221. provide step-by-step procedures telling the computer how to solve
  222. each problems. By contrast, learning means that users need only supply
  223. the necessary facts, SymbMath will determine how to go about
  224. solutions.
  225.     If the learning is saved into the initial file init.sm, the 
  226. learning  will become the knowledge of the SymbMath system, users need 
  227. not to teach SymbMath again when users run SymbMath next time.
  228.