int.rlg 75 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128
  1. Sun Jan 3 23:45:56 MET 1999
  2. REDUCE 3.7, 15-Jan-99 ...
  3. 1: 1:
  4. 2: 2: 2: 2: 2: 2: 2: 2: 2:
  5. 3: 3: COMMENT
  6. THE REDUCE INTEGRATION TEST PACKAGE
  7. Edited By
  8. Anthony C. Hearn
  9. The RAND Corporation
  10. This file is designed to provide a set of representative tests of the
  11. Reduce integration package. Not all examples go through, even when an
  12. integral exists, since some of the arguments are outside the domain of
  13. applicability of the current package. However, future improvements to
  14. the package will result in more closed-form evaluations in later
  15. releases. We would appreciate any additional contributions to this test
  16. file either because they illustrate some feature (good or bad) of the
  17. current package, or suggest domains which future versions should handle.
  18. Any suggestions for improved organization of this test file (e.g., in a
  19. way which corresponds more directly to the organization of a standard
  20. integration table book such as Gradshteyn and Ryznik) are welcome.
  21. Acknowledgments:
  22. The examples in this file have been contributed by the following.
  23. Any omissions to this list should be reported to the Editor.
  24. David M. Dahm
  25. James H. Davenport
  26. John P. Fitch
  27. Steven Harrington
  28. Anthony C. Hearn
  29. K. Siegfried Koelbig
  30. Ernst Krupnikov
  31. Arthur C. Norman
  32. Herbert Stoyan
  33. ;
  34. Comment we first set up a suitable testing functions;
  35. fluid '(gcknt!*);
  36. global '(faillist!* gcnumber!* inittime number!-of!-integrals
  37. unintlist!*);
  38. symbolic operator time;
  39. symbolic procedure initialize!-integral!-test;
  40. begin
  41. faillist!* := unintlist!* := nil;
  42. number!-of!-integrals := 0;
  43. gcnumber!* := gcknt!*;
  44. inittime := time()
  45. end;
  46. initialize!-integral!-test
  47. symbolic procedure summarize!-integral!-test;
  48. begin scalar totaltime;
  49. totaltime := time()-inittime;
  50. prin2t
  51. " ***** SUMMARY OF INTEGRAL TESTS *****";
  52. terpri();
  53. prin2 "Number of integrals tested: ";
  54. prin2t number!-of!-integrals;
  55. terpri();
  56. prin2 "Total time taken: ";
  57. prin2 totaltime;
  58. prin2t " ms";
  59. terpri();
  60. if gcnumber!*
  61. then <<prin2 "Number of garbage collections: ";
  62. prin2t (gcknt!* - gcnumber!*);
  63. terpri()>>;
  64. prin2 "Number of incorrect integrals: ";
  65. prin2t length faillist!*;
  66. terpri();
  67. prin2 "Number of unevaluated integrals: ";
  68. prin2t length unintlist!*;
  69. terpri();
  70. if faillist!*
  71. then <<prin2t "Integrands of incorrect integrals are:";
  72. for each x in reverse faillist!* do mathprint car x>>;
  73. if unintlist!*
  74. then <<prin2t "Integrands of unevaluated integrals are:";
  75. terpri();
  76. for each x in reverse unintlist!* do mathprint car x>>
  77. end;
  78. summarize!-integral!-test
  79. procedure testint(a,b);
  80. begin scalar der,diffce,res,tt;
  81. tt:=time();
  82. symbolic (number!-of!-integrals := number!-of!-integrals + 1);
  83. res:=int(a,b);
  84. % write "time for integral: ",time()-tt," ms";
  85. off precise;
  86. der := df(res,b);
  87. diffce := der-a;
  88. if diffce neq 0
  89. then begin for all x let cot x=cos x/sin x,
  90. sec x=1/cos x,
  91. sin x**2=1-cos x**2,
  92. tan(x/2)=sin x/(1+cos x),
  93. tan x=sin x/cos x,
  94. tanh x=
  95. (e**(x)-e**(-x))/(e**x+e**(-x)),
  96. coth x= 1/tanh x;
  97. diffce := diffce;
  98. for all x clear cot x,sec x,sin x**2,tan x,tan(x/2),
  99. tanh x,coth x
  100. end;
  101. %hopefully, difference appeared non-zero due to absence of
  102. %above transformations;
  103. if diffce neq 0
  104. then <<on combineexpt; diffce := diffce; off combineexpt>>;
  105. if diffce neq 0
  106. then begin scalar !*reduced;
  107. symbolic(!*reduced := t);
  108. for all x let cos(2x)= 1-2sin x**2, sin x**2=1-cos x**2;
  109. diffce := diffce;
  110. for all x clear cos(2x),sin x**2
  111. end;
  112. if diffce neq 0
  113. then <<write
  114. " ***** DERIVATIVE OF INTEGRAL NOT EQUAL TO INTEGRAND *****";
  115. symbolic(faillist!* := list(a,b,res,der) . faillist!*)>>;
  116. symbolic if smemq('int,res)
  117. then unintlist!* := list(a,b,res) . unintlist!*;
  118. on precise;
  119. return res
  120. end;
  121. testint
  122. symbolic initialize!-integral!-test();
  123. % References are to Gradshteyn and Ryznik.
  124. testint(1+x+x**2,x);
  125. 2
  126. x*(2*x + 3*x + 6)
  127. --------------------
  128. 6
  129. testint(x**2*(2*x**2+x)**2,x);
  130. 5 2
  131. x *(60*x + 70*x + 21)
  132. ------------------------
  133. 105
  134. testint(x*(x**2+2*x+1),x);
  135. 2 2
  136. x *(3*x + 8*x + 6)
  137. ---------------------
  138. 12
  139. testint(1/x,x);
  140. log(x)
  141. % 2.01 #2;
  142. testint((x+1)**3/(x-1)**4,x);
  143. 3 2 3
  144. 3*log(x - 1)*x - 9*log(x - 1)*x + 9*log(x - 1)*x - 3*log(x - 1) - 6*x - 2
  145. ------------------------------------------------------------------------------
  146. 3 2
  147. 3*(x - 3*x + 3*x - 1)
  148. testint(1/(x*(x-1)*(x+1)**2),x);
  149. (log(x - 1)*x + log(x - 1) + 3*log(x + 1)*x + 3*log(x + 1) - 4*log(x)*x
  150. - 4*log(x) + 2*x)/(4*(x + 1))
  151. testint((a*x+b)/((x-p)*(x-q)),x);
  152. log(p - x)*a*p + log(p - x)*b - log(q - x)*a*q - log(q - x)*b
  153. ---------------------------------------------------------------
  154. p - q
  155. testint(1/(a*x**2+b*x+c),x);
  156. 2 2*a*x + b
  157. 2*sqrt(4*a*c - b )*atan(------------------)
  158. 2
  159. sqrt(4*a*c - b )
  160. ---------------------------------------------
  161. 2
  162. 4*a*c - b
  163. testint((a*x+b)/(1+x**2),x);
  164. 2
  165. 2*atan(x)*b + log(x + 1)*a
  166. -----------------------------
  167. 2
  168. testint(1/(x**2-2*x+3),x);
  169. x - 1
  170. sqrt(2)*atan(---------)
  171. sqrt(2)
  172. -------------------------
  173. 2
  174. % Rational function examples from Hardy, Pure Mathematics, p 253 et seq.
  175. testint(1/((x-1)*(x**2+1))**2,x);
  176. 3 2 2 3 2 2
  177. (atan(x)*x - atan(x)*x + atan(x)*x - atan(x) + log(x + 1)*x - log(x + 1)*x
  178. 2 2 3 2
  179. + log(x + 1)*x - log(x + 1) - 2*log(x - 1)*x + 2*log(x - 1)*x
  180. 3 3 2
  181. - 2*log(x - 1)*x + 2*log(x - 1) - x - 2*x + 1)/(4*(x - x + x - 1))
  182. testint(x/((x-a)*(x-b)*(x-c)),x);
  183. (log(a - x)*a*b - log(a - x)*a*c - log(b - x)*a*b + log(b - x)*b*c
  184. 2 2 2 2 2 2
  185. + log(c - x)*a*c - log(c - x)*b*c)/(a *b - a *c - a*b + a*c + b *c - b*c )
  186. testint(x/((x**2+a**2)*(x**2+b**2)),x);
  187. 2 2 2 2
  188. - log(a + x ) + log(b + x )
  189. --------------------------------
  190. 2 2
  191. 2*(a - b )
  192. testint(x**2/((x**2+a**2)*(x**2+b**2)),x);
  193. x x
  194. atan(---)*a - atan(---)*b
  195. a b
  196. ---------------------------
  197. 2 2
  198. a - b
  199. testint(x/((x-1)*(x**2+1)),x);
  200. 2
  201. 2*atan(x) - log(x + 1) + 2*log(x - 1)
  202. ----------------------------------------
  203. 4
  204. testint(x/(1+x**3),x);
  205. 2*x - 1 2
  206. 2*sqrt(3)*atan(---------) + log(x - x + 1) - 2*log(x + 1)
  207. sqrt(3)
  208. ------------------------------------------------------------
  209. 6
  210. testint(x**3/((x-1)**2*(x**3+1)),x);
  211. 2 2
  212. ( - 4*log(x - x + 1)*x + 4*log(x - x + 1) + 9*log(x - 1)*x - 9*log(x - 1)
  213. - log(x + 1)*x + log(x + 1) - 6*x)/(12*(x - 1))
  214. testint(1/(1+x**4),x);
  215. sqrt(2) - 2*x sqrt(2) + 2*x
  216. (sqrt(2)*( - 2*atan(---------------) + 2*atan(---------------)
  217. sqrt(2) sqrt(2)
  218. 2 2
  219. - log( - sqrt(2)*x + x + 1) + log(sqrt(2)*x + x + 1)))/8
  220. testint(x**2/(1+x**4),x);
  221. sqrt(2) - 2*x sqrt(2) + 2*x
  222. (sqrt(2)*( - 2*atan(---------------) + 2*atan(---------------)
  223. sqrt(2) sqrt(2)
  224. 2 2
  225. + log( - sqrt(2)*x + x + 1) - log(sqrt(2)*x + x + 1)))/8
  226. testint(1/(1+x**2+x**4),x);
  227. 2*x - 1 2*x + 1 2
  228. (2*sqrt(3)*atan(---------) + 2*sqrt(3)*atan(---------) - 3*log(x - x + 1)
  229. sqrt(3) sqrt(3)
  230. 2
  231. + 3*log(x + x + 1))/12
  232. % Examples involving a+b*x.
  233. z := a+b*x;
  234. z := a + b*x
  235. testint(z**p,x);
  236. p
  237. (a + b*x) *(a + b*x)
  238. ----------------------
  239. b*(p + 1)
  240. testint(x*z**p,x);
  241. p 2 2 2 2 2
  242. (a + b*x) *( - a + a*b*p*x + b *p*x + b *x )
  243. ------------------------------------------------
  244. 2 2
  245. b *(p + 3*p + 2)
  246. testint(x**2*z**p,x);
  247. p
  248. ((a + b*x)
  249. 3 2 2 2 2 2 2 3 2 3 3 3 3 3
  250. *(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 ))
  251. 3 3 2
  252. /(b *(p + 6*p + 11*p + 6))
  253. testint(1/z,x);
  254. log(a + b*x)
  255. --------------
  256. b
  257. testint(1/z**2,x);
  258. x
  259. -------------
  260. a*(a + b*x)
  261. testint(x/z,x);
  262. - log(a + b*x)*a + b*x
  263. -------------------------
  264. 2
  265. b
  266. testint(x**2/z,x);
  267. 2 2 2
  268. 2*log(a + b*x)*a - 2*a*b*x + b *x
  269. -------------------------------------
  270. 3
  271. 2*b
  272. testint(1/(x*z),x);
  273. - log(a + b*x) + log(x)
  274. --------------------------
  275. a
  276. testint(1/(x**2*z),x);
  277. log(a + b*x)*b*x - log(x)*b*x - a
  278. -----------------------------------
  279. 2
  280. a *x
  281. testint(1/(x*z)**2,x);
  282. 2 2 2 2
  283. (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
  284. 2 2 2 3
  285. - a + 2*b *x )/(a *x*(a + b*x))
  286. testint(1/(c**2+x**2),x);
  287. x
  288. atan(---)
  289. c
  290. -----------
  291. c
  292. testint(1/(c**2-x**2),x);
  293. log( - c - x) - log(c - x)
  294. ----------------------------
  295. 2*c
  296. % More complicated rational function examples, mostly contributed
  297. % by David M. Dahm, who also developed the code to integrate them.
  298. testint(1/(2*x**3-1),x);
  299. 1/3
  300. 2/3 2*2 *x + 1 2/3 2 1/3
  301. (2 *( - 2*sqrt(3)*atan(--------------) - log(2 *x + 2 *x + 1)
  302. sqrt(3)
  303. 1/3
  304. + 2*log(2 *x - 1)))/12
  305. testint(1/(x**3-2),x);
  306. 1/3
  307. 1/3 2 + 2*x 2/3 1/3 2
  308. (2 *( - 2*sqrt(3)*atan(--------------) - log(2 + 2 *x + x )
  309. 1/3
  310. 2 *sqrt(3)
  311. 1/3
  312. + 2*log( - 2 + x)))/12
  313. testint(1/(a*x**3-b),x);
  314. 1/3 1/3
  315. 1/3 2/3 2*a *x + b
  316. (b *a *( - 2*sqrt(3)*atan(-----------------)
  317. 1/3
  318. b *sqrt(3)
  319. 2/3 2 1/3 1/3 2/3 1/3 1/3
  320. - log(a *x + b *a *x + b ) + 2*log(a *x - b )))/(6*a*b
  321. )
  322. testint(1/(x**4-2),x);
  323. 1/4 x 1/4 1/4
  324. 2 *( - 2*atan(------) - log(2 + x) + log( - 2 + x))
  325. 1/4
  326. 2
  327. -------------------------------------------------------------
  328. 8
  329. testint(1/(5*x**4-1),x);
  330. 3/4 sqrt(5)*x 1/4 1/4
  331. 5 *( - 2*atan(-----------) + log(5 *x - 1) - log(5 *x + 1))
  332. 1/4
  333. 5
  334. -------------------------------------------------------------------
  335. 20
  336. testint(1/(3*x**4+7),x);
  337. 1/4
  338. 3/4 1/4 sqrt(2)*21 - 2*sqrt(3)*x
  339. (sqrt(2)*3 *7 *( - 2*atan(-----------------------------)
  340. 1/4
  341. sqrt(2)*21
  342. 1/4
  343. sqrt(2)*21 + 2*sqrt(3)*x
  344. + 2*atan(-----------------------------)
  345. 1/4
  346. sqrt(2)*21
  347. 1/4 2
  348. - log( - sqrt(2)*21 *x + sqrt(7) + sqrt(3)*x )
  349. 1/4 2
  350. + log(sqrt(2)*21 *x + sqrt(7) + sqrt(3)*x )))/168
  351. testint(1/(x**4+3*x**2-1),x);
  352. 2*x
  353. (sqrt(2)*(6*sqrt(sqrt(13) + 3)*sqrt(13)*atan(----------------------------)
  354. sqrt(sqrt(13) + 3)*sqrt(2)
  355. 2*x
  356. - 26*sqrt(sqrt(13) + 3)*atan(----------------------------) + 3
  357. sqrt(sqrt(13) + 3)*sqrt(2)
  358. *sqrt(sqrt(13) - 3)*sqrt(13)*log( - sqrt(sqrt(13) - 3) + sqrt(2)*x)
  359. - 3*sqrt(sqrt(13) - 3)*sqrt(13)*log(sqrt(sqrt(13) - 3) + sqrt(2)*x)
  360. + 13*sqrt(sqrt(13) - 3)*log( - sqrt(sqrt(13) - 3) + sqrt(2)*x)
  361. - 13*sqrt(sqrt(13) - 3)*log(sqrt(sqrt(13) - 3) + sqrt(2)*x)))/104
  362. testint(1/(x**4-3*x**2-1),x);
  363. 2*x
  364. (sqrt(2)*( - 6*sqrt(sqrt(13) - 3)*sqrt(13)*atan(----------------------------)
  365. sqrt(sqrt(13) - 3)*sqrt(2)
  366. 2*x
  367. - 26*sqrt(sqrt(13) - 3)*atan(----------------------------) - 3
  368. sqrt(sqrt(13) - 3)*sqrt(2)
  369. *sqrt(sqrt(13) + 3)*sqrt(13)*log( - sqrt(sqrt(13) + 3) + sqrt(2)*x)
  370. + 3*sqrt(sqrt(13) + 3)*sqrt(13)*log(sqrt(sqrt(13) + 3) + sqrt(2)*x)
  371. + 13*sqrt(sqrt(13) + 3)*log( - sqrt(sqrt(13) + 3) + sqrt(2)*x)
  372. - 13*sqrt(sqrt(13) + 3)*log(sqrt(sqrt(13) + 3) + sqrt(2)*x)))/104
  373. testint(1/(x**4-3*x**2+1),x);
  374. ( - sqrt(5)*log( - sqrt(5) + 2*x - 1) - sqrt(5)*log( - sqrt(5) + 2*x + 1)
  375. + sqrt(5)*log(sqrt(5) + 2*x - 1) + sqrt(5)*log(sqrt(5) + 2*x + 1)
  376. + 5*log( - sqrt(5) + 2*x - 1) - 5*log( - sqrt(5) + 2*x + 1)
  377. + 5*log(sqrt(5) + 2*x - 1) - 5*log(sqrt(5) + 2*x + 1))/20
  378. testint(1/(x**4-4*x**2+1),x);
  379. 2*x 2*x
  380. (sqrt(2)*(2*sqrt(3)*atanh(-------------------) + 6*atanh(-------------------)
  381. sqrt(6) - sqrt(2) sqrt(6) - sqrt(2)
  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)*i
  1195. ------------------------
  1196. 2
  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. 4 2
  1360. sqrt( - x + x - 1)
  1361. - int(----------------------,x)
  1362. 5 3
  1363. x - x + x
  1364. % Examples from James Davenport's thesis:
  1365. testint(1/sqrt(x**2-1)+10/sqrt(x**2-4),x);
  1366. 2
  1367. 2 sqrt(x - 4) + x
  1368. log(sqrt(x - 1) + x) + 10*log(------------------)
  1369. 2
  1370. % p. 173
  1371. testint(sqrt(x+sqrt(x**2+a**2))/x,x);
  1372. 2 2
  1373. sqrt(sqrt(a + x ) + x)
  1374. int(-------------------------,x)
  1375. x
  1376. % Examples generated by differentiating various functions.
  1377. testint(df(sqrt(1+x**2)/(1-x),x),x);
  1378. 2
  1379. - sqrt(x + 1)
  1380. -----------------
  1381. x - 1
  1382. testint(df(log(x+sqrt(1+x**2)),x),x);
  1383. 2
  1384. log(sqrt(x + 1) + x)
  1385. testint(df(sqrt(x)+sqrt(x+1)+sqrt(x+2),x),x);
  1386. sqrt(x + 2) + sqrt(x + 1) + sqrt(x)
  1387. testint(df(sqrt(x**5-2*x+1)-sqrt(x**3+1),x),x);
  1388. 5 3
  1389. sqrt(x - 2*x + 1) - sqrt(x + 1)
  1390. % Another such example from James Davenport's thesis (p. 146).
  1391. % It contains a point of order 3, which is found by use of Mazur's
  1392. % bound on the torsion of elliptic curves over the rationals;
  1393. testint(df(log(1+sqrt(x**3+1)),x),x);
  1394. 3
  1395. sqrt(x + 1)
  1396. 3*( - int(--------------,x) + log(x))
  1397. 4
  1398. x + x
  1399. ---------------------------------------
  1400. 2
  1401. % Examples quoted by Joel Moses:
  1402. testint(1/sqrt(2*h*r**2-alpha**2),r);
  1403. 2 2
  1404. sqrt( - alpha + 2*h*r ) + sqrt(h)*sqrt(2)*r
  1405. sqrt(h)*sqrt(2)*log(----------------------------------------------)
  1406. alpha
  1407. ---------------------------------------------------------------------
  1408. 2*h
  1409. testint(1/(r*sqrt(2*h*r**2-alpha**2-epsilon**2)),r);
  1410. 2 2
  1411. (2*sqrt(alpha + epsilon )
  1412. 2 2 2
  1413. sqrt( - alpha - epsilon + 2*h*r ) + sqrt(h)*sqrt(2)*r 2
  1414. *atan(---------------------------------------------------------))/(alpha
  1415. 2 2
  1416. sqrt(alpha + epsilon )
  1417. 2
  1418. + epsilon )
  1419. testint(1/(r*sqrt(2*h*r**2-alpha**2-2*k*r)),r);
  1420. 2 2
  1421. sqrt(h)*sqrt( - alpha + 2*h*r - 2*k*r)*sqrt(2) + 2*h*r
  1422. 2*atan(----------------------------------------------------------)
  1423. sqrt(h)*sqrt(2)*alpha
  1424. --------------------------------------------------------------------
  1425. alpha
  1426. testint(1/(r*sqrt(2*h*r**2-alpha**2-epsilon**2-2*k*r)),r);
  1427. 2 2
  1428. (2*sqrt(alpha + epsilon )
  1429. 2 2 2
  1430. sqrt(h)*sqrt( - alpha - epsilon + 2*h*r - 2*k*r)*sqrt(2) + 2*h*r
  1431. *atan(---------------------------------------------------------------------))/(
  1432. 2 2
  1433. sqrt(h)*sqrt(alpha + epsilon )*sqrt(2)
  1434. 2 2
  1435. alpha + epsilon )
  1436. testint(r/sqrt(2*e*r**2-alpha**2),r);
  1437. 2 2
  1438. sqrt( - alpha + 2*e*r )
  1439. --------------------------
  1440. 2*e
  1441. testint(r/sqrt(2*e*r**2-alpha**2-epsilon**2),r);
  1442. 2 2 2
  1443. sqrt( - alpha + 2*e*r - epsilon )
  1444. -------------------------------------
  1445. 2*e
  1446. testint(r/sqrt(2*e*r**2-alpha**2-2*k*r**4),r);
  1447. 2
  1448. e*i - 2*i*k*r
  1449. sqrt(k)*sqrt(2)*asinh(--------------------------)*i
  1450. 2 2
  1451. sqrt( - 2*alpha *k + e )
  1452. -----------------------------------------------------
  1453. 4*k
  1454. testint(r/sqrt(2*e*r**2-alpha**2-2*k*r),r);
  1455. 2 2
  1456. (2*sqrt( - alpha + 2*e*r - 2*k*r)*e + sqrt(e)*sqrt(2)
  1457. 2 2
  1458. sqrt(e)*sqrt( - alpha + 2*e*r - 2*k*r)*sqrt(2) + 2*e*r - k 2
  1459. *log(--------------------------------------------------------------)*k)/(4*e )
  1460. 2 2
  1461. sqrt(2*alpha *e + k )
  1462. testint(1/(r*sqrt(2*h*r**2-alpha**2-2*k*r**4)),r);
  1463. 2 2 4
  1464. sqrt( - alpha + 2*h*r - 2*k*r )
  1465. - int(-----------------------------------,r)
  1466. 2 3 5
  1467. alpha *r - 2*h*r + 2*k*r
  1468. testint(1/(r*sqrt(2*h*r**2-alpha**2-epsilon**2-2*k*r**4)),r);
  1469. 2 2 2 4
  1470. sqrt( - alpha - epsilon + 2*h*r - 2*k*r )
  1471. - int(----------------------------------------------,r)
  1472. 2 2 3 5
  1473. alpha *r + epsilon *r - 2*h*r + 2*k*r
  1474. Comment many of these integrals used to require Steve Harrington's
  1475. code to evaluate. They originated in Novosibirsk as examples
  1476. of using Analytik. There are still a few examples that could
  1477. be evaluated using better heuristics;
  1478. testint(a*sin(3*x+5)**2*cos(3*x+5),x);
  1479. 3
  1480. sin(3*x + 5) *a
  1481. -----------------
  1482. 9
  1483. testint(log(x**2)/x**3,x);
  1484. 2
  1485. - (log(x ) + 1)
  1486. ------------------
  1487. 2
  1488. 2*x
  1489. testint(x*sin(x+a),x);
  1490. - cos(a + x)*x + sin(a + x)
  1491. testint((log(x)*(1-x)-1)/(e**x*log(x)**2),x);
  1492. x
  1493. -----------
  1494. x
  1495. e *log(x)
  1496. testint(x**3*(a*x**2+b)**(-1),x);
  1497. 2 2
  1498. - log(a*x + b)*b + a*x
  1499. ---------------------------
  1500. 2
  1501. 2*a
  1502. testint(x**(1/2)*(x+1)**(-7/2),x);
  1503. 2 2
  1504. (2*( - 2*sqrt(x + 1)*x - 4*sqrt(x + 1)*x - 2*sqrt(x + 1) + 2*sqrt(x)*x
  1505. 2
  1506. + 5*sqrt(x)*x))/(15*sqrt(x + 1)*(x + 2*x + 1))
  1507. testint(x**(-1)*(x+1)**(-1),x);
  1508. - log(x + 1) + log(x)
  1509. testint(x**(-1/2)*(2*x-1)**(-1),x);
  1510. sqrt(2)*(log(2*sqrt(x) - sqrt(2)) - log(2*sqrt(x) + sqrt(2)))
  1511. ---------------------------------------------------------------
  1512. 2
  1513. testint((x**2+1)*x**(1/2),x);
  1514. 2
  1515. 2*sqrt(x)*x*(3*x + 7)
  1516. ------------------------
  1517. 21
  1518. testint(x**(-1)*(x-a)**(1/3),x);
  1519. 1/6 1/6
  1520. 2*( - a + x) - a *sqrt(3)
  1521. ( - 2*sqrt(3)*atan(--------------------------------)*a
  1522. 1/6
  1523. a
  1524. 1/6 1/6
  1525. 2*( - a + x) + a *sqrt(3) 2/3 1/3
  1526. + 2*sqrt(3)*atan(--------------------------------)*a + 6*a *( - a + x)
  1527. 1/6
  1528. a
  1529. 1/3 1/3
  1530. - 2*log(( - a + x) + a )*a
  1531. 1/6 1/6 1/3 1/3
  1532. + log( - a *( - a + x) *sqrt(3) + ( - a + x) + a )*a
  1533. 1/6 1/6 1/3 1/3 2/3
  1534. + log(a *( - a + x) *sqrt(3) + ( - a + x) + a )*a)/(2*a )
  1535. testint(x*sinh(x),x);
  1536. cosh(x)*x - sinh(x)
  1537. testint(x*cosh(x),x);
  1538. - cosh(x) + sinh(x)*x
  1539. testint(sinh(2*x)/cosh(2*x),x);
  1540. log(cosh(2*x))
  1541. ----------------
  1542. 2
  1543. testint((i*eps*sinh x-1)/(eps*i*cosh x+i*a-x),x);
  1544. log(cosh(x)*eps*i + a*i - x)
  1545. testint(sin(2*x+3)*cos(x)**2,x);
  1546. 2
  1547. ( - 4*cos(2*x + 3)*cos(x)*sin(x)*x + 2*cos(2*x + 3)*sin(x) - 3*cos(2*x + 3)
  1548. 2
  1549. - 4*sin(2*x + 3)*sin(x) *x + 2*sin(2*x + 3)*x + 3)/8
  1550. testint(x*atan(x),x);
  1551. 2
  1552. atan(x)*x + atan(x) - x
  1553. --------------------------
  1554. 2
  1555. testint(x*acot(x),x);
  1556. 2
  1557. acot(x)*x + acot(x) + x
  1558. --------------------------
  1559. 2
  1560. testint(x*log(x**2+a),x);
  1561. 2 2 2 2
  1562. log(a + x )*a + log(a + x )*x - x
  1563. -------------------------------------
  1564. 2
  1565. testint(sin(x+a)*cos(x),x);
  1566. - cos(a + x)*cos(x) - cos(a + x)*sin(x)*x + cos(x)*sin(a + x)*x
  1567. ------------------------------------------------------------------
  1568. 2
  1569. testint(cos(x+a)*sin(x),x);
  1570. - cos(a + x)*cos(x) + cos(a + x)*sin(x)*x - cos(x)*sin(a + x)*x
  1571. ------------------------------------------------------------------
  1572. 2
  1573. testint((1+sin(x))**(1/2),x);
  1574. int(sqrt(sin(x) + 1),x)
  1575. testint((1-sin(x))**(1/2),x);
  1576. int(sqrt( - sin(x) + 1),x)
  1577. testint((1+cos(x))**(1/2),x);
  1578. int(sqrt(cos(x) + 1),x)
  1579. testint((1-cos(x))**(1/2),x);
  1580. int(sqrt( - cos(x) + 1),x)
  1581. testint(1/(x**(1/2)-(x-1)**(1/2)),x);
  1582. 2*(sqrt(x - 1)*x - sqrt(x - 1) + sqrt(x)*x)
  1583. ---------------------------------------------
  1584. 3
  1585. testint(1/(1-(x+1)**(1/2)),x);
  1586. - 2*(sqrt(x + 1) + log(sqrt(x + 1) - 1))
  1587. testint(x/(x**4+36)**(1/2),x);
  1588. 4 2
  1589. sqrt(x + 36) + x
  1590. log(--------------------)
  1591. 6
  1592. ---------------------------
  1593. 2
  1594. testint(1/(x**(1/3)+x**(1/2)),x);
  1595. 1/6 1/3 1/6
  1596. 6*x - 3*x + 2*sqrt(x) - 6*log(x + 1)
  1597. testint(log(2+3*x**2),x);
  1598. 3*x 2
  1599. 2*sqrt(6)*atan(---------) + 3*log(3*x + 2)*x - 6*x
  1600. sqrt(6)
  1601. -----------------------------------------------------
  1602. 3
  1603. testint(cot(x),x);
  1604. x 2 x
  1605. - log(tan(---) + 1) + log(tan(---))
  1606. 2 2
  1607. testint(cot x**4,x);
  1608. 3
  1609. - cot(x) + 3*cot(x) + 3*x
  1610. -----------------------------
  1611. 3
  1612. testint(tanh(x),x);
  1613. 2*x
  1614. log(e + 1) - x
  1615. testint(coth(x),x);
  1616. x x
  1617. log(e - 1) + log(e + 1) - x
  1618. testint(b**x,x);
  1619. x
  1620. b
  1621. --------
  1622. log(b)
  1623. testint((x**4+x**(-4)+2)**(1/2),x);
  1624. 4
  1625. x - 3
  1626. --------
  1627. 3*x
  1628. testint((2*x+1)/(3*x+2),x);
  1629. - log(3*x + 2) + 6*x
  1630. -----------------------
  1631. 9
  1632. testint(x*log(x+(x**2+1)**(1/2)),x);
  1633. 2 2 2 2
  1634. - sqrt(x + 1)*x + 2*log(sqrt(x + 1) + x)*x + log(sqrt(x + 1) + x)
  1635. ------------------------------------------------------------------------
  1636. 4
  1637. testint(x*(e**x*sin(x)+1)**2,x);
  1638. 2*x 2*x x x
  1639. ( - 2*e *cos(x)*sin(x)*x + e *cos(x)*sin(x) - 8*e *cos(x)*x + 8*e *cos(x)
  1640. 2*x 2 2*x 2*x x 2
  1641. + 2*e *sin(x) *x + e *x - e + 8*e *sin(x)*x + 4*x )/8
  1642. testint(x*e**x*cos(x),x);
  1643. x
  1644. e *(cos(x)*x + sin(x)*x - sin(x))
  1645. -----------------------------------
  1646. 2
  1647. Comment the following set came from Herbert Stoyan;
  1648. testint(1/(x-3)**4,x);
  1649. - 1
  1650. ---------------------------
  1651. 3 2
  1652. 3*(x - 9*x + 27*x - 27)
  1653. testint(x/(x**3-1),x);
  1654. 2*x + 1 2
  1655. 2*sqrt(3)*atan(---------) - log(x + x + 1) + 2*log(x - 1)
  1656. sqrt(3)
  1657. ------------------------------------------------------------
  1658. 6
  1659. testint(x/(x**4-1),x);
  1660. 2
  1661. - log(x + 1) + log(x - 1) + log(x + 1)
  1662. ------------------------------------------
  1663. 4
  1664. testint(log(x)*(x**3+1)/(x**4+2),x);
  1665. log(x) log(x) 2
  1666. - 4*int(----------,x) + 2*int(--------,x) + log(x)
  1667. 5 4
  1668. x + 2*x x + 2
  1669. ------------------------------------------------------
  1670. 2
  1671. testint(log(x)+log(x+1)+log(x+2),x);
  1672. log(x + 2)*x + 2*log(x + 2) + log(x + 1)*x + log(x + 1) + log(x)*x - 3*x
  1673. testint(1/(x**3+5),x);
  1674. 1/3
  1675. 1/3 5 - 2*x 2/3 1/3 2
  1676. (5 *( - 2*sqrt(3)*atan(--------------) - log(5 - 5 *x + x )
  1677. 1/3
  1678. sqrt(3)*5
  1679. 1/3
  1680. + 2*log(5 + x)))/30
  1681. testint(1/sqrt(1+x**2),x);
  1682. 2
  1683. log(sqrt(x + 1) + x)
  1684. testint(sqrt(x**2+3),x);
  1685. 2
  1686. 2 sqrt(x + 3) + x
  1687. sqrt(x + 3)*x + 3*log(------------------)
  1688. sqrt(3)
  1689. --------------------------------------------
  1690. 2
  1691. testint(x/(x+1)**2,x);
  1692. log(x + 1)*x + log(x + 1) - x
  1693. -------------------------------
  1694. x + 1
  1695. COMMENT The following integrals were used among others as a test of
  1696. Moses' SIN program;
  1697. testint(asin x,x);
  1698. 2
  1699. asin(x)*x + sqrt( - x + 1)
  1700. testint(x**2*asin x,x);
  1701. 2
  1702. int(asin(x)*x ,x)
  1703. testint(sec x**2/(1+sec x**2-3*tan x),x);
  1704. x x
  1705. log( - sqrt(5) + 2*tan(---) + 1) - log( - sqrt(2) + tan(---) + 1)
  1706. 2 2
  1707. x x
  1708. + log(sqrt(5) + 2*tan(---) + 1) - log(sqrt(2) + tan(---) + 1)
  1709. 2 2
  1710. testint(1/sec x**2,x);
  1711. cos(x)*sin(x) + x
  1712. -------------------
  1713. 2
  1714. testint((5*x**2-3*x-2)/(x**2*(x-2)),x);
  1715. 3*log(x - 2)*x + 2*log(x)*x - 1
  1716. ---------------------------------
  1717. x
  1718. testint(1/(4*x**2+9)**(1/2),x);
  1719. 2
  1720. sqrt(4*x + 9) + 2*x
  1721. log(----------------------)
  1722. 3
  1723. -----------------------------
  1724. 2
  1725. testint((x**2+4)**(-1/2),x);
  1726. 2
  1727. sqrt(x + 4) + x
  1728. log(------------------)
  1729. 2
  1730. testint(1/(9*x**2-12*x+10),x);
  1731. 3*x - 2
  1732. sqrt(6)*atan(---------)
  1733. sqrt(6)
  1734. -------------------------
  1735. 18
  1736. testint(1/(x**8-2*x**7+2*x**6-2*x**5+x**4),x);
  1737. 2 4 2 3 4 3
  1738. (3*log(x + 1)*x - 3*log(x + 1)*x - 30*log(x - 1)*x + 30*log(x - 1)*x
  1739. 4 3 4 2 3
  1740. + 24*log(x)*x - 24*log(x)*x - 30*x + 12*x + 8*x + 4)/(12*x *(x - 1))
  1741. testint((a*x**3+b*x**2+c*x+d)/((x+1)*x*(x-3)),x);
  1742. (27*log(x - 3)*a + 9*log(x - 3)*b + 3*log(x - 3)*c + log(x - 3)*d
  1743. - 3*log(x + 1)*a + 3*log(x + 1)*b - 3*log(x + 1)*c + 3*log(x + 1)*d
  1744. - 4*log(x)*d + 12*a*x)/12
  1745. testint(1/(2-log(x**2+1))**5,x);
  1746. 2 5 2 4 2 3 2 2
  1747. - int(1/(log(x + 1) - 10*log(x + 1) + 40*log(x + 1) - 80*log(x + 1)
  1748. 2
  1749. + 80*log(x + 1) - 32),x)
  1750. % The next integral appeared in Risch's 1968 paper.
  1751. testint(2*x*e**(x**2)*log(x)+e**(x**2)/x+(log(x)-2)/(log(x)**2+x)**2+
  1752. ((2/x)*log(x)+(1/x)+1)/(log(x)**2+x),x);
  1753. 2 2
  1754. x 3 x 2 2 2
  1755. (e *log(x) + e *log(x)*x + log(log(x) + x)*log(x) + log(log(x) + x)*x
  1756. 2
  1757. - log(x))/(log(x) + x)
  1758. % The following integral would not evaluate in REDUCE 3.3.
  1759. testint(exp(x*ze+x/2)*sin(pi*ze)**4*x**4,ze);
  1760. (2*x*ze + x)/2 3 3 3
  1761. (e *x *( - 16*cos(pi*ze)*sin(pi*ze) *pi *x
  1762. 3 3 3
  1763. - 4*cos(pi*ze)*sin(pi*ze) *pi*x - 24*cos(pi*ze)*sin(pi*ze)*pi *x
  1764. 4 2 2 4 4 2 2 2 4
  1765. + 4*sin(pi*ze) *pi *x + sin(pi*ze) *x + 12*sin(pi*ze) *pi *x + 24*pi ))/
  1766. 4 2 2 4
  1767. (64*pi + 20*pi *x + x )
  1768. % This one evaluates:
  1769. testint(erf(x),x);
  1770. 2
  1771. x
  1772. e *erf(x)*pi*x + sqrt(pi)
  1773. ----------------------------
  1774. 2
  1775. x
  1776. e *pi
  1777. % So why not this one?
  1778. testint(erf(x+a),x);
  1779. int(erf(a + x),x)
  1780. Comment here is an example of using the integrator with pattern
  1781. matching;
  1782. for all m,n let int(k1**m*log(k1)**n/(p**2-k1**2),k1)=foo(m,n),
  1783. int(k1*log(k1)**n/(p**2-k1**2),k1)=foo(1,n),
  1784. int(k1**m*log(k1)/(p**2-k1**2),k1)=foo(m,1),
  1785. int(k1*log(k1)/(p**2-k1**2),k1)=foo(1,1),
  1786. int(log(k1)**n/(k1*(p**2-k1**2)),k1)=foo(-1,n);
  1787. int(k1**2*log(k1)/(p**2-k1**2),k1);
  1788. *** foo declared operator
  1789. foo(2,1)
  1790. COMMENT It is interesting to see how much of this one can be done;
  1791. let f1s= (12*log(s/mc**2)*s**2*pi**2*mc**3*(-8*s-12*mc**2+3*mc)
  1792. + pi**2*(12*s**4*mc+3*s**4+176*s**3*mc**3-24*s**3*mc**2
  1793. -144*s**2*mc**5-48*s*mc**7+24*s*mc**6+4*mc**9-3*mc**8))
  1794. /(384*e**(s/y)*s**2);
  1795. int(f1s,s);
  1796. 2 s/y - s 9 s/y - s 8
  1797. (pi *( - 4*e *ei(------)*mc *s + 3*e *ei(------)*mc *s
  1798. y y
  1799. s/y - s 7 s/y - s 6
  1800. - 48*e *ei(------)*mc *s*y + 24*e *ei(------)*mc *s*y
  1801. y y
  1802. s/y - s 5 2 s/y - s 4 2
  1803. - 144*e *ei(------)*mc *s*y + 36*e *ei(------)*mc *s*y
  1804. y y
  1805. s/y - s 3 3 s 5 2
  1806. - 96*e *ei(------)*mc *s*y + 144*log(-----)*mc *s*y
  1807. y 2
  1808. mc
  1809. s 4 2 s 3 2 2
  1810. - 36*log(-----)*mc *s*y + 96*log(-----)*mc *s *y
  1811. 2 2
  1812. mc mc
  1813. s 3 3 9 8 5 2
  1814. + 96*log(-----)*mc *s*y - 4*mc *y + 3*mc *y + 144*mc *s*y
  1815. 2
  1816. mc
  1817. 3 2 2 3 3 2 2 2 2 3 3 2
  1818. - 176*mc *s *y - 80*mc *s*y + 24*mc *s *y + 24*mc *s*y - 12*mc*s *y
  1819. 2 3 4 3 2 2 3 4 s/y
  1820. - 24*mc*s *y - 24*mc*s*y - 3*s *y - 6*s *y - 6*s*y ))/(384*e *s*y)
  1821. factor ei,log;
  1822. ws;
  1823. s/y - s 3 2
  1824. (e *ei(------)*mc *pi *s
  1825. y
  1826. 6 5 4 3 2 2 2 3
  1827. *( - 4*mc + 3*mc - 48*mc *y + 24*mc *y - 144*mc *y + 36*mc*y - 96*y )
  1828. s 3 2 2 2 2 9
  1829. + 12*log(-----)*mc *pi *s*y *(12*mc - 3*mc + 8*s + 8*y) + pi *y*( - 4*mc
  1830. 2
  1831. mc
  1832. 8 5 3 2 3 2 2 2
  1833. + 3*mc + 144*mc *s*y - 176*mc *s *y - 80*mc *s*y + 24*mc *s *y
  1834. 2 2 3 2 2 3 3 2 2
  1835. + 24*mc *s*y - 12*mc*s *y - 24*mc*s *y - 24*mc*s*y - 3*s *y - 6*s *y
  1836. 3 s/y
  1837. - 6*s*y ))/(384*e *s*y)
  1838. Comment the following integrals reveal deficiencies in the current
  1839. integrator;
  1840. %high degree denominator;
  1841. %testint(1/(2-log(x**2+1))**5,x);
  1842. %this example should evaluate;
  1843. testint(sin(2*x)/cos(x),x);
  1844. sin(2*x)
  1845. int(----------,x)
  1846. cos(x)
  1847. %this example, which appeared in Tobey's thesis, needs factorization
  1848. %over algebraic fields. It currently gives an ugly answer and so has
  1849. %been suppressed;
  1850. % testint((7*x**13+10*x**8+4*x**7-7*x**6-4*x**3-4*x**2+3*x+3)/
  1851. % (x**14-2*x**8-2*x**7-2*x**4-4*x**3-x**2+2*x+1),x);
  1852. symbolic summarize!-integral!-test();
  1853. ***** SUMMARY OF INTEGRAL TESTS *****
  1854. Number of integrals tested: 278
  1855. Total time taken: 19320 ms
  1856. Number of garbage collections: 38
  1857. Number of incorrect integrals: 0
  1858. Number of unevaluated integrals: 21
  1859. Integrands of unevaluated integrals are:
  1860. log(log(log(log(x))))
  1861. p
  1862. sin(x)
  1863. 4 3
  1864. tan(x) *x
  1865. 6 3
  1866. tan(x) *x
  1867. xi
  1868. cos(--------)*cos(x)*x
  1869. sin(x)
  1870. ------------------------
  1871. 2
  1872. sin(x)
  1873. x
  1874. a *x
  1875. -------------------
  1876. 2 2
  1877. b *x + 2*b*x + 1
  1878. x
  1879. e
  1880. e
  1881. e
  1882. e
  1883. 1
  1884. ------------------------
  1885. 4 2
  1886. sqrt( - x + x - 1)*x
  1887. 2 2
  1888. sqrt(sqrt(a + x ) + x)
  1889. -------------------------
  1890. x
  1891. 2
  1892. 3*x
  1893. ---------------------------
  1894. 3 3
  1895. 2*sqrt(x + 1) + 2*x + 2
  1896. 1
  1897. -------------------------------------
  1898. 2 2 4
  1899. sqrt( - alpha + 2*h*r - 2*k*r )*r
  1900. 1
  1901. ------------------------------------------------
  1902. 2 2 2 4
  1903. sqrt( - alpha - epsilon + 2*h*r - 2*k*r )*r
  1904. sqrt(sin(x) + 1)
  1905. sqrt( - sin(x) + 1)
  1906. sqrt(cos(x) + 1)
  1907. sqrt( - cos(x) + 1)
  1908. 3
  1909. log(x)*x + log(x)
  1910. --------------------
  1911. 4
  1912. x + 2
  1913. 2
  1914. asin(x)*x
  1915. 2 5 2 4 2 3 2 2
  1916. ( - 1)/(log(x + 1) - 10*log(x + 1) + 40*log(x + 1) - 80*log(x + 1)
  1917. 2
  1918. + 80*log(x + 1) - 32)
  1919. erf(a + x)
  1920. sin(2*x)
  1921. ----------
  1922. cos(x)
  1923. end;
  1924. 4: 4: 4: 4: 4: 4: 4: 4: 4:
  1925. Time for test: 19340 ms, plus GC time: 1060 ms
  1926. 5: 5:
  1927. Quitting
  1928. Sun Jan 3 23:46:20 MET 1999