home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / calculat / sm30a.zip / SYMBMATH.H47 < prev    next >
Text File  |  1993-11-07  |  7KB  |  198 lines

  1.             4.15  Learning from User
  2.  
  3.     One of the most important feature of SymbMath is its ability 
  4. to deduce and expand its knowledge. If you provide it with the 
  5. necessary facts, SymbMath can solve many problems which were unable 
  6. to be solved before. The followings are several ways in which SymbMath 
  7. is able to learn from your input.
  8.  
  9.     4.15.1  Learning integrals from a derivative
  10.  
  11.     Finding derivatives is much easier than finding integrals.
  12. Therefore, you can find the integrals of a function from the derivative
  13. of that function.
  14.     If you provide the derivative of a known or unknown function,
  15. SymbMath can deduce the indefinite and definite integrals of that
  16. function. If the function is not a simple function, you only need to
  17. provide the derivative of its simple function. For example, you want to
  18. evaluate the integral of f(a*x+b), you only need to provide f'(x).
  19.  
  20.     Example 4.15.1.1 :
  21. If you know a derivative of an function f(x) (where f(x) is  
  22. a known or unknown function), SymbMath can learn the integrals of that 
  23. function from its derivative.
  24.     Input: 
  25. IN:  inte(f(x), x)      # check SymbMath whether or not it had already
  26.             # known integral of f(x)
  27. OUT: inte(f(x), x)
  28. IN:  inte(f(x), x, 1, 2)
  29. OUT: inte(f(x), x, 1, 2)
  30.  
  31. As the output displayed only what was typed in the input without any
  32. computed results, imply that SymbMath has no knowledge of the indefinite
  33. and definite integrals of the functions in question. Now you teach
  34. SymbMath the derivative of f(x) on the first line, and then run the
  35. program again.
  36.  
  37. IN:  f'(x_) := exp(x)/x
  38. IN:  inte(f(x), x)
  39. OUT: x*f(x) - e^x
  40. IN:  inte(f(x), x, 1, 2)
  41. OUT: e - f(1) + 2*f(2) - e^2
  42.  
  43. As demonstrated, you only supplied the derivative of the function, and in
  44. exchange SymbMath logically deduced its integral.
  45.     An other example is
  46.  
  47. IN:  f'(x_) := 1/sqrt(1-x^2)
  48. IN:  inte(f(x), x)
  49. OUT: sqrt(1 - x^2) + x*f(x)
  50. IN:  inte(k*f(a*x+b), x)
  51. OUT: k*(sqrt(1 - (b + a*x)^2) + (b + a*x)*f(b + a*x))/a
  52. IN:  inte(x*f(a*x^2+b), x)
  53. OUT: sqrt(1-(a*x^2 + b)^2) + (a*x^2 + b)*f(a*x^2 + b)
  54.  
  55.     The derivative of the function that you supplied can be another
  56. derivative or integral.
  57.  
  58.     Example 4.15.1.2 :
  59.  
  60. IN:  f'(x_) := eval(inte(cos(x),x))
  61. OUT: f'(x_) := sin(x)
  62. IN:  inte(f(x), x)
  63. OUT: -sin(x)
  64. IN:  inte(f(a*x + b), x)
  65. OUT: -sin(b + a*x)/a
  66. IN:  inte(x*f(x), x)
  67. OUT: -cos(x) - x*sin(x)
  68. IN:  inte(x^1.5*f(x), x)
  69. OUT: 1.5*inte(sqrt(x)*sin(x), x) - x^1.5*sin(x)
  70. IN:  inte(x^2*f(x), x)
  71. OUT: -2*x*cos(x) + 2*sin(x) - x^2*sin(x)
  72. IN:  inte(x*f(x^2), x)
  73. OUT: -sin(x^2)
  74. IN:  inte(x^3*f(x^2), x)
  75. OUT: -0.5*cos(x^2) - 0.5*x^2*sin(x^2)
  76. IN:  inte(f(x)/(x^1.5), x)
  77. OUT: -2/sqrt(x)*f(x) + 2*inte(sin(x)/sqrt(x), x)
  78. IN:  inte(f(x)/(x^2), x)
  79. OUT: -f(x)/x + si(x)
  80.  
  81.  
  82.     4.15.2  Learning complicated indefinite integrals from a simple
  83.         indefinite integral
  84.  
  85.     You supply a simple indefinite integral, and in return, SymbMath
  86. will perform the related complicated integrals.
  87.  
  88.     Example 4.15.2.1 :
  89. Check whether SymbMath already knowns the following integrals or not.
  90.  
  91. IN:  inte(f(x), x)
  92. OUT: inte(f(x), x)
  93. IN:  inte((2*f(x)+x), x)
  94. OUT: inte((2*f(x)+x), x)
  95. IN:  inte(inte(f(x)+y), x), y)
  96. OUT: inte(inte(f(x)+y), x), y)
  97.  
  98. Supply, like in the previous examples, the information:
  99. integral of f(x) is f(x) - x; then ask the indefinite integral 
  100. of 2*f(x)+x, and a double indefinite integral of 2*f(x) + x, 
  101. and a double indefinite integral of respect to both x and y. Change 
  102. the first line, and then run the program again.
  103.  
  104. IN:  inte(f(x_), x_) := f(x) - x
  105. IN:  inte(2*f(x)+x, x)
  106. OUT: 2*f(x) - 2*x + 1/2*x^2
  107. IN:  inte(inte(f(x)+y, x), y)
  108. OUT: f(x)*y - x*y + x*y^2
  109.  
  110.     You can also ask SymbMath to perform the following integrals: 
  111. inte(inte(f(x)+y^2, x), y), 
  112. inte(inte(f(x)*y, x), y), 
  113. inte(x*f(x), x), 
  114. triple integral of f(x)-y+z, or others.
  115.  
  116.  
  117.     4.15.3  Learning definite integral from indefinite integral
  118.  
  119.     You continue to ask indefinite integral.
  120.  
  121. IN:  inte(inte(f(x)+y, x from 0 to 1), y from 0 to 2)
  122. OUT: 2 f(1)
  123.  
  124.  
  125.     4.15.4  Learning complicated derivatives from a simple derivative
  126.     SymbMath can learn complicated derivatives from a simple 
  127. derivative, even though the function to be differentiated is an unknown
  128. function, instead of standard function.
  129.  
  130.     Example 4.15.4.1 :
  131.         Differentiate f(x^2)^6, where f(x) is an unknown function.
  132.  
  133. IN:  d(f(x^2)^6, x)
  134. OUT: 12 x f(x^2)^5 f'(x^2)
  135.  
  136. Output is only the part derivative. f'(x^2) in the output suggest that
  137. you should teach SymbMath f'(x_). e.g. the derivative of f(x) is another
  138. unknown function df(x), i.e. f'(x_) = df(x), input f'(x_) = df(x) and
  139. run it again.
  140.  
  141. IN:  f'(x_) := df(x)
  142. IN:  d(f(x^2)^6, x)
  143. OUT: 12 x f(x^2)^5 df(x^2)
  144.  
  145. This time you get the complete derivative.
  146.  
  147.     4.15.5  Learning integration from algebra
  148.     If you show SymbMath algebra, SymbMath can learn integrals
  149. from that algebra.
  150.  
  151.     Example 4.15.5.1 :
  152. Input f(x)^2=1/2-1/2*cos(2*x), then ask for the integral of f(x)^2.
  153.  
  154. IN:  f(x)^2 := 1/2-1/2*cos(2*x)
  155. IN:  inte(f(x)^2, x)
  156. OUT: 1/2 x - 1/4 sin(2 x)
  157.  
  158. SymbMath is very flexible. It learned to solve these problems, even 
  159. though the types of problems are different, e.g. learning integrals 
  160. from derivatives or algebra.
  161.  
  162.  
  163.     4.15.6  Learning complicated algebra from simple algebra
  164.  
  165.     SymbMath has the ability to learn complicated algebra from simple 
  166. algebra.
  167.  
  168.     Example 4.15.6.1:
  169. Transform sin(x)/cos(x) into tan(x) in an expression.
  170.  
  171. IN:  sin(x)/cos(x) := tan(x)
  172. IN:  x+sin(x)/cos(x)+a
  173. OUT: a + x + tan(x)
  174.  
  175.  
  176.         4.15.7  Learning vs. Programming
  177.     The difference between learning and programming is as follows : 
  178. the learning process of SymbMath is very similar to the way human 
  179. beings learn, and that is accomplished by knowing certain rule that 
  180. can be applied to several problems. Programming is diffrent in the way 
  181. that the programmer have to accomplish many tasks before he can begin 
  182. to solve a problem. First, the programmer defines many subroutines for 
  183. the individual integrands (e.g. f(x), f(x)+y^2, 2*f(x)+x,
  184. x*f(x), etc.), and for individual integrals (e.g. the indefinite
  185. integral, definite integral, the indefinite double integrals,
  186. indefinite triple integrals, definite double integrals, definite
  187. triple integrals, etc.), second, write many lines of program for the
  188. individual subroutines, (i.e. to tell the computer how to calculate
  189. these integrals), third, load these subroutines, finally, call these
  190. subroutines. That is precisely what SymbMath do not ask you to do.
  191.     In one word, programming means that programmers must
  192. provide step-by-step procedures telling the computer how to solve
  193. each problems. By contrast, learning means that you need only supply
  194. the necessary facts (usually one f'(x) and/or one intergral of f(x)),
  195. SymbMath will determine how to go about solutions of many problems.
  196.     If the learning is saved as a library, then you need not to
  197. teach SymbMath again when you run SymbMath next time.
  198.