Hello, I have been trying to solve PDEs using NDSolve, in particular the following one:
xmax=10;
wmax=10;
xmin=10^-20;
psiinit[w_,x_]:=(Exp[-w^2]/Sqrt[π]-w*Erfc[w])*x;
sol=NDSolve[{2*x*D[psi[w,x],x]==D[psi[w,x],{w,2}]+2*w*D[psi[w,x],w]-(x*psi[w,x])^2,psi[w,xmin]==psiinit[w,xmin],Derivative[1,0][psi][0,x]==-x,psi[wmax,x]==0},psi,{w,0,wmax},{x,xmin,xmax},PrecisionGoal->20,AccuracyGoal->10,Method->{"MethodOfLines","SpatialDiscretization"->{"TensorProductGrid","MaxStepSize"->1/5000,"DifferenceOrder"->4}}]
N[psi[0,7]/.sol,20]
{1.14428}
However, as can be seen at the end of the above code, the solution obtained is provided with only 6 significant digits, whereas I would be happy to obtain more accurate solutions. Changing parameters such as PrecisionGoal and AccuracyGoal does not seem to help, but cause some error messages. I managed to obtain some improvement only by increasing MaxStepSize. It is less clear whether changing DifferenceOrder brings any improvement. Which other parameters one can change to get a better accuracy of the solution, without causing error messages? Manuals do not seem to provide any discussion of this essential issue. Manuals are also incomplete, as they do not explain which are default settings for various parameters, so that one cannnot even know which particular method or available option is used. Ideally, I would like to make use of the multiprecision available in MATHEMATICA, in order to obtain solutions with as many as 19 accurate significant digits. Is this possible at all? If yes, I would also be happy to learn how to split the PDE solving calculations into several runs, as they are likely to be time-consuming. Or, perhaps there are more accurate and efficient alternatives to NDSolve?
Leslaw