FPS.LOG 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706
  1. REDUCE 3.6, 15-Jul-95, patched to 6 Mar 96 ...
  2. % Examples for the algorithmic calculation of formal
  3. % Puiseux, Laurent and power series,
  4. %
  5. % Wolfram Koepf, Freie Universitaet Berlin, Germany
  6. % (taken from the original paper and adapted to REDUCE
  7. % form by Winfried Neun, ZIB Berlin)
  8. % Formal Laurent series
  9. on errcont;
  10. fps(E^x,x);
  11. k
  12. x
  13. infsum(--------------,k,0,infinity)
  14. factorial(k)
  15. fps(E^x/(x^3),x);
  16. k
  17. x
  18. infsum(-----------------,k,0,infinity)
  19. 3
  20. factorial(k)*x
  21. fps(x * e^(x^4),x);
  22. 4*k
  23. x *x
  24. infsum(--------------,k,0,infinity)
  25. factorial(k)
  26. fps(sin (x + y),x);
  27. 2*k k
  28. x *( - 1) *cos(y)*x
  29. infsum(-----------------------,k,0,infinity)
  30. factorial(2*k + 1)
  31. 2*k k
  32. x *( - 1) *sin(y)
  33. + infsum(---------------------,k,0,infinity)
  34. factorial(2*k)
  35. simplede (sin x,x);
  36. df(y,x,2) + y
  37. %find a DE for sin
  38. simplede (sin (x)^2,x,w);
  39. df(w,x,3) + 4*df(w,x)
  40. % DE in w and x
  41. fps(asin x,x);
  42. 2*k
  43. x *factorial(2*k)*x
  44. infsum(------------------------------,k,0,infinity)
  45. 2*k 2
  46. 2 *factorial(k) *(2*k + 1)
  47. fps((asin x)^2,x);
  48. 2*k 2*k 2 2
  49. x *2 *factorial(k) *x
  50. infsum(----------------------------,k,0,infinity)
  51. factorial(2*k + 1)*(k + 1)
  52. fps(e^(asin x),x);
  53. 2*k k 2
  54. x *2 *prod(2*j - 2*j + 1,j,1,k)*x
  55. infsum(--------------------------------------,k,0,infinity)
  56. factorial(2*k + 1)
  57. 2*k 2
  58. x *prod(4*j - 8*j + 5,j,1,k)
  59. + infsum(---------------------------------,k,0,infinity)
  60. factorial(2*k)
  61. fps(e^(asinh x),x);
  62. 2*k k
  63. - x *( - 1) *factorial(2*k)
  64. infsum(--------------------------------,k,0,infinity) + x
  65. k 2
  66. 4 *factorial(k) *(2*k - 1)
  67. fps((x + sqrt(1+x^2))^A,x);
  68. 2*k k 2*k - a a
  69. x *( - 1) *2 *pochhammer(------,k)*pochhammer(---,k)
  70. 2 2
  71. infsum(----------------------------------------------------------,k,0,infinity)
  72. factorial(2*k)
  73. 2*k k 2*k - a + 1 a + 1
  74. x *( - 1) *2 *pochhammer(----------,k)*pochhammer(-------,k)*a*x
  75. 2 2
  76. + infsum(----------------------------------------------------------------------,
  77. factorial(2*k + 1)
  78. k,0,infinity)
  79. fps(e^(x^2)*erf x,x);
  80. 2*k 2*k
  81. 2*x *sqrt(pi)*2 *factorial(k)*x
  82. infsum(-------------------------------------,k,0,infinity)
  83. factorial(2*k + 1)*pi
  84. fps(e^x - 2 e^(-x/2) * cos(sqrt(3) * x/2 -pi/3),x);
  85. 3*k 2
  86. 9*x *x *(k + 1)
  87. infsum(--------------------,k,0,infinity)
  88. factorial(3*k + 3)
  89. % fps(int(e^(-a^2*t^2) * cos(2*x*t),t,0,infinity),x) % not yet
  90. % fps(4/x * int(e^(t^2)*erf(t),t,0,sqrt(x)/2),x);
  91. fps(sin x * e^x,x);
  92. k k/2 k*pi
  93. x *2 *sin(------)
  94. 4
  95. infsum(---------------------,k,0,infinity)
  96. factorial(k)
  97. fps(cos x * e^(2*x),x);
  98. k k/2 1
  99. x *5 *cos(atan(---)*k)
  100. 2
  101. infsum(--------------------------,k,0,infinity)
  102. factorial(k)
  103. fps(1/(x-x^3),x);
  104. k k k
  105. x *( - 1) - x
  106. infsum(-----------------,k,0,infinity)*x + 1
  107. k
  108. 2*( - 1)
  109. ----------------------------------------------
  110. x
  111. fps(1/(x^2 + 3 x + 2),x);
  112. k k k k
  113. 2*x *( - 2) - x *( - 1)
  114. infsum(---------------------------,k,0,infinity)
  115. k k
  116. 2*( - 1) *( - 2)
  117. fps(x/(1-x-x^2),x);
  118. x
  119. fps(--------------,x,0)
  120. 2
  121. (1 - x) - x
  122. % Logarithmic singularities and Puisieux series
  123. fps(sin sqrt x,x);
  124. (2*k + 1)/2 k
  125. x *( - 1)
  126. infsum(----------------------,k,0,infinity)
  127. factorial(2*k + 1)
  128. fps(((1 + sqrt x)/x)^(1/3),x);
  129. (6*k + 1)/6 2
  130. x *pochhammer(---,2*k)
  131. 3
  132. infsum(----------------------------------,k,0,infinity)
  133. 3*factorial(2*k + 1)
  134. k - 1
  135. x *pochhammer(------,2*k)
  136. 3
  137. + infsum(---------------------------,k,0,infinity)
  138. 1/3
  139. x *factorial(2*k)
  140. fps(asech x,x);
  141. ***** Problem using limit operator
  142. % some more (Wolfram Koepf, priv. comm.)
  143. fps((1+x)^alpha,x);
  144. k k
  145. x *( - 1) *pochhammer( - alpha,k)
  146. infsum(-----------------------------------,k,0,infinity)
  147. factorial(k)
  148. fps((1+sqrt(1+x))^beta,x);
  149. k k beta
  150. x *( - 1) *2 *pochhammer( - beta,2*k)
  151. infsum(---------------------------------------------,k,0,infinity)
  152. 2*k
  153. 2 *factorial(k)*pochhammer( - beta + 1,k)
  154. fps(sin(x)^2+cos(x)^2,x);
  155. 1
  156. fps(sin(x)^2*cos(x)^2,x);
  157. 2*k k 2*k 2
  158. x *( - 4) *2 *x
  159. infsum(----------------------------,k,0,infinity)
  160. factorial(2*k + 1)*(k + 1)
  161. fps(sin(x)*cos(x^2),x);
  162. 2
  163. fps(sin(x)*cos(x ),x,0)
  164. fps((x-1)^(-1),x);
  165. k
  166. infsum( - x ,k,0,infinity)
  167. fps(atan(x+y),x);
  168. fps(atan(x + y),x,0)
  169. fps((1-x^5)^6,x);
  170. 30 25 20 15 10 5
  171. x - 6*x + 15*x - 20*x + 15*x - 6*x + 1
  172. fps(asec x,x);
  173. ***** Problem using limit operator
  174. fps(besseli(0,x),x);
  175. 2*k
  176. x *besseli(0,0)
  177. infsum(--------------------,k,0,infinity)
  178. 2*k 2
  179. 2 *factorial(k)
  180. fps(besseli(1,x),x);
  181. 2*k
  182. x *besseli(0,0)*x
  183. infsum(--------------------------------------,k,0,infinity)
  184. 2*k
  185. 2*2 *factorial(k + 1)*factorial(k)
  186. fps(exp(x^(1/3)),x);
  187. (3*k + 1)/3
  188. x
  189. infsum(--------------------,k,0,infinity)
  190. factorial(3*k + 1)
  191. k
  192. x
  193. + infsum(----------------,k,0,infinity)
  194. factorial(3*k)
  195. (3*k + 2)/3
  196. 3*x *(k + 1)
  197. + infsum(------------------------,k,0,infinity)
  198. factorial(3*k + 3)
  199. fps(log(1-x),x);
  200. k
  201. - x *x
  202. infsum(---------,k,0,infinity)
  203. k + 1
  204. fps(exp x*sinh x,x);
  205. k k
  206. x *2 *x
  207. infsum(------------------,k,0,infinity)
  208. factorial(k + 1)
  209. fps(atan x,x);
  210. 2*k k
  211. x *( - 1) *x
  212. infsum(----------------,k,0,infinity)
  213. 2*k + 1
  214. fps(sin x+sinh x,x);
  215. 4*k
  216. 2*x *x
  217. infsum(--------------------,k,0,infinity)
  218. factorial(4*k + 1)
  219. fps(sin x*sinh x,x);
  220. 4*k k 2*k 2
  221. x *( - 1) *2 *x
  222. infsum(------------------------------,k,0,infinity)
  223. factorial(4*k + 1)*(2*k + 1)
  224. fps(int(erf(x),x),x);
  225. *** ci already defined as operator
  226. *** si already defined as operator
  227. 2*k k
  228. - x *sqrt(pi)*( - 1)
  229. infsum(---------------------------,k,0,infinity)
  230. factorial(k)*pi*(2*k - 1)
  231. fps(sqrt(2-x),x);
  232. k
  233. - x *sqrt(2)*factorial(2*k)
  234. infsum(------------------------------,k,0,infinity)
  235. k 2
  236. 8 *factorial(k) *(2*k - 1)
  237. fps(sqrt(1+x)+sqrt(1-x),x);
  238. 2*k
  239. - 2*x *factorial(4*k)
  240. infsum(--------------------------------,k,0,infinity)
  241. 2*k 2
  242. 4 *factorial(2*k) *(4*k - 1)
  243. fps(exp(a+b*x)*exp(c+d*x),x);
  244. k a + c k
  245. x *e *(b + d)
  246. infsum(--------------------,k,0,infinity)
  247. factorial(k)
  248. fps(1/cos(asin x),x);
  249. 2*k
  250. x *factorial(2*k)
  251. infsum(---------------------,k,0,infinity)
  252. 2*k 2
  253. 2 *factorial(k)
  254. fps(sqrt(1-x^2)+x*asin x,x);
  255. 2*k
  256. x *factorial(2*k)
  257. infsum(-----------------------------------,k,0,infinity)
  258. k 2 2
  259. 4 *factorial(k) *(4*k - 4*k + 1)
  260. fps(sqrt(1-sqrt(x)),x);
  261. (2*k + 1)/2
  262. - x *factorial(4*k)
  263. infsum(------------------------------------------,k,0,infinity)
  264. 4*k
  265. 2*2 *factorial(2*k + 1)*factorial(2*k)
  266. k
  267. - x *factorial(4*k)
  268. + infsum(--------------------------------,k,0,infinity)
  269. 2*k 2
  270. 4 *factorial(2*k) *(4*k - 1)
  271. fps(cos(n*acos x),x);
  272. 2*k 2*k n*pi - n n
  273. x *2 *cos(------)*pochhammer(------,k)*pochhammer(---,k)
  274. 2 2 2
  275. infsum(--------------------------------------------------------------,k,0,
  276. factorial(2*k)
  277. infinity) + infsum(
  278. 2*k 2*k - n + 1 n + 1 n*pi
  279. x *2 *pochhammer(----------,k)*pochhammer(-------,k)*sin(------)*n*x
  280. 2 2 2
  281. --------------------------------------------------------------------------,k,
  282. factorial(2*k + 1)
  283. 0,infinity)
  284. fps(cos x+I*sin x,x);
  285. k k
  286. x *( - 1)
  287. infsum(-----------------,k,0,infinity)
  288. k
  289. i *factorial(k)
  290. fps(cos(3*asinh x),x);
  291. 2*k k 2
  292. x *( - 1) *prod(4*j - 8*j + 13,j,1,k)
  293. infsum(------------------------------------------,k,0,infinity)
  294. factorial(2*k)
  295. fps(cos(n*asinh x),x);
  296. 2*k k 2*k - i*n i*n
  297. x *( - 1) *2 *pochhammer(--------,k)*pochhammer(-----,k)
  298. 2 2
  299. infsum(--------------------------------------------------------------,k,0,
  300. factorial(2*k)
  301. infinity)
  302. fps(sin(n*log(x+sqrt(1+x^2))),x);
  303. 2*k k 2*k - i*n + 1 i*n + 1
  304. infsum((x *( - 1) *2 *pochhammer(------------,k)*pochhammer(---------,k)*n*x
  305. 2 2
  306. )/factorial(2*k + 1),k,0,infinity)
  307. fps(sqrt(1+x^2)*asinh x-x,x);
  308. 2*k k 2*k 3
  309. 2*x *( - 1) *2 *factorial(k + 1)*factorial(k)*x
  310. infsum(------------------------------------------------------,k,0,infinity)
  311. factorial(2*k + 3)
  312. fps(int(erf(x)/x,x),x);
  313. 2*k k
  314. 2*x *sqrt(pi)*( - 1) *x
  315. infsum(----------------------------------,k,0,infinity)
  316. 2
  317. factorial(k)*pi*(4*k + 4*k + 1)
  318. erf(x)
  319. + sub(x=0,int(--------,x))
  320. x
  321. fps(asin(x)^2/x^4,x);
  322. 2*k 2*k 2
  323. x *2 *factorial(k)
  324. infsum(-------------------------------,k,0,infinity)
  325. 2
  326. factorial(2*k + 1)*x *(k + 1)
  327. % we had problems here:
  328. fps(cos(asin x),x);
  329. 2*k
  330. - x *factorial(2*k)
  331. infsum(----------------------------,k,0,infinity)
  332. k 2
  333. 4 *factorial(k) *(2*k - 1)
  334. fps(sinh(log x),x);
  335. fps(sinh(log(x)),x,0)
  336. fps(atan(cot x),x);
  337. Could not find the limit of: atan(cot(x)),x,0
  338. ***** problem using limit operator
  339. % we can cure this one by defining the limit:
  340. let limit(atan(cot ~x),x,0) => pi/2;
  341. fps(atan(cot x),x);
  342. pi - 2*x
  343. ----------
  344. 2
  345. fps(exp(nnn*x)*cos(mmm*x),x);
  346. k 2 2
  347. infsum((x *((impart(mmm) + 2*impart(mmm)*repart(nnn) + impart(nnn)
  348. 2 2 k
  349. - 2*impart(nnn)*repart(mmm) + repart(mmm) + repart(nnn) )**---
  350. 2
  351. impart(nnn) - repart(mmm) 2
  352. *cos(atan(---------------------------)*k) + (impart(mmm)
  353. impart(mmm) + repart(nnn)
  354. 2
  355. - 2*impart(mmm)*repart(nnn) + impart(nnn)
  356. 2 2 k
  357. + 2*impart(nnn)*repart(mmm) + repart(mmm) + repart(nnn) )**---
  358. 2
  359. impart(nnn) + repart(mmm) 2
  360. *cos(atan(---------------------------)*k) - (impart(mmm)
  361. impart(mmm) - repart(nnn)
  362. 2
  363. - 2*impart(mmm)*repart(nnn) + impart(nnn)
  364. 2 2 k
  365. + 2*impart(nnn)*repart(mmm) + repart(mmm) + repart(nnn) )**---
  366. 2
  367. impart(nnn) + repart(mmm) 2
  368. *sin(atan(---------------------------)*k)*i + (impart(mmm)
  369. impart(mmm) - repart(nnn)
  370. 2
  371. + 2*impart(mmm)*repart(nnn) + impart(nnn)
  372. 2 2 k
  373. - 2*impart(nnn)*repart(mmm) + repart(mmm) + repart(nnn) )**---
  374. 2
  375. impart(nnn) - repart(mmm)
  376. *sin(atan(---------------------------)*k)*i))/(2*factorial(k)),k,0,
  377. impart(mmm) + repart(nnn)
  378. infinity)
  379. fps(sqrt(2-x^2),x);
  380. 2*k
  381. - x *sqrt(2)*factorial(2*k)
  382. infsum(--------------------------------,k,0,infinity)
  383. k 2
  384. 8 *factorial(k) *(2*k - 1)
  385. fps(ci x,x);
  386. 2*k k
  387. x *( - 1) *infinity*x
  388. ci(0) + infsum(------------------------------,k,0,infinity)
  389. factorial(2*k + 1)*(2*k + 1)
  390. fps(log(1-2*x*y+x^2),x);
  391. 2
  392. fps(log(1 - 2*x*y + x ),x,0)
  393. FPS(sin x,x,pi);
  394. 2*k k
  395. ( - pi + x) *( - 1) *( - pi + x)
  396. infsum(------------------------------------,k,0,infinity)
  397. factorial(2*k + 1)
  398. % This one takes ages :
  399. %fps(acos(cos(x)),x);
  400. fps_search_depth := 7;
  401. fps_search_depth := 7
  402. % does not find aa DE with the default
  403. fps(sin(x^(1/3)),x);
  404. 2*k k k k
  405. infsum(( - x *( - 1) *108 *factorial(k)*x)/(6*46656 *factorial(3*k + 1)
  406. 7 5
  407. *factorial(2*k + 1)*pochhammer(---,k)*pochhammer(---,k)),k,0,infinity)
  408. 6 6
  409. (6*k + 2)/3 k 2*k 3*k k
  410. + infsum((x *( - 1) *2 *3 *factorial(k + 1)*x)/(20*46656
  411. 11
  412. *factorial(3*k + 3)*factorial(2*k + 1)*pochhammer(----,k)
  413. 6
  414. 7
  415. *pochhammer(---,k)),k,0,infinity) + infsum(
  416. 6
  417. (6*k + 1)/3 k 2*k 3*k
  418. x *( - 1) *2 *3 *factorial(k)
  419. --------------------------------------------------------------------------,k,
  420. k 7 5
  421. 46656 *factorial(3*k)*factorial(2*k)*pochhammer(---,k)*pochhammer(---,k)
  422. 6 6
  423. 0,infinity)
  424. end;
  425. (TIME: fps 165079 183049)