Re: ndsolve ndsv problem
- To: mathgroup at smc.vnet.net
- Subject: [mg79853] Re: ndsolve ndsv problem
- From: chuck009 <dmilioto at comcast.com>
- Date: Tue, 7 Aug 2007 01:25:40 -0400 (EDT)
I don't see where you're supplying the end points for the numeric calculations. The code I wrote below just sets the boundary point at infinity at 1000 and does generate a solution which matches the two boundary points you supplied somewhat ok: sol = NDSolve[0.0005635632304299039*psi[R] == (2*Derivative[1][psi][R])/R + Derivative[2][psi][R] && Derivative[1][psi][1] == 7.017487714753473 && psi[1000] == 0, psi, {R, 1, 1000}, WorkingPrecision -> 30] f[x_] := Evaluate[psi[x] /. Flatten[sol]]; Plot[f[x] /. Evaluate[Flatten[sol]], {x, 1, 100}] In[146]:= f[1000] fd[x_] = D[f[x], x] fd[1] Out[146]= \!\(0``40.78712463722495\) Out[147]= InterpolatingFunction[{{1.00000000000000000000000000000,1000.\ 00000000000000000000000000}},<>][x] Out[148]= 7.0324851897180024334773666 > Steps to reproduce: > 1. Issue this command (given to you in InputFrom due > to a copy/paste problem) > > NDSolve[0.0005635632304299039*psi[R] == > (2*Derivative[1][psi][R])/R + > Derivative[2][psi][R] && > Derivative[1][psi][1] == 7.017487714753473 && > psi[Infinity] == 0, psi, R] >