INT.LOG 72 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121
  1. REDUCE 3.6, 15-Jul-95, patched to 6 Mar 96 ...
  2. COMMENT
  3. THE REDUCE INTEGRATION TEST PACKAGE
  4. Edited By
  5. Anthony C. Hearn
  6. The RAND Corporation
  7. This file is designed to provide a set of representative tests of the
  8. Reduce integration package. Not all examples go through, even when an
  9. integral exists, since some of the arguments are outside the domain of
  10. applicability of the current package. However, future improvements to
  11. the package will result in more closed-form evaluations in later
  12. releases. We would appreciate any additional contributions to this test
  13. file either because they illustrate some feature (good or bad) of the
  14. current package, or suggest domains which future versions should handle.
  15. Any suggestions for improved organization of this test file (e.g., in a
  16. way which corresponds more directly to the organization of a standard
  17. integration table book such as Gradshteyn and Ryznik) are welcome.
  18. Acknowledgments:
  19. The examples in this file have been contributed by the following.
  20. Any omissions to this list should be reported to the Editor.
  21. David M. Dahm
  22. James H. Davenport
  23. John P. Fitch
  24. Steven Harrington
  25. Anthony C. Hearn
  26. K. Siegfried Koelbig
  27. Ernst Krupnikov
  28. Arthur C. Norman
  29. Herbert Stoyan
  30. ;
  31. Comment we first set up a suitable testing functions;
  32. fluid '(gcknt!*);
  33. global '(faillist!* gcnumber!* inittime number!-of!-integrals
  34. unintlist!*);
  35. symbolic operator time;
  36. symbolic procedure initialize!-integral!-test;
  37. begin
  38. faillist!* := unintlist!* := nil;
  39. number!-of!-integrals := 0;
  40. gcnumber!* := gcknt!*;
  41. inittime := time()
  42. end;
  43. initialize!-integral!-test
  44. symbolic procedure summarize!-integral!-test;
  45. begin scalar totaltime;
  46. totaltime := time()-inittime;
  47. prin2t
  48. " ***** SUMMARY OF INTEGRAL TESTS *****";
  49. terpri();
  50. prin2 "Number of integrals tested: ";
  51. prin2t number!-of!-integrals;
  52. terpri();
  53. prin2 "Total time taken: ";
  54. prin2 totaltime;
  55. prin2t " ms";
  56. terpri();
  57. if gcnumber!*
  58. then <<prin2 "Number of garbage collections: ";
  59. prin2t (gcknt!* - gcnumber!*);
  60. terpri()>>;
  61. prin2 "Number of incorrect integrals: ";
  62. prin2t length faillist!*;
  63. terpri();
  64. prin2 "Number of unevaluated integrals: ";
  65. prin2t length unintlist!*;
  66. terpri();
  67. if faillist!*
  68. then <<prin2t "Integrands of incorrect integrals are:";
  69. for each x in reverse faillist!* do mathprint car x>>;
  70. if unintlist!*
  71. then <<prin2t "Integrands of unevaluated integrals are:";
  72. terpri();
  73. for each x in reverse unintlist!* do mathprint car x>>
  74. end;
  75. summarize!-integral!-test
  76. procedure testint(a,b);
  77. begin scalar der,diffce,res,tt;
  78. tt:=time();
  79. symbolic (number!-of!-integrals := number!-of!-integrals + 1);
  80. res:=int(a,b);
  81. % write "time for integral: ",time()-tt," ms";
  82. off precise;
  83. der := df(res,b);
  84. diffce := der-a;
  85. if diffce neq 0
  86. then begin for all x let cot x=cos x/sin x,
  87. sec x=1/cos x,
  88. sin x**2=1-cos x**2,
  89. tan(x/2)=sin x/(1+cos x),
  90. tan x=sin x/cos x,
  91. tanh x=
  92. (e**(x)-e**(-x))/(e**x+e**(-x)),
  93. coth x= 1/tanh x;
  94. diffce := diffce;
  95. for all x clear cot x,sec x,sin x**2,tan x,tan(x/2),
  96. tanh x,coth x
  97. end;
  98. %hopefully, difference appeared non-zero due to absence of
  99. %above transformations;
  100. if diffce neq 0
  101. then <<on combineexpt; diffce := diffce; off combineexpt>>;
  102. if diffce neq 0
  103. then begin scalar !*reduced;
  104. !*reduced := t;
  105. for all x let cos(2x)= 1-2sin x**2, sin x**2=1-cos x**2;
  106. diffce := diffce;
  107. for all x clear cos(2x),sin x**2
  108. end;
  109. if diffce neq 0
  110. then <<write
  111. " ***** DERIVATIVE OF INTEGRAL NOT EQUAL TO INTEGRAND *****";
  112. symbolic(faillist!* := list(a,b,res,der) . faillist!*)>>;
  113. symbolic if smemq('int,res)
  114. then unintlist!* := list(a,b,res) . unintlist!*;
  115. on precise;
  116. return res
  117. end;
  118. testint
  119. symbolic initialize!-integral!-test();
  120. % References are to Gradshteyn and Ryznik.
  121. testint(1+x+x**2,x);
  122. 2
  123. x*(2*x + 3*x + 6)
  124. --------------------
  125. 6
  126. testint(x**2*(2*x**2+x)**2,x);
  127. 5 2
  128. x *(60*x + 70*x + 21)
  129. ------------------------
  130. 105
  131. testint(x*(x**2+2*x+1),x);
  132. 2 2
  133. x *(3*x + 8*x + 6)
  134. ---------------------
  135. 12
  136. testint(1/x,x);
  137. log(x)
  138. % 2.01 #2;
  139. testint((x+1)**3/(x-1)**4,x);
  140. 3 2 3
  141. 3*log(x - 1)*x - 9*log(x - 1)*x + 9*log(x - 1)*x - 3*log(x - 1) - 6*x - 2
  142. ------------------------------------------------------------------------------
  143. 3 2
  144. 3*(x - 3*x + 3*x - 1)
  145. testint(1/(x*(x-1)*(x+1)**2),x);
  146. (log(x - 1)*x + log(x - 1) + 3*log(x + 1)*x + 3*log(x + 1) - 4*log(x)*x
  147. - 4*log(x) + 2*x)/(4*(x + 1))
  148. testint((a*x+b)/((x-p)*(x-q)),x);
  149. log(p - x)*a*p + log(p - x)*b - log(q - x)*a*q - log(q - x)*b
  150. ---------------------------------------------------------------
  151. p - q
  152. testint(1/(a*x**2+b*x+c),x);
  153. 2 2*a*x + b
  154. 2*sqrt(4*a*c - b )*atan(------------------)
  155. 2
  156. sqrt(4*a*c - b )
  157. ---------------------------------------------
  158. 2
  159. 4*a*c - b
  160. testint((a*x+b)/(1+x**2),x);
  161. 2
  162. 2*atan(x)*b + log(x + 1)*a
  163. -----------------------------
  164. 2
  165. testint(1/(x**2-2*x+3),x);
  166. x - 1
  167. sqrt(2)*atan(---------)
  168. sqrt(2)
  169. -------------------------
  170. 2
  171. % Rational function examples from Hardy, Pure Mathematics, p 253 et seq.
  172. testint(1/((x-1)*(x**2+1))**2,x);
  173. 3 2 2 3 2 2
  174. (atan(x)*x - atan(x)*x + atan(x)*x - atan(x) + log(x + 1)*x - log(x + 1)*x
  175. 2 2 3 2
  176. + log(x + 1)*x - log(x + 1) - 2*log(x - 1)*x + 2*log(x - 1)*x
  177. 3 3 2
  178. - 2*log(x - 1)*x + 2*log(x - 1) - x - 2*x + 1)/(4*(x - x + x - 1))
  179. testint(x/((x-a)*(x-b)*(x-c)),x);
  180. (log(a - x)*a*b - log(a - x)*a*c - log(b - x)*a*b + log(b - x)*b*c
  181. 2 2 2 2 2 2
  182. + log(c - x)*a*c - log(c - x)*b*c)/(a *b - a *c - a*b + a*c + b *c - b*c )
  183. testint(x/((x**2+a**2)*(x**2+b**2)),x);
  184. 2 2 2 2
  185. - log(a + x ) + log(b + x )
  186. --------------------------------
  187. 2 2
  188. 2*(a - b )
  189. testint(x**2/((x**2+a**2)*(x**2+b**2)),x);
  190. x x
  191. atan(---)*a - atan(---)*b
  192. a b
  193. ---------------------------
  194. 2 2
  195. a - b
  196. testint(x/((x-1)*(x**2+1)),x);
  197. 2
  198. 2*atan(x) - log(x + 1) + 2*log(x - 1)
  199. ----------------------------------------
  200. 4
  201. testint(x/(1+x**3),x);
  202. 2*x - 1 2
  203. 2*sqrt(3)*atan(---------) + log(x - x + 1) - 2*log(x + 1)
  204. sqrt(3)
  205. ------------------------------------------------------------
  206. 6
  207. testint(x**3/((x-1)**2*(x**3+1)),x);
  208. 2 2
  209. ( - 4*log(x - x + 1)*x + 4*log(x - x + 1) + 9*log(x - 1)*x - 9*log(x - 1)
  210. - log(x + 1)*x + log(x + 1) - 6*x)/(12*(x - 1))
  211. testint(1/(1+x**4),x);
  212. sqrt(2) - 2*x sqrt(2) + 2*x
  213. (sqrt(2)*( - 2*atan(---------------) + 2*atan(---------------)
  214. sqrt(2) sqrt(2)
  215. 2 2
  216. - log( - sqrt(2)*x + x + 1) + log(sqrt(2)*x + x + 1)))/8
  217. testint(x**2/(1+x**4),x);
  218. sqrt(2) - 2*x sqrt(2) + 2*x
  219. (sqrt(2)*( - 2*atan(---------------) + 2*atan(---------------)
  220. sqrt(2) sqrt(2)
  221. 2 2
  222. + log( - sqrt(2)*x + x + 1) - log(sqrt(2)*x + x + 1)))/8
  223. testint(1/(1+x**2+x**4),x);
  224. 2*x - 1 2*x + 1 2
  225. (2*sqrt(3)*atan(---------) + 2*sqrt(3)*atan(---------) - 3*log(x - x + 1)
  226. sqrt(3) sqrt(3)
  227. 2
  228. + 3*log(x + x + 1))/12
  229. % Examples involving a+b*x.
  230. z := a+b*x;
  231. z := a + b*x
  232. testint(z**p,x);
  233. p
  234. (a + b*x) *(a + b*x)
  235. ----------------------
  236. b*(p + 1)
  237. testint(x*z**p,x);
  238. p 2 2 2 2 2
  239. (a + b*x) *( - a + a*b*p*x + b *p*x + b *x )
  240. ------------------------------------------------
  241. 2 2
  242. b *(p + 3*p + 2)
  243. testint(x**2*z**p,x);
  244. p
  245. ((a + b*x)
  246. 3 2 2 2 2 2 2 3 2 3 3 3 3 3
  247. *(2*a - 2*a *b*p*x + a*b *p *x + a*b *p*x + b *p *x + 3*b *p*x + 2*b *x ))
  248. 3 3 2
  249. /(b *(p + 6*p + 11*p + 6))
  250. testint(1/z,x);
  251. log(a + b*x)
  252. --------------
  253. b
  254. testint(1/z**2,x);
  255. x
  256. -------------
  257. a*(a + b*x)
  258. testint(x/z,x);
  259. - log(a + b*x)*a + b*x
  260. -------------------------
  261. 2
  262. b
  263. testint(x**2/z,x);
  264. 2 2 2
  265. 2*log(a + b*x)*a - 2*a*b*x + b *x
  266. -------------------------------------
  267. 3
  268. 2*b
  269. testint(1/(x*z),x);
  270. - log(a + b*x) + log(x)
  271. --------------------------
  272. a
  273. testint(1/(x**2*z),x);
  274. log(a + b*x)*b*x - log(x)*b*x - a
  275. -----------------------------------
  276. 2
  277. a *x
  278. testint(1/(x*z)**2,x);
  279. 2 2 2 2
  280. (2*log(a + b*x)*a*b*x + 2*log(a + b*x)*b *x - 2*log(x)*a*b*x - 2*log(x)*b *x
  281. 2 2 2 3
  282. - a + 2*b *x )/(a *x*(a + b*x))
  283. testint(1/(c**2+x**2),x);
  284. x
  285. atan(---)
  286. c
  287. -----------
  288. c
  289. testint(1/(c**2-x**2),x);
  290. log( - c - x) - log(c - x)
  291. ----------------------------
  292. 2*c
  293. % More complicated rational function examples, mostly contributed
  294. % by David M. Dahm, who also developed the code to integrate them.
  295. testint(1/(2*x**3-1),x);
  296. 1/3
  297. 2/3 2*2 *x + 1 2/3 2 1/3
  298. (2 *( - 2*sqrt(3)*atan(--------------) - log(2 *x + 2 *x + 1)
  299. sqrt(3)
  300. 1/3
  301. + 2*log(2 *x - 1)))/12
  302. testint(1/(x**3-2),x);
  303. 1/3
  304. 1/3 2 + 2*x 2/3 1/3 2
  305. (2 *( - 2*sqrt(3)*atan(--------------) - log(2 + 2 *x + x )
  306. 1/3
  307. 2 *sqrt(3)
  308. 1/3
  309. + 2*log( - 2 + x)))/12
  310. testint(1/(a*x**3-b),x);
  311. 1/3 1/3
  312. 1/3 2/3 2*a *x + b
  313. (b *a *( - 2*sqrt(3)*atan(-----------------)
  314. 1/3
  315. b *sqrt(3)
  316. 2/3 2 1/3 1/3 2/3 1/3 1/3
  317. - log(a *x + b *a *x + b ) + 2*log(a *x - b )))/(6*a*b
  318. )
  319. testint(1/(x**4-2),x);
  320. 1/4 x 1/4 1/4
  321. 2 *( - 2*atan(------) - log(2 + x) + log( - 2 + x))
  322. 1/4
  323. 2
  324. -------------------------------------------------------------
  325. 8
  326. testint(1/(5*x**4-1),x);
  327. 1/4 sqrt(5)*x 1/4 1/4
  328. sqrt(5)*5 *( - 2*atan(-----------) + log(5 *x - 1) - log(5 *x + 1))
  329. 1/4
  330. 5
  331. ---------------------------------------------------------------------------
  332. 20
  333. testint(1/(3*x**4+7),x);
  334. 1/4
  335. 1/4 sqrt(2)*21 - 2*sqrt(3)*x
  336. (sqrt(6)*21 *( - 2*atan(-----------------------------)
  337. 1/4
  338. sqrt(2)*21
  339. 1/4
  340. sqrt(2)*21 + 2*sqrt(3)*x
  341. + 2*atan(-----------------------------)
  342. 1/4
  343. sqrt(2)*21
  344. 1/4 2
  345. - log( - sqrt(2)*21 *x + sqrt(7) + sqrt(3)*x )
  346. 1/4 2
  347. + log(sqrt(2)*21 *x + sqrt(7) + sqrt(3)*x )))/168
  348. testint(1/(x**4+3*x**2-1),x);
  349. 2*x
  350. (sqrt(2)*(6*sqrt(sqrt(13) + 3)*sqrt(13)*atan(----------------------------)
  351. sqrt(sqrt(13) + 3)*sqrt(2)
  352. 2*x
  353. - 26*sqrt(sqrt(13) + 3)*atan(----------------------------) + 3
  354. sqrt(sqrt(13) + 3)*sqrt(2)
  355. *sqrt(sqrt(13) - 3)*sqrt(13)*log( - sqrt(sqrt(13) - 3) + sqrt(2)*x)
  356. - 3*sqrt(sqrt(13) - 3)*sqrt(13)*log(sqrt(sqrt(13) - 3) + sqrt(2)*x)
  357. + 13*sqrt(sqrt(13) - 3)*log( - sqrt(sqrt(13) - 3) + sqrt(2)*x)
  358. - 13*sqrt(sqrt(13) - 3)*log(sqrt(sqrt(13) - 3) + sqrt(2)*x)))/104
  359. testint(1/(x**4-3*x**2-1),x);
  360. 2*x
  361. (sqrt(2)*( - 6*sqrt(sqrt(13) - 3)*sqrt(13)*atan(----------------------------)
  362. sqrt(sqrt(13) - 3)*sqrt(2)
  363. 2*x
  364. - 26*sqrt(sqrt(13) - 3)*atan(----------------------------) - 3
  365. sqrt(sqrt(13) - 3)*sqrt(2)
  366. *sqrt(sqrt(13) + 3)*sqrt(13)*log( - sqrt(sqrt(13) + 3) + sqrt(2)*x)
  367. + 3*sqrt(sqrt(13) + 3)*sqrt(13)*log(sqrt(sqrt(13) + 3) + sqrt(2)*x)
  368. + 13*sqrt(sqrt(13) + 3)*log( - sqrt(sqrt(13) + 3) + sqrt(2)*x)
  369. - 13*sqrt(sqrt(13) + 3)*log(sqrt(sqrt(13) + 3) + sqrt(2)*x)))/104
  370. testint(1/(x**4-3*x**2+1),x);
  371. ( - sqrt(5)*log( - sqrt(5) + 2*x - 1) - sqrt(5)*log( - sqrt(5) + 2*x + 1)
  372. + sqrt(5)*log(sqrt(5) + 2*x - 1) + sqrt(5)*log(sqrt(5) + 2*x + 1)
  373. + 5*log( - sqrt(5) + 2*x - 1) - 5*log( - sqrt(5) + 2*x + 1)
  374. + 5*log(sqrt(5) + 2*x - 1) - 5*log(sqrt(5) + 2*x + 1))/20
  375. testint(1/(x**4-4*x**2+1),x);
  376. 2*x
  377. (sqrt(2)*(2*sqrt(3)*atan(-----------------------)*i
  378. sqrt(6)*i - sqrt(2)*i
  379. 2*x
  380. + 6*atan(-----------------------)*i
  381. sqrt(6)*i - sqrt(2)*i
  382. - sqrt(6) - sqrt(2) + 2*x
  383. - sqrt(3)*log(----------------------------)
  384. 2
  385. sqrt(6) + sqrt(2) + 2*x
  386. + sqrt(3)*log(-------------------------)
  387. 2
  388. - sqrt(6) - sqrt(2) + 2*x
  389. + 3*log(----------------------------)
  390. 2
  391. sqrt(6) + sqrt(2) + 2*x
  392. - 3*log(-------------------------)))/24
  393. 2
  394. testint(1/(x**4+4*x**2+1),x);
  395. 2*x 2*x
  396. (sqrt(2)*(2*sqrt(3)*atan(-------------------) - 6*atan(-------------------)
  397. sqrt(6) + sqrt(2) sqrt(6) + sqrt(2)
  398. - sqrt(6)*i + sqrt(2)*i + 2*x
  399. - sqrt(3)*log(--------------------------------)*i
  400. 2
  401. sqrt(6)*i - sqrt(2)*i + 2*x
  402. + sqrt(3)*log(-----------------------------)*i
  403. 2
  404. - sqrt(6)*i + sqrt(2)*i + 2*x
  405. - 3*log(--------------------------------)*i
  406. 2
  407. sqrt(6)*i - sqrt(2)*i + 2*x
  408. + 3*log(-----------------------------)*i))/24
  409. 2
  410. testint(1/(x**4+x**2+2),x);
  411. sqrt(2*sqrt(2) - 1) - 2*x
  412. (2*sqrt(2*sqrt(2) + 1)*sqrt(2)*atan(---------------------------)
  413. sqrt(2*sqrt(2) + 1)
  414. sqrt(2*sqrt(2) - 1) - 2*x
  415. - 8*sqrt(2*sqrt(2) + 1)*atan(---------------------------)
  416. sqrt(2*sqrt(2) + 1)
  417. sqrt(2*sqrt(2) - 1) + 2*x
  418. - 2*sqrt(2*sqrt(2) + 1)*sqrt(2)*atan(---------------------------)
  419. sqrt(2*sqrt(2) + 1)
  420. sqrt(2*sqrt(2) - 1) + 2*x
  421. + 8*sqrt(2*sqrt(2) + 1)*atan(---------------------------)
  422. sqrt(2*sqrt(2) + 1)
  423. 2
  424. - sqrt(2*sqrt(2) - 1)*sqrt(2)*log( - sqrt(2*sqrt(2) - 1)*x + sqrt(2) + x )
  425. 2
  426. + sqrt(2*sqrt(2) - 1)*sqrt(2)*log(sqrt(2*sqrt(2) - 1)*x + sqrt(2) + x )
  427. 2
  428. - 4*sqrt(2*sqrt(2) - 1)*log( - sqrt(2*sqrt(2) - 1)*x + sqrt(2) + x )
  429. 2
  430. + 4*sqrt(2*sqrt(2) - 1)*log(sqrt(2*sqrt(2) - 1)*x + sqrt(2) + x ))/56
  431. testint(1/(x**4-x**2+2),x);
  432. sqrt(2*sqrt(2) + 1) - 2*x
  433. ( - 2*sqrt(2*sqrt(2) - 1)*sqrt(2)*atan(---------------------------)
  434. sqrt(2*sqrt(2) - 1)
  435. sqrt(2*sqrt(2) + 1) - 2*x
  436. - 8*sqrt(2*sqrt(2) - 1)*atan(---------------------------)
  437. sqrt(2*sqrt(2) - 1)
  438. sqrt(2*sqrt(2) + 1) + 2*x
  439. + 2*sqrt(2*sqrt(2) - 1)*sqrt(2)*atan(---------------------------)
  440. sqrt(2*sqrt(2) - 1)
  441. sqrt(2*sqrt(2) + 1) + 2*x
  442. + 8*sqrt(2*sqrt(2) - 1)*atan(---------------------------)
  443. sqrt(2*sqrt(2) - 1)
  444. 2
  445. + sqrt(2*sqrt(2) + 1)*sqrt(2)*log( - sqrt(2*sqrt(2) + 1)*x + sqrt(2) + x )
  446. 2
  447. - sqrt(2*sqrt(2) + 1)*sqrt(2)*log(sqrt(2*sqrt(2) + 1)*x + sqrt(2) + x )
  448. 2
  449. - 4*sqrt(2*sqrt(2) + 1)*log( - sqrt(2*sqrt(2) + 1)*x + sqrt(2) + x )
  450. 2
  451. + 4*sqrt(2*sqrt(2) + 1)*log(sqrt(2*sqrt(2) + 1)*x + sqrt(2) + x ))/56
  452. testint(1/(x**6-1),x);
  453. 2*x - 1 2*x + 1 2
  454. ( - 2*sqrt(3)*atan(---------) - 2*sqrt(3)*atan(---------) + log(x - x + 1)
  455. sqrt(3) sqrt(3)
  456. 2
  457. - log(x + x + 1) + 2*log(x - 1) - 2*log(x + 1))/12
  458. testint(1/(x**6-2),x);
  459. 1/6 1/6
  460. 1/6 2 - 2*x 2 + 2*x
  461. (2 *(2*sqrt(3)*atan(--------------) - 2*sqrt(3)*atan(--------------)
  462. 1/6 1/6
  463. 2 *sqrt(3) 2 *sqrt(3)
  464. 1/6 1/6 1/6 1/3 2
  465. - 2*log(2 + x) + 2*log( - 2 + x) + log( - 2 *x + 2 + x )
  466. 1/6 1/3 2
  467. - log(2 *x + 2 + x )))/24
  468. testint(1/(x**6+2),x);
  469. 1/6 1/6
  470. 1/6 2 *sqrt(3) - 2*x 2 *sqrt(3) + 2*x
  471. (2 *( - 2*atan(--------------------) + 2*atan(--------------------)
  472. 1/6 1/6
  473. 2 2
  474. x 1/6 1/3 2
  475. + 4*atan(------) - sqrt(3)*log( - 2 *sqrt(3)*x + 2 + x )
  476. 1/6
  477. 2
  478. 1/6 1/3 2
  479. + sqrt(3)*log(2 *sqrt(3)*x + 2 + x )))/24
  480. testint(1/(x**8+1),x);
  481. sqrt( - sqrt(2) + 2) - 2*x
  482. ( - 2*sqrt(sqrt(2) + 2)*atan(----------------------------)
  483. sqrt(sqrt(2) + 2)
  484. sqrt( - sqrt(2) + 2) + 2*x
  485. + 2*sqrt(sqrt(2) + 2)*atan(----------------------------)
  486. sqrt(sqrt(2) + 2)
  487. sqrt(sqrt(2) + 2) - 2*x
  488. - 2*sqrt( - sqrt(2) + 2)*atan(-------------------------)
  489. sqrt( - sqrt(2) + 2)
  490. sqrt(sqrt(2) + 2) + 2*x
  491. + 2*sqrt( - sqrt(2) + 2)*atan(-------------------------)
  492. sqrt( - sqrt(2) + 2)
  493. 2
  494. - sqrt( - sqrt(2) + 2)*log( - sqrt( - sqrt(2) + 2)*x + x + 1)
  495. 2
  496. + sqrt( - sqrt(2) + 2)*log(sqrt( - sqrt(2) + 2)*x + x + 1)
  497. 2
  498. - sqrt(sqrt(2) + 2)*log( - sqrt(sqrt(2) + 2)*x + x + 1)
  499. 2
  500. + sqrt(sqrt(2) + 2)*log(sqrt(sqrt(2) + 2)*x + x + 1))/16
  501. testint(1/(x**8-1),x);
  502. sqrt(2) - 2*x sqrt(2) + 2*x
  503. (2*sqrt(2)*atan(---------------) - 2*sqrt(2)*atan(---------------) - 4*atan(x)
  504. sqrt(2) sqrt(2)
  505. 2 2
  506. + sqrt(2)*log( - sqrt(2)*x + x + 1) - sqrt(2)*log(sqrt(2)*x + x + 1)
  507. + 2*log(x - 1) - 2*log(x + 1))/16
  508. testint(1/(x**8-x**4+1),x);
  509. sqrt(6) + sqrt(2) - 4*x
  510. ( - 2*sqrt( - sqrt(3) + 2)*sqrt(3)*atan(-------------------------)
  511. 2*sqrt( - sqrt(3) + 2)
  512. sqrt(6) + sqrt(2) - 4*x
  513. - 6*sqrt( - sqrt(3) + 2)*atan(-------------------------)
  514. 2*sqrt( - sqrt(3) + 2)
  515. sqrt(6) + sqrt(2) + 4*x
  516. + 2*sqrt( - sqrt(3) + 2)*sqrt(3)*atan(-------------------------)
  517. 2*sqrt( - sqrt(3) + 2)
  518. sqrt(6) + sqrt(2) + 4*x
  519. + 6*sqrt( - sqrt(3) + 2)*atan(-------------------------)
  520. 2*sqrt( - sqrt(3) + 2)
  521. 2*sqrt( - sqrt(3) + 2) - 4*x
  522. - 2*sqrt(6)*atan(------------------------------)
  523. sqrt(6) + sqrt(2)
  524. 2*sqrt( - sqrt(3) + 2) + 4*x
  525. + 2*sqrt(6)*atan(------------------------------)
  526. sqrt(6) + sqrt(2)
  527. 2
  528. - sqrt( - sqrt(3) + 2)*sqrt(3)*log( - sqrt( - sqrt(3) + 2)*x + x + 1)
  529. 2
  530. + sqrt( - sqrt(3) + 2)*sqrt(3)*log(sqrt( - sqrt(3) + 2)*x + x + 1)
  531. 2
  532. - 3*sqrt( - sqrt(3) + 2)*log( - sqrt( - sqrt(3) + 2)*x + x + 1)
  533. 2
  534. + 3*sqrt( - sqrt(3) + 2)*log(sqrt( - sqrt(3) + 2)*x + x + 1)
  535. 2
  536. - sqrt(6)*x - sqrt(2)*x + 2*x + 2
  537. - sqrt(6)*log(-------------------------------------)
  538. 2
  539. 2
  540. sqrt(6)*x + sqrt(2)*x + 2*x + 2
  541. + sqrt(6)*log(----------------------------------))/24
  542. 2
  543. testint(x**7/(x**12+1),x);
  544. sqrt(6) + sqrt(2) - 4*x
  545. ( - sqrt( - sqrt(3) + 2)*sqrt(6)*atan(-------------------------)
  546. 2*sqrt( - sqrt(3) + 2)
  547. sqrt(6) + sqrt(2) - 4*x
  548. - 3*sqrt( - sqrt(3) + 2)*sqrt(2)*atan(-------------------------)
  549. 2*sqrt( - sqrt(3) + 2)
  550. sqrt(6) + sqrt(2) + 4*x
  551. - sqrt( - sqrt(3) + 2)*sqrt(6)*atan(-------------------------)
  552. 2*sqrt( - sqrt(3) + 2)
  553. sqrt(6) + sqrt(2) + 4*x
  554. - 3*sqrt( - sqrt(3) + 2)*sqrt(2)*atan(-------------------------)
  555. 2*sqrt( - sqrt(3) + 2)
  556. 2*sqrt( - sqrt(3) + 2) - 4*x
  557. + sqrt( - sqrt(3) + 2)*sqrt(6)*atan(------------------------------)
  558. sqrt(6) + sqrt(2)
  559. 2*sqrt( - sqrt(3) + 2) - 4*x
  560. + 3*sqrt( - sqrt(3) + 2)*sqrt(2)*atan(------------------------------)
  561. sqrt(6) + sqrt(2)
  562. 2*sqrt( - sqrt(3) + 2) + 4*x
  563. + sqrt( - sqrt(3) + 2)*sqrt(6)*atan(------------------------------)
  564. sqrt(6) + sqrt(2)
  565. 2*sqrt( - sqrt(3) + 2) + 4*x
  566. + 3*sqrt( - sqrt(3) + 2)*sqrt(2)*atan(------------------------------)
  567. sqrt(6) + sqrt(2)
  568. 2 2
  569. + log( - sqrt( - sqrt(3) + 2)*x + x + 1) - 2*log( - sqrt(2)*x + x + 1)
  570. 2 2
  571. + log(sqrt( - sqrt(3) + 2)*x + x + 1) - 2*log(sqrt(2)*x + x + 1)
  572. 2
  573. - sqrt(6)*x - sqrt(2)*x + 2*x + 2
  574. + log(-------------------------------------)
  575. 2
  576. 2
  577. sqrt(6)*x + sqrt(2)*x + 2*x + 2
  578. + log(----------------------------------))/24
  579. 2
  580. % Examples involving logarithms.
  581. testint(log x,x);
  582. x*(log(x) - 1)
  583. testint(x*log x,x);
  584. 2
  585. x *(2*log(x) - 1)
  586. -------------------
  587. 4
  588. testint(x**2*log x,x);
  589. 3
  590. x *(3*log(x) - 1)
  591. -------------------
  592. 9
  593. testint(x**p*log x,x);
  594. p
  595. x *x*(log(x)*p + log(x) - 1)
  596. ------------------------------
  597. 2
  598. p + 2*p + 1
  599. testint((log x)**2,x);
  600. 2
  601. x*(log(x) - 2*log(x) + 2)
  602. testint(x**9*log x**11,x);
  603. 10 11 10 9
  604. (x *(15625000*log(x) - 17187500*log(x) + 17187500*log(x)
  605. 8 7 6 5
  606. - 15468750*log(x) + 12375000*log(x) - 8662500*log(x) + 5197500*log(x)
  607. 4 3 2
  608. - 2598750*log(x) + 1039500*log(x) - 311850*log(x) + 62370*log(x)
  609. - 6237))/156250000
  610. testint(log x**2/x,x);
  611. 3
  612. log(x)
  613. ---------
  614. 3
  615. testint(1/log x,x);
  616. ei(log(x))
  617. testint(1/log(x+1),x);
  618. ei(log(x + 1))
  619. testint(1/(x*log x),x);
  620. log(log(x))
  621. testint(1/(x*log x)**2,x);
  622. - (ei( - log(x))*log(x)*x + 1)
  623. ---------------------------------
  624. log(x)*x
  625. testint((log x)**p/x,x);
  626. p
  627. log(x) *log(x)
  628. ----------------
  629. p + 1
  630. testint(log x *(a*x+b),x);
  631. x*(2*log(x)*a*x + 4*log(x)*b - a*x - 4*b)
  632. -------------------------------------------
  633. 4
  634. testint((a*x+b)**2*log x,x);
  635. 2 2 2 2 2 2
  636. (x*(6*log(x)*a *x + 18*log(x)*a*b*x + 18*log(x)*b - 2*a *x - 9*a*b*x - 18*b )
  637. )/18
  638. testint(log x/(a*x+b)**2,x);
  639. - log(a*x + b)*a*x - log(a*x + b)*b + log(x)*a*x
  640. ---------------------------------------------------
  641. a*b*(a*x + b)
  642. testint(x*log (a*x+b),x);
  643. 2 2 2 2 2
  644. 2*log(a*x + b)*a *x - 2*log(a*x + b)*b - a *x + 2*a*b*x
  645. ------------------------------------------------------------
  646. 2
  647. 4*a
  648. testint(x**2*log(a*x+b),x);
  649. 3 3 3 3 3 2 2 2
  650. 6*log(a*x + b)*a *x + 6*log(a*x + b)*b - 2*a *x + 3*a *b*x - 6*a*b *x
  651. ---------------------------------------------------------------------------
  652. 3
  653. 18*a
  654. testint(log(x**2+a**2),x);
  655. x 2 2
  656. 2*atan(---)*a + log(a + x )*x - 2*x
  657. a
  658. testint(x*log(x**2+a**2),x);
  659. 2 2 2 2 2 2 2
  660. log(a + x )*a + log(a + x )*x - x
  661. ----------------------------------------
  662. 2
  663. testint(x**2*log(x**2+a**2),x);
  664. x 3 2 2 3 2 3
  665. - 6*atan(---)*a + 3*log(a + x )*x + 6*a *x - 2*x
  666. a
  667. -------------------------------------------------------
  668. 9
  669. testint(x**4*log(x**2+a**2),x);
  670. x 5 2 2 5 4 2 3 5
  671. 30*atan(---)*a + 15*log(a + x )*x - 30*a *x + 10*a *x - 6*x
  672. a
  673. ------------------------------------------------------------------
  674. 75
  675. testint(log(x**2-a**2),x);
  676. 2 2 2 2
  677. - log( - a + x )*a + log( - a + x )*x + 2*log( - a - x)*a - 2*x
  678. testint(log(log(log(log(x)))),x);
  679. 1
  680. - int(-------------------------------------,x) + log(log(log(log(x))))*x
  681. log(log(log(x)))*log(log(x))*log(x)
  682. % Examples involving circular functions.
  683. testint(sin x,x);
  684. - cos(x)
  685. % 2.01 #5;
  686. testint(cos x,x);
  687. sin(x)
  688. % #6;
  689. testint(tan x,x);
  690. 2
  691. log(tan(x) + 1)
  692. ------------------
  693. 2
  694. % #11;
  695. testint(1/tan(x),x);
  696. 2
  697. - log(tan(x) + 1) + 2*log(tan(x))
  698. -------------------------------------
  699. 2
  700. % 2.01 #12;
  701. testint(1/(1+tan(x))**2,x);
  702. 2 2
  703. ( - log(tan(x) + 1)*tan(x) - log(tan(x) + 1) + 2*log(tan(x) + 1)*tan(x)
  704. + 2*log(tan(x) + 1) + 2*tan(x))/(4*(tan(x) + 1))
  705. testint(1/cos x,x);
  706. x x
  707. - log(tan(---) - 1) + log(tan(---) + 1)
  708. 2 2
  709. testint(1/sin x,x);
  710. x
  711. log(tan(---))
  712. 2
  713. testint(sin x**2,x);
  714. - cos(x)*sin(x) + x
  715. ----------------------
  716. 2
  717. testint(x**3*sin(x**2),x);
  718. 2 2 2
  719. - cos(x )*x + sin(x )
  720. -------------------------
  721. 2
  722. testint(sin x**3,x);
  723. 2
  724. - cos(x)*sin(x) - 2*cos(x) + 2
  725. ----------------------------------
  726. 3
  727. testint(sin x**p,x);
  728. p
  729. int(sin(x) ,x)
  730. testint((sin x**2+1)**2*cos x,x);
  731. 4 2
  732. sin(x)*(3*sin(x) + 10*sin(x) + 15)
  733. --------------------------------------
  734. 15
  735. testint(cos x**2,x);
  736. cos(x)*sin(x) + x
  737. -------------------
  738. 2
  739. testint(cos x**3,x);
  740. 2
  741. sin(x)*( - sin(x) + 3)
  742. -------------------------
  743. 3
  744. testint(sin(a*x+b),x);
  745. - cos(a*x + b)
  746. -----------------
  747. a
  748. testint(1/cos x**2,x);
  749. sin(x)
  750. --------
  751. cos(x)
  752. testint(sin x*sin(2*x),x);
  753. - 2*cos(2*x)*sin(x) + cos(x)*sin(2*x)
  754. ----------------------------------------
  755. 3
  756. testint(x*sin x,x);
  757. - cos(x)*x + sin(x)
  758. testint(x**2*sin x,x);
  759. 2
  760. - cos(x)*x + 2*cos(x) + 2*sin(x)*x
  761. testint(x*sin x**2,x);
  762. 2 2
  763. - 2*cos(x)*sin(x)*x + sin(x) + x - 2
  764. -----------------------------------------
  765. 4
  766. testint(x**2*sin x**2,x);
  767. 2 2 3
  768. - 6*cos(x)*sin(x)*x + 3*cos(x)*sin(x) + 6*sin(x) *x + 2*x - 3*x
  769. --------------------------------------------------------------------
  770. 12
  771. testint(x*sin x**3,x);
  772. 2 3
  773. - 3*cos(x)*sin(x) *x - 6*cos(x)*x + sin(x) + 6*sin(x)
  774. ---------------------------------------------------------
  775. 9
  776. testint(x*cos x,x);
  777. cos(x) + sin(x)*x
  778. testint(x**2*cos x,x);
  779. 2
  780. 2*cos(x)*x + sin(x)*x - 2*sin(x)
  781. testint(x*cos x**2,x);
  782. 2 2
  783. 2*cos(x)*sin(x)*x - sin(x) + x + 2
  784. --------------------------------------
  785. 4
  786. testint(x**2*cos x**2,x);
  787. 2 2 3
  788. 6*cos(x)*sin(x)*x - 3*cos(x)*sin(x) - 6*sin(x) *x + 2*x + 3*x
  789. -----------------------------------------------------------------
  790. 12
  791. testint(x*cos x**3,x);
  792. 2 3
  793. - cos(x)*sin(x) + 7*cos(x) - 3*sin(x) *x + 9*sin(x)*x + 1
  794. -------------------------------------------------------------
  795. 9
  796. testint(sin x/x,x);
  797. si(x)
  798. testint(cos x/x,x);
  799. ci(x)
  800. testint(sin x/x**2,x);
  801. ci(x)*x - sin(x)
  802. ------------------
  803. x
  804. testint(sin x**2/x,x);
  805. - ci(2*x) + log(x)
  806. ---------------------
  807. 2
  808. testint(tan x**3,x);
  809. 2 2
  810. - log(tan(x) + 1) + tan(x)
  811. -------------------------------
  812. 2
  813. % z := a+b*x;
  814. testint(sin z,x);
  815. - cos(a + b*x)
  816. -----------------
  817. b
  818. testint(cos z,x);
  819. sin(a + b*x)
  820. --------------
  821. b
  822. testint(tan z,x);
  823. 2
  824. log(tan(a + b*x) + 1)
  825. ------------------------
  826. 2*b
  827. testint(1/tan z,x);
  828. 2
  829. - log(tan(a + b*x) + 1) + 2*log(tan(a + b*x))
  830. -------------------------------------------------
  831. 2*b
  832. testint(1/sin z,x);
  833. a + b*x
  834. log(tan(---------))
  835. 2
  836. ---------------------
  837. b
  838. testint(1/cos z,x);
  839. a + b*x a + b*x
  840. - log(tan(---------) - 1) + log(tan(---------) + 1)
  841. 2 2
  842. ------------------------------------------------------
  843. b
  844. testint(sin z**2,x);
  845. - cos(a + b*x)*sin(a + b*x) + b*x
  846. ------------------------------------
  847. 2*b
  848. testint(sin z**3,x);
  849. 2
  850. - cos(a + b*x)*sin(a + b*x) - 2*cos(a + b*x) + 2
  851. ----------------------------------------------------
  852. 3*b
  853. testint(cos z**2,x);
  854. cos(a + b*x)*sin(a + b*x) + b*x
  855. ---------------------------------
  856. 2*b
  857. testint(cos z**3,x);
  858. 2
  859. sin(a + b*x)*( - sin(a + b*x) + 3)
  860. -------------------------------------
  861. 3*b
  862. testint(1/cos z**2,x);
  863. sin(a + b*x)
  864. ----------------
  865. cos(a + b*x)*b
  866. testint(1/(1+cos x),x);
  867. x
  868. tan(---)
  869. 2
  870. testint(1/(1-cos x),x);
  871. - 1
  872. ----------
  873. x
  874. tan(---)
  875. 2
  876. testint(1/(1+sin x),x);
  877. x
  878. 2*tan(---)
  879. 2
  880. --------------
  881. x
  882. tan(---) + 1
  883. 2
  884. testint(1/(1-sin x),x);
  885. x
  886. - 2*tan(---)
  887. 2
  888. ---------------
  889. x
  890. tan(---) - 1
  891. 2
  892. testint(1/(a+b*sin x),x);
  893. x
  894. tan(---)*a + b
  895. 2 2 2
  896. 2*sqrt(a - b )*atan(----------------)
  897. 2 2
  898. sqrt(a - b )
  899. ----------------------------------------
  900. 2 2
  901. a - b
  902. testint(1/(a+b*sin x+cos x),x);
  903. x x
  904. tan(---)*a - tan(---) + b
  905. 2 2 2 2
  906. 2*sqrt(a - b - 1)*atan(---------------------------)
  907. 2 2
  908. sqrt(a - b - 1)
  909. -------------------------------------------------------
  910. 2 2
  911. a - b - 1
  912. testint(x**2*sin z**2,x);
  913. 2 2
  914. ( - 6*cos(a + b*x)*sin(a + b*x)*b *x + 3*cos(a + b*x)*sin(a + b*x)
  915. 2 3 3 3
  916. + 6*sin(a + b*x) *b*x + 9*a + 2*b *x - 3*b*x)/(12*b )
  917. testint(cos x*cos(2*x),x);
  918. - cos(2*x)*sin(x) + 2*cos(x)*sin(2*x)
  919. ----------------------------------------
  920. 3
  921. testint(x**2*cos z**2,x);
  922. 2 2
  923. (6*cos(a + b*x)*sin(a + b*x)*b *x - 3*cos(a + b*x)*sin(a + b*x)
  924. 2 3 3 3
  925. - 6*sin(a + b*x) *b*x + 2*b *x + 3*b*x)/(12*b )
  926. testint(1/tan x**3,x);
  927. 2 2 2
  928. log(tan(x) + 1)*tan(x) - 2*log(tan(x))*tan(x) - 1
  929. ------------------------------------------------------
  930. 2
  931. 2*tan(x)
  932. testint(x**3*tan(x)**4,x);
  933. 2 2 3 3 2 2
  934. (48*int(tan(x)*x ,x) - 6*log(tan(x) + 1) + 4*tan(x) *x - 6*tan(x) *x
  935. 3 4 2
  936. - 12*tan(x)*x + 12*tan(x)*x + 3*x - 6*x )/12
  937. testint(x**3*tan(x)**6,x);
  938. 2 2 5 3 4 2
  939. ( - 276*int(tan(x)*x ,x) + 60*log(tan(x) + 1) + 12*tan(x) *x - 9*tan(x) *x
  940. 3 3 3 2 2 2 3
  941. - 20*tan(x) *x + 6*tan(x) *x + 48*tan(x) *x - 3*tan(x) + 60*tan(x)*x
  942. 4 2
  943. - 114*tan(x)*x - 15*x + 57*x )/60
  944. testint(x*tan(x)**2,x);
  945. 2 2
  946. - log(tan(x) + 1) + 2*tan(x)*x - x
  947. ---------------------------------------
  948. 2
  949. testint(sin(2*x)*cos(3*x),x);
  950. 2*cos(3*x)*cos(2*x) + 3*sin(3*x)*sin(2*x)
  951. -------------------------------------------
  952. 5
  953. testint(sin x**2*cos x**2,x);
  954. 3
  955. 2*cos(x)*sin(x) - cos(x)*sin(x) + x
  956. --------------------------------------
  957. 8
  958. testint(1/(sin x**2*cos x**2),x);
  959. 2
  960. 2*sin(x) - 1
  961. ---------------
  962. cos(x)*sin(x)
  963. testint(d**x*sin x,x);
  964. x
  965. d *( - cos(x) + log(d)*sin(x))
  966. --------------------------------
  967. 2
  968. log(d) + 1
  969. testint(d**x*cos x,x);
  970. x
  971. d *(cos(x)*log(d) + sin(x))
  972. -----------------------------
  973. 2
  974. log(d) + 1
  975. testint(x*d**x*sin x,x);
  976. x 2 3
  977. (d *( - cos(x)*log(d) *x + 2*cos(x)*log(d) - cos(x)*x + log(d) *sin(x)*x
  978. 2 4 2
  979. - log(d) *sin(x) + log(d)*sin(x)*x + sin(x)))/(log(d) + 2*log(d) + 1)
  980. testint(x*d**x*cos x,x);
  981. x 3 2
  982. (d *(cos(x)*log(d) *x - cos(x)*log(d) + cos(x)*log(d)*x + cos(x)
  983. 2 4 2
  984. + log(d) *sin(x)*x - 2*log(d)*sin(x) + sin(x)*x))/(log(d) + 2*log(d) + 1
  985. )
  986. testint(x**2*d**x*sin x,x);
  987. x 4 2 3 2 2
  988. (d *( - cos(x)*log(d) *x + 4*cos(x)*log(d) *x - 2*cos(x)*log(d) *x
  989. 2 2
  990. - 6*cos(x)*log(d) + 4*cos(x)*log(d)*x - cos(x)*x + 2*cos(x)
  991. 5 2 4 3 2
  992. + log(d) *sin(x)*x - 2*log(d) *sin(x)*x + 2*log(d) *sin(x)*x
  993. 3 2
  994. + 2*log(d) *sin(x) + log(d)*sin(x)*x - 6*log(d)*sin(x) + 2*sin(x)*x))/(
  995. 6 4 2
  996. log(d) + 3*log(d) + 3*log(d) + 1)
  997. testint(x**2*d**x*cos x,x);
  998. x 5 2 4 3 2
  999. (d *(cos(x)*log(d) *x - 2*cos(x)*log(d) *x + 2*cos(x)*log(d) *x
  1000. 3 2
  1001. + 2*cos(x)*log(d) + cos(x)*log(d)*x - 6*cos(x)*log(d) + 2*cos(x)*x
  1002. 4 2 3 2 2
  1003. + log(d) *sin(x)*x - 4*log(d) *sin(x)*x + 2*log(d) *sin(x)*x
  1004. 2 2 6
  1005. + 6*log(d) *sin(x) - 4*log(d)*sin(x)*x + sin(x)*x - 2*sin(x)))/(log(d)
  1006. 4 2
  1007. + 3*log(d) + 3*log(d) + 1)
  1008. testint(x**3*d**x*sin x,x);
  1009. x 6 3 5 2 4 3
  1010. (d *( - cos(x)*log(d) *x + 6*cos(x)*log(d) *x - 3*cos(x)*log(d) *x
  1011. 4 3 2 3
  1012. - 18*cos(x)*log(d) *x + 12*cos(x)*log(d) *x + 24*cos(x)*log(d)
  1013. 2 3 2 2
  1014. - 3*cos(x)*log(d) *x - 12*cos(x)*log(d) *x + 6*cos(x)*log(d)*x
  1015. 3 7 3
  1016. - 24*cos(x)*log(d) - cos(x)*x + 6*cos(x)*x + log(d) *sin(x)*x
  1017. 6 2 5 3 5
  1018. - 3*log(d) *sin(x)*x + 3*log(d) *sin(x)*x + 6*log(d) *sin(x)*x
  1019. 4 2 4 3 3
  1020. - 3*log(d) *sin(x)*x - 6*log(d) *sin(x) + 3*log(d) *sin(x)*x
  1021. 3 2 2 2
  1022. - 12*log(d) *sin(x)*x + 3*log(d) *sin(x)*x + 36*log(d) *sin(x)
  1023. 3 2
  1024. + log(d)*sin(x)*x - 18*log(d)*sin(x)*x + 3*sin(x)*x - 6*sin(x)))/(
  1025. 8 6 4 2
  1026. log(d) + 4*log(d) + 6*log(d) + 4*log(d) + 1)
  1027. testint(x**3*d**x*cos x,x);
  1028. x 7 3 6 2 5 3
  1029. (d *(cos(x)*log(d) *x - 3*cos(x)*log(d) *x + 3*cos(x)*log(d) *x
  1030. 5 4 2 4
  1031. + 6*cos(x)*log(d) *x - 3*cos(x)*log(d) *x - 6*cos(x)*log(d)
  1032. 3 3 3 2 2
  1033. + 3*cos(x)*log(d) *x - 12*cos(x)*log(d) *x + 3*cos(x)*log(d) *x
  1034. 2 3 2
  1035. + 36*cos(x)*log(d) + cos(x)*log(d)*x - 18*cos(x)*log(d)*x + 3*cos(x)*x
  1036. 6 3 5 2 4 3
  1037. - 6*cos(x) + log(d) *sin(x)*x - 6*log(d) *sin(x)*x + 3*log(d) *sin(x)*x
  1038. 4 3 2 3
  1039. + 18*log(d) *sin(x)*x - 12*log(d) *sin(x)*x - 24*log(d) *sin(x)
  1040. 2 3 2 2
  1041. + 3*log(d) *sin(x)*x + 12*log(d) *sin(x)*x - 6*log(d)*sin(x)*x
  1042. 3 8 6
  1043. + 24*log(d)*sin(x) + sin(x)*x - 6*sin(x)*x))/(log(d) + 4*log(d)
  1044. 4 2
  1045. + 6*log(d) + 4*log(d) + 1)
  1046. testint(sin x*sin(2*x)*sin(3*x),x);
  1047. ( - cos(3*x)*cos(2*x)*cos(x) + 6*cos(3*x)*cos(2*x)*sin(x)*x
  1048. + 6*cos(3*x)*cos(x)*sin(2*x)*x - 8*cos(3*x)*sin(2*x)*sin(x)
  1049. - 6*cos(2*x)*cos(x)*sin(3*x)*x + 3*cos(2*x)*sin(3*x)*sin(x)
  1050. + 6*sin(3*x)*sin(2*x)*sin(x)*x)/24
  1051. testint(cos x*cos(2*x)*cos(3*x),x);
  1052. (6*cos(3*x)*cos(2*x)*cos(x)*x + 8*cos(3*x)*cos(2*x)*sin(x)
  1053. + 5*cos(3*x)*cos(x)*sin(2*x) - 6*cos(3*x)*sin(2*x)*sin(x)*x
  1054. + 6*cos(2*x)*sin(3*x)*sin(x)*x + 6*cos(x)*sin(3*x)*sin(2*x)*x
  1055. + 9*sin(3*x)*sin(2*x)*sin(x))/24
  1056. testint(sin(x*kx)**3*x**2,x);
  1057. 2 2 2 2 2 2
  1058. ( - 9*cos(kx*x)*sin(kx*x) *kx *x + 2*cos(kx*x)*sin(kx*x) - 18*cos(kx*x)*kx *x
  1059. 3 3
  1060. + 40*cos(kx*x) + 6*sin(kx*x) *kx*x + 36*sin(kx*x)*kx*x + 16)/(27*kx )
  1061. testint(x*cos(xi/sin(x))*cos(x)/sin(x)**2,x);
  1062. xi
  1063. cos(--------)*cos(x)*x
  1064. sin(x)
  1065. int(------------------------,x)
  1066. 2
  1067. sin(x)
  1068. % Mixed angles and half angles.
  1069. int(cos(x)/(sin(x)*tan(x/2)),x);
  1070. x
  1071. - (tan(---)*x + 1)
  1072. 2
  1073. ---------------------
  1074. x
  1075. tan(---)
  1076. 2
  1077. % This integral produces a messy result because the code for
  1078. % converting half angle tans to sin and cos is not effective enough.
  1079. testint(sin(a*x)/(b+c*sin(a*x))**2,x);
  1080. a*x
  1081. tan(-----)*b + c
  1082. 2 2 2 2
  1083. ( - 2*sqrt(b - c )*atan(------------------)*sin(a*x)*c
  1084. 2 2
  1085. sqrt(b - c )
  1086. a*x
  1087. tan(-----)*b + c
  1088. 2 2 2 3 2
  1089. - 2*sqrt(b - c )*atan(------------------)*b*c - cos(a*x)*b + cos(a*x)*b*c )/
  1090. 2 2
  1091. sqrt(b - c )
  1092. 4 2 3 5 5 3 2 4
  1093. (a*(sin(a*x)*b *c - 2*sin(a*x)*b *c + sin(a*x)*c + b - 2*b *c + b*c ))
  1094. % Examples involving logarithms and circular functions.
  1095. testint(sin log x,x);
  1096. x*( - cos(log(x)) + sin(log(x)))
  1097. ----------------------------------
  1098. 2
  1099. testint(cos log x,x);
  1100. x*(cos(log(x)) + sin(log(x)))
  1101. -------------------------------
  1102. 2
  1103. % Examples involving exponentials.
  1104. testint(e**x,x);
  1105. x
  1106. e
  1107. % 2.01 #3;
  1108. testint(a**x,x);
  1109. x
  1110. a
  1111. --------
  1112. log(a)
  1113. % 2.01 #4;
  1114. testint(e**(a*x),x);
  1115. a*x
  1116. e
  1117. ------
  1118. a
  1119. testint(e**(a*x)/x,x);
  1120. ei(a*x)
  1121. testint(1/(a+b*e**(m*x)),x);
  1122. m*x
  1123. - log(e *b + a) + m*x
  1124. --------------------------
  1125. a*m
  1126. testint(e**(2*x)/(1+e**x),x);
  1127. x x
  1128. e - log(e + 1)
  1129. testint(e**(2*x)*e**(a*x),x);
  1130. a*x + 2*x
  1131. e
  1132. ------------
  1133. a + 2
  1134. testint(1/(a*e**(m*x)+b*e**(-m*x)),x);
  1135. m*x
  1136. e *a
  1137. sqrt(b)*sqrt(a)*atan(-----------------)
  1138. sqrt(b)*sqrt(a)
  1139. -----------------------------------------
  1140. a*b*m
  1141. testint(x*e**(a*x),x);
  1142. a*x
  1143. e *(a*x - 1)
  1144. ----------------
  1145. 2
  1146. a
  1147. testint(x**20*e**x,x);
  1148. x 20 19 18 17 16 15 14
  1149. e *(x - 20*x + 380*x - 6840*x + 116280*x - 1860480*x + 27907200*x
  1150. 13 12 11 10
  1151. - 390700800*x + 5079110400*x - 60949324800*x + 670442572800*x
  1152. 9 8 7
  1153. - 6704425728000*x + 60339831552000*x - 482718652416000*x
  1154. 6 5 4
  1155. + 3379030566912000*x - 20274183401472000*x + 101370917007360000*x
  1156. 3 2
  1157. - 405483668029440000*x + 1216451004088320000*x - 2432902008176640000*x
  1158. + 2432902008176640000)
  1159. testint(a**x/b**x,x);
  1160. x
  1161. a
  1162. ----------------------
  1163. x
  1164. b *(log(a) - log(b))
  1165. testint(a**x*b**x,x);
  1166. x x
  1167. b *a
  1168. -----------------
  1169. log(a) + log(b)
  1170. testint(a**x/x**2,x);
  1171. x
  1172. ei(log(a)*x)*log(a)*x - a
  1173. ----------------------------
  1174. x
  1175. testint(x*a**x/(1+b*x)**2,x);
  1176. x
  1177. a *x
  1178. int(-----------------------------------------------------------,x)*(log(a) - b)
  1179. 2 2 3 2 2
  1180. log(a)*b *x + 2*log(a)*b*x + log(a) - b *x - 2*b *x - b
  1181. testint(x*e**(a*x)/(1+a*x)**2,x);
  1182. a*x
  1183. e
  1184. --------------
  1185. 2
  1186. a *(a*x + 1)
  1187. testint(x*k**(x**2),x);
  1188. 2
  1189. x
  1190. k
  1191. ----------
  1192. 2*log(k)
  1193. testint(e**(x**2),x);
  1194. sqrt(pi)*erf(i*x)
  1195. -------------------
  1196. 2*i
  1197. testint(x*e**(x**2),x);
  1198. 2
  1199. x
  1200. e
  1201. -----
  1202. 2
  1203. testint((x+1)*e**(1/x)/x**4,x);
  1204. 1/x 2
  1205. e *( - x + x - 1)
  1206. ----------------------
  1207. 2
  1208. x
  1209. testint((2*x**3+x)*(e**(x**2))**2*e**(1-x*e**(x**2))/(1-x*e**(x**2))**2,
  1210. x);
  1211. - e
  1212. --------------------
  1213. 2
  1214. x 2
  1215. e *x x
  1216. e *(e *x - 1)
  1217. testint(e**(e**(e**(e**x))),x);
  1218. x
  1219. e
  1220. e
  1221. e
  1222. int(e ,x)
  1223. % Examples involving exponentials and logarithms.
  1224. testint(e**x*log x,x);
  1225. x
  1226. - ei(x) + e *log(x)
  1227. testint(x*e**x*log x,x);
  1228. x x x
  1229. ei(x) + e *log(x)*x - e *log(x) - e
  1230. testint(e**(2*x)*log(e**x),x);
  1231. 2*x
  1232. e *(2*x - 1)
  1233. ----------------
  1234. 4
  1235. % Examples involving square roots.
  1236. testint(sqrt(2)*x**2 + 2*x,x);
  1237. 2
  1238. x *(sqrt(2)*x + 3)
  1239. --------------------
  1240. 3
  1241. testint(log x/sqrt(a*x+b),x);
  1242. (2*(sqrt(a*x + b)*log(x) - 2*sqrt(a*x + b)
  1243. - 2*sqrt(b)*log(sqrt(a*x + b) - sqrt(b)) + sqrt(b)*log(x)))/a
  1244. u:=sqrt(a+b*x);
  1245. u := sqrt(a + b*x)
  1246. v:=sqrt(c+d*x);
  1247. v := sqrt(c + d*x)
  1248. testint(u*v,x);
  1249. 2 2
  1250. (sqrt(c + d*x)*sqrt(a + b*x)*a*b*d + sqrt(c + d*x)*sqrt(a + b*x)*b *c*d
  1251. 2 2
  1252. + 2*sqrt(c + d*x)*sqrt(a + b*x)*b *d *x
  1253. sqrt(d)*sqrt(a + b*x) + sqrt(b)*sqrt(c + d*x) 2 2
  1254. - sqrt(d)*sqrt(b)*log(-----------------------------------------------)*a *d +
  1255. sqrt(a*d - b*c)
  1256. sqrt(d)*sqrt(a + b*x) + sqrt(b)*sqrt(c + d*x)
  1257. 2*sqrt(d)*sqrt(b)*log(-----------------------------------------------)*a*b*c*d
  1258. sqrt(a*d - b*c)
  1259. sqrt(d)*sqrt(a + b*x) + sqrt(b)*sqrt(c + d*x) 2 2
  1260. - sqrt(d)*sqrt(b)*log(-----------------------------------------------)*b *c )/
  1261. sqrt(a*d - b*c)
  1262. 2 2
  1263. (4*b *d )
  1264. testint(u,x);
  1265. 2*sqrt(a + b*x)*(a + b*x)
  1266. ---------------------------
  1267. 3*b
  1268. testint(x*u,x);
  1269. 2 2 2
  1270. 2*sqrt(a + b*x)*( - 2*a + a*b*x + 3*b *x )
  1271. ---------------------------------------------
  1272. 2
  1273. 15*b
  1274. testint(x**2*u,x);
  1275. 3 2 2 2 3 3
  1276. 2*sqrt(a + b*x)*(8*a - 4*a *b*x + 3*a*b *x + 15*b *x )
  1277. ----------------------------------------------------------
  1278. 3
  1279. 105*b
  1280. testint(u/x,x);
  1281. 2*sqrt(a + b*x) + sqrt(a)*log(sqrt(a + b*x) - sqrt(a))
  1282. - sqrt(a)*log(sqrt(a + b*x) + sqrt(a))
  1283. testint(u/x**2,x);
  1284. ( - 2*sqrt(a + b*x)*a + sqrt(a)*log(sqrt(a + b*x) - sqrt(a))*b*x
  1285. - sqrt(a)*log(sqrt(a + b*x) + sqrt(a))*b*x)/(2*a*x)
  1286. testint(1/u,x);
  1287. 2*sqrt(a + b*x)
  1288. -----------------
  1289. b
  1290. testint(x/u,x);
  1291. 2*sqrt(a + b*x)*( - 2*a + b*x)
  1292. --------------------------------
  1293. 2
  1294. 3*b
  1295. testint(x**2/u,x);
  1296. 2 2 2
  1297. 2*sqrt(a + b*x)*(8*a - 4*a*b*x + 3*b *x )
  1298. --------------------------------------------
  1299. 3
  1300. 15*b
  1301. testint(1/(x*u),x);
  1302. sqrt(a)*(log(sqrt(a + b*x) - sqrt(a)) - log(sqrt(a + b*x) + sqrt(a)))
  1303. -----------------------------------------------------------------------
  1304. a
  1305. testint(1/(x**2*u),x);
  1306. ( - 2*sqrt(a + b*x)*a - sqrt(a)*log(sqrt(a + b*x) - sqrt(a))*b*x
  1307. 2
  1308. + sqrt(a)*log(sqrt(a + b*x) + sqrt(a))*b*x)/(2*a *x)
  1309. testint(u**p,x);
  1310. p/2
  1311. 2*(a + b*x) *(a + b*x)
  1312. --------------------------
  1313. b*(p + 2)
  1314. testint(x*u**p,x);
  1315. p/2 2 2 2 2 2
  1316. 2*(a + b*x) *( - 2*a + a*b*p*x + b *p*x + 2*b *x )
  1317. --------------------------------------------------------
  1318. 2 2
  1319. b *(p + 6*p + 8)
  1320. testint(atan((-sqrt(2)+2*x)/sqrt(2)),x);
  1321. sqrt(2) - 2*x sqrt(2) - 2*x
  1322. (2*sqrt(2)*atan(---------------) - 4*atan(---------------)*x
  1323. sqrt(2) sqrt(2)
  1324. 2
  1325. - sqrt(2)*log( - sqrt(2)*x + x + 1))/4
  1326. testint(1/sqrt(x**2-1),x);
  1327. 2
  1328. log(sqrt(x - 1) + x)
  1329. testint(sqrt(x+1)*sqrt x,x);
  1330. 2*sqrt(x)*sqrt(x + 1)*x + sqrt(x)*sqrt(x + 1) - log(sqrt(x + 1) + sqrt(x))
  1331. ----------------------------------------------------------------------------
  1332. 4
  1333. testint(sin(sqrt x),x);
  1334. 2*( - sqrt(x)*cos(sqrt(x)) + sin(sqrt(x)))
  1335. testint(x*(1-x^2)^(-9/4),x);
  1336. 2 1/4
  1337. - 2*( - x + 1)
  1338. ----------------------------
  1339. 2 2
  1340. 5*sqrt( - x + 1)*(x - 1)
  1341. testint(x/sqrt(1-x^4),x);
  1342. 2
  1343. asin(x )
  1344. ----------
  1345. 2
  1346. testint(1/(x*sqrt(1+x^4)),x);
  1347. 4 2 4 2
  1348. log(sqrt(x + 1) + x - 1) - log(sqrt(x + 1) + x + 1)
  1349. ---------------------------------------------------------
  1350. 2
  1351. testint(x/sqrt(1+x^2+x^4),x);
  1352. 4 2 2
  1353. 2*sqrt(x + x + 1) + 2*x + 1
  1354. log(--------------------------------)
  1355. sqrt(3)
  1356. ---------------------------------------
  1357. 2
  1358. testint(1/(x*sqrt(x^2-1-x^4)),x);
  1359. 1
  1360. int(------------------------,x)
  1361. 4 2
  1362. sqrt( - x + x - 1)*x
  1363. % Examples from James Davenport's thesis:
  1364. testint(1/sqrt(x**2-1)+10/sqrt(x**2-4),x);
  1365. 2
  1366. 2 sqrt(x - 4) + x
  1367. log(sqrt(x - 1) + x) + 10*log(------------------)
  1368. 2
  1369. % p. 173
  1370. testint(sqrt(x+sqrt(x**2+a**2))/x,x);
  1371. 2 2
  1372. sqrt(sqrt(a + x ) + x)
  1373. int(-------------------------,x)
  1374. x
  1375. % Examples generated by differentiating various functions.
  1376. testint(df(sqrt(1+x**2)/(1-x),x),x);
  1377. 2
  1378. - sqrt(x + 1)
  1379. -----------------
  1380. x - 1
  1381. testint(df(log(x+sqrt(1+x**2)),x),x);
  1382. 2
  1383. log(sqrt(x + 1) + x)
  1384. testint(df(sqrt(x)+sqrt(x+1)+sqrt(x+2),x),x);
  1385. sqrt(x + 2) + sqrt(x + 1) + sqrt(x)
  1386. testint(df(sqrt(x**5-2*x+1)-sqrt(x**3+1),x),x);
  1387. 5 3
  1388. sqrt(x - 2*x + 1) - sqrt(x + 1)
  1389. % Another such example from James Davenport's thesis (p. 146).
  1390. % It contains a point of order 3, which is found by use of Mazur's
  1391. % bound on the torsion of elliptic curves over the rationals;
  1392. testint(df(log(1+sqrt(x**3+1)),x),x);
  1393. 3
  1394. sqrt(x + 1)
  1395. 3*( - int(--------------,x) + log(x))
  1396. 4
  1397. x + x
  1398. ---------------------------------------
  1399. 2
  1400. % Examples quoted by Joel Moses:
  1401. testint(1/sqrt(2*h*r**2-alpha**2),r);
  1402. 2 2
  1403. sqrt( - alpha + 2*h*r ) + sqrt(h)*sqrt(2)*r
  1404. sqrt(h)*sqrt(2)*log(----------------------------------------------)
  1405. alpha
  1406. ---------------------------------------------------------------------
  1407. 2*h
  1408. testint(1/(r*sqrt(2*h*r**2-alpha**2-epsilon**2)),r);
  1409. 2 2
  1410. (2*sqrt(alpha + epsilon )
  1411. 2 2 2
  1412. sqrt( - alpha - epsilon + 2*h*r ) + sqrt(h)*sqrt(2)*r 2
  1413. *atan(---------------------------------------------------------))/(alpha
  1414. 2 2
  1415. sqrt(alpha + epsilon )
  1416. 2
  1417. + epsilon )
  1418. testint(1/(r*sqrt(2*h*r**2-alpha**2-2*k*r)),r);
  1419. 2 2
  1420. sqrt(h)*sqrt( - alpha + 2*h*r - 2*k*r)*sqrt(2) + 2*h*r
  1421. 2*atan(----------------------------------------------------------)
  1422. sqrt(h)*sqrt(2)*alpha
  1423. --------------------------------------------------------------------
  1424. alpha
  1425. testint(1/(r*sqrt(2*h*r**2-alpha**2-epsilon**2-2*k*r)),r);
  1426. 2 2
  1427. (2*sqrt(alpha + epsilon )
  1428. 2 2 2
  1429. sqrt(h)*sqrt( - alpha - epsilon + 2*h*r - 2*k*r)*sqrt(2) + 2*h*r
  1430. *atan(---------------------------------------------------------------------))/(
  1431. 2 2
  1432. sqrt(h)*sqrt(alpha + epsilon )*sqrt(2)
  1433. 2 2
  1434. alpha + epsilon )
  1435. testint(r/sqrt(2*e*r**2-alpha**2),r);
  1436. 2 2
  1437. sqrt( - alpha + 2*e*r )
  1438. --------------------------
  1439. 2*e
  1440. testint(r/sqrt(2*e*r**2-alpha**2-epsilon**2),r);
  1441. 2 2 2
  1442. sqrt( - alpha + 2*e*r - epsilon )
  1443. -------------------------------------
  1444. 2*e
  1445. testint(r/sqrt(2*e*r**2-alpha**2-2*k*r**4),r);
  1446. r
  1447. int(-----------------------------------,r)
  1448. 2 2 4
  1449. sqrt( - alpha + 2*e*r - 2*k*r )
  1450. testint(r/sqrt(2*e*r**2-alpha**2-2*k*r),r);
  1451. 2 2
  1452. (2*sqrt( - alpha + 2*e*r - 2*k*r)*e + sqrt(e)*sqrt(2)
  1453. 2 2
  1454. sqrt(e)*sqrt( - alpha + 2*e*r - 2*k*r)*sqrt(2) + 2*e*r - k 2
  1455. *log(--------------------------------------------------------------)*k)/(4*e )
  1456. 2 2
  1457. sqrt(2*alpha *e + k )
  1458. testint(1/(r*sqrt(2*h*r**2-alpha**2-2*k*r**4)),r);
  1459. 1
  1460. int(-------------------------------------,r)
  1461. 2 2 4
  1462. sqrt( - alpha + 2*h*r - 2*k*r )*r
  1463. testint(1/(r*sqrt(2*h*r**2-alpha**2-epsilon**2-2*k*r**4)),r);
  1464. 1
  1465. int(------------------------------------------------,r)
  1466. 2 2 2 4
  1467. sqrt( - alpha - epsilon + 2*h*r - 2*k*r )*r
  1468. Comment many of these integrals used to require Steve Harrington's
  1469. code to evaluate. They originated in Novosibirsk as examples
  1470. of using Analytik. There are still a few examples that could
  1471. be evaluated using better heuristics;
  1472. testint(a*sin(3*x+5)**2*cos(3*x+5),x);
  1473. 3
  1474. sin(3*x + 5) *a
  1475. -----------------
  1476. 9
  1477. testint(log(x**2)/x**3,x);
  1478. 2
  1479. - (log(x ) + 1)
  1480. ------------------
  1481. 2
  1482. 2*x
  1483. testint(x*sin(x+a),x);
  1484. - cos(a + x)*x + sin(a + x)
  1485. testint((log(x)*(1-x)-1)/(e**x*log(x)**2),x);
  1486. x
  1487. -----------
  1488. x
  1489. e *log(x)
  1490. testint(x**3*(a*x**2+b)**(-1),x);
  1491. 2 2
  1492. - log(a*x + b)*b + a*x
  1493. ---------------------------
  1494. 2
  1495. 2*a
  1496. testint(x**(1/2)*(x+1)**(-7/2),x);
  1497. 2 2
  1498. (2*( - 2*sqrt(x + 1)*x - 4*sqrt(x + 1)*x - 2*sqrt(x + 1) + 2*sqrt(x)*x
  1499. 2
  1500. + 5*sqrt(x)*x))/(15*sqrt(x + 1)*(x + 2*x + 1))
  1501. testint(x**(-1)*(x+1)**(-1),x);
  1502. - log(x + 1) + log(x)
  1503. testint(x**(-1/2)*(2*x-1)**(-1),x);
  1504. sqrt(2)*(log(2*sqrt(x) - sqrt(2)) - log(2*sqrt(x) + sqrt(2)))
  1505. ---------------------------------------------------------------
  1506. 2
  1507. testint((x**2+1)*x**(1/2),x);
  1508. 2
  1509. 2*sqrt(x)*x*(3*x + 7)
  1510. ------------------------
  1511. 21
  1512. testint(x**(-1)*(x-a)**(1/3),x);
  1513. 1/6 1/6
  1514. 2*( - a + x) - a *sqrt(3)
  1515. ( - 2*sqrt(3)*atan(--------------------------------)*a
  1516. 1/6
  1517. a
  1518. 1/6 1/6
  1519. 2*( - a + x) + a *sqrt(3) 2/3 1/3
  1520. + 2*sqrt(3)*atan(--------------------------------)*a + 6*a *( - a + x)
  1521. 1/6
  1522. a
  1523. 1/3 1/3
  1524. - 2*log(( - a + x) + a )*a
  1525. 1/6 1/6 1/3 1/3
  1526. + log( - a *( - a + x) *sqrt(3) + ( - a + x) + a )*a
  1527. 1/6 1/6 1/3 1/3 2/3
  1528. + log(a *( - a + x) *sqrt(3) + ( - a + x) + a )*a)/(2*a )
  1529. testint(x*sinh(x),x);
  1530. cosh(x)*x - sinh(x)
  1531. testint(x*cosh(x),x);
  1532. - cosh(x) + sinh(x)*x
  1533. testint(sinh(2*x)/cosh(2*x),x);
  1534. log(cosh(2*x))
  1535. ----------------
  1536. 2
  1537. testint((i*eps*sinh x-1)/(eps*i*cosh x+i*a-x),x);
  1538. log(cosh(x)*eps*i + a*i - x)
  1539. testint(sin(2*x+3)*cos(x)**2,x);
  1540. 2
  1541. ( - 4*cos(2*x + 3)*cos(x)*sin(x)*x + 2*cos(2*x + 3)*sin(x) - 3*cos(2*x + 3)
  1542. 2
  1543. - 4*sin(2*x + 3)*sin(x) *x + 2*sin(2*x + 3)*x + 3)/8
  1544. testint(x*atan(x),x);
  1545. 2
  1546. atan(x)*x + atan(x) - x
  1547. --------------------------
  1548. 2
  1549. testint(x*acot(x),x);
  1550. 2
  1551. acot(x)*x + acot(x) + x
  1552. --------------------------
  1553. 2
  1554. testint(x*log(x**2+a),x);
  1555. 2 2 2 2
  1556. log(a + x )*a + log(a + x )*x - x
  1557. -------------------------------------
  1558. 2
  1559. testint(sin(x+a)*cos(x),x);
  1560. - cos(a + x)*cos(x) - cos(a + x)*sin(x)*x + cos(x)*sin(a + x)*x
  1561. ------------------------------------------------------------------
  1562. 2
  1563. testint(cos(x+a)*sin(x),x);
  1564. - cos(a + x)*cos(x) + cos(a + x)*sin(x)*x - cos(x)*sin(a + x)*x
  1565. ------------------------------------------------------------------
  1566. 2
  1567. testint((1+sin(x))**(1/2),x);
  1568. int(sqrt(sin(x) + 1),x)
  1569. testint((1-sin(x))**(1/2),x);
  1570. int(sqrt( - sin(x) + 1),x)
  1571. testint((1+cos(x))**(1/2),x);
  1572. int(sqrt(cos(x) + 1),x)
  1573. testint((1-cos(x))**(1/2),x);
  1574. int(sqrt( - cos(x) + 1),x)
  1575. testint(1/(x**(1/2)-(x-1)**(1/2)),x);
  1576. 2*(sqrt(x - 1)*x - sqrt(x - 1) + sqrt(x)*x)
  1577. ---------------------------------------------
  1578. 3
  1579. testint(1/(1-(x+1)**(1/2)),x);
  1580. - 2*(sqrt(x + 1) + log(sqrt(x + 1) - 1))
  1581. testint(x/(x**4+36)**(1/2),x);
  1582. 4 2
  1583. sqrt(x + 36) + x
  1584. log(--------------------)
  1585. 6
  1586. ---------------------------
  1587. 2
  1588. testint(1/(x**(1/3)+x**(1/2)),x);
  1589. 1/6 1/3 1/6
  1590. 6*x - 3*x + 2*sqrt(x) - 6*log(x + 1)
  1591. testint(log(2+3*x**2),x);
  1592. 3*x 2
  1593. 2*sqrt(6)*atan(---------) + 3*log(3*x + 2)*x - 6*x
  1594. sqrt(6)
  1595. -----------------------------------------------------
  1596. 3
  1597. testint(cot(x),x);
  1598. x 2 x
  1599. - log(tan(---) + 1) + log(tan(---))
  1600. 2 2
  1601. testint(cot x**4,x);
  1602. 3
  1603. - cot(x) + 3*cot(x) + 3*x
  1604. -----------------------------
  1605. 3
  1606. testint(tanh(x),x);
  1607. 2*x
  1608. log(e + 1) - x
  1609. testint(coth(x),x);
  1610. x x
  1611. log(e - 1) + log(e + 1) - x
  1612. testint(b**x,x);
  1613. x
  1614. b
  1615. --------
  1616. log(b)
  1617. testint((x**4+x**(-4)+2)**(1/2),x);
  1618. 4
  1619. x - 3
  1620. --------
  1621. 3*x
  1622. testint((2*x+1)/(3*x+2),x);
  1623. - log(3*x + 2) + 6*x
  1624. -----------------------
  1625. 9
  1626. testint(x*log(x+(x**2+1)**(1/2)),x);
  1627. 2 2 2 2
  1628. - sqrt(x + 1)*x + 2*log(sqrt(x + 1) + x)*x + log(sqrt(x + 1) + x)
  1629. ------------------------------------------------------------------------
  1630. 4
  1631. testint(x*(e**x*sin(x)+1)**2,x);
  1632. 2*x 2*x x x
  1633. ( - 2*e *cos(x)*sin(x)*x + e *cos(x)*sin(x) - 8*e *cos(x)*x + 8*e *cos(x)
  1634. 2*x 2 2*x 2*x x 2
  1635. + 2*e *sin(x) *x + e *x - e + 8*e *sin(x)*x + 4*x )/8
  1636. testint(x*e**x*cos(x),x);
  1637. x
  1638. e *(cos(x)*x + sin(x)*x - sin(x))
  1639. -----------------------------------
  1640. 2
  1641. Comment the following set came from Herbert Stoyan;
  1642. testint(1/(x-3)**4,x);
  1643. - 1
  1644. ---------------------------
  1645. 3 2
  1646. 3*(x - 9*x + 27*x - 27)
  1647. testint(x/(x**3-1),x);
  1648. 2*x + 1 2
  1649. 2*sqrt(3)*atan(---------) - log(x + x + 1) + 2*log(x - 1)
  1650. sqrt(3)
  1651. ------------------------------------------------------------
  1652. 6
  1653. testint(x/(x**4-1),x);
  1654. 2
  1655. - log(x + 1) + log(x - 1) + log(x + 1)
  1656. ------------------------------------------
  1657. 4
  1658. testint(log(x)*(x**3+1)/(x**4+2),x);
  1659. log(x) log(x) 2
  1660. - 4*int(----------,x) + 2*int(--------,x) + log(x)
  1661. 5 4
  1662. x + 2*x x + 2
  1663. ------------------------------------------------------
  1664. 2
  1665. testint(log(x)+log(x+1)+log(x+2),x);
  1666. log(x + 2)*x + 2*log(x + 2) + log(x + 1)*x + log(x + 1) + log(x)*x - 3*x
  1667. testint(1/(x**3+5),x);
  1668. 1/3
  1669. 1/3 5 - 2*x 2/3 1/3 2
  1670. (5 *( - 2*sqrt(3)*atan(--------------) - log(5 - 5 *x + x )
  1671. 1/3
  1672. sqrt(3)*5
  1673. 1/3
  1674. + 2*log(5 + x)))/30
  1675. testint(1/sqrt(1+x**2),x);
  1676. 2
  1677. log(sqrt(x + 1) + x)
  1678. testint(sqrt(x**2+3),x);
  1679. 2
  1680. 2 sqrt(x + 3) + x
  1681. sqrt(x + 3)*x + 3*log(------------------)
  1682. sqrt(3)
  1683. --------------------------------------------
  1684. 2
  1685. testint(x/(x+1)**2,x);
  1686. log(x + 1)*x + log(x + 1) - x
  1687. -------------------------------
  1688. x + 1
  1689. COMMENT The following integrals were used among others as a test of
  1690. Moses' SIN program;
  1691. testint(asin x,x);
  1692. 2
  1693. asin(x)*x + sqrt( - x + 1)
  1694. testint(x**2*asin x,x);
  1695. 2
  1696. int(asin(x)*x ,x)
  1697. testint(sec x**2/(1+sec x**2-3*tan x),x);
  1698. x x
  1699. log( - sqrt(5) + 2*tan(---) + 1) - log( - sqrt(2) + tan(---) + 1)
  1700. 2 2
  1701. x x
  1702. + log(sqrt(5) + 2*tan(---) + 1) - log(sqrt(2) + tan(---) + 1)
  1703. 2 2
  1704. testint(1/sec x**2,x);
  1705. cos(x)*sin(x) + x
  1706. -------------------
  1707. 2
  1708. testint((5*x**2-3*x-2)/(x**2*(x-2)),x);
  1709. 3*log(x - 2)*x + 2*log(x)*x - 1
  1710. ---------------------------------
  1711. x
  1712. testint(1/(4*x**2+9)**(1/2),x);
  1713. 2
  1714. sqrt(4*x + 9) + 2*x
  1715. log(----------------------)
  1716. 3
  1717. -----------------------------
  1718. 2
  1719. testint((x**2+4)**(-1/2),x);
  1720. 2
  1721. sqrt(x + 4) + x
  1722. log(------------------)
  1723. 2
  1724. testint(1/(9*x**2-12*x+10),x);
  1725. 3*x - 2
  1726. sqrt(6)*atan(---------)
  1727. sqrt(6)
  1728. -------------------------
  1729. 18
  1730. testint(1/(x**8-2*x**7+2*x**6-2*x**5+x**4),x);
  1731. 2 4 2 3 4 3
  1732. (3*log(x + 1)*x - 3*log(x + 1)*x - 30*log(x - 1)*x + 30*log(x - 1)*x
  1733. 4 3 4 2 3
  1734. + 24*log(x)*x - 24*log(x)*x - 30*x + 12*x + 8*x + 4)/(12*x *(x - 1))
  1735. testint((a*x**3+b*x**2+c*x+d)/((x+1)*x*(x-3)),x);
  1736. (27*log(x - 3)*a + 9*log(x - 3)*b + 3*log(x - 3)*c + log(x - 3)*d
  1737. - 3*log(x + 1)*a + 3*log(x + 1)*b - 3*log(x + 1)*c + 3*log(x + 1)*d
  1738. - 4*log(x)*d + 12*a*x)/12
  1739. testint(1/(2-log(x**2+1))**5,x);
  1740. 2 5 2 4 2 3 2 2
  1741. - int(1/(log(x + 1) - 10*log(x + 1) + 40*log(x + 1) - 80*log(x + 1)
  1742. 2
  1743. + 80*log(x + 1) - 32),x)
  1744. % The next integral appeared in Risch's 1968 paper.
  1745. testint(2*x*e**(x**2)*log(x)+e**(x**2)/x+(log(x)-2)/(log(x)**2+x)**2+
  1746. ((2/x)*log(x)+(1/x)+1)/(log(x)**2+x),x);
  1747. 2 2
  1748. x 3 x 2 2 2
  1749. (e *log(x) + e *log(x)*x + log(log(x) + x)*log(x) + log(log(x) + x)*x
  1750. 2
  1751. - log(x))/(log(x) + x)
  1752. % The following integral would not evaluate in REDUCE 3.3.
  1753. testint(exp(x*ze+x/2)*sin(pi*ze)**4*x**4,ze);
  1754. (2*x*ze + x)/2 3 3 3
  1755. (e *x *( - 16*cos(pi*ze)*sin(pi*ze) *pi *x
  1756. 3 3 3
  1757. - 4*cos(pi*ze)*sin(pi*ze) *pi*x - 24*cos(pi*ze)*sin(pi*ze)*pi *x
  1758. 4 2 2 4 4 2 2 2 4
  1759. + 4*sin(pi*ze) *pi *x + sin(pi*ze) *x + 12*sin(pi*ze) *pi *x + 24*pi ))/
  1760. 4 2 2 4
  1761. (64*pi + 20*pi *x + x )
  1762. % This one evaluates:
  1763. testint(erf(x),x);
  1764. 2
  1765. x
  1766. e *erf(x)*pi*x + sqrt(pi)
  1767. ----------------------------
  1768. 2
  1769. x
  1770. e *pi
  1771. % So why not this one?
  1772. testint(erf(x+a),x);
  1773. int(erf(a + x),x)
  1774. Comment here is an example of using the integrator with pattern
  1775. matching;
  1776. for all m,n let int(k1**m*log(k1)**n/(p**2-k1**2),k1)=foo(m,n),
  1777. int(k1*log(k1)**n/(p**2-k1**2),k1)=foo(1,n),
  1778. int(k1**m*log(k1)/(p**2-k1**2),k1)=foo(m,1),
  1779. int(k1*log(k1)/(p**2-k1**2),k1)=foo(1,1),
  1780. int(log(k1)**n/(k1*(p**2-k1**2)),k1)=foo(-1,n);
  1781. int(k1**2*log(k1)/(p**2-k1**2),k1);
  1782. *** foo declared operator
  1783. foo(2,1)
  1784. COMMENT It is interesting to see how much of this one can be done;
  1785. let f1s= (12*log(s/mc**2)*s**2*pi**2*mc**3*(-8*s-12*mc**2+3*mc)
  1786. + pi**2*(12*s**4*mc+3*s**4+176*s**3*mc**3-24*s**3*mc**2
  1787. -144*s**2*mc**5-48*s*mc**7+24*s*mc**6+4*mc**9-3*mc**8))
  1788. /(384*e**(s/y)*s**2);
  1789. int(f1s,s);
  1790. 2 s/y - s 9 s/y - s 8
  1791. (pi *( - 4*e *ei(------)*mc *s + 3*e *ei(------)*mc *s
  1792. y y
  1793. s/y - s 7 s/y - s 6
  1794. - 48*e *ei(------)*mc *s*y + 24*e *ei(------)*mc *s*y
  1795. y y
  1796. s/y - s 5 2 s/y - s 4 2
  1797. - 144*e *ei(------)*mc *s*y + 36*e *ei(------)*mc *s*y
  1798. y y
  1799. s/y - s 3 3 s 5 2
  1800. - 96*e *ei(------)*mc *s*y + 144*log(-----)*mc *s*y
  1801. y 2
  1802. mc
  1803. s 4 2 s 3 2 2
  1804. - 36*log(-----)*mc *s*y + 96*log(-----)*mc *s *y
  1805. 2 2
  1806. mc mc
  1807. s 3 3 9 8 5 2
  1808. + 96*log(-----)*mc *s*y - 4*mc *y + 3*mc *y + 144*mc *s*y
  1809. 2
  1810. mc
  1811. 3 2 2 3 3 2 2 2 2 3 3 2
  1812. - 176*mc *s *y - 80*mc *s*y + 24*mc *s *y + 24*mc *s*y - 12*mc*s *y
  1813. 2 3 4 3 2 2 3 4 s/y
  1814. - 24*mc*s *y - 24*mc*s*y - 3*s *y - 6*s *y - 6*s*y ))/(384*e *s*y)
  1815. factor ei,log;
  1816. ws;
  1817. s/y - s 3 2
  1818. (e *ei(------)*mc *pi *s
  1819. y
  1820. 6 5 4 3 2 2 2 3
  1821. *( - 4*mc + 3*mc - 48*mc *y + 24*mc *y - 144*mc *y + 36*mc*y - 96*y )
  1822. s 3 2 2 2 2 9
  1823. + 12*log(-----)*mc *pi *s*y *(12*mc - 3*mc + 8*s + 8*y) + pi *y*( - 4*mc
  1824. 2
  1825. mc
  1826. 8 5 3 2 3 2 2 2
  1827. + 3*mc + 144*mc *s*y - 176*mc *s *y - 80*mc *s*y + 24*mc *s *y
  1828. 2 2 3 2 2 3 3 2 2
  1829. + 24*mc *s*y - 12*mc*s *y - 24*mc*s *y - 24*mc*s*y - 3*s *y - 6*s *y
  1830. 3 s/y
  1831. - 6*s*y ))/(384*e *s*y)
  1832. Comment the following integrals reveal deficiencies in the current
  1833. integrator;
  1834. %high degree denominator;
  1835. %testint(1/(2-log(x**2+1))**5,x);
  1836. %this example should evaluate;
  1837. testint(sin(2*x)/cos(x),x);
  1838. sin(2*x)
  1839. int(----------,x)
  1840. cos(x)
  1841. %this example, which appeared in Tobey's thesis, needs factorization
  1842. %over algebraic fields. It currently gives an ugly answer and so has
  1843. %been suppressed;
  1844. % testint((7*x**13+10*x**8+4*x**7-7*x**6-4*x**3-4*x**2+3*x+3)/
  1845. % (x**14-2*x**8-2*x**7-2*x**4-4*x**3-x**2+2*x+1),x);
  1846. symbolic summarize!-integral!-test();
  1847. ***** SUMMARY OF INTEGRAL TESTS *****
  1848. Number of integrals tested: 278
  1849. Total time taken: 49440 ms
  1850. Number of incorrect integrals: 0
  1851. Number of unevaluated integrals: 22
  1852. Integrands of unevaluated integrals are:
  1853. log(log(log(log(x))))
  1854. p
  1855. sin(x)
  1856. 4 3
  1857. tan(x) *x
  1858. 6 3
  1859. tan(x) *x
  1860. xi
  1861. cos(--------)*cos(x)*x
  1862. sin(x)
  1863. ------------------------
  1864. 2
  1865. sin(x)
  1866. x
  1867. a *x
  1868. -------------------
  1869. 2 2
  1870. b *x + 2*b*x + 1
  1871. x
  1872. e
  1873. e
  1874. e
  1875. e
  1876. 1
  1877. ------------------------
  1878. 4 2
  1879. sqrt( - x + x - 1)*x
  1880. 2 2
  1881. sqrt(sqrt(a + x ) + x)
  1882. -------------------------
  1883. x
  1884. 3 3
  1885. - 3*sqrt(x + 1) + 3*x + 3
  1886. ------------------------------
  1887. 4
  1888. 2*x + 2*x
  1889. r
  1890. -----------------------------------
  1891. 2 2 4
  1892. sqrt( - alpha + 2*e*r - 2*k*r )
  1893. 1
  1894. -------------------------------------
  1895. 2 2 4
  1896. sqrt( - alpha + 2*h*r - 2*k*r )*r
  1897. 1
  1898. ------------------------------------------------
  1899. 2 2 2 4
  1900. sqrt( - alpha - epsilon + 2*h*r - 2*k*r )*r
  1901. sqrt(sin(x) + 1)
  1902. sqrt( - sin(x) + 1)
  1903. sqrt(cos(x) + 1)
  1904. sqrt( - cos(x) + 1)
  1905. 3
  1906. log(x)*x + log(x)
  1907. --------------------
  1908. 4
  1909. x + 2
  1910. 2
  1911. asin(x)*x
  1912. 2 5 2 4 2 3 2 2
  1913. ( - 1)/(log(x + 1) - 10*log(x + 1) + 40*log(x + 1) - 80*log(x + 1)
  1914. 2
  1915. + 80*log(x + 1) - 32)
  1916. erf(a + x)
  1917. sin(2*x)
  1918. ----------
  1919. cos(x)
  1920. end;
  1921. (TIME: int 49530 52429)