十一:本征值.doc

上传人:大张伟 文档编号:10824317 上传时间:2021-06-05 格式:DOC 页数:2 大小:22.50KB
返回 下载 相关 举报
十一:本征值.doc_第1页
第1页 / 共2页
十一:本征值.doc_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

《十一:本征值.doc》由会员分享,可在线阅读,更多相关《十一:本征值.doc(2页珍藏版)》请在三一文库上搜索。

1、作业:设计出算法(写出相应的计算公式)来求解下列非简谐振子薛定谔方程的最低能量本征值和相应的本征波函数,并编出程序(K值自设) : #include #include using namespace std;double V(double x) return (x-1)*(x-1)*(x+2)*(x+2); int main() double E,g,gstep, a=1; const int N=1000; double phiN,ophi,dx=1./N; int flag,oflag; const double epsilon=1e-5; FILE *fp1; int i; for(E=

2、0.5;E50;E+=0.001) gstep=0.1; g=1; oflag=0; do phi0=0; phi1=phi0+g*dx; for(i=2;iN;+i) phii=2*phii-1-phii-2-(dx*dx*a*(E-V(dx*(i-1)*phii-1; if(fabs(phiN-1)0) if(phiN-10) g-=gstep; flag=-1; else g+=gstep; flag=1; else if(phiN-10) g+=gstep; flag=1; else g-=gstep; flag=-1; if(flag!=oflag) gstep*=0.5; else flag=1; oflag=flag; ophi=phiN-1; while(gstep1e-16); if(flag=2) if(fabs(g)1e-3) printf( E=%lf g=%lf n,E,g); if(fabs(g-0.4)1e-4&fabs(E-11.482)1e-4) fp1=fopen(e1.txt,w+); for(i=0;iN;+i) fprintf(fp1,%d,%lf,i,phii); fclose(fp1); return 1;

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 科普知识


经营许可证编号:宁ICP备18001539号-1