Parametric System of differential equation, finally plotting against the parameter
2 次查看(过去 30 天)
显示 更早的评论
Below is the mathematica code for Parametric System of differential equations with parameter e. I want to find Re[g[[1]] for different values of e ..... But there is no syntax like table in Matlab.
m=3.5;
pot[x_] := -(I*x)^m;
d = 3;
zaf = Table[
sol1 =
NDSolve[{sy''[x] + sy[x]*(e - (pot[x])) == 0, sy[0] == 1,
sy'[0] == 0},
{sy}, {x, 0, d}];
u1 = sy[d] /. sol1; pu1 = sy'[d] /. sol1;
sol2 =
NDSolve[{fy''[x] + fy[x]*(e - (pot[x])) == 0, fy[0] == 0,
fy'[0] == 1},
{fy}, {x, 0, d}];
v1 = fy[d] /. sol2; pv1 = fy'[d] /. sol2;
sol3 =
NDSolve[{ty''[x] + ty[x]*(e - (pot[x])) == 0, ty[0] == 1,
ty'[0] == 0},
{ty}, {x, 0, -d}];
u2 = ty[-d] /. sol3; pu2 = ty'[-d] /. sol3;
sol4 =
NDSolve[{zy''[x] + zy[x]*(e - (pot[x])) == 0, zy[0] == 0,
zy'[0] == 1},
{zy}, {x, 0, -d}];
v2 = zy[-d] /. sol4; pv2 = zy'[-d] /. sol4;
f = v1/u1 - v2/u2;
g = v1*u2 - v2*u1;
{e, Re[g[[1]]]}, {e, 0.8, 30, .01}]
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Systems of Nonlinear Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!