Applications, Examples and Libraries

Share your work here

The William Lowell Putnam Mathematical Competition, often abbreviated to the Putnam Competition, is an annual mathematics competition for undergraduate college students enrolled at institutions of higher learning in the world (regardless of the students' nationalities). One can see some problems and answers here. I find it remarkable that a lot of these problems can be done with Maple. Here is a sample (The DirectSearch package should be downloaded from http://www.maplesoft.com/applications/view.aspx?SID=101333 and installed in your Maple.).

 

rsolve({a(k)=a(k-1)^2-2,a(0)=5/2},a)#2014,A-3

NULL

rs := unapply(rsolve({a(0) = 5/2, a(k) = a(k-1)^2-2}, a), k)

proc (k) options operator, arrow; 2*cosh(arccosh(5/4)*2^k) end proc

(1)

(2)

evalf(product(1-1/rs(k), k = 0 .. infinity))

.4285714286

(3)

identify(%)

3/7

(4)

sol := solve({1/x-1/(2*y) = 2*(-x^4+y^4), 1/x+1/(2*y) = (x^2+3*y^2)*(3*x^2+y^2)}, explicit)

sol[1]; evalf(sol)

{x = 1.122865470, y = .1228654698}, {x = -0.39087502e-2+.3661111372*I, y = -1.003908750+.3661111372*I}, {x = .6924760152-.5923802638*I, y = -.3075239848-.5923802638*I}, {x = .6924760152+.5923802638*I, y = -.3075239848+.5923802638*I}, {x = -0.39087502e-2-.3661111372*I, y = -1.003908750-.3661111372*I}, {x = .3469845126+.1168520057*I, y = 0.3796751170e-1+1.067908527*I}, {x = .7773739670+.4755282581*I, y = .4683569607-.4755282736*I}, {x = .2183569726+.2938926261*I, y = 1.027373941-.2938926802*I}, {x = .3469845126+1.067908522*I, y = 0.3796751830e-1+.1168520056*I}, {x = -.2120324818+.8862728900*I, y = .5969845187+.2984876419*I}, {x = -.3494002531+.8416393955*I, y = -.6584172547-.1094171332*I}, {x = -.2120324818+.2984876377*I, y = .5969845144+.8862728969*I}, {x = -.9084172475+.6600037635*I, y = -0.9940025307e-1+0.7221851120e-1*I}, {x = -.3494002531+.1094171208*I, y = -.6584172336-.8416394020*I}, {x = -.9084172475+0.7221851117e-1*I, y = -0.9940025050e-1+.6600037719*I}, {x = -.9084172475-0.7221851117e-1*I, y = -0.9940025050e-1-.6600037719*I}, {x = -.3494002531-.1094171208*I, y = -.6584172336+.8416394020*I}, {x = -.9084172475-.6600037635*I, y = -0.9940025307e-1-0.7221851120e-1*I}, {x = -.2120324818-.2984876377*I, y = .5969845144-.8862728969*I}, {x = -.3494002531-.8416393955*I, y = -.6584172547+.1094171332*I}, {x = -.2120324818-.8862728900*I, y = .5969845187-.2984876419*I}, {x = .3469845126-1.067908522*I, y = 0.3796751830e-1-.1168520056*I}, {x = .2183569726-.2938926261*I, y = 1.027373941+.2938926802*I}, {x = .7773739670-.4755282581*I, y = .4683569607+.4755282736*I}, {x = .3469845126-.1168520057*I, y = 0.3796751170e-1-1.067908527*I}

(5)

plots:-implicitplot([1/x+1/(2*y) = (x^2+3*y^2)*(3*x^2+y^2), 1/x-1/(2*y) = 2*(-x^4+y^4)], x = 0 .. 2, y = 0 .. 1, color = [red, blue], gridrefine = 4)

 

"http://kskedlaya.org/putnam-archive/  and https://en.wikipedia.org/wiki/William_Lowell_Putnam_Mathematical_Competition"

Re(convert(int(ln(x+1)/(x^2+1), x = 0 .. 1), polylog))

(1/8)*Pi*ln(2)

(6)

Im(convert(int(ln(x+1)/(x^2+1), x = 0 .. 1), polylog))

0

(7)

NULL

DirectSearch:-GlobalOptima(int(sqrt(x^4+(-y^2+y)^2), x = 0 .. y), {y = 0 .. 1}, maximize)

[.333333333333333, [y = HFloat(0.9999999999999992)], 96]

(8)

rsolve({T(0) = 2, T(1) = 3, T(2) = 6, T(n) = (n+4)*T(n-1)-4*n*T(n-2)+(4*n-8)*T(n-3)}, T)

GAMMA(n+1)+2^n

(9)

floor(10^20000/(10^100+3))

9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999997000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000899999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999975700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007289999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999997813000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000656099999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999803170000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000059048999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999982285300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005314409999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998405677000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000478296899999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999856510930000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043046720999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999987085983700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003874204889999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998837738533000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000348678440099999999999999999999999999999999999999999999999999999999999999999999999999999999999999999895396467970000000000000000000000000000000000000000000000000000000000000000000000000000000000000000031381059608999999999999999999999999999999999999999999999999999999999999999999999999999999999999999990585682117300000000000000000000000000000000000000000000000000000000000000000000000000000000000000002824295364809999999999999999999999999999999999999999999999999999999999999999999999999999999999999999152711390557000000000000000000000000000000000000000000000000000000000000000000000000000000000000000254186582832899999999999999999999999999999999999999999999999999999999999999999999999999999999999999923744025150130000000000000000000000000000000000000000000000000000000000000000000000000000000000000022876792454960999999999999999999999999999999999999999999999999999999999999999999999999999999999999993136962263511700000000000000000000000000000000000000000000000000000000000000000000000000000000000002058911320946489999999999999999999999999999999999999999999999999999999999999999999999999999999999999382326603716053000000000000000000000000000000000000000000000000000000000000000000000000000000000000185302018885184099999999999999999999999999999999999999999999999999999999999999999999999999999999999944409394334444770000000000000000000000000000000000000000000000000000000000000000000000000000000000016677181699666568999999999999999999999999999999999999999999999999999999999999999999999999999999999994996845490100029300000000000000000000000000000000000000000000000000000000000000000000000000000000001500946352969991209999999999999999999999999999999999999999999999999999999999999999999999999999999999549716094109002637000000000000000000000000000000000000000000000000000000000000000000000000000000000135085171767299208899999999999999999999999999999999999999999999999999999999999999999999999999999999959474448469810237330000000000000000000000000000000000000000000000000000000000000000000000000000000012157665459056928800999999999999999999999999999999999999999999999999999999999999999999999999999999996352700362282921359700000000000000000000000000000000000000000000000000000000000000000000000000000001094189891315123592089999999999999999999999999999999999999999999999999999999999999999999999999999999671743032605462922373000000000000000000000000000000000000000000000000000000000000000000000000000000098477090218361123288099999999999999999999999999999999999999999999999999999999999999999999999999999970456872934491663013570000000000000000000000000000000000000000000000000000000000000000000000000000008862938119652501095928999999999999999999999999999999999999999999999999999999999999999999999999999997341118564104249671221300000000000000000000000000000000000000000000000000000000000000000000000000000797664430768725098633609999999999999999999999999999999999999999999999999999999999999999999999999999760700670769382470409917000000000000000000000000000000000000000000000000000000000000000000000000000071789798769185258877024899999999999999999999999999999999999999999999999999999999999999999999999999978463060369244422336892530000000000000000000000000000000000000000000000000000000000000000000000000006461081889226673298932240999999999999999999999999999999999999999999999999999999999999999999999999998061675433231998010320327700000000000000000000000000000000000000000000000000000000000000000000000000581497370030400596903901689999999999999999999999999999999999999999999999999999999999999999999999999825550788990879820928829493000000000000000000000000000000000000000000000000000000000000000000000000052334763302736053721351152099999999999999999999999999999999999999999999999999999999999999999999999984299571009179183883594654370000000000000000000000000000000000000000000000000000000000000000000000004710128697246244834921603688999999999999999999999999999999999999999999999999999999999999999999999998586961390826126549523518893300000000000000000000000000000000000000000000000000000000000000000000000423911582752162035142944332009999999999999999999999999999999999999999999999999999999999999999999999872826525174351389457116700397000000000000000000000000000000000000000000000000000000000000000000000038152042447694583162864989880899999999999999999999999999999999999999999999999999999999999999999999988554387265691625051140503035730000000000000000000000000000000000000000000000000000000000000000000003433683820292512484657849089280999999999999999999999999999999999999999999999999999999999999999999998969894853912246254602645273215700000000000000000000000000000000000000000000000000000000000000000000309031543826326123619206418035289999999999999999999999999999999999999999999999999999999999999999999907290536852102162914238074589413000000000000000000000000000000000000000000000000000000000000000000027812838944369351125728577623176099999999999999999999999999999999999999999999999999999999999999999991656148316689194662281426713047170000000000000000000000000000000000000000000000000000000000000000002503155504993241601315571986085848999999999999999999999999999999999999999999999999999999999999999999249053348502027519605328404174245300000000000000000000000000000000000000000000000000000000000000000225283995449391744118401478747726409999999999999999999999999999999999999999999999999999999999999999932414801365182476764479556375682077000000000000000000000000000000000000000000000000000000000000000020275559590445256970656133087295376899999999999999999999999999999999999999999999999999999999999999993917332122866422908803160073811386930000000000000000000000000000000000000000000000000000000000000001824800363140073127359051977856583920999999999999999999999999999999999999999999999999999999999999999452559891057978061792284406643024823700000000000000000000000000000000000000000000000000000000000000164232032682606581462314678007092552889999999999999999999999999999999999999999999999999999999999999950730390195218025561305596597872234133000000000000000000000000000000000000000000000000000000000000014780882941434592331608321020638329760099999999999999999999999999999999999999999999999999999999999995565735117569622300517503693808501071970000000000000000000000000000000000000000000000000000000000001330279464729113309844748891857449678408999999999999999999999999999999999999999999999999999999999999600916160581266007046575332442765096477300000000000000000000000000000000000000000000000000000000000119725151825620197886027400267170471056809999999999999999999999999999999999999999999999999999999999964082454452313940634191779919848858682957000000000000000000000000000000000000000000000000000000000010775263664305817809742466024045342395112899999999999999999999999999999999999999999999999999999999996767420900708254657077260192786397281466130000000000000000000000000000000000000000000000000000000000969773729787523602876821942164080815560160999999999999999999999999999999999999999999999999999999999709067881063742919136953417350775755331951700000000000000000000000000000000000000000000000000000000087279635680877124258913974794767273400414489999999999999999999999999999999999999999999999999999999973816109295736862722325807561569817979875653000000000000000000000000000000000000000000000000000000007855167211278941183302257731529054606037304099999999999999999999999999999999999999999999999999999997643449836616317645009322680541283618188808770000000000000000000000000000000000000000000000000000000706965049015104706497203195837614914543357368999999999999999999999999999999999999999999999999999999787910485295468588050839041248715525636992789300000000000000000000000000000000000000000000000000000063626854411359423584748287625385342308902163209999999999999999999999999999999999999999999999999999980911943676592172924575513712384397307329351037000000000000000000000000000000000000000000000000000005726416897022348122627345886284680807801194688899999999999999999999999999999999999999999999999999998282074930893295563211796234114595757659641593330000000000000000000000000000000000000000000000000000515377520732011331036461129765621272702107522000999999999999999999999999999999999999999999999999999845386743780396600689061661070313618189367743399700000000000000000000000000000000000000000000000000046383976865881019793281501678905914543189676980089999999999999999999999999999999999999999999999999986084806940235694062015549496328225637043096905973000000000000000000000000000000000000000000000000004174557917929291781395335151101532308887070928208099999999999999999999999999999999999999999999999998747632624621212465581399454669540307333878721537570000000000000000000000000000000000000000000000000375710212613636260325580163599137907799836383538728999999999999999999999999999999999999999999999999887286936215909121902325950920258627660049084938381300000000000000000000000000000000000000000000000033813919135227263429302214723922411701985274518485609999999999999999999999999999999999999999999999989855824259431820971209335582823276489404417644454317000000000000000000000000000000000000000000000003043252722170453708637199325153017053178674706663704899999999999999999999999999999999999999999999999087024183348863887408840202454094884046397588000888530000000000000000000000000000000000000000000000273892744995340833777347939263771534786080723599733440999999999999999999999999999999999999999999999917832176501397749866795618220868539564175782920079967700000000000000000000000000000000000000000000024650347049580675039961314533739438130747265123976009689999999999999999999999999999999999999999999992604895885125797488011605639878168560775820462807197093000000000000000000000000000000000000000000002218531234462260753596518308036549431767253861157840872099999999999999999999999999999999999999999999334440629661321773921044507589035170469823841652647738370000000000000000000000000000000000000000000199667811101603467823686647723289448859052847504205678488999999999999999999999999999999999999999999940099656669518959652894005683013165342284145748738296453300000000000000000000000000000000000000000017970102999144312104131798295096050397314756275378511064009999999999999999999999999999999999999999994608969100256706368760460511471184880805573117386446680797000000000000000000000000000000000000000001617309269922988089371861846558644535758328064784065995760899999999999999999999999999999999999999999514807219023103573188441446032406639272501580564780201271730000000000000000000000000000000000000000145557834293068928043467566190278008218249525830565939618480999999999999999999999999999999999999999956332649712079321586959730142916597534525142250830218114455700000000000000000000000000000000000000013100205086376203523912080957125020739642457324750934565663289999999999999999999999999999999999999996069938474087138942826375712862493778107262802574719630301013000000000000000000000000000000000000001179018457773858317152087286141251866567821159227584110909696099999999999999999999999999999999999999646294462667842504854373814157624440029653652231724766727091170000000000000000000000000000000000000106111661199647248543687855752712667991103904330482569981872648999999999999999999999999999999999999968166501640105825436893643274186199602668828700855229005438205300000000000000000000000000000000000009550049507968252368931907017744140119199351389743431298368538409999999999999999999999999999999999997134985147609524289320427894676757964240194583076970610489438477000000000000000000000000000000000000859504455717142713203871631596972610727941625076908816853168456899999999999999999999999999999999999742148663284857186038838510520908216781617512476927354944049462930000000000000000000000000000000000077355401014542844188348446843727534965514746256921793516785161120999999999999999999999999999999999976793379695637146743495465946881739510345576122923461944964451663700000000000000000000000000000000006961986091308855976951360215935478146896327163122961416510664500889999999999999999999999999999999997911404172607343206914591935219356555931101851063111575046800649733000000000000000000000000000000000626578748217797037925622419434193033220669444681066527485959805080099999999999999999999999999999999812026375534660888622313274169742090033799166595680041754212058475970000000000000000000000000000000056392087339601733413306017749077372989860250021295987473736382457208999999999999999999999999999999983082373798119479976008194675276788103041924993611203757879085262837300000000000000000000000000000005075287860564156007197541597416963569087422501916638872636274421148809999999999999999999999999999998477413641830753197840737520774910929273773249425008338209117673655357000000000000000000000000000000456775907450774040647778743767526721217868025172497498537264697903392899999999999999999999999999999862967227764767787805666376869741983634639592448250750438820590628982130000000000000000000000000000041109831670569663658300086939077404909608122265524774868353822811305360999999999999999999999999999987667050498829100902509973918276778527117563320342567539493853156608391700000000000000000000000000003699884850351269729247007824516966441864731003897229738151844053017482489999999999999999999999999998890034544894619081225897652644910067440580698830831078554446784094755253000000000000000000000000000332989636531614275632230704206526979767825790350750676433665964771573424099999999999999999999999999900103109040515717310330788738041906069652262894774797069900210568527972770000000000000000000000000029969067287845284806900763378587428179104321131567560879029936829441608168999999999999999999999999991009279813646414557929770986423771546268703660529731736291018951167517549300000000000000000000000002697216055906075632621068704072868536119388901841080479112694314649744735209999999999999999999999999190835183228177310213679388778139439164183329447675856266191705605076579437000000000000000000000000242749445031546806935896183366558168250745001165697243120142488318477026168899999999999999999999999927175166490535957919231144990032549524776499650290827063957253504456892149330000000000000000000000021847450052839212624230656502990235142567050104912751880812823948662932355200999999999999999999999993445764984148236212730803049102929457229884968526174435756152815401120293439700000000000000000000001966270504755529136180759085269121162831034509442147669273154155379663911968089999999999999999999999410118848573341259145772274419263651150689647167355699218053753386100826409573000000000000000000000176964345427997622256268317674220904654793105849793290234583873984169752077128099999999999999999999946910696371600713323119504697733728603562068245062012929624837804749074376861570000000000000000000015926791088519786003064148590679881418931379526481396121112548658575277686941528999999999999999999995221962673444064199080755422796035574320586142055581163666235402427416693917541300000000000000000001433411197966780740275773373161189327703824157383325650900129379271774991824737609999999999999999999569976640609965777917267988051643201688852752785002304729961186218467502452578717000000000000000000129007007817010266624819603584507039493344174164499308581011644134459749264226384899999999999999999961297897654896920012554118924647888151996747750650207425696506759662075220732084530000000000000000011610630703530923996233764322605633554400975674804937772291047972101377433780374640999999999999999996516810788940722801129870703218309933679707297558518668312685608369586769865887607700000000000000001044956763317783159661038789034507019896087810732444399506194317489123969040233717689999999999999999686512971004665052101688363289647894031173656780266680148141704753262809287929884693000000000000000094046108698600484369493491013105631790647902965919995955557488574021157213621034592099999999999999971786167390419854689151952696068310462805629110224001213332753427793652835913689622370000000000000008464149782874043593254414191179506861158311266932799636000173971661904149225893113288999999999999997460755065137786922023675742646147941652506619920160109199947808501428755232232066013300000000000000761773480458663923392897277206155617504248014023951967240015657449571373430330380196009999999999999771467955862400822982130816838153314748725595792814409827995302765128587970900885941197000000000000068559613241279753105360754948554005575382321262155677051601409170461423608729734217640899999999999979432116027616074068391773515433798327385303621353296884519577248861572917381079734707730000000000006170365191715177779482467945369860501784408913594010934644126825341528124785676079587680999999999998148890442485446666155259616389041849464677325921796719606761952397541562564297176123695700000000000555332867254366000153422115083287445160596802223460984117971414280737531230710847162891289999999999833400139823690199953973365475013766451820959332961704764608575715778740630786745851132613000000000049979958052892940013807990357495870064453712200111488570617427285266377810763976244660216099999999985006012584132117995857602892751238980663886339966553428814771814420086656770807126601935170000000004498196224760364601242719132174628305800834098010033971355568455673974002968757862019419448999999998650541132571890619627184260347611508259749770596989808593329463297807799109372641394174165300000000404837660228432814111844721895716547522075068820903057422001161010657660267188207581747750409999999878548701931470155766446583431285035743377479353729082773399651696802701919843537725475674877000000036435389420558953270066024970614489276986756193881275167980104490959189424046938682357297536899999989069383173832314018980192508815653216903973141835617449605968652712243172785918395292810738930000003279185047850305794305942247355304034928808057449314765118209404186327048164224481412156778320999999016244485644908261708217325793408789521357582765205570464537178744101885550732655576352966503700000295126654306527521487534802261977363143592725170438328860638846376769434334780203327094110048889999911462003708041743553739559321406791056922182448868501341808346086969169699565939001871766985333

(10)

int(exp(-1985*(t+1/t))/sqrt(t), t = 0 .. infinity)

(1/1985)*Pi^(1/2)*exp(-3970)*1985^(1/2)

(11)

l := [seq(LinearAlgebra:-Determinant(Matrix(n, proc (i, j) options operator, arrow; 1/min(i, j) end proc)), n = 1 .. 10)]

[1, -1/2, 1/12, -1/144, 1/2880, -1/86400, 1/3628800, -1/203212800, 1/14631321600, -1/1316818944000]

(12)

with(gfun):

rec := listtorec(l, u(n))

[{u(n+1)+(n^2+5*n+6)*u(n+2), u(0) = 1, u(1) = -1/2}, ogf]

(13)

rsolve(rec[1], u)

(-1)^n*(n+1)/GAMMA(n+2)^2

(14)

``

Hope the reader will try to continue the above.

Download Putnam_done_with_Maple.mw

Ever year about this time, somewhat geeky holiday-themed content makes the rounds on the internet.  And I realized that even though I have seen much of this content already, I still enjoy seeing it again. (Why wouldn’t I want to see a Dalek Christmas tree every year?)

So in the spirit of internet recycling, here are a couple of older-but-still-fun Maple applications with a Christmas/holiday theme for your enjoyment.

Talkin’ Turkey

The Physics of Santa Claus

Other examples (old or new) are most welcome, if anyone wants to share.

eithne

Hi
Two new things recently added to the latest version of Physics available on Maplesoft's R&D Physics webpage are worth mentioning outside the framework of Physics.

  • automaticsimplification. This means that after "Physics:-Setup(automaticsimplification=true)", the output corresponding to every single input (literally) gets automatically simplified in size before being returned to the screen. This is fantastically convenient for interactive work in most situations.

  • Add Physics:-Library:-Assume, to perform the same operations one typically performs with the  assume command, but without the side effect that the variables get redefined. So the variables do not get redefined, they only receive assumptions.

This new Assume implements the concept of an "extended assuming". It permits re-using expressions involving the variables being assumed, expressions that were entered before the assumptions were placed, as well as reusing all the expressions computed while the variables had assumptions, even after removing the variable's assumptions. None of this is possible when placing assumptions using the standard assume. The new routine also permits placing assumptions on global variables that have special meaning, that cannot be redefined, e.g. the cartesian, cylindrical or spherical coordinates sets, or the coordinates of a coordinate spacetime system within the Physics package, etc.

Examples:

 

with(Physics):

This is Physics from today:

Physics:-Version()[2]

`2014, December 9, 16:51 hours`

(1.1)
• 

Automatic simplification is here. At this point automaticsimplification is OFF by default.

Setup(automaticsimplification)

[automaticsimplification = false]

(1.2)

Hence, for instance, if you input the following expression, the computer just echoes your input:

Physics:-`*`(a, c)+Physics:-`*`(a, d)+Physics:-`*`(b, c)+Physics:-`*`(b, d)

a*c+a*d+b*c+b*d

(1.3)

There is however some structure behind (1.3) and, in most situations, it is convenient to have these structures
apparent, in part because they frequently provide hints on how to proceed ahead, but also because a more
compact expression is, roughly speaking, simpler to understand. To see this
automaticsimplification in action,
turn it ON:

Setup(automaticsimplification = true)

[automaticsimplification = true]

(1.4)

Recall this same expression (you could input it with the equation label (1.3) as well) 

Physics:-`*`(a, c)+Physics:-`*`(a, d)+Physics:-`*`(b, c)+Physics:-`*`(b, d)

(c+d)*(a+b)

(1.5)

What happened: this output, as everything else after you set automaticsimplification = true and with no
exceptions, is now further processed with simplify/size before being returned. And enjoy computing with frankly
shorter expressions all around! And no need anymore for "simplify(%, size)" every three or four input lines.

Another  example, typical in computer algebra where expressions become uncomfortably large and difficult to
read: convert the following input to 2D math input mode first, in order to compare what is being entered with the
automatically simplified output on the screen

-Physics:-`*`(Physics:-`*`(Physics:-`*`(3, sin(x)^(1/2)), cos(x)^2), sin(x)^m)+Physics:-`*`(Physics:-`*`(Physics:-`*`(3, sin(x)^(1/2)), cos(x)^2), cos(x)^n)+Physics:-`*`(Physics:-`*`(Physics:-`*`(4, sin(x)^(1/2)), cos(x)^4), sin(x)^m)-Physics:-`*`(Physics:-`*`(Physics:-`*`(4, sin(x)^(1/2)), cos(x)^4), cos(x)^n)

-4*(cos(x)^n-sin(x)^m)*sin(x)^(1/2)*cos(x)^2*(cos(x)^2-3/4)

(1.6)

You can turn automaticsimplification OFF the same way

Setup(automaticsimplification = false)

[automaticsimplification = false]

(1.7)
• 

New Library:-Assume facility; welcome to the world of "extended assuming" :)

 

Consider a generic variable, x. Nothing is known about it

about(x)

x:

  nothing known about this object

 

Each variable has associated a number that depends on the session, and the computer (internally) uses this
number to refer to the variable.

addressof(x)

18446744078082181054

(1.8)

When using the assume  command to place assumptions on a variable, this number, associated to it, changes,
for example:

assume(0 < x and x < Physics:-`*`(Pi, 1/2))

addressof(x)

18446744078179060574

(1.9)

Indeed, the variable x got redefined and renamed, it is not anymore the variable x referenced in (1.8).

about(x)

Originally x, renamed x~:

  is assumed to be: RealRange(Open(0),Open(1/2*Pi))

 


The semantics may seem confusing but that is what happened, you enter x and the computer thinks x~, not x 
anymore.This means two things:

1) all the equations/expressions, entered before placing the assumptions on x using assume, involve a variable x 
that is different than the one that exists after placing the assumptions, and so these previous expressions
cannot
be reused
. They involve a different variable.

2) Also, because, after placing the assumptions using assume, x refers to a different object, programs that depend
on the
x that existed before placing the assumptions will not recognize the new x redefined by assume .

 

For example, if x was part of a coordinate system and the spacetime metric g[mu, nu]depends on it, the new variable x
redefined within assume, being a different symbol, will not be recognized as part of the dependency of "g[mu,nu]." This
posed constant obstacles to working with curved spacetimes that depend on parameters or on coordinates that
have a restricted range. These problems are resolved entirely with this new
Library:-Assume, because it does not
redefine the variables. It only places assumptions on them, and in this sense it works like
assuming , not assume .
As another example, all the
Physics:-Vectors commands look for the cartesian, cylindrical or spherical coordinates
sets
[x, y, z], [rho, phi, z], [r, theta, phi] in order to determine how to proceed, but these variables disappear if you use
assume to place assumptions on them. For that reason, only assuming  was fully compatible with Physics, not assume.

 

To undo assumptions placed using the assume command one reassigns the variable x to itself:

x := 'x'

x

(1.10)

Check the numerical address: it is again equal to (1.8) 

addressof(x)

18446744078082181054

(1.11)

·All these issues get resolved with the new Library:-Assume, that uses all the implementation of the existing 
assume command but with a different approach: the variables being assumed do not get redefined, and hence:
a) you can reuse expressions/equations entered before placing the assumptions, you can also undo the
assumptions and reuse results obtained with assumptions. This is the concept of an
extended assuming. Also,
commands that depend on these assumed variables will all continue to work normally, before, during or after
placing the assumption, because
the variables do not get redefined.

Example:

about(x)

x:

  nothing known about this object

 

So this simplification attempt accomplishes nothing

simplify(arccos(cos(x)))

arccos(cos(x))

(1.12)

Let's assume now that 0 < x and x < (1/2)*Pi

Library:-Assume(0 < x and x < Physics:-`*`(Pi, 1/2))

{x::(RealRange(Open(0), Open((1/2)*Pi)))}

(1.13)

The new command echoes the internal format representing the assumption placed.

a) The address is still the same as (1.8)

addressof(x)

18446744078082181054

(1.14)

So the variable did not get redefined. The system however knows about the assumption - all the machinery of the
assume command is being used

about(x)

Originally x, renamed x:

  is assumed to be: RealRange(Open(0),Open(1/2*Pi))

 


Note that the renaming is to the variable itself - i.e. no renaming.

Hence, expressions entered before placing assumptions can be reused. For example, for (1.12), we now have

simplify(arccos(cos(x)))

x

(1.15)

To clear the assumptions on x, you can use either of Library:-Assume(x=x) or Library:-Assume(clear = {x, ...}) in
the case of many variables being cleared in one go, or in the case of a single variable being cleared:

Library:-Assume(clear = x)

about(x)

x:

  nothing known about this object

 


The implementation includes the additionally functionality, for that purpose add the keyword
additionally 
anywhere in the calling sequence. For example:

Library:-Assume(x::positive)

{x::(RealRange(Open(0), infinity))}

(1.16)

about(x)

Originally x, renamed x:

  is assumed to be: RealRange(Open(0),infinity)

 

Library:-Assume(additionally, x < 1)

{x::(RealRange(Open(0), Open(1)))}

(1.17)

Library:-Assume(x = x)

In summary, the new Library:-Assume command implements the concept of an extended assuming, that can be
turned ON and OFF at will at any moment without changing the variables involved.


Download AutomaticSimplificationAndAssume.mw

 

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft


Partial rectification for the Physics:-Simplify and Physics:-Library:-SortProducts procedures dealing with Fermi annihilation/creation operators

This post will be useful for physicists dealing with Fermi annihilation/creation operators. Physics Package provides plenty of powerful tools for quantum operators handling, however some of them often fail to render correct result.  In particular incorrect behaviour with respect to Fermi annihilation/creation operators is observed for routines Simplify and SortProducts.  In this post I present my procedures S*implifyFermionicOperators and SortProductsFermi which partially solve these issues.

Problems with Physics Package routines

   

Short explanation of custom routines SimplifyFermionicOperators and SortProductsFermi

   

"Details for SimplifyFermionicOperators(z,prefix)"

   

"Details for SortProductsFermi(x,L,prefix)"

   

Weak points

   

Final notes

   


Download FermiCreationAnnihilation.mw

I'd like to pay attention to the article of David Austin "How to Grow and Prune a Classification Tree"

Here is its introduction:

"

It's easy to collect data these days; making sense of it is more work. This article explains a construction in machine learning and data mining called a classification tree. Let's consider an example.

In the late 1970's, researchers at the University of California, San Diego Medical Center performed a study in which they monitored 215 patients following a heart attack. For each patient, 19 variables, such as age and blood pressure, were recorded. Patients were then grouped into two classes, depending on whether or not they survived more than 30 days following the heart attack.

Assuming the patients studied were representative of the more general population of heart attack patients, the researchers aimed to distill all this data into a simple test to identify new patients at risk of dying within 30 days of a heart attack.

By applying the algorithm described here, Breiman, Freidman, Olshen, and Stone, created a test consisting of only three questions---what is the patient's minimum systolic blood pressure within 24 hours of being admitted to the hospital, what is the patient's age, does the patient exhibit sinus tachycardia---to identify patients at risk. In spite of its simplicity, this test proved to be more accurate than any other known test. In addition, the importance of these three questions indicate that, among all 19 variables, these three factors play an important role in determining a patient's chance of surviving.

Besides medicine, these ideas are applicable to a wide range of problems, such as identifying which loan applicants are likely to default and which voters are likely to vote for a particular political party.

In what follows, we will describe the work of Breiman and his colleagues as set out in their seminal book Classification and Regression Trees. Theirs is a very rich story, and we will concentrate on only the essential ideas"

It would be interesting to compare this approach with discriminant analysis. Hope somebody of  the Maple developers will give a concrete example on this theme with Maple.

The procedure  NumbersGame  generalizes the well-known 24 game  (implementation in Maple see here), as well as related issues (see here and here).

 

Required parameters of the procedure:

Result is an integer or a fraction of any sign.

Numbers is a list of positive integers.

 

Optional parameters:

Operators is a list of permitted arithmetic operations. By default  Operators is  ["+","-","*","/"]

NumbersOrder is a string. It is equal to "strict order" or "arbitrary order" . By default  NumbersOrder is "strict order"

Parentheses is a symbol  no  or  yes . By default  Parentheses is  no 

 

The procedure puts the signs of operations from the list  Operators  between the numbers from  Numbers  so that the result is equal to Result. The procedure finds all possible solutions. The global  M  saves the list of the all solutions.

 

Code the procedure:

restart;

NumbersGame:=proc(Result::{integer,fraction}, Numbers::list(posint), Operators::list:=["+","-","*","/"], NumbersOrder::string:="strict order", Parentheses::symbol:=no)

local MyHandler, It, K, i, P, S, n, s, L, c;

global M;

uses StringTools, ListTools, combinat; 

 MyHandler := proc(operator,operands,default_value)

      NumericStatus( division_by_zero = false );

      return infinity;

   end proc;

   NumericEventHandler(division_by_zero=MyHandler); 

if Parentheses=yes then 

It:=proc(L1,L2)

local i, j, L;

for i in L1 do

for j in L2 do

L[i,j]:=seq(Substitute(Substitute(Substitute("( i Op j )","i",convert(i,string)),"j",convert(j,string)),"Op",Operators[k]), k=1..nops(Operators));

od; od;

L:=convert(L, list);

end proc; 

P:=proc(L::list)

local n, K, i, M1, M2, S;

n:=nops(L);

if n=1 then return L else

for i to n-1 do

M1:=P(L[1..i]); M2:=P(L[i+1..n]);

K[i]:=seq(seq(It(M1[j], M2[k]), k=1..nops(M2)), j=1..nops(M1))

od; fi;

K:=convert(K,list);

end proc;

if NumbersOrder="arbitrary order" then S:=permute(Numbers); K:=[seq(op(Flatten([op(P(s))])), s=S)] else  K:=[op(Flatten([op(P(Numbers))]))] fi; 

else 

if NumbersOrder="strict order" then

K:=[convert(Numbers[1],string)];

for i in Numbers[2..-1] do

K:=[seq(seq(cat(k, Substitute(Substitute(" j i","j",convert(j,string)),"i",convert(i,string))), k in K), j in Operators)]

od;   else 

S:=permute(Numbers);

for s in S do

L:=[convert(s[1],string)];

for i in s[2..-1] do

L:=[seq(seq(cat(k, Substitute(Substitute(" j i","j",convert(j,string)),"i",convert(i,string))), k in L), j in Operators)]

od; K[s]:=op(L) od; K:=convert(K,list) fi;  

fi; 

M:='M'; c:=0;

for i in K do

if parse(i)=Result then c:=c+1; if Parentheses=yes then M[i]:= convert(SubString(i,2..length(i)-1),symbol)=convert(Result,symbol) else M[i]:=convert(i,symbol)=convert(Result,symbol) fi; fi;

od; 

if c=0 then M:=[]; return `No solutions` else M:=convert(M,list);  op(M) fi; 

end proc:

 

Examples of use.

 

Example 1:

NumbersGame(1/20, [$ 1..9]);

     1 * 2 - 3 + 4 / 5 / 6 * 7 / 8 * 9 = 1/20

 

Example 2. Numbers in the list  Numbers  may be repeated and permitted operations can be reduced:

NumbersGame(15, [3,3,5,5,5], ["+","-"]);

         3 - 3 + 5 + 5 + 5 = 15

 

Example 3. 

NumbersGame(10, [1,2,3,4,5]);

         1 + 2 + 3 * 4 - 5 = 10

If the order of the number in Numbers is arbitrary, then the number of solutions is greatly increased (10 solutions displayed):

NumbersGame(10, [1,2,3,4,5], "arbitrary order"):

nops(M);

for i to 10 do

M[1+50*(i-1)] od;

If you use the parentheses, the number of solutions will increase significantly more (10 solutions displayed):

NumbersGame(10, [1,2,3,4,5], "arbitrary order", yes):

nops(M);

for i to 10 do

M[1+600*(i-1)] od;

Game.mws

 

 

 

We received an interesting and timely submission to the Maple Application Center this morning that I think people might be interested in.  It's called:

The Comet 67P/Churyumov-Gerasimenko, Rosetta & Philae, by Dr. Ahmed Baroudy. From the abstract:

Our plan is rather a modest one since all we want is to get , by calculations, specific data concerning the comet and its lander.
We shall take a simplified model and consider the comet as a perfect solid sphere to which we can apply Newton's laws.

We want to find:

I- the acceleration on the comet surface ,
II- its radius,
III- its density,
IV- the velocity of Philae just after the 1st bounce off the comet (it has bounced twice),
V- the time for Philae to reach altitude of 1000 m above the comet .

We shall compare our findings with the already known data to see how close our simplified mathematical model findings are to the duck-shaped comet already known results.
It turned out that our calculations for a sphere shaped comet are very close to the already known data.

Click on the link above if you want to take a look.

 

eithne

What is Groebner? That was asked in different forms several times in MaplePrimes and MathStackExchange (for example, see http://math.stackexchange.com/questions/3550/using-gr?bner-bases-for-solving-polynomial-equations ). In view of this I think the presented post on Groebner basis will be useful. This post consists of two parts: its mathematical background and examples of solutions of polynomial systems by hand and with Maple.

Let us start. Up to Wiki http://en.wikipedia.org/wiki/Gr%C3%B6bner_basis ,Groebner basis computation can be seen as a multivariate, non-linear generalization of both Euclid's algorithm for computing polynomial greatest common divisors, and Gaussian elimination for linear systems. This is implemented in Maple trough the Groebner package.
The simplest introduction to the topic I know is a well-written book of Ivan Arzhantsev (https://zbmath.org/?q=an:05864974) which includes the proofs of all the claimed theorems and the solutions of all the exercises. Here is its digest groebner.pdf done by me (The reader is assumed to be familiar with the ideal notion and ring notion (one may refresh her/his knowledge, looking in http://en.wikipedia.org/wiki/Ideal_%28ring_theory%29)). It should be noted that there is no easy reading about this serious matter.
Referring to the digest as appropriate, we solve the system
S:={a*b = c^2+c, a^2 =a+ b*c, a*c = b^2+b} by hand and with the Groebner package.
For the order a > b > c we construct its ideal
J(S):=<f1 = a*b-c^2-c,f2 = a^2-a-b*c, f3 = a*c-b^2-b>.
The link between f1 and f2 gives
f1*a-f2*b = (-c^2-c)*a + (a + b*c)*b = a*b -a*c + b^2*c -
a*c^2 =f4.
The reduction with f1 produces
f4 ->-a*c^2- a*c + b^2*c + c^2 +c =: f4.
Now the reduction with f3 produces
f4 -> -b^2- b - b*c +c^2 + c =:f4.
The link between f2 and f3 gives:
f2*c - f3*a = a*b +a*b^2 -a*c -b*c^2 = f5.
The reduction with f1 produces
f5 -> -a*c + c*b +c^2 +c =:f5.
The reduction with f3 produces
f5 -> -b^2 -b + c*b +c^2 +c =:f5.
The reduction with f4 produces
f5 -> 2b*c =: f5.
The link between f1 and f3
f1*c - f3*b = b^3 + b^2 -c^3 -c^2=:f6.
The reduction with f4 produces
f6 -> 2b*c + 2b*c^2 -2c^3 -2c^2=:f6.
At last, we reduce f6 by f5, obtaining f6:= -2c^3 -2c^2.
We see the minimal reduced Groebner basis of S consists of
a^2 -a -b*c, -b^2 -b- b*c +c^2 +c, -2c^3 - 2c^2.
Now we find the solution set of the system under consideration. The equation -2c^3 - 2c^2 = 0 implies
c=0, c=0, c=-1. The the equation -b^2 - b - b*c +c^2 + c = 0 gives
b = 0 , b = -1, b = 0, b = -1, b = 0, b = 0 respectively.
At last, knowing b and c, we find a from a^2 -a -b*c = 0.
Hence,
[{a = 0, b = 0, c = 0}, {a = 1, b = 0, c = 0}, {a = 0, b = -1, c = 0}], [{a = 0, b = 0, c = 0}, {a = 1, b = 0, c = 0}, {a = 0, b = -1, c = 0}], [{a = 0, b = 0, c = -1}].
The solution of the system under consideration by the Groebner package is somewhat different because Maple does not find the minimal reduced Groebner basis directly.

 

with(Groebner):

[b*c, a*c-c^2-c, b^2-c^2+b-c, a*b-c^2-c, a^2-a, c^3+c^2]

(1)

GB2 := remove(has, GB1, a);

[b*c, b^2-c^2+b-c, c^3+c^2]

(2)

GB3 := Basis(GB2, lexdeg([b, c]))

[b*c, b^2-c^2+b-c, c^3+c^2]

(3)

op(remove(has, GB3, {b}))

c^3+c^2

(4)

solc := solve(c^3+c^2);

-1, 0, 0

(5)

solb := [seq(op(map(`union`, [solve(eval(GB3, c = i), {b})], {c = i})), i = solc)]

[{b = 0, c = -1}, {b = -1, c = 0}, {b = 0, c = 0}, {b = -1, c = 0}, {b = 0, c = 0}]

(6)

sol := seq(op(map(`union`, [solve(eval(GB1, i))], i)), i = solb)

{a = 0, b = 0, c = -1}, {a = 0, b = -1, c = 0}, {a = 0, b = 0, c = 0}, {a = 1, b = 0, c = 0}, {a = 0, b = -1, c = 0}, {a = 0, b = 0, c = 0}, {a = 1, b = 0, c = 0}

(7)

NULL

S2 := {a*c-b^2-b, a*b-c^2-c, a^2-b*c+a}:

GB1 := Basis(S2, lexdeg([a, b, c]))

[a*c+b*c+c^2+c, b^2+b*c+c^2+b+c, a*b-c^2-c, a^2-b*c+a]

(8)

GB2 := remove(has, GB1, a)

[b^2+b*c+c^2+b+c]

(9)

sol1 := solve(GB2, b)

{b = -(1/2)*c-1/2+(1/2)*(-3*c^2-2*c+1)^(1/2)}, {b = -(1/2)*c-1/2-(1/2)*(-3*c^2-2*c+1)^(1/2)}

(10)

map(proc (c) options operator, arrow; `union`(c, sol1[1]) end proc, map(proc (C) options operator, arrow; solve(C, {a}) end proc, eval(S2, sol1[1])))

{{a = 2*c*(c+1)/(-c-1+(-3*c^2-2*c+1)^(1/2)), b = -(1/2)*c-1/2+(1/2)*(-3*c^2-2*c+1)^(1/2)}, {a = -1/2-(1/2)*(1+2*c*(-3*c^2-2*c+1)^(1/2)-2*c^2-2*c)^(1/2), b = -(1/2)*c-1/2+(1/2)*(-3*c^2-2*c+1)^(1/2)}, {a = -1/2+(1/2)*(1+2*c*(-3*c^2-2*c+1)^(1/2)-2*c^2-2*c)^(1/2), b = -(1/2)*c-1/2+(1/2)*(-3*c^2-2*c+1)^(1/2)}, {a = -(1/2)*c-1/2-(1/2)*(-3*c^2-2*c+1)^(1/2), b = -(1/2)*c-1/2+(1/2)*(-3*c^2-2*c+1)^(1/2)}}

(11)

``

 

Download groebner.mw

I'd like to pay attention to the recent article "The Misfortunes of a Trio of Mathematicians Using Computer Algebra Systems. Can We Trust in Them?"

In particular, the authors consider the integral

int(abs(exp(2*Pi*Ix)+exp(2*Pi*I*y)),[x=0..1,y=0..1]),

stating "Both Mathematica and Maple return zero as the answer to this calculation. Yet this cannot be correct, because the integrand is clearly positive and nonzero in the indicated region". Unfortunately, they give only the Mathematica command to this end.

Of course, the integral under consideration is complicated so the the simple-minded trials

int(evalc(abs(exp((2*Pi*I)*x)+exp((2*Pi*I)*y))), [x = 0 .. 1, y = 0 .. 1]);

and

VectorCalculus:-int(evalc(abs(exp((2*Pi*I)*x)+exp((2*Pi*I)*y))), [x,y]=Rectangle( 0 .. 1, 0 .. 1));

fail. However,this can be found with Maple (I think with Mathematica too.) in such a way.

 

A := evalc(abs(exp((2*Pi*I)*x)+exp((2*Pi*I)*y)))

((cos(2*Pi*x)+cos(2*Pi*y))^2+(sin(2*Pi*x)+sin(2*Pi*y))^2)^(1/2)

(1)

NULL

B := simplify(A, trig)

(2*cos(2*Pi*x)*cos(2*Pi*y)+2+2*sin(2*Pi*x)*sin(2*Pi*y))^(1/2)

(2)

op(B)[1]

2*cos(2*Pi*x)*cos(2*Pi*y)+2+2*sin(2*Pi*x)*sin(2*Pi*y)

(3)

combine(op(B)[1], x)

2*cos(2*Pi*x-2*Pi*y)+2

(4)

C := eval(B, op(B)[1] = combine(op(B)[1], x))

(2*cos(2*Pi*x-2*Pi*y)+2)^(1/2)

(5)

int(C, [x = 0 .. 1, y = 0 .. 1])

4/Pi

(6)

``

 

Download int.mw

 

 

Hi, we recently put together a web video on how memes spread on the internet using several visualizations generated from Maple 18:

http://youtu.be/vEhAkEPwESI

Found the new ability to specify a background image for plots to be very helpful.

We have just released a new version of MapleSim.

MapleSim 7 makes it substantially easier to explore and validate designs, create and manage libraries of custom components, and use your MapleSim models with other tools. It includes:

  • Easy model investigation. A new Results Manager gives you greater flexibility when it comes to investigating your simulation results, including the ability to compare simulation runs on the same axes, instantly plot both probed and unprobed variables, and easily create custom plots.
  • Convenient library creation. With MapleSim 7, it is significantly easier to create, manage, and share libraries of custom components.
  • Improved Modelica support. MapleSim 7 expands the support of the Modelica language so that more Modelica definitions can be used directly inside MapleSim.

We have also updated and expanded the MapleSim 7 family of add-on products:

  • The new MapleSim Battery Library, which is available as a separate add-on, allows you to incorporate physics-based predictive models of battery cells into your system models so you can take battery behavior into account early in the design process. 
  • The MapleSim Connector for FMI, which allows engineers to share very efficient, high-fidelity models created in MapleSim with other modeling tools, has been expanded to support more export formats for co-simulation and model exchange.

See What’s New in MapleSim 7 for more information about these and other improvements in MapleSim.

 

eithne

Last week the Physics package was presented in a talk at the Perimeter Institute for Theoretical Physics and in a combined Applied Mathematics and Physics Seminar at the University of Waterloo. The presentation at the Perimeter Institute got recorded. It was a nice opportunity to surprise people with the recent advances in the package. It follows the presentation with sections closed, and at the end there is a link to a pdf with the sections open and to the related worksheet, used to run the computations in real time during the presentation.

COMPUTER ALGEBRA FOR THEORETICAL PHYSICS

 

  

Generally speaking, physicists still experience that computing with paper and pencil is in most cases simpler than computing on a Computer Algebra worksheet. On the other hand, recent developments in the Maple system implemented most of the mathematical objects and mathematics used in theoretical physics computations, and dramatically approximated the notation used in the computer to the one used in paper and pencil, diminishing the learning gap and computer-syntax distraction to a strict minimum. In connection, in this talk the Physics project at Maplesoft is presented and the resulting Physics package illustrated tackling problems in classical and quantum mechanics, general relativity and field theory. In addition to the 10 a.m lecture, there will be a hands-on workshop at 1pm in the Alice Room.

 

... Why computers?

 

 

We can concentrate more on the ideas instead of on the algebraic manipulations

 

We can extend results with ease

 

We can explore the mathematics surrounding a problem

 

We can share results in a reproducible way

 

Representation issues that were preventing the use of computer algebra in Physics

 

 

Notation and related mathematical methods that were missing:


coordinate free representations for vectors and vectorial differential operators,

covariant tensors distinguished from contravariant tensors,

functional differentiation, relativity differential operators and sum rule for tensor contracted (repeated) indices

Bras, Kets, projectors and all related to Dirac's notation in Quantum Mechanics

 

Inert representations of operations, mathematical functions, and related typesetting were missing:

 

inert versus active representations for mathematical operations

ability to move from inert to active representations of computations and viceversa as necessary

hand-like style for entering computations and texbook-like notation for displaying results

 

Key elements of the computational domain of theoretical physics were missing:

 

ability to handle products and derivatives involving commutative, anticommutative and noncommutative variables and functions

ability to perform computations taking into account custom-defined algebra rules of different kinds

(problem related commutator, anticommutator, bracket, etc. rules)

Vector and tensor notation in mechanics, electrodynamics and relativity

   

Dirac's notation in quantum mechanics

   

 

• 

Computer algebra systems were not originally designed to work with this compact notation, having attached so dense mathematical contents, active and inert representations of operations, not commutative and customizable algebraic computational domain, and the related mathematical methods, all this typically present in computations in theoretical physics.

• 

This situation has changed. The notation and related mathematical methods are now implemented.

 

Tackling examples with the Physics package

 

Classical Mechanics

 

Inertia tensor for a triatomic molecule

 

 

Problem: Determine the Inertia tensor of a triatomic molecule that has the form of an isosceles triangle with two masses m[1] in the extremes of the base and mass m[2] in the third vertex. The distance between the two masses m[1] is equal to a, and the height of the triangle is equal to h.

Solution

   

Quantum mechanics

 

Quantization of the energy of a particle in a magnetic field

 


Show that the energy of a particle in a constant magnetic field oriented along the z axis can be written as

H = `&hbar;`*`&omega;__c`*(`#msup(mi("a",mathcolor = "olive"),mo("&dagger;"))`*a+1/2)

where `#msup(mi("a",mathcolor = "olive"),mo("&dagger;"))`and a are creation and anihilation operators.

Solution

   

The quantum operator components of `#mover(mi("L",mathcolor = "olive"),mo("&rarr;",fontstyle = "italic"))` satisfy "[L[j],L[k]][-]=i `&epsilon;`[j,k,m] L[m]"

   

Unitary Operators in Quantum Mechanics

 

(with Pascal Szriftgiser, from Laboratoire PhLAM, Université Lille 1, France)

A linear operator U is unitary if 1/U = `#msup(mi("U"),mo("&dagger;"))`, in which case, U*`#msup(mi("U"),mo("&dagger;"))` = U*`#msup(mi("U"),mo("&dagger;"))` and U*`#msup(mi("U"),mo("&dagger;"))` = 1.Unitary operators are used to change the basis inside an Hilbert space, which physically means changing the point of view of the considered problem, but not the underlying physics. Examples: translations, rotations and the parity operator.

1) Eigenvalues of an unitary operator and exponential of Hermitian operators

   

2) Properties of unitary operators

   

3) Schrödinger equation and unitary transform

   

4) Translation operators

   

Classical Field Theory

 

The field equations for a quantum system of identical particles

 

 

Problem: derive the field equation describing the ground state of a quantum system of identical particles (bosons), that is, the Gross-Pitaevskii equation (GPE). This equation is particularly useful to describe Bose-Einstein condensates (BEC).

Solution

   

The field equations for the lambda*Phi^4 model

   

Maxwell equations departing from the 4-dimensional Action for Electrodynamics

   

General Relativity

 

Given the spacetime metric,

g[mu, nu] = (Matrix(4, 4, {(1, 1) = -exp(lambda(r)), (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = -r^2, (2, 3) = 0, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -r^2*sin(theta)^2, (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = exp(nu(r))}))

a) Compute the trace of

"Z[alpha]^(beta)=Phi R[alpha]^(beta)+`&Dscr;`[alpha]`&Dscr;`[]^(beta) Phi+T[alpha]^(beta)"

where `&equiv;`(Phi, Phi(r)) is some function of the radial coordinate, R[alpha, `~beta`] is the Ricci tensor, `&Dscr;`[alpha] is the covariant derivative operator and T[alpha, `~beta`] is the stress-energy tensor

T[alpha, beta] = (Matrix(4, 4, {(1, 1) = 8*exp(lambda(r))*Pi, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = 8*r^2*Pi, (2, 3) = 0, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 8*r^2*sin(theta)^2*Pi, (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 8*exp(nu(r))*Pi*epsilon}))

b) Compute the components of "W[alpha]^(beta)"" &equiv;"the traceless part of  "Z[alpha]^(beta)" of item a)

c) Compute an exact solution to the nonlinear system of differential equations conformed by the components of  "W[alpha]^(beta)" obtained in b)

Background: paper from February/2013, "Withholding Potentials, Absence of Ghosts and Relationship between Minimal Dilatonic Gravity and f(R) Theories", by P. Fiziev.

a) The trace of "  Z[alpha]^(beta)=Phi R[alpha]^(beta)+`&Dscr;`[alpha]`&Dscr;`[]^(beta) Phi+T[alpha]^(beta)"

   

b) The components of "W[alpha]^(beta)"" &equiv;"the traceless part of " Z[alpha]^(beta)"

   

c) An exact solution for the nonlinear system of differential equations conformed by the components of  "W[alpha]^(beta)"

   

The Physics Project

 

 

"Physics" is a software project at Maplesoft that started in 2006. The idea is to develop a computational symbolic/numeric environment specifically for Physics, targeting educational and research needs in equal footing, and resembling as much as possible the flexible style of computations used with paper and pencil. The main reference for the project is the Landau and Lifshitz Course of Theoretical Physics.

 

A first version of "Physics" with basic functionality appeared in 2007. Since then the package has been growing every year, including now, among other things, a searcheable database of solutions to Einstein equations and a new dedicated programming language for Physics.

 

Since August/2013, weekly updates of the Physics package are distributed on the web, including the new developments related to our plan as well as related to people's feedback.

 

 

Presentation_at_PI_and_UW.pdf     Presentation_at_PI_and_UW.mw

 

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

The Embedded Components are containers that currently use industries for modeling complex systems to find viable solutions in real time and thus avoid huge wait times and overload our computer; by this paper should show you how to implement a dynamic worksheet through Embedded Components in Maple; it goes from finding solutions to ordinary differential equations partial; which interact with the researcher using different parameters.
Using graphical programming will find immediate solutions to selected problems in science and engineering criteria of variability and boundary conditions evolving development with buttons on multiple actions.

 

cimac_2014.pdf

(in spanish)

Solutions_of_Differential_Equations_with_Embedded_Components.mw

 

Lenin Araujo Castillo

Physics Pure

Computer Science

 

Maplesoft regularly hosts live webinars on a variety of topics. Below you will find details on some upcoming webinars we think may be of interest to the MaplePrimes community.  For the complete list of upcoming webinars, visit our website.

Maplesoft Solutions for Math Education

This webinar will demonstrate how Maplesoft’s solutions for mathematics education help teachers bring complex problems to life, allow students to focus on concepts rather than the mechanics of solutions, and offer students the necessary practice to master the concepts being taught.

Key takeaways include:

• How to quickly and painlessly place incoming students in the correct math courses

• How you can use hundreds of intuitive Clickable Math tools to demonstrate and explore up to advanced-level problems and algorithms in the classroom

• How to automate your testing and assessment needs, specifically for math courses

• How to bring your STEM courses to life in an online environment

To join us for the live presentation, please click here to register.

Introduction to Maple T.A. Placement Test Suite 10

This webinar will provide an overview and demonstration of the latest release of the Maple T.A. MAA Placement Test Suite. A result of the ongoing partnership between the Mathematical Association of America (MAA) and Maplesoft, this product gives you the ability to provide the renowned MAA placement tests in an online testing environment. Learn how the Maple T.A. MAA Placement Test Suite can greatly simplify your placement process and explore the latest additions, including a streamlined interface and new tests to determine your students’ readiness for Precalculus and Algebra courses.

To join us for the live presentation, please click here to register.

There is also a recording available from another live webinar we did earlier this month: Introduction to Maple T.A. 10.

First 41 42 43 44 45 46 47 Last Page 43 of 71