limits.log 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  1. Sat Jun 29 13:47:50 PDT 1991
  2. REDUCE 3.4, 15-Jul-91 ...
  3. 1: 1:
  4. 2: 2:
  5. 3: 3: % Tests of limits package.
  6. limit(sin(x)/x,x,0);
  7. 1
  8. limit(sin(x)^2/x,x,0);
  9. 0
  10. limit(sin(x)/x,x,1);
  11. SIN(1)
  12. limit(1/x,x,0);
  13. INFINITY
  14. limit(-1/x,x,0);
  15. - INFINITY
  16. limit((sin(x)-x)/x^3,x,0);
  17. - 1
  18. ------
  19. 6
  20. limit(x*sin(1/x),x,infinity);
  21. 1
  22. limit(sin x/x^2,x,0);
  23. INFINITY
  24. limit(x^2*sin(1/x),x,infinity);
  25. INFINITY
  26. % Simple examples from Schaum's Theory & Problems of Advanced Calculus
  27. limit(x^2-6x+4,x,2);
  28. -4
  29. limit((x+3)*(2x-1)/(x^2+3x-2),x,-1);
  30. 3
  31. ---
  32. 2
  33. limit((sqrt(4+h)-2)/h,h,0);
  34. 1
  35. ---
  36. 4
  37. limit((sqrt(x)-2)/(4-x),x,4);
  38. - 1
  39. ------
  40. 4
  41. limit((x^2-4)/(x-2),x,2);
  42. 4
  43. limit(1/(2x-5),x,-1);
  44. - 1
  45. ------
  46. 7
  47. limit(sqrt(x)/(x+1),x,1);
  48. 1
  49. ---
  50. 2
  51. limit((2x+5)/(3x-2),x,infinity);
  52. 2
  53. ---
  54. 3
  55. limit((1/(x+3)-2/(3x+5))/(x-1),x,1);
  56. 1
  57. ----
  58. 32
  59. limit(sin(3x)/x,x,0);
  60. 3
  61. limit((1-cos(x))/x^2,x,0);
  62. 1
  63. ---
  64. 2
  65. limit((6x-sin(2x))/(2x+3*sin(4x)),x,0);
  66. 2
  67. ---
  68. 7
  69. limit((1-2*cos(x)+cos(2x))/x^2,x,0);
  70. -1
  71. limit((3*sin(pi*x) - sin(3*pi*x))/x^3,x,0);
  72. 3
  73. 4*PI
  74. limit((cos(a*x)-cos(b*x))/x^2,x,0);
  75. 2 2
  76. - A + B
  77. ------------
  78. 2
  79. limit((e^x-1)/x,x,0);
  80. 1
  81. limit((a^x-b^x)/x,x,0);
  82. LOG(A) - LOG(B)
  83. % Examples taken from Hyslop's Real Variable
  84. limit(sinh(2x)^2/log(1+x^2),x,0);
  85. 4
  86. limit(x^2*(e^(1/x)-1)*(log(x+2)-log(x)),x,infinity);
  87. 2
  88. limit(x^alpha*log(x+1)^2/log(x),x,infinity);
  89. FAILED
  90. %% fails because answer depends in essential way on parameter.
  91. limit((2*cosh(x)-2-x^2)/log(1+x^2)^2,x,0);
  92. 1
  93. ----
  94. 12
  95. limit((x*sinh(x)-2+2*cosh(x))/(x^4+2*x^2),x,0);
  96. 1
  97. limit((2*sinh(x)-tanh(x))/(e^x-1),x,0);
  98. 1
  99. limit(x*tanh(x)/(sqrt(1-x^2)-1),x,0);
  100. -2
  101. limit((2*log(1+x)+x^2-2*x)/x^3,x,0);
  102. 2
  103. ---
  104. 3
  105. limit((e^(5*x)-2*x)^(1/x),x,0);
  106. 3
  107. E
  108. limit(log(log(x))/log(x)^2,x,infinity);
  109. 0
  110. % These are adapted from Lession 4 from Stoutmyer
  111. limit((e^x-1)/x, x, 0);
  112. 1
  113. limit(((1-x)/log(x))**2, x, 1);
  114. 1
  115. limit(x/(e**x-1), x, 0);
  116. 1
  117. %% One sided limits
  118. limit!+(sin(x)/sqrt(x),x,0);
  119. 0
  120. limit!-(sin(x)/sqrt(x),x,0);
  121. 0
  122. limit(x/log x,x,0);
  123. 0
  124. limit(log(1 + x)/log x,x,infinity);
  125. 1
  126. limit(log x/sqrt x,x,infinity);
  127. 0
  128. limit!+(sqrt x/sin x,x,0);
  129. INFINITY
  130. limit(log x,x,0);
  131. - INFINITY
  132. limit(x*log x,x,0);
  133. 0
  134. limit(log x/log(2x),x,0);
  135. 1
  136. limit(log x*log(1+x)*(1+x),x,0);
  137. 0
  138. limit(log x/x,x,infinity);
  139. 0
  140. limit(log x/sqrt x,x,infinity);
  141. 0
  142. limit(log x,x,infinity);
  143. INFINITY
  144. limit(log(x+1)/sin x,x,0);
  145. 1
  146. limit(log(1+1/x)*sin x,x,0);
  147. 0
  148. limit(-log(1+x)*(x+2)/sin x,x,0);
  149. -2
  150. limit(-log x*(3+x)/log(2x),x,0);
  151. -3
  152. limit(log(x+1)^2/sqrt x,x,infinity);
  153. 0
  154. limit(log(x + 1) - log x,x,infinity);
  155. 0
  156. limit(-(log x)^2/log log x,x,infinity);
  157. - INFINITY
  158. limit(log(x-1)/sin x,x,0);
  159. INFINITY
  160. %% -> INFINITY, but what should it be?
  161. limit!-(sqrt x/sin x,x,0);
  162. INFINITY
  163. % infinity
  164. limit(log x-log(2x),x,0);
  165. - LOG(2)
  166. % or any other limit!
  167. limit(sqrt x-sqrt(x+1),x,infinity);
  168. 0
  169. limit(sin sin x/x,x,0);
  170. 1
  171. limit!-(sin x/cos x,x,pi/2);
  172. INFINITY
  173. % this works!
  174. limit!+(sin x/cos x,x,pi/2);
  175. - INFINITY
  176. % so does this!
  177. % but limit!+(tan x,x,pi/2) fails unless tan is defined using let.
  178. limit(sin x/cosh x,x,infinity);
  179. 0
  180. limit(sin x/x,x,infinity);
  181. 0
  182. limit(x*sin(1/x),x,0);
  183. 0
  184. limit(exp x/((exp x + exp(-x))/2),x,infinity);
  185. 2
  186. % limit(exp x/cosh x,x,infinity); % fails in this form, but if cosh is
  187. %defined using let, then it works.
  188. limit((sin(x^2)/(x*sinh x)),x,0);
  189. 1
  190. limit(log x*sin(x^2)/(x*sinh x),x,0);
  191. - INFINITY
  192. limit(sin(x^2)/(x*sinh x*log x),x,0);
  193. 0
  194. limit(log x/log(x^2),x,0);
  195. 1
  196. ---
  197. 2
  198. limit(log(x^2)-log(x^2+8x),x,0);
  199. - INFINITY
  200. limit(log(x^2)-log(x^2+8x),x,infinity);
  201. 0
  202. limit(sqrt(x+5)-sqrt x,x,infinity);
  203. 0
  204. limit(2^(log x),x,0);
  205. 0
  206. limit((sin tan x-tan sin x)/(asin atan x-atan asin x),x,0);
  207. 1
  208. % This one has the value infinity, but fails with de L'Hospital's rule:
  209. limit((e+1)^(x^2)/e^x,x,infinity);
  210. FAILED
  211. showtime;
  212. Time: 42755 ms
  213. end;
  214. 4: 4:
  215. Quitting
  216. Sat Jun 29 13:48:36 PDT 1991