Re: Recursion depth
- To: mathgroup at smc.vnet.net
- Subject: [mg49888] Re: Recursion depth
- From: "Steve Luttrell" <steve_usenet at _removemefirst_luttrell.org.uk>
- Date: Thu, 5 Aug 2004 09:21:10 -0400 (EDT)
- References: <cequj5$k47$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Mathematica 5.0.1 solves these ODEs using your code. In case it is any help to you here is the FullForm version of the solution {si2[s],r2[s],th2[s],ph2[s]} that I obtained: List[InterpolatingFunction[List[List[0.`,1.`]], List[1,2,True,Real,List[3],List[0]], List[List[0.`,0.00009533963472195465`,0.0001906792694439093`, 0.007298682413533105`,0.014406685557622301`,0.0215146887017115`, 0.04271275658506481`,0.06391082446841811`,0.08510889235177144`, 0.10630696023512475`,0.14870309600183138`,0.191099231768538`, 0.2334953675352446`,0.2758915033019512`,0.31828763906865787`, 0.3997983119521431`,0.48130898483562834`,0.5628196577191136`, 0.6443303306025988`,0.725841003486084`,0.8073516763695694`, 0.9036758381847847`,1.`]], List[List[0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63, 66,69],List[-1.5`,0.2`,-0.004987391808853677`,-1.4999809321637718`, 0.19999904849588407`,-0.004990076366041424`,-1.4999618644183084`, 0.19999809647974534`,-0.004992761622783256`,-1.498540534679022`, 0.19992568253845477`,-0.005194901469456241`,-1.4971197299691923`, 0.19985036740324427`,-0.005400920406781723`,-1.4956994711062206`, 0.19977209599618165`,-0.0056108089743061`,-1.4914672990676239`, 0.19952060702127164`,-0.006259642195934895`,-1.4872407627692799`, 0.19924086669908314`,-0.006942535377643348`,-1.4830204683806087`, 0.19893145727547437`,-0.00765920909935484`,-1.4788070599358991`, 0.19859095285808823`,-0.008409364193681502`,-1.4704036246231706`, 0.19781102053008992`,-0.010008845794748712`,-1.4620362052886506`, 0.19688993397212082`,-0.011738272427899998`,-1.4537110248092326`, 0.1958168013056401`,-0.013594684842870488`,-1.4454347524267483`, 0.19458098780030553`,-0.015574880291918372`,-1.437214505652577`, 0.1931721418980054`,-0.01767541568723259`,-1.421595776690298`, 0.189940724252321`,-0.022038313015607238`,-1.4062703443490072`, 0.18596481931077138`,-0.02680394640153168`,-1.391301491931676`, 0.18118127948598003`,-0.031941340394863016`,-1.3767574501048336`, 0.1755321746152456`,-0.03741729729766833`,-1.3627109451801283`, 0.16896513747865247`,-0.04319690281328978`,-1.3492387364201326`, 0.16143359587115574`,-0.04924407703051103`,-1.33416846999958`, 0.15123474948947963`,-0.0566850536118796`,-1.32015049659536`, 0.1395762062191881`,-0.06438814759908776`]]][s], InterpolatingFunction[List[List[0.`,1.`]], List[1,1,True,Real,List[3],List[0]], List[List[0.`,0.00009533963472195465`,0.0001906792694439093`, 0.007298682413533105`,0.014406685557622301`,0.0215146887017115`, 0.04271275658506481`,0.06391082446841811`,0.08510889235177144`, 0.10630696023512475`,0.14870309600183138`,0.191099231768538`, 0.2334953675352446`,0.2758915033019512`,0.31828763906865787`, 0.3997983119521431`,0.48130898483562834`,0.5628196577191136`, 0.6443303306025988`,0.725841003486084`,0.8073516763695694`, 0.9036758381847847`,1.`]], List[List[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42, 44,46],List[1.25`,0.0707372016677029`,1.2500067458723336`, 0.07075622172593408`,1.2500134935580216`,0.0707752416678537`, 1.2505216026833772`,0.07219293520415954`,1.2510397863996277`, 0.07360995929272424`,1.2515680398647995`,0.07502629042841734`, 1.2532031886311146`,0.07924585060951676`,1.2549277086493238`, 0.08345837270798082`,1.2567414455004713`,0.08766318878502834`, 1.258644228353726`,0.09185958577772692`,1.2627161721753573`, 0.10022414880866037`,1.2671418565808956`,0.10854583205706149`, 1.2719193205040418`,0.11681796558962369`,1.2770463163632537`, 0.12503347835018544`,1.2825202867182963`,0.13318490069382438`, 1.2940084661091313`,0.14864761043319752`,1.3067441796415384`, 0.16378473244679434`,1.3206983062225555`,0.17853254972515142`, 1.3358363890942992`,0.19282353869263702`,1.352118329152839`, 0.2065869637124943`,1.369498148699033`,0.21974940706660878`, 1.3913802649120397`,0.23442579205034605`,1.4146254498944555`, 0.24802966113501462`]]][s], InterpolatingFunction[List[List[0.`,1.`]], List[1,1,True,Real,List[3],List[0]], List[List[0.`,0.00009533963472195465`,0.0001906792694439093`, 0.007298682413533105`,0.014406685557622301`,0.0215146887017115`, 0.04271275658506481`,0.06391082446841811`,0.08510889235177144`, 0.10630696023512475`,0.14870309600183138`,0.191099231768538`, 0.2334953675352446`,0.2758915033019512`,0.31828763906865787`, 0.3997983119521431`,0.48130898483562834`,0.5628196577191136`, 0.6443303306025988`,0.725841003486084`,0.8073516763695694`, 0.9036758381847847`,1.`]], List[List[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42, 44,46],List[1.`,-0.7979959892832436`, 0.9999239198673432`,-0.7979906035796773`, 0.9998478402482894`,-0.7979852164916424`, 0.9941771999100659`,-0.797579732839867`, 0.9885094690099041`,-0.7971665792449575`, 0.9828447019740946`,-0.7967457815057992`, 0.9659688705209264`,-0.7954457115458904`, 0.9491213297754195`,-0.7940786211684414`, 0.9323034722793107`,-0.7926452776403052`, 0.9155166939236691`,-0.7911464952623136`, 0.8820418697026856`,-0.7879560783162229`, 0.8487076552067281`,-0.784514725733165`, 0.8155245177129057`,-0.7808304563915742`, 0.782502576464965`,-0.7769119338400645`, 0.7496515681909222`,-0.7727684451790683`, 0.6870064659220974`,-0.764206925285944`, 0.6250890624800383`,-0.7549267248016657`, 0.5639545942005394`,-0.7450104244498289`, 0.5036513578753655`,-0.7345461299746177`, 0.4442202819845077`,-0.7236261960033303`, 0.3856946389763214`,-0.7123458722340958`, 0.31773423217980873`,-0.6986832012873263`, 0.25110118392406383`,-0.6848119680887575`]]][s], InterpolatingFunction[List[List[0.`,1.`]], List[1,1,True,Real,List[3],List[0]], List[List[0.`,0.00009533963472195465`,0.0001906792694439093`, 0.007298682413533105`,0.014406685557622301`,0.0215146887017115`, 0.04271275658506481`,0.06391082446841811`,0.08510889235177144`, 0.10630696023512475`,0.14870309600183138`,0.191099231768538`, 0.2334953675352446`,0.2758915033019512`,0.31828763906865787`, 0.3997983119521431`,0.48130898483562834`,0.5628196577191136`, 0.6443303306025988`,0.725841003486084`,0.8073516763695694`, 0.9036758381847847`,1.`]], List[List[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42, 44,46],List[-0.01`,-0.05658693186967461`,-0.010005396398620246`,-0.\ 056601838637037855`,-0.010010794218413816`,-0.05661674506423603`,-0.\ 010417172515977789`,-0.057727126013509454`,-0.010831436527801497`,-0.\ 05883557195552481`,-0.011253572342289249`,-0.059942038557714364`,-0.\ 012559110334902618`,-0.06322965151454743`,-0.013934132766244799`,-0.\ 06649807007821537`,-0.015378225427221845`,-0.06974610694152882`,-0.\ 016890943484591383`,-0.0729725525765394`,-0.020120349860873292`,-0.\ 07935580839909083`,-0.023618277909054523`,-0.08563805091248743`,-0.\ 027380230645714907`,-0.09180942424617795`,-0.03140130137454962`,-0.\ 09786006796067681`,-0.0356761630948117`,-0.10378015299772099`,-0.\ 044586580654758255`,-0.11475959077771011`,-0.05436849937914773`,-0.\ 1251528235706858`,-0.06497147806727649`,-0.1348952006755518`,-0.\ 07633996868658957`,-0.1439262663315521`,-0.08841370394320949`,-0.\ 1521908562073985`,-0.10112816739235099`,-0.15964000122076033`,-0.\ 11688580643365921`,-0.16733471329358596`,-0.13332466831559348`,-0.\ 17377638937890727`]]][s]] Steve Luttrell "Narasimham G.L." <mathma18 at hotmail.com> wrote in message news:cequj5$k47$1 at smc.vnet.net... > Recursion depth exceeded while trying to solve four simultaneous ODEs. > How to fix this? TIA. > > Clear[s,si2,r2,th2,ph2,si,r,th,ph]; > equns={si2''[s]==-Sin[si2[s]]*Sin[ph2[s]], > si2'[0]==.2, si2[0]==-1.5, > ph2'[s]== -Cos[ph2[s]]*Cos[si2[s]]/r2[s],ph2[0]==-.01, > r2'[s]==Cos[si2[s]],r2[0]==1.25, > th2'[s]==Sin[si2[s]]/r2[s],th2[0]== 1}; > NDSolve[equns,{si2,r2,th2,ph2},{s,0,1}]; >