int.log 71 KB

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