int.rlg 75 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117
  1. Sun Aug 18 15:49:32 2002 run on Windows
  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. symbolic(!*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. 3/4 sqrt(5)*x 1/4 1/4
  328. 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. 3/4 1/4 sqrt(2)*21 - 2*sqrt(3)*x
  336. (sqrt(2)*3 *7 *( - 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 2*x
  377. (sqrt(2)*(2*sqrt(3)*atanh(-------------------) + 6*atanh(-------------------)
  378. sqrt(6) - sqrt(2) sqrt(6) - sqrt(2)
  379. - sqrt(6) - sqrt(2) + 2*x
  380. - sqrt(3)*log(----------------------------)
  381. 2
  382. sqrt(6) + sqrt(2) + 2*x
  383. + sqrt(3)*log(-------------------------)
  384. 2
  385. - sqrt(6) - sqrt(2) + 2*x
  386. + 3*log(----------------------------)
  387. 2
  388. sqrt(6) + sqrt(2) + 2*x
  389. - 3*log(-------------------------)))/24
  390. 2
  391. testint(1/(x**4+4*x**2+1),x);
  392. 2*x 2*x
  393. (sqrt(2)*(2*sqrt(3)*atan(-------------------) - 6*atan(-------------------)
  394. sqrt(6) + sqrt(2) sqrt(6) + sqrt(2)
  395. - sqrt(6)*i + sqrt(2)*i + 2*x
  396. - sqrt(3)*log(--------------------------------)*i
  397. 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. - 3*log(--------------------------------)*i
  403. 2
  404. sqrt(6)*i - sqrt(2)*i + 2*x
  405. + 3*log(-----------------------------)*i))/24
  406. 2
  407. testint(1/(x**4+x**2+2),x);
  408. sqrt(2*sqrt(2) - 1) - 2*x
  409. (2*sqrt(2*sqrt(2) + 1)*sqrt(2)*atan(---------------------------)
  410. sqrt(2*sqrt(2) + 1)
  411. sqrt(2*sqrt(2) - 1) - 2*x
  412. - 8*sqrt(2*sqrt(2) + 1)*atan(---------------------------)
  413. sqrt(2*sqrt(2) + 1)
  414. sqrt(2*sqrt(2) - 1) + 2*x
  415. - 2*sqrt(2*sqrt(2) + 1)*sqrt(2)*atan(---------------------------)
  416. sqrt(2*sqrt(2) + 1)
  417. sqrt(2*sqrt(2) - 1) + 2*x
  418. + 8*sqrt(2*sqrt(2) + 1)*atan(---------------------------)
  419. sqrt(2*sqrt(2) + 1)
  420. 2
  421. - sqrt(2*sqrt(2) - 1)*sqrt(2)*log( - sqrt(2*sqrt(2) - 1)*x + sqrt(2) + x )
  422. 2
  423. + sqrt(2*sqrt(2) - 1)*sqrt(2)*log(sqrt(2*sqrt(2) - 1)*x + sqrt(2) + x )
  424. 2
  425. - 4*sqrt(2*sqrt(2) - 1)*log( - sqrt(2*sqrt(2) - 1)*x + sqrt(2) + x )
  426. 2
  427. + 4*sqrt(2*sqrt(2) - 1)*log(sqrt(2*sqrt(2) - 1)*x + sqrt(2) + x ))/56
  428. testint(1/(x**4-x**2+2),x);
  429. sqrt(2*sqrt(2) + 1) - 2*x
  430. ( - 2*sqrt(2*sqrt(2) - 1)*sqrt(2)*atan(---------------------------)
  431. sqrt(2*sqrt(2) - 1)
  432. sqrt(2*sqrt(2) + 1) - 2*x
  433. - 8*sqrt(2*sqrt(2) - 1)*atan(---------------------------)
  434. sqrt(2*sqrt(2) - 1)
  435. sqrt(2*sqrt(2) + 1) + 2*x
  436. + 2*sqrt(2*sqrt(2) - 1)*sqrt(2)*atan(---------------------------)
  437. sqrt(2*sqrt(2) - 1)
  438. sqrt(2*sqrt(2) + 1) + 2*x
  439. + 8*sqrt(2*sqrt(2) - 1)*atan(---------------------------)
  440. sqrt(2*sqrt(2) - 1)
  441. 2
  442. + sqrt(2*sqrt(2) + 1)*sqrt(2)*log( - sqrt(2*sqrt(2) + 1)*x + sqrt(2) + x )
  443. 2
  444. - sqrt(2*sqrt(2) + 1)*sqrt(2)*log(sqrt(2*sqrt(2) + 1)*x + sqrt(2) + x )
  445. 2
  446. - 4*sqrt(2*sqrt(2) + 1)*log( - sqrt(2*sqrt(2) + 1)*x + sqrt(2) + x )
  447. 2
  448. + 4*sqrt(2*sqrt(2) + 1)*log(sqrt(2*sqrt(2) + 1)*x + sqrt(2) + x ))/56
  449. testint(1/(x**6-1),x);
  450. 2*x - 1 2*x + 1 2
  451. ( - 2*sqrt(3)*atan(---------) - 2*sqrt(3)*atan(---------) + log(x - x + 1)
  452. sqrt(3) sqrt(3)
  453. 2
  454. - log(x + x + 1) + 2*log(x - 1) - 2*log(x + 1))/12
  455. testint(1/(x**6-2),x);
  456. 1/6 1/6
  457. 1/6 2 - 2*x 2 + 2*x
  458. (2 *(2*sqrt(3)*atan(--------------) - 2*sqrt(3)*atan(--------------)
  459. 1/6 1/6
  460. 2 *sqrt(3) 2 *sqrt(3)
  461. 1/6 1/6 1/6 1/3 2
  462. - 2*log(2 + x) + 2*log( - 2 + x) + log( - 2 *x + 2 + x )
  463. 1/6 1/3 2
  464. - log(2 *x + 2 + x )))/24
  465. testint(1/(x**6+2),x);
  466. 1/6 1/6
  467. 1/6 2 *sqrt(3) - 2*x 2 *sqrt(3) + 2*x
  468. (2 *( - 2*atan(--------------------) + 2*atan(--------------------)
  469. 1/6 1/6
  470. 2 2
  471. x 1/6 1/3 2
  472. + 4*atan(------) - sqrt(3)*log( - 2 *sqrt(3)*x + 2 + x )
  473. 1/6
  474. 2
  475. 1/6 1/3 2
  476. + sqrt(3)*log(2 *sqrt(3)*x + 2 + x )))/24
  477. testint(1/(x**8+1),x);
  478. sqrt( - sqrt(2) + 2) - 2*x
  479. ( - 2*sqrt(sqrt(2) + 2)*atan(----------------------------)
  480. sqrt(sqrt(2) + 2)
  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. 2
  491. - sqrt( - sqrt(2) + 2)*log( - sqrt( - sqrt(2) + 2)*x + x + 1)
  492. 2
  493. + sqrt( - sqrt(2) + 2)*log(sqrt( - sqrt(2) + 2)*x + x + 1)
  494. 2
  495. - sqrt(sqrt(2) + 2)*log( - sqrt(sqrt(2) + 2)*x + x + 1)
  496. 2
  497. + sqrt(sqrt(2) + 2)*log(sqrt(sqrt(2) + 2)*x + x + 1))/16
  498. testint(1/(x**8-1),x);
  499. sqrt(2) - 2*x sqrt(2) + 2*x
  500. (2*sqrt(2)*atan(---------------) - 2*sqrt(2)*atan(---------------) - 4*atan(x)
  501. sqrt(2) sqrt(2)
  502. 2 2
  503. + sqrt(2)*log( - sqrt(2)*x + x + 1) - sqrt(2)*log(sqrt(2)*x + x + 1)
  504. + 2*log(x - 1) - 2*log(x + 1))/16
  505. testint(1/(x**8-x**4+1),x);
  506. sqrt(6) + sqrt(2) - 4*x
  507. ( - 2*sqrt( - sqrt(3) + 2)*sqrt(3)*atan(-------------------------)
  508. 2*sqrt( - sqrt(3) + 2)
  509. sqrt(6) + sqrt(2) - 4*x
  510. - 6*sqrt( - sqrt(3) + 2)*atan(-------------------------)
  511. 2*sqrt( - sqrt(3) + 2)
  512. sqrt(6) + sqrt(2) + 4*x
  513. + 2*sqrt( - sqrt(3) + 2)*sqrt(3)*atan(-------------------------)
  514. 2*sqrt( - sqrt(3) + 2)
  515. sqrt(6) + sqrt(2) + 4*x
  516. + 6*sqrt( - sqrt(3) + 2)*atan(-------------------------)
  517. 2*sqrt( - sqrt(3) + 2)
  518. 2*sqrt( - sqrt(3) + 2) - 4*x
  519. - 2*sqrt(6)*atan(------------------------------)
  520. sqrt(6) + sqrt(2)
  521. 2*sqrt( - sqrt(3) + 2) + 4*x
  522. + 2*sqrt(6)*atan(------------------------------)
  523. sqrt(6) + sqrt(2)
  524. 2
  525. - sqrt( - sqrt(3) + 2)*sqrt(3)*log( - sqrt( - sqrt(3) + 2)*x + x + 1)
  526. 2
  527. + sqrt( - sqrt(3) + 2)*sqrt(3)*log(sqrt( - sqrt(3) + 2)*x + x + 1)
  528. 2
  529. - 3*sqrt( - sqrt(3) + 2)*log( - sqrt( - sqrt(3) + 2)*x + x + 1)
  530. 2
  531. + 3*sqrt( - sqrt(3) + 2)*log(sqrt( - sqrt(3) + 2)*x + x + 1)
  532. 2
  533. - sqrt(6)*x - sqrt(2)*x + 2*x + 2
  534. - sqrt(6)*log(-------------------------------------)
  535. 2
  536. 2
  537. sqrt(6)*x + sqrt(2)*x + 2*x + 2
  538. + sqrt(6)*log(----------------------------------))/24
  539. 2
  540. testint(x**7/(x**12+1),x);
  541. sqrt(6) + sqrt(2) - 4*x
  542. ( - sqrt( - sqrt(3) + 2)*sqrt(6)*atan(-------------------------)
  543. 2*sqrt( - sqrt(3) + 2)
  544. sqrt(6) + sqrt(2) - 4*x
  545. - 3*sqrt( - sqrt(3) + 2)*sqrt(2)*atan(-------------------------)
  546. 2*sqrt( - sqrt(3) + 2)
  547. sqrt(6) + sqrt(2) + 4*x
  548. - sqrt( - sqrt(3) + 2)*sqrt(6)*atan(-------------------------)
  549. 2*sqrt( - sqrt(3) + 2)
  550. sqrt(6) + sqrt(2) + 4*x
  551. - 3*sqrt( - sqrt(3) + 2)*sqrt(2)*atan(-------------------------)
  552. 2*sqrt( - sqrt(3) + 2)
  553. 2*sqrt( - sqrt(3) + 2) - 4*x
  554. + sqrt( - sqrt(3) + 2)*sqrt(6)*atan(------------------------------)
  555. sqrt(6) + sqrt(2)
  556. 2*sqrt( - sqrt(3) + 2) - 4*x
  557. + 3*sqrt( - sqrt(3) + 2)*sqrt(2)*atan(------------------------------)
  558. sqrt(6) + sqrt(2)
  559. 2*sqrt( - sqrt(3) + 2) + 4*x
  560. + sqrt( - sqrt(3) + 2)*sqrt(6)*atan(------------------------------)
  561. sqrt(6) + sqrt(2)
  562. 2*sqrt( - sqrt(3) + 2) + 4*x
  563. + 3*sqrt( - sqrt(3) + 2)*sqrt(2)*atan(------------------------------)
  564. sqrt(6) + sqrt(2)
  565. 2 2
  566. + log( - sqrt( - sqrt(3) + 2)*x + x + 1) - 2*log( - sqrt(2)*x + x + 1)
  567. 2 2
  568. + log(sqrt( - sqrt(3) + 2)*x + x + 1) - 2*log(sqrt(2)*x + x + 1)
  569. 2
  570. - sqrt(6)*x - sqrt(2)*x + 2*x + 2
  571. + log(-------------------------------------)
  572. 2
  573. 2
  574. sqrt(6)*x + sqrt(2)*x + 2*x + 2
  575. + log(----------------------------------))/24
  576. 2
  577. % Examples involving logarithms.
  578. testint(log x,x);
  579. x*(log(x) - 1)
  580. testint(x*log x,x);
  581. 2
  582. x *(2*log(x) - 1)
  583. -------------------
  584. 4
  585. testint(x**2*log x,x);
  586. 3
  587. x *(3*log(x) - 1)
  588. -------------------
  589. 9
  590. testint(x**p*log x,x);
  591. p
  592. x *x*(log(x)*p + log(x) - 1)
  593. ------------------------------
  594. 2
  595. p + 2*p + 1
  596. testint((log x)**2,x);
  597. 2
  598. x*(log(x) - 2*log(x) + 2)
  599. testint(x**9*log x**11,x);
  600. 10 11 10 9
  601. (x *(15625000*log(x) - 17187500*log(x) + 17187500*log(x)
  602. 8 7 6 5
  603. - 15468750*log(x) + 12375000*log(x) - 8662500*log(x) + 5197500*log(x)
  604. 4 3 2
  605. - 2598750*log(x) + 1039500*log(x) - 311850*log(x) + 62370*log(x)
  606. - 6237))/156250000
  607. testint(log x**2/x,x);
  608. 3
  609. log(x)
  610. ---------
  611. 3
  612. testint(1/log x,x);
  613. ei(log(x))
  614. testint(1/log(x+1),x);
  615. ei(log(x + 1))
  616. testint(1/(x*log x),x);
  617. log(log(x))
  618. testint(1/(x*log x)**2,x);
  619. - (ei( - log(x))*log(x)*x + 1)
  620. ---------------------------------
  621. log(x)*x
  622. testint((log x)**p/x,x);
  623. p
  624. log(x) *log(x)
  625. ----------------
  626. p + 1
  627. testint(log x *(a*x+b),x);
  628. x*(2*log(x)*a*x + 4*log(x)*b - a*x - 4*b)
  629. -------------------------------------------
  630. 4
  631. testint((a*x+b)**2*log x,x);
  632. 2 2 2 2 2 2
  633. (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 )
  634. )/18
  635. testint(log x/(a*x+b)**2,x);
  636. - log(a*x + b)*a*x - log(a*x + b)*b + log(x)*a*x
  637. ---------------------------------------------------
  638. a*b*(a*x + b)
  639. testint(x*log (a*x+b),x);
  640. 2 2 2 2 2
  641. 2*log(a*x + b)*a *x - 2*log(a*x + b)*b - a *x + 2*a*b*x
  642. ------------------------------------------------------------
  643. 2
  644. 4*a
  645. testint(x**2*log(a*x+b),x);
  646. 3 3 3 3 3 2 2 2
  647. 6*log(a*x + b)*a *x + 6*log(a*x + b)*b - 2*a *x + 3*a *b*x - 6*a*b *x
  648. ---------------------------------------------------------------------------
  649. 3
  650. 18*a
  651. testint(log(x**2+a**2),x);
  652. x 2 2
  653. 2*atan(---)*a + log(a + x )*x - 2*x
  654. a
  655. testint(x*log(x**2+a**2),x);
  656. 2 2 2 2 2 2 2
  657. log(a + x )*a + log(a + x )*x - x
  658. ----------------------------------------
  659. 2
  660. testint(x**2*log(x**2+a**2),x);
  661. x 3 2 2 3 2 3
  662. - 6*atan(---)*a + 3*log(a + x )*x + 6*a *x - 2*x
  663. a
  664. -------------------------------------------------------
  665. 9
  666. testint(x**4*log(x**2+a**2),x);
  667. x 5 2 2 5 4 2 3 5
  668. 30*atan(---)*a + 15*log(a + x )*x - 30*a *x + 10*a *x - 6*x
  669. a
  670. ------------------------------------------------------------------
  671. 75
  672. testint(log(x**2-a**2),x);
  673. 2 2 2 2
  674. - log( - a + x )*a + log( - a + x )*x + 2*log( - a - x)*a - 2*x
  675. testint(log(log(log(log(x)))),x);
  676. 1
  677. - int(-------------------------------------,x) + log(log(log(log(x))))*x
  678. log(log(log(x)))*log(log(x))*log(x)
  679. % Examples involving circular functions.
  680. testint(sin x,x);
  681. - cos(x)
  682. % 2.01 #5;
  683. testint(cos x,x);
  684. sin(x)
  685. % #6;
  686. testint(tan x,x);
  687. 2
  688. log(tan(x) + 1)
  689. ------------------
  690. 2
  691. % #11;
  692. testint(1/tan(x),x);
  693. 2
  694. - log(tan(x) + 1) + 2*log(tan(x))
  695. -------------------------------------
  696. 2
  697. % 2.01 #12;
  698. testint(1/(1+tan(x))**2,x);
  699. 2 2
  700. ( - log(tan(x) + 1)*tan(x) - log(tan(x) + 1) + 2*log(tan(x) + 1)*tan(x)
  701. + 2*log(tan(x) + 1) + 2*tan(x))/(4*(tan(x) + 1))
  702. testint(1/cos x,x);
  703. x x
  704. - log(tan(---) - 1) + log(tan(---) + 1)
  705. 2 2
  706. testint(1/sin x,x);
  707. x
  708. log(tan(---))
  709. 2
  710. testint(sin x**2,x);
  711. - cos(x)*sin(x) + x
  712. ----------------------
  713. 2
  714. testint(x**3*sin(x**2),x);
  715. 2 2 2
  716. - cos(x )*x + sin(x )
  717. -------------------------
  718. 2
  719. testint(sin x**3,x);
  720. 2
  721. - cos(x)*sin(x) - 2*cos(x) + 2
  722. ----------------------------------
  723. 3
  724. testint(sin x**p,x);
  725. p
  726. int(sin(x) ,x)
  727. testint((sin x**2+1)**2*cos x,x);
  728. 4 2
  729. sin(x)*(3*sin(x) + 10*sin(x) + 15)
  730. --------------------------------------
  731. 15
  732. testint(cos x**2,x);
  733. cos(x)*sin(x) + x
  734. -------------------
  735. 2
  736. testint(cos x**3,x);
  737. 2
  738. sin(x)*( - sin(x) + 3)
  739. -------------------------
  740. 3
  741. testint(sin(a*x+b),x);
  742. - cos(a*x + b)
  743. -----------------
  744. a
  745. testint(1/cos x**2,x);
  746. sin(x)
  747. --------
  748. cos(x)
  749. testint(sin x*sin(2*x),x);
  750. - 2*cos(2*x)*sin(x) + cos(x)*sin(2*x)
  751. ----------------------------------------
  752. 3
  753. testint(x*sin x,x);
  754. - cos(x)*x + sin(x)
  755. testint(x**2*sin x,x);
  756. 2
  757. - cos(x)*x + 2*cos(x) + 2*sin(x)*x
  758. testint(x*sin x**2,x);
  759. 2 2
  760. - 2*cos(x)*sin(x)*x + sin(x) + x - 2
  761. -----------------------------------------
  762. 4
  763. testint(x**2*sin x**2,x);
  764. 2 2 3
  765. - 6*cos(x)*sin(x)*x + 3*cos(x)*sin(x) + 6*sin(x) *x + 2*x - 3*x
  766. --------------------------------------------------------------------
  767. 12
  768. testint(x*sin x**3,x);
  769. 2 3
  770. - 3*cos(x)*sin(x) *x - 6*cos(x)*x + sin(x) + 6*sin(x)
  771. ---------------------------------------------------------
  772. 9
  773. testint(x*cos x,x);
  774. cos(x) + sin(x)*x
  775. testint(x**2*cos x,x);
  776. 2
  777. 2*cos(x)*x + sin(x)*x - 2*sin(x)
  778. testint(x*cos x**2,x);
  779. 2 2
  780. 2*cos(x)*sin(x)*x - sin(x) + x + 2
  781. --------------------------------------
  782. 4
  783. testint(x**2*cos x**2,x);
  784. 2 2 3
  785. 6*cos(x)*sin(x)*x - 3*cos(x)*sin(x) - 6*sin(x) *x + 2*x + 3*x
  786. -----------------------------------------------------------------
  787. 12
  788. testint(x*cos x**3,x);
  789. 2 3
  790. - cos(x)*sin(x) + 7*cos(x) - 3*sin(x) *x + 9*sin(x)*x + 1
  791. -------------------------------------------------------------
  792. 9
  793. testint(sin x/x,x);
  794. si(x)
  795. testint(cos x/x,x);
  796. ci(x)
  797. testint(sin x/x**2,x);
  798. ci(x)*x - sin(x)
  799. ------------------
  800. x
  801. testint(sin x**2/x,x);
  802. - ci(2*x) + log(x)
  803. ---------------------
  804. 2
  805. testint(tan x**3,x);
  806. 2 2
  807. - log(tan(x) + 1) + tan(x)
  808. -------------------------------
  809. 2
  810. % z := a+b*x;
  811. testint(sin z,x);
  812. - cos(a + b*x)
  813. -----------------
  814. b
  815. testint(cos z,x);
  816. sin(a + b*x)
  817. --------------
  818. b
  819. testint(tan z,x);
  820. 2
  821. log(tan(a + b*x) + 1)
  822. ------------------------
  823. 2*b
  824. testint(1/tan z,x);
  825. 2
  826. - log(tan(a + b*x) + 1) + 2*log(tan(a + b*x))
  827. -------------------------------------------------
  828. 2*b
  829. testint(1/sin z,x);
  830. a + b*x
  831. log(tan(---------))
  832. 2
  833. ---------------------
  834. b
  835. testint(1/cos z,x);
  836. a + b*x a + b*x
  837. - log(tan(---------) - 1) + log(tan(---------) + 1)
  838. 2 2
  839. ------------------------------------------------------
  840. b
  841. testint(sin z**2,x);
  842. - cos(a + b*x)*sin(a + b*x) + b*x
  843. ------------------------------------
  844. 2*b
  845. testint(sin z**3,x);
  846. 2
  847. - cos(a + b*x)*sin(a + b*x) - 2*cos(a + b*x) + 2
  848. ----------------------------------------------------
  849. 3*b
  850. testint(cos z**2,x);
  851. cos(a + b*x)*sin(a + b*x) + b*x
  852. ---------------------------------
  853. 2*b
  854. testint(cos z**3,x);
  855. 2
  856. sin(a + b*x)*( - sin(a + b*x) + 3)
  857. -------------------------------------
  858. 3*b
  859. testint(1/cos z**2,x);
  860. sin(a + b*x)
  861. ----------------
  862. cos(a + b*x)*b
  863. testint(1/(1+cos x),x);
  864. x
  865. tan(---)
  866. 2
  867. testint(1/(1-cos x),x);
  868. - 1
  869. ----------
  870. x
  871. tan(---)
  872. 2
  873. testint(1/(1+sin x),x);
  874. x
  875. 2*tan(---)
  876. 2
  877. --------------
  878. x
  879. tan(---) + 1
  880. 2
  881. testint(1/(1-sin x),x);
  882. x
  883. - 2*tan(---)
  884. 2
  885. ---------------
  886. x
  887. tan(---) - 1
  888. 2
  889. testint(1/(a+b*sin x),x);
  890. x
  891. tan(---)*a + b
  892. 2 2 2
  893. 2*sqrt(a - b )*atan(----------------)
  894. 2 2
  895. sqrt(a - b )
  896. ----------------------------------------
  897. 2 2
  898. a - b
  899. testint(1/(a+b*sin x+cos x),x);
  900. x x
  901. tan(---)*a - tan(---) + b
  902. 2 2 2 2
  903. 2*sqrt(a - b - 1)*atan(---------------------------)
  904. 2 2
  905. sqrt(a - b - 1)
  906. -------------------------------------------------------
  907. 2 2
  908. a - b - 1
  909. testint(x**2*sin z**2,x);
  910. 2 2
  911. ( - 6*cos(a + b*x)*sin(a + b*x)*b *x + 3*cos(a + b*x)*sin(a + b*x)
  912. 2 3 3 3
  913. + 6*sin(a + b*x) *b*x + 9*a + 2*b *x - 3*b*x)/(12*b )
  914. testint(cos x*cos(2*x),x);
  915. - cos(2*x)*sin(x) + 2*cos(x)*sin(2*x)
  916. ----------------------------------------
  917. 3
  918. testint(x**2*cos z**2,x);
  919. 2 2
  920. (6*cos(a + b*x)*sin(a + b*x)*b *x - 3*cos(a + b*x)*sin(a + b*x)
  921. 2 3 3 3
  922. - 6*sin(a + b*x) *b*x + 2*b *x + 3*b*x)/(12*b )
  923. testint(1/tan x**3,x);
  924. 2 2 2
  925. log(tan(x) + 1)*tan(x) - 2*log(tan(x))*tan(x) - 1
  926. ------------------------------------------------------
  927. 2
  928. 2*tan(x)
  929. testint(x**3*tan(x)**4,x);
  930. 2 2 3 3 2 2
  931. (48*int(tan(x)*x ,x) - 6*log(tan(x) + 1) + 4*tan(x) *x - 6*tan(x) *x
  932. 3 4 2
  933. - 12*tan(x)*x + 12*tan(x)*x + 3*x - 6*x )/12
  934. testint(x**3*tan(x)**6,x);
  935. 2 2 5 3 4 2
  936. ( - 276*int(tan(x)*x ,x) + 60*log(tan(x) + 1) + 12*tan(x) *x - 9*tan(x) *x
  937. 3 3 3 2 2 2 3
  938. - 20*tan(x) *x + 6*tan(x) *x + 48*tan(x) *x - 3*tan(x) + 60*tan(x)*x
  939. 4 2
  940. - 114*tan(x)*x - 15*x + 57*x )/60
  941. testint(x*tan(x)**2,x);
  942. 2 2
  943. - log(tan(x) + 1) + 2*tan(x)*x - x
  944. ---------------------------------------
  945. 2
  946. testint(sin(2*x)*cos(3*x),x);
  947. 2*cos(3*x)*cos(2*x) + 3*sin(3*x)*sin(2*x)
  948. -------------------------------------------
  949. 5
  950. testint(sin x**2*cos x**2,x);
  951. 3
  952. 2*cos(x)*sin(x) - cos(x)*sin(x) + x
  953. --------------------------------------
  954. 8
  955. testint(1/(sin x**2*cos x**2),x);
  956. 2
  957. 2*sin(x) - 1
  958. ---------------
  959. cos(x)*sin(x)
  960. testint(d**x*sin x,x);
  961. x
  962. d *( - cos(x) + log(d)*sin(x))
  963. --------------------------------
  964. 2
  965. log(d) + 1
  966. testint(d**x*cos x,x);
  967. x
  968. d *(cos(x)*log(d) + sin(x))
  969. -----------------------------
  970. 2
  971. log(d) + 1
  972. testint(x*d**x*sin x,x);
  973. x 2 3
  974. (d *( - cos(x)*log(d) *x + 2*cos(x)*log(d) - cos(x)*x + log(d) *sin(x)*x
  975. 2 4 2
  976. - log(d) *sin(x) + log(d)*sin(x)*x + sin(x)))/(log(d) + 2*log(d) + 1)
  977. testint(x*d**x*cos x,x);
  978. x 3 2
  979. (d *(cos(x)*log(d) *x - cos(x)*log(d) + cos(x)*log(d)*x + cos(x)
  980. 2 4 2
  981. + log(d) *sin(x)*x - 2*log(d)*sin(x) + sin(x)*x))/(log(d) + 2*log(d) + 1
  982. )
  983. testint(x**2*d**x*sin x,x);
  984. x 4 2 3 2 2
  985. (d *( - cos(x)*log(d) *x + 4*cos(x)*log(d) *x - 2*cos(x)*log(d) *x
  986. 2 2
  987. - 6*cos(x)*log(d) + 4*cos(x)*log(d)*x - cos(x)*x + 2*cos(x)
  988. 5 2 4 3 2
  989. + log(d) *sin(x)*x - 2*log(d) *sin(x)*x + 2*log(d) *sin(x)*x
  990. 3 2
  991. + 2*log(d) *sin(x) + log(d)*sin(x)*x - 6*log(d)*sin(x) + 2*sin(x)*x))/(
  992. 6 4 2
  993. log(d) + 3*log(d) + 3*log(d) + 1)
  994. testint(x**2*d**x*cos x,x);
  995. x 5 2 4 3 2
  996. (d *(cos(x)*log(d) *x - 2*cos(x)*log(d) *x + 2*cos(x)*log(d) *x
  997. 3 2
  998. + 2*cos(x)*log(d) + cos(x)*log(d)*x - 6*cos(x)*log(d) + 2*cos(x)*x
  999. 4 2 3 2 2
  1000. + log(d) *sin(x)*x - 4*log(d) *sin(x)*x + 2*log(d) *sin(x)*x
  1001. 2 2 6
  1002. + 6*log(d) *sin(x) - 4*log(d)*sin(x)*x + sin(x)*x - 2*sin(x)))/(log(d)
  1003. 4 2
  1004. + 3*log(d) + 3*log(d) + 1)
  1005. testint(x**3*d**x*sin x,x);
  1006. x 6 3 5 2 4 3
  1007. (d *( - cos(x)*log(d) *x + 6*cos(x)*log(d) *x - 3*cos(x)*log(d) *x
  1008. 4 3 2 3
  1009. - 18*cos(x)*log(d) *x + 12*cos(x)*log(d) *x + 24*cos(x)*log(d)
  1010. 2 3 2 2
  1011. - 3*cos(x)*log(d) *x - 12*cos(x)*log(d) *x + 6*cos(x)*log(d)*x
  1012. 3 7 3
  1013. - 24*cos(x)*log(d) - cos(x)*x + 6*cos(x)*x + log(d) *sin(x)*x
  1014. 6 2 5 3 5
  1015. - 3*log(d) *sin(x)*x + 3*log(d) *sin(x)*x + 6*log(d) *sin(x)*x
  1016. 4 2 4 3 3
  1017. - 3*log(d) *sin(x)*x - 6*log(d) *sin(x) + 3*log(d) *sin(x)*x
  1018. 3 2 2 2
  1019. - 12*log(d) *sin(x)*x + 3*log(d) *sin(x)*x + 36*log(d) *sin(x)
  1020. 3 2
  1021. + log(d)*sin(x)*x - 18*log(d)*sin(x)*x + 3*sin(x)*x - 6*sin(x)))/(
  1022. 8 6 4 2
  1023. log(d) + 4*log(d) + 6*log(d) + 4*log(d) + 1)
  1024. testint(x**3*d**x*cos x,x);
  1025. x 7 3 6 2 5 3
  1026. (d *(cos(x)*log(d) *x - 3*cos(x)*log(d) *x + 3*cos(x)*log(d) *x
  1027. 5 4 2 4
  1028. + 6*cos(x)*log(d) *x - 3*cos(x)*log(d) *x - 6*cos(x)*log(d)
  1029. 3 3 3 2 2
  1030. + 3*cos(x)*log(d) *x - 12*cos(x)*log(d) *x + 3*cos(x)*log(d) *x
  1031. 2 3 2
  1032. + 36*cos(x)*log(d) + cos(x)*log(d)*x - 18*cos(x)*log(d)*x + 3*cos(x)*x
  1033. 6 3 5 2 4 3
  1034. - 6*cos(x) + log(d) *sin(x)*x - 6*log(d) *sin(x)*x + 3*log(d) *sin(x)*x
  1035. 4 3 2 3
  1036. + 18*log(d) *sin(x)*x - 12*log(d) *sin(x)*x - 24*log(d) *sin(x)
  1037. 2 3 2 2
  1038. + 3*log(d) *sin(x)*x + 12*log(d) *sin(x)*x - 6*log(d)*sin(x)*x
  1039. 3 8 6
  1040. + 24*log(d)*sin(x) + sin(x)*x - 6*sin(x)*x))/(log(d) + 4*log(d)
  1041. 4 2
  1042. + 6*log(d) + 4*log(d) + 1)
  1043. testint(sin x*sin(2*x)*sin(3*x),x);
  1044. ( - cos(3*x)*cos(2*x)*cos(x) + 6*cos(3*x)*cos(2*x)*sin(x)*x
  1045. + 6*cos(3*x)*cos(x)*sin(2*x)*x - 8*cos(3*x)*sin(2*x)*sin(x)
  1046. - 6*cos(2*x)*cos(x)*sin(3*x)*x + 3*cos(2*x)*sin(3*x)*sin(x)
  1047. + 6*sin(3*x)*sin(2*x)*sin(x)*x)/24
  1048. testint(cos x*cos(2*x)*cos(3*x),x);
  1049. (6*cos(3*x)*cos(2*x)*cos(x)*x + 8*cos(3*x)*cos(2*x)*sin(x)
  1050. + 5*cos(3*x)*cos(x)*sin(2*x) - 6*cos(3*x)*sin(2*x)*sin(x)*x
  1051. + 6*cos(2*x)*sin(3*x)*sin(x)*x + 6*cos(x)*sin(3*x)*sin(2*x)*x
  1052. + 9*sin(3*x)*sin(2*x)*sin(x))/24
  1053. testint(sin(x*kx)**3*x**2,x);
  1054. 2 2 2 2 2 2
  1055. ( - 9*cos(kx*x)*sin(kx*x) *kx *x + 2*cos(kx*x)*sin(kx*x) - 18*cos(kx*x)*kx *x
  1056. 3 3
  1057. + 40*cos(kx*x) + 6*sin(kx*x) *kx*x + 36*sin(kx*x)*kx*x + 16)/(27*kx )
  1058. testint(x*cos(xi/sin(x))*cos(x)/sin(x)**2,x);
  1059. xi
  1060. cos(--------)*cos(x)*x
  1061. sin(x)
  1062. int(------------------------,x)
  1063. 2
  1064. sin(x)
  1065. % Mixed angles and half angles.
  1066. int(cos(x)/(sin(x)*tan(x/2)),x);
  1067. x
  1068. - (tan(---)*x + 1)
  1069. 2
  1070. ---------------------
  1071. x
  1072. tan(---)
  1073. 2
  1074. % This integral produces a messy result because the code for
  1075. % converting half angle tans to sin and cos is not effective enough.
  1076. testint(sin(a*x)/(b+c*sin(a*x))**2,x);
  1077. a*x
  1078. tan(-----)*b + c
  1079. 2 2 2 2
  1080. ( - 2*sqrt(b - c )*atan(------------------)*sin(a*x)*c
  1081. 2 2
  1082. sqrt(b - c )
  1083. a*x
  1084. tan(-----)*b + c
  1085. 2 2 2 3 2
  1086. - 2*sqrt(b - c )*atan(------------------)*b*c - cos(a*x)*b + cos(a*x)*b*c )/
  1087. 2 2
  1088. sqrt(b - c )
  1089. 4 2 3 5 5 3 2 4
  1090. (a*(sin(a*x)*b *c - 2*sin(a*x)*b *c + sin(a*x)*c + b - 2*b *c + b*c ))
  1091. % Examples involving logarithms and circular functions.
  1092. testint(sin log x,x);
  1093. x*( - cos(log(x)) + sin(log(x)))
  1094. ----------------------------------
  1095. 2
  1096. testint(cos log x,x);
  1097. x*(cos(log(x)) + sin(log(x)))
  1098. -------------------------------
  1099. 2
  1100. % Examples involving exponentials.
  1101. testint(e**x,x);
  1102. x
  1103. e
  1104. % 2.01 #3;
  1105. testint(a**x,x);
  1106. x
  1107. a
  1108. --------
  1109. log(a)
  1110. % 2.01 #4;
  1111. testint(e**(a*x),x);
  1112. a*x
  1113. e
  1114. ------
  1115. a
  1116. testint(e**(a*x)/x,x);
  1117. ei(a*x)
  1118. testint(1/(a+b*e**(m*x)),x);
  1119. m*x
  1120. - log(e *b + a) + m*x
  1121. --------------------------
  1122. a*m
  1123. testint(e**(2*x)/(1+e**x),x);
  1124. x x
  1125. e - log(e + 1)
  1126. testint(e**(2*x)*e**(a*x),x);
  1127. a*x + 2*x
  1128. e
  1129. ------------
  1130. a + 2
  1131. testint(1/(a*e**(m*x)+b*e**(-m*x)),x);
  1132. m*x
  1133. e *a
  1134. sqrt(b)*sqrt(a)*atan(-----------------)
  1135. sqrt(b)*sqrt(a)
  1136. -----------------------------------------
  1137. a*b*m
  1138. testint(x*e**(a*x),x);
  1139. a*x
  1140. e *(a*x - 1)
  1141. ----------------
  1142. 2
  1143. a
  1144. testint(x**20*e**x,x);
  1145. x 20 19 18 17 16 15 14
  1146. e *(x - 20*x + 380*x - 6840*x + 116280*x - 1860480*x + 27907200*x
  1147. 13 12 11 10
  1148. - 390700800*x + 5079110400*x - 60949324800*x + 670442572800*x
  1149. 9 8 7
  1150. - 6704425728000*x + 60339831552000*x - 482718652416000*x
  1151. 6 5 4
  1152. + 3379030566912000*x - 20274183401472000*x + 101370917007360000*x
  1153. 3 2
  1154. - 405483668029440000*x + 1216451004088320000*x - 2432902008176640000*x
  1155. + 2432902008176640000)
  1156. testint(a**x/b**x,x);
  1157. x
  1158. a
  1159. ----------------------
  1160. x
  1161. b *(log(a) - log(b))
  1162. testint(a**x*b**x,x);
  1163. x x
  1164. b *a
  1165. -----------------
  1166. log(a) + log(b)
  1167. testint(a**x/x**2,x);
  1168. x
  1169. ei(log(a)*x)*log(a)*x - a
  1170. ----------------------------
  1171. x
  1172. testint(x*a**x/(1+b*x)**2,x);
  1173. x
  1174. a *x
  1175. int(-----------------------------------------------------------,x)*(log(a) - b)
  1176. 2 2 3 2 2
  1177. log(a)*b *x + 2*log(a)*b*x + log(a) - b *x - 2*b *x - b
  1178. testint(x*e**(a*x)/(1+a*x)**2,x);
  1179. a*x
  1180. e
  1181. --------------
  1182. 2
  1183. a *(a*x + 1)
  1184. testint(x*k**(x**2),x);
  1185. 2
  1186. x
  1187. k
  1188. ----------
  1189. 2*log(k)
  1190. testint(e**(x**2),x);
  1191. - sqrt(pi)*erf(i*x)*i
  1192. ------------------------
  1193. 2
  1194. testint(x*e**(x**2),x);
  1195. 2
  1196. x
  1197. e
  1198. -----
  1199. 2
  1200. testint((x+1)*e**(1/x)/x**4,x);
  1201. 1/x 2
  1202. e *( - x + x - 1)
  1203. ----------------------
  1204. 2
  1205. x
  1206. testint((2*x**3+x)*(e**(x**2))**2*e**(1-x*e**(x**2))/(1-x*e**(x**2))**2,
  1207. x);
  1208. - e
  1209. --------------------
  1210. 2
  1211. x 2
  1212. e *x x
  1213. e *(e *x - 1)
  1214. testint(e**(e**(e**(e**x))),x);
  1215. x
  1216. e
  1217. e
  1218. e
  1219. int(e ,x)
  1220. % Examples involving exponentials and logarithms.
  1221. testint(e**x*log x,x);
  1222. x
  1223. - ei(x) + e *log(x)
  1224. testint(x*e**x*log x,x);
  1225. x x x
  1226. ei(x) + e *log(x)*x - e *log(x) - e
  1227. testint(e**(2*x)*log(e**x),x);
  1228. 2*x
  1229. e *(2*x - 1)
  1230. ----------------
  1231. 4
  1232. % Examples involving square roots.
  1233. testint(sqrt(2)*x**2 + 2*x,x);
  1234. 2
  1235. x *(sqrt(2)*x + 3)
  1236. --------------------
  1237. 3
  1238. testint(log x/sqrt(a*x+b),x);
  1239. (2*(sqrt(a*x + b)*log(x) - 2*sqrt(a*x + b)
  1240. + 2*sqrt(b)*log( - sqrt(a*x + b) - sqrt(b)) - sqrt(b)*log(x)))/a
  1241. u:=sqrt(a+b*x);
  1242. u := sqrt(a + b*x)
  1243. v:=sqrt(c+d*x);
  1244. v := sqrt(c + d*x)
  1245. testint(u*v,x);
  1246. 2 2
  1247. (sqrt(c + d*x)*sqrt(a + b*x)*a*b*d + sqrt(c + d*x)*sqrt(a + b*x)*b *c*d
  1248. 2 2
  1249. + 2*sqrt(c + d*x)*sqrt(a + b*x)*b *d *x
  1250. sqrt(d)*sqrt(a + b*x) + sqrt(b)*sqrt(c + d*x) 2 2
  1251. - sqrt(d)*sqrt(b)*log(-----------------------------------------------)*a *d +
  1252. sqrt(a*d - b*c)
  1253. sqrt(d)*sqrt(a + b*x) + sqrt(b)*sqrt(c + d*x)
  1254. 2*sqrt(d)*sqrt(b)*log(-----------------------------------------------)*a*b*c*d
  1255. sqrt(a*d - b*c)
  1256. sqrt(d)*sqrt(a + b*x) + sqrt(b)*sqrt(c + d*x) 2 2
  1257. - sqrt(d)*sqrt(b)*log(-----------------------------------------------)*b *c )/
  1258. sqrt(a*d - b*c)
  1259. 2 2
  1260. (4*b *d )
  1261. testint(u,x);
  1262. 2*sqrt(a + b*x)*(a + b*x)
  1263. ---------------------------
  1264. 3*b
  1265. testint(x*u,x);
  1266. 2 2 2
  1267. 2*sqrt(a + b*x)*( - 2*a + a*b*x + 3*b *x )
  1268. ---------------------------------------------
  1269. 2
  1270. 15*b
  1271. testint(x**2*u,x);
  1272. 3 2 2 2 3 3
  1273. 2*sqrt(a + b*x)*(8*a - 4*a *b*x + 3*a*b *x + 15*b *x )
  1274. ----------------------------------------------------------
  1275. 3
  1276. 105*b
  1277. testint(u/x,x);
  1278. 2*sqrt(a + b*x) - sqrt(a)*log( - sqrt(a + b*x) - sqrt(a))
  1279. + sqrt(a)*log( - sqrt(a + b*x) + sqrt(a))
  1280. testint(u/x**2,x);
  1281. ( - 2*sqrt(a + b*x)*a - sqrt(a)*log( - sqrt(a + b*x) - sqrt(a))*b*x
  1282. + sqrt(a)*log( - sqrt(a + b*x) + sqrt(a))*b*x)/(2*a*x)
  1283. testint(1/u,x);
  1284. 2*sqrt(a + b*x)
  1285. -----------------
  1286. b
  1287. testint(x/u,x);
  1288. 2*sqrt(a + b*x)*( - 2*a + b*x)
  1289. --------------------------------
  1290. 2
  1291. 3*b
  1292. testint(x**2/u,x);
  1293. 2 2 2
  1294. 2*sqrt(a + b*x)*(8*a - 4*a*b*x + 3*b *x )
  1295. --------------------------------------------
  1296. 3
  1297. 15*b
  1298. testint(1/(x*u),x);
  1299. sqrt(a)*( - log( - sqrt(a + b*x) - sqrt(a)) + log( - sqrt(a + b*x) + sqrt(a)))
  1300. --------------------------------------------------------------------------------
  1301. a
  1302. testint(1/(x**2*u),x);
  1303. ( - 2*sqrt(a + b*x)*a + sqrt(a)*log( - sqrt(a + b*x) - sqrt(a))*b*x
  1304. 2
  1305. - sqrt(a)*log( - sqrt(a + b*x) + sqrt(a))*b*x)/(2*a *x)
  1306. testint(u**p,x);
  1307. p/2
  1308. 2*(a + b*x) *(a + b*x)
  1309. --------------------------
  1310. b*(p + 2)
  1311. testint(x*u**p,x);
  1312. p/2 2 2 2 2 2
  1313. 2*(a + b*x) *( - 2*a + a*b*p*x + b *p*x + 2*b *x )
  1314. --------------------------------------------------------
  1315. 2 2
  1316. b *(p + 6*p + 8)
  1317. testint(atan((-sqrt(2)+2*x)/sqrt(2)),x);
  1318. sqrt(2) - 2*x sqrt(2) - 2*x
  1319. (2*sqrt(2)*atan(---------------) - 4*atan(---------------)*x
  1320. sqrt(2) sqrt(2)
  1321. 2
  1322. - sqrt(2)*log(sqrt(2)*x - x - 1))/4
  1323. testint(1/sqrt(x**2-1),x);
  1324. 2
  1325. log(sqrt(x - 1) + x)
  1326. testint(sqrt(x+1)*sqrt x,x);
  1327. 2*sqrt(x)*sqrt(x + 1)*x + sqrt(x)*sqrt(x + 1) - log(sqrt(x + 1) + sqrt(x))
  1328. ----------------------------------------------------------------------------
  1329. 4
  1330. testint(sin(sqrt x),x);
  1331. 2*( - sqrt(x)*cos(sqrt(x)) + sin(sqrt(x)))
  1332. testint(x*(1-x^2)^(-9/4),x);
  1333. 2 1/4
  1334. - 2*( - x + 1)
  1335. ----------------------------
  1336. 2 2
  1337. 5*sqrt( - x + 1)*(x - 1)
  1338. testint(x/sqrt(1-x^4),x);
  1339. 2
  1340. asin(x )
  1341. ----------
  1342. 2
  1343. testint(1/(x*sqrt(1+x^4)),x);
  1344. 4 2 4 2
  1345. log(sqrt(x + 1) + x - 1) - log(sqrt(x + 1) + x + 1)
  1346. ---------------------------------------------------------
  1347. 2
  1348. testint(x/sqrt(1+x^2+x^4),x);
  1349. 4 2 2
  1350. 2*sqrt(x + x + 1) + 2*x + 1
  1351. log(--------------------------------)
  1352. sqrt(3)
  1353. ---------------------------------------
  1354. 2
  1355. testint(1/(x*sqrt(x^2-1-x^4)),x);
  1356. 4 2
  1357. sqrt( - x + x - 1)
  1358. - int(----------------------,x)
  1359. 5 3
  1360. x - x + x
  1361. % Examples from James Davenport's thesis:
  1362. testint(1/sqrt(x**2-1)+10/sqrt(x**2-4),x);
  1363. 2
  1364. 2 sqrt(x - 4) + x
  1365. log(sqrt(x - 1) + x) + 10*log(------------------)
  1366. 2
  1367. % p. 173
  1368. testint(sqrt(x+sqrt(x**2+a**2))/x,x);
  1369. 2 2
  1370. sqrt(sqrt(a + x ) + x)
  1371. int(-------------------------,x)
  1372. x
  1373. % Examples generated by differentiating various functions.
  1374. testint(df(sqrt(1+x**2)/(1-x),x),x);
  1375. 2
  1376. - sqrt(x + 1)
  1377. -----------------
  1378. x - 1
  1379. testint(df(log(x+sqrt(1+x**2)),x),x);
  1380. 2
  1381. log(sqrt(x + 1) + x)
  1382. testint(df(sqrt(x)+sqrt(x+1)+sqrt(x+2),x),x);
  1383. sqrt(x + 2) + sqrt(x + 1) + sqrt(x)
  1384. testint(df(sqrt(x**5-2*x+1)-sqrt(x**3+1),x),x);
  1385. 5 3
  1386. sqrt(x - 2*x + 1) - sqrt(x + 1)
  1387. % Another such example from James Davenport's thesis (p. 146).
  1388. % It contains a point of order 3, which is found by use of Mazur's
  1389. % bound on the torsion of elliptic curves over the rationals;
  1390. testint(df(log(1+sqrt(x**3+1)),x),x);
  1391. 3
  1392. sqrt(x + 1)
  1393. 3*( - int(--------------,x) + log(x))
  1394. 4
  1395. x + x
  1396. ---------------------------------------
  1397. 2
  1398. % Examples quoted by Joel Moses:
  1399. testint(1/sqrt(2*h*r**2-alpha**2),r);
  1400. 2 2
  1401. sqrt( - alpha + 2*h*r ) + sqrt(h)*sqrt(2)*r
  1402. sqrt(h)*sqrt(2)*log(----------------------------------------------)
  1403. alpha
  1404. ---------------------------------------------------------------------
  1405. 2*h
  1406. testint(1/(r*sqrt(2*h*r**2-alpha**2-epsilon**2)),r);
  1407. 2 2
  1408. (2*sqrt(alpha + epsilon )
  1409. 2 2 2
  1410. sqrt( - alpha - epsilon + 2*h*r ) + sqrt(h)*sqrt(2)*r 2
  1411. *atan(---------------------------------------------------------))/(alpha
  1412. 2 2
  1413. sqrt(alpha + epsilon )
  1414. 2
  1415. + epsilon )
  1416. testint(1/(r*sqrt(2*h*r**2-alpha**2-2*k*r)),r);
  1417. 2 2
  1418. sqrt(h)*sqrt( - alpha + 2*h*r - 2*k*r)*sqrt(2) + 2*h*r
  1419. 2*atan(----------------------------------------------------------)
  1420. sqrt(h)*sqrt(2)*alpha
  1421. --------------------------------------------------------------------
  1422. alpha
  1423. testint(1/(r*sqrt(2*h*r**2-alpha**2-epsilon**2-2*k*r)),r);
  1424. 2 2
  1425. (2*sqrt(alpha + epsilon )
  1426. 2 2 2
  1427. sqrt(h)*sqrt( - alpha - epsilon + 2*h*r - 2*k*r)*sqrt(2) + 2*h*r
  1428. *atan(---------------------------------------------------------------------))/(
  1429. 2 2
  1430. sqrt(h)*sqrt(alpha + epsilon )*sqrt(2)
  1431. 2 2
  1432. alpha + epsilon )
  1433. testint(r/sqrt(2*e*r**2-alpha**2),r);
  1434. 2 2
  1435. sqrt( - alpha + 2*e*r )
  1436. --------------------------
  1437. 2*e
  1438. testint(r/sqrt(2*e*r**2-alpha**2-epsilon**2),r);
  1439. 2 2 2
  1440. sqrt( - alpha + 2*e*r - epsilon )
  1441. -------------------------------------
  1442. 2*e
  1443. testint(r/sqrt(2*e*r**2-alpha**2-2*k*r**4),r);
  1444. 2
  1445. e*i - 2*i*k*r
  1446. sqrt(k)*sqrt(2)*asinh(--------------------------)*i
  1447. 2 2
  1448. sqrt( - 2*alpha *k + e )
  1449. -----------------------------------------------------
  1450. 4*k
  1451. testint(r/sqrt(2*e*r**2-alpha**2-2*k*r),r);
  1452. 2 2
  1453. (2*sqrt( - alpha + 2*e*r - 2*k*r)*e + sqrt(e)*sqrt(2)
  1454. 2 2
  1455. sqrt(e)*sqrt( - alpha + 2*e*r - 2*k*r)*sqrt(2) + 2*e*r - k 2
  1456. *log(--------------------------------------------------------------)*k)/(4*e )
  1457. 2 2
  1458. sqrt(2*alpha *e + k )
  1459. testint(1/(r*sqrt(2*h*r**2-alpha**2-2*k*r**4)),r);
  1460. 2 2 4
  1461. sqrt( - alpha + 2*h*r - 2*k*r )
  1462. - int(-----------------------------------,r)
  1463. 2 3 5
  1464. alpha *r - 2*h*r + 2*k*r
  1465. testint(1/(r*sqrt(2*h*r**2-alpha**2-epsilon**2-2*k*r**4)),r);
  1466. 2 2 2 4
  1467. sqrt( - alpha - epsilon + 2*h*r - 2*k*r )
  1468. - int(----------------------------------------------,r)
  1469. 2 2 3 5
  1470. alpha *r + epsilon *r - 2*h*r + 2*k*r
  1471. Comment many of these integrals used to require Steve Harrington's
  1472. code to evaluate. They originated in Novosibirsk as examples
  1473. of using Analytik. There are still a few examples that could
  1474. be evaluated using better heuristics;
  1475. testint(a*sin(3*x+5)**2*cos(3*x+5),x);
  1476. 3
  1477. sin(3*x + 5) *a
  1478. -----------------
  1479. 9
  1480. testint(log(x**2)/x**3,x);
  1481. 2
  1482. - (log(x ) + 1)
  1483. ------------------
  1484. 2
  1485. 2*x
  1486. testint(x*sin(x+a),x);
  1487. - cos(a + x)*x + sin(a + x)
  1488. testint((log(x)*(1-x)-1)/(e**x*log(x)**2),x);
  1489. x
  1490. -----------
  1491. x
  1492. e *log(x)
  1493. testint(x**3*(a*x**2+b)**(-1),x);
  1494. 2 2
  1495. - log(a*x + b)*b + a*x
  1496. ---------------------------
  1497. 2
  1498. 2*a
  1499. testint(x**(1/2)*(x+1)**(-7/2),x);
  1500. 2 2
  1501. (2*( - 2*sqrt(x + 1)*x - 4*sqrt(x + 1)*x - 2*sqrt(x + 1) + 2*sqrt(x)*x
  1502. 2
  1503. + 5*sqrt(x)*x))/(15*sqrt(x + 1)*(x + 2*x + 1))
  1504. testint(x**(-1)*(x+1)**(-1),x);
  1505. - log(x + 1) + log(x)
  1506. testint(x**(-1/2)*(2*x-1)**(-1),x);
  1507. sqrt(2)*(log(2*sqrt(x) - sqrt(2)) - log(2*sqrt(x) + sqrt(2)))
  1508. ---------------------------------------------------------------
  1509. 2
  1510. testint((x**2+1)*x**(1/2),x);
  1511. 2
  1512. 2*sqrt(x)*x*(3*x + 7)
  1513. ------------------------
  1514. 21
  1515. testint(x**(-1)*(x-a)**(1/3),x);
  1516. 1/6 1/6
  1517. 2*( - a + x) - a *sqrt(3)
  1518. ( - 2*sqrt(3)*atan(--------------------------------)*a
  1519. 1/6
  1520. a
  1521. 1/6 1/6
  1522. 2*( - a + x) + a *sqrt(3) 2/3 1/3
  1523. + 2*sqrt(3)*atan(--------------------------------)*a + 6*a *( - a + x)
  1524. 1/6
  1525. a
  1526. 1/3 1/3
  1527. - 2*log(( - a + x) + a )*a
  1528. 1/6 1/6 1/3 1/3
  1529. + log( - a *( - a + x) *sqrt(3) + ( - a + x) + a )*a
  1530. 1/6 1/6 1/3 1/3 2/3
  1531. + log(a *( - a + x) *sqrt(3) + ( - a + x) + a )*a)/(2*a )
  1532. testint(x*sinh(x),x);
  1533. cosh(x)*x - sinh(x)
  1534. testint(x*cosh(x),x);
  1535. - cosh(x) + sinh(x)*x
  1536. testint(sinh(2*x)/cosh(2*x),x);
  1537. log(cosh(2*x))
  1538. ----------------
  1539. 2
  1540. testint((i*eps*sinh x-1)/(eps*i*cosh x+i*a-x),x);
  1541. log(cosh(x)*eps*i + a*i - x)
  1542. testint(sin(2*x+3)*cos(x)**2,x);
  1543. 2
  1544. ( - 4*cos(2*x + 3)*cos(x)*sin(x)*x + 2*cos(2*x + 3)*sin(x) - 3*cos(2*x + 3)
  1545. 2
  1546. - 4*sin(2*x + 3)*sin(x) *x + 2*sin(2*x + 3)*x + 3)/8
  1547. testint(x*atan(x),x);
  1548. 2
  1549. atan(x)*x + atan(x) - x
  1550. --------------------------
  1551. 2
  1552. testint(x*acot(x),x);
  1553. 2
  1554. acot(x)*x + acot(x) + x
  1555. --------------------------
  1556. 2
  1557. testint(x*log(x**2+a),x);
  1558. 2 2 2 2
  1559. log(a + x )*a + log(a + x )*x - x
  1560. -------------------------------------
  1561. 2
  1562. testint(sin(x+a)*cos(x),x);
  1563. - cos(a + x)*cos(x) - cos(a + x)*sin(x)*x + cos(x)*sin(a + x)*x
  1564. ------------------------------------------------------------------
  1565. 2
  1566. testint(cos(x+a)*sin(x),x);
  1567. - cos(a + x)*cos(x) + cos(a + x)*sin(x)*x - cos(x)*sin(a + x)*x
  1568. ------------------------------------------------------------------
  1569. 2
  1570. testint((1+sin(x))**(1/2),x);
  1571. int(sqrt(sin(x) + 1),x)
  1572. testint((1-sin(x))**(1/2),x);
  1573. int(sqrt( - sin(x) + 1),x)
  1574. testint((1+cos(x))**(1/2),x);
  1575. int(sqrt(cos(x) + 1),x)
  1576. testint((1-cos(x))**(1/2),x);
  1577. int(sqrt( - cos(x) + 1),x)
  1578. testint(1/(x**(1/2)-(x-1)**(1/2)),x);
  1579. 2*(sqrt(x - 1)*x - sqrt(x - 1) + sqrt(x)*x)
  1580. ---------------------------------------------
  1581. 3
  1582. testint(1/(1-(x+1)**(1/2)),x);
  1583. - 2*(sqrt(x + 1) + log(sqrt(x + 1) - 1))
  1584. testint(x/(x**4+36)**(1/2),x);
  1585. 4 2
  1586. sqrt(x + 36) + x
  1587. log(--------------------)
  1588. 6
  1589. ---------------------------
  1590. 2
  1591. testint(1/(x**(1/3)+x**(1/2)),x);
  1592. 1/6 1/3 1/6
  1593. 6*x - 3*x + 2*sqrt(x) - 6*log(x + 1)
  1594. testint(log(2+3*x**2),x);
  1595. 3*x 2
  1596. 2*sqrt(6)*atan(---------) + 3*log(3*x + 2)*x - 6*x
  1597. sqrt(6)
  1598. -----------------------------------------------------
  1599. 3
  1600. testint(cot(x),x);
  1601. x 2 x
  1602. - log(tan(---) + 1) + log(tan(---))
  1603. 2 2
  1604. testint(cot x**4,x);
  1605. 3
  1606. - cot(x) + 3*cot(x) + 3*x
  1607. -----------------------------
  1608. 3
  1609. testint(tanh(x),x);
  1610. 2*x
  1611. log(e + 1) - x
  1612. testint(coth(x),x);
  1613. x x
  1614. log(e - 1) + log(e + 1) - x
  1615. testint(b**x,x);
  1616. x
  1617. b
  1618. --------
  1619. log(b)
  1620. testint((x**4+x**(-4)+2)**(1/2),x);
  1621. 4
  1622. x - 3
  1623. --------
  1624. 3*x
  1625. testint((2*x+1)/(3*x+2),x);
  1626. - log(3*x + 2) + 6*x
  1627. -----------------------
  1628. 9
  1629. testint(x*log(x+(x**2+1)**(1/2)),x);
  1630. 2 2 2 2
  1631. - sqrt(x + 1)*x + 2*log(sqrt(x + 1) + x)*x + log(sqrt(x + 1) + x)
  1632. ------------------------------------------------------------------------
  1633. 4
  1634. testint(x*(e**x*sin(x)+1)**2,x);
  1635. 2*x 2*x x x
  1636. ( - 2*e *cos(x)*sin(x)*x + e *cos(x)*sin(x) - 8*e *cos(x)*x + 8*e *cos(x)
  1637. 2*x 2 2*x 2*x x 2
  1638. + 2*e *sin(x) *x + e *x - e + 8*e *sin(x)*x + 4*x )/8
  1639. testint(x*e**x*cos(x),x);
  1640. x
  1641. e *(cos(x)*x + sin(x)*x - sin(x))
  1642. -----------------------------------
  1643. 2
  1644. Comment the following set came from Herbert Stoyan;
  1645. testint(1/(x-3)**4,x);
  1646. - 1
  1647. ---------------------------
  1648. 3 2
  1649. 3*(x - 9*x + 27*x - 27)
  1650. testint(x/(x**3-1),x);
  1651. 2*x + 1 2
  1652. 2*sqrt(3)*atan(---------) - log(x + x + 1) + 2*log(x - 1)
  1653. sqrt(3)
  1654. ------------------------------------------------------------
  1655. 6
  1656. testint(x/(x**4-1),x);
  1657. 2
  1658. - log(x + 1) + log(x - 1) + log(x + 1)
  1659. ------------------------------------------
  1660. 4
  1661. testint(log(x)*(x**3+1)/(x**4+2),x);
  1662. log(x) log(x) 2
  1663. - 4*int(----------,x) + 2*int(--------,x) + log(x)
  1664. 5 4
  1665. x + 2*x x + 2
  1666. ------------------------------------------------------
  1667. 2
  1668. testint(log(x)+log(x+1)+log(x+2),x);
  1669. log(x + 2)*x + 2*log(x + 2) + log(x + 1)*x + log(x + 1) + log(x)*x - 3*x
  1670. testint(1/(x**3+5),x);
  1671. 1/3
  1672. 1/3 5 - 2*x 2/3 1/3 2
  1673. (5 *( - 2*sqrt(3)*atan(--------------) - log(5 - 5 *x + x )
  1674. 1/3
  1675. sqrt(3)*5
  1676. 1/3
  1677. + 2*log(5 + x)))/30
  1678. testint(1/sqrt(1+x**2),x);
  1679. 2
  1680. log(sqrt(x + 1) + x)
  1681. testint(sqrt(x**2+3),x);
  1682. 2
  1683. 2 sqrt(x + 3) + x
  1684. sqrt(x + 3)*x + 3*log(------------------)
  1685. sqrt(3)
  1686. --------------------------------------------
  1687. 2
  1688. testint(x/(x+1)**2,x);
  1689. log(x + 1)*x + log(x + 1) - x
  1690. -------------------------------
  1691. x + 1
  1692. COMMENT The following integrals were used among others as a test of
  1693. Moses' SIN program;
  1694. testint(asin x,x);
  1695. 2
  1696. asin(x)*x + sqrt( - x + 1)
  1697. testint(x**2*asin x,x);
  1698. 2
  1699. int(asin(x)*x ,x)
  1700. testint(sec x**2/(1+sec x**2-3*tan x),x);
  1701. x x
  1702. log( - sqrt(5) + 2*tan(---) + 1) - log( - sqrt(2) + tan(---) + 1)
  1703. 2 2
  1704. x x
  1705. + log(sqrt(5) + 2*tan(---) + 1) - log(sqrt(2) + tan(---) + 1)
  1706. 2 2
  1707. testint(1/sec x**2,x);
  1708. cos(x)*sin(x) + x
  1709. -------------------
  1710. 2
  1711. testint((5*x**2-3*x-2)/(x**2*(x-2)),x);
  1712. 3*log(x - 2)*x + 2*log(x)*x - 1
  1713. ---------------------------------
  1714. x
  1715. testint(1/(4*x**2+9)**(1/2),x);
  1716. 2
  1717. sqrt(4*x + 9) + 2*x
  1718. log(----------------------)
  1719. 3
  1720. -----------------------------
  1721. 2
  1722. testint((x**2+4)**(-1/2),x);
  1723. 2
  1724. sqrt(x + 4) + x
  1725. log(------------------)
  1726. 2
  1727. testint(1/(9*x**2-12*x+10),x);
  1728. 3*x - 2
  1729. sqrt(6)*atan(---------)
  1730. sqrt(6)
  1731. -------------------------
  1732. 18
  1733. testint(1/(x**8-2*x**7+2*x**6-2*x**5+x**4),x);
  1734. 2 4 2 3 4 3
  1735. (3*log(x + 1)*x - 3*log(x + 1)*x - 30*log(x - 1)*x + 30*log(x - 1)*x
  1736. 4 3 4 2 3
  1737. + 24*log(x)*x - 24*log(x)*x - 30*x + 12*x + 8*x + 4)/(12*x *(x - 1))
  1738. testint((a*x**3+b*x**2+c*x+d)/((x+1)*x*(x-3)),x);
  1739. (27*log(x - 3)*a + 9*log(x - 3)*b + 3*log(x - 3)*c + log(x - 3)*d
  1740. - 3*log(x + 1)*a + 3*log(x + 1)*b - 3*log(x + 1)*c + 3*log(x + 1)*d
  1741. - 4*log(x)*d + 12*a*x)/12
  1742. testint(1/(2-log(x**2+1))**5,x);
  1743. 2 5 2 4 2 3 2 2
  1744. - int(1/(log(x + 1) - 10*log(x + 1) + 40*log(x + 1) - 80*log(x + 1)
  1745. 2
  1746. + 80*log(x + 1) - 32),x)
  1747. % The next integral appeared in Risch's 1968 paper.
  1748. testint(2*x*e**(x**2)*log(x)+e**(x**2)/x+(log(x)-2)/(log(x)**2+x)**2+
  1749. ((2/x)*log(x)+(1/x)+1)/(log(x)**2+x),x);
  1750. 2 2
  1751. x 3 x 2 2 2
  1752. (e *log(x) + e *log(x)*x + log(log(x) + x)*log(x) + log(log(x) + x)*x
  1753. 2
  1754. - log(x))/(log(x) + x)
  1755. % The following integral would not evaluate in REDUCE 3.3.
  1756. testint(exp(x*ze+x/2)*sin(pi*ze)**4*x**4,ze);
  1757. (2*x*ze + x)/2 3 3 3
  1758. (e *x *( - 16*cos(pi*ze)*sin(pi*ze) *pi *x
  1759. 3 3 3
  1760. - 4*cos(pi*ze)*sin(pi*ze) *pi*x - 24*cos(pi*ze)*sin(pi*ze)*pi *x
  1761. 4 2 2 4 4 2 2 2 4
  1762. + 4*sin(pi*ze) *pi *x + sin(pi*ze) *x + 12*sin(pi*ze) *pi *x + 24*pi ))/
  1763. 4 2 2 4
  1764. (64*pi + 20*pi *x + x )
  1765. % This one evaluates:
  1766. testint(erf(x),x);
  1767. 2
  1768. x
  1769. e *erf(x)*pi*x + sqrt(pi)
  1770. ----------------------------
  1771. 2
  1772. x
  1773. e *pi
  1774. % So why not this one?
  1775. testint(erf(x+a),x);
  1776. int(erf(a + x),x)
  1777. Comment here is an example of using the integrator with pattern
  1778. matching;
  1779. for all m,n let int(k1**m*log(k1)**n/(p**2-k1**2),k1)=foo(m,n),
  1780. int(k1*log(k1)**n/(p**2-k1**2),k1)=foo(1,n),
  1781. int(k1**m*log(k1)/(p**2-k1**2),k1)=foo(m,1),
  1782. int(k1*log(k1)/(p**2-k1**2),k1)=foo(1,1),
  1783. int(log(k1)**n/(k1*(p**2-k1**2)),k1)=foo(-1,n);
  1784. int(k1**2*log(k1)/(p**2-k1**2),k1);
  1785. *** foo declared operator
  1786. foo(2,1)
  1787. COMMENT It is interesting to see how much of this one can be done;
  1788. let f1s= (12*log(s/mc**2)*s**2*pi**2*mc**3*(-8*s-12*mc**2+3*mc)
  1789. + pi**2*(12*s**4*mc+3*s**4+176*s**3*mc**3-24*s**3*mc**2
  1790. -144*s**2*mc**5-48*s*mc**7+24*s*mc**6+4*mc**9-3*mc**8))
  1791. /(384*e**(s/y)*s**2);
  1792. int(f1s,s);
  1793. 2 s/y - s 9 s/y - s 8
  1794. (pi *( - 4*e *ei(------)*mc *s + 3*e *ei(------)*mc *s
  1795. y y
  1796. s/y - s 7 s/y - s 6
  1797. - 48*e *ei(------)*mc *s*y + 24*e *ei(------)*mc *s*y
  1798. y y
  1799. s/y - s 5 2 s/y - s 4 2
  1800. - 144*e *ei(------)*mc *s*y + 36*e *ei(------)*mc *s*y
  1801. y y
  1802. s/y - s 3 3 s 5 2
  1803. - 96*e *ei(------)*mc *s*y + 144*log(-----)*mc *s*y
  1804. y 2
  1805. mc
  1806. s 4 2 s 3 2 2
  1807. - 36*log(-----)*mc *s*y + 96*log(-----)*mc *s *y
  1808. 2 2
  1809. mc mc
  1810. s 3 3 9 8 5 2
  1811. + 96*log(-----)*mc *s*y - 4*mc *y + 3*mc *y + 144*mc *s*y
  1812. 2
  1813. mc
  1814. 3 2 2 3 3 2 2 2 2 3 3 2
  1815. - 176*mc *s *y - 80*mc *s*y + 24*mc *s *y + 24*mc *s*y - 12*mc*s *y
  1816. 2 3 4 3 2 2 3 4 s/y
  1817. - 24*mc*s *y - 24*mc*s*y - 3*s *y - 6*s *y - 6*s*y ))/(384*e *s*y)
  1818. factor ei,log;
  1819. ws;
  1820. s/y - s 3 2
  1821. (e *ei(------)*mc *pi *s
  1822. y
  1823. 6 5 4 3 2 2 2 3
  1824. *( - 4*mc + 3*mc - 48*mc *y + 24*mc *y - 144*mc *y + 36*mc*y - 96*y )
  1825. s 3 2 2 2 2 9
  1826. + 12*log(-----)*mc *pi *s*y *(12*mc - 3*mc + 8*s + 8*y) + pi *y*( - 4*mc
  1827. 2
  1828. mc
  1829. 8 5 3 2 3 2 2 2
  1830. + 3*mc + 144*mc *s*y - 176*mc *s *y - 80*mc *s*y + 24*mc *s *y
  1831. 2 2 3 2 2 3 3 2 2
  1832. + 24*mc *s*y - 12*mc*s *y - 24*mc*s *y - 24*mc*s*y - 3*s *y - 6*s *y
  1833. 3 s/y
  1834. - 6*s*y ))/(384*e *s*y)
  1835. Comment the following integrals reveal deficiencies in the current
  1836. integrator;
  1837. %high degree denominator;
  1838. %testint(1/(2-log(x**2+1))**5,x);
  1839. %this example should evaluate;
  1840. testint(sin(2*x)/cos(x),x);
  1841. sin(2*x)
  1842. int(----------,x)
  1843. cos(x)
  1844. %this example, which appeared in Tobey's thesis, needs factorization
  1845. %over algebraic fields. It currently gives an ugly answer and so has
  1846. %been suppressed;
  1847. % testint((7*x**13+10*x**8+4*x**7-7*x**6-4*x**3-4*x**2+3*x+3)/
  1848. % (x**14-2*x**8-2*x**7-2*x**4-4*x**3-x**2+2*x+1),x);
  1849. symbolic summarize!-integral!-test();
  1850. ***** SUMMARY OF INTEGRAL TESTS *****
  1851. Number of integrals tested: 278
  1852. Total time taken: 226090 ms
  1853. Number of incorrect integrals: 0
  1854. Number of unevaluated integrals: 21
  1855. Integrands of unevaluated integrals are:
  1856. log(log(log(log(x))))
  1857. p
  1858. sin(x)
  1859. 4 3
  1860. tan(x) *x
  1861. 6 3
  1862. tan(x) *x
  1863. xi
  1864. cos(--------)*cos(x)*x
  1865. sin(x)
  1866. ------------------------
  1867. 2
  1868. sin(x)
  1869. x
  1870. a *x
  1871. -------------------
  1872. 2 2
  1873. b *x + 2*b*x + 1
  1874. x
  1875. e
  1876. e
  1877. e
  1878. e
  1879. 1
  1880. ------------------------
  1881. 4 2
  1882. sqrt( - x + x - 1)*x
  1883. 2 2
  1884. sqrt(sqrt(a + x ) + x)
  1885. -------------------------
  1886. x
  1887. 2
  1888. 3*x
  1889. ---------------------------
  1890. 3 3
  1891. 2*sqrt(x + 1) + 2*x + 2
  1892. 1
  1893. -------------------------------------
  1894. 2 2 4
  1895. sqrt( - alpha + 2*h*r - 2*k*r )*r
  1896. 1
  1897. ------------------------------------------------
  1898. 2 2 2 4
  1899. sqrt( - alpha - epsilon + 2*h*r - 2*k*r )*r
  1900. sqrt(sin(x) + 1)
  1901. sqrt( - sin(x) + 1)
  1902. sqrt(cos(x) + 1)
  1903. sqrt( - cos(x) + 1)
  1904. 3
  1905. log(x)*x + log(x)
  1906. --------------------
  1907. 4
  1908. x + 2
  1909. 2
  1910. asin(x)*x
  1911. 2 5 2 4 2 3 2 2
  1912. ( - 1)/(log(x + 1) - 10*log(x + 1) + 40*log(x + 1) - 80*log(x + 1)
  1913. 2
  1914. + 80*log(x + 1) - 32)
  1915. erf(a + x)
  1916. sin(2*x)
  1917. ----------
  1918. cos(x)
  1919. end;
  1920. Time for test: 226510 ms, plus GC time: 299100 ms