Parametric System of differential equation, finally plotting against the parameter
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Systems of Nonlinear Equations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!