Skip to main content
added 2 characters in body
Source Link

Maybe you can do it more simply :

xvalue = 1000;
avalues = Range[-1, 0, 0.3];
results = Table[NDSolve[{I D[v[x], x] == (0.4 + a)*v[x], v[0] == 1}, 
 v[x], {x, 0, 2000}][[1, 1, 2]] /. x -> 1000xvalue, {a, avalues}]

(* {-0.999044 + 0.0441925 I, -0.0221014 - 0.999765 I, 1. + 0. I, -0.0221014 + 0.999765 I} *)

solution

Maybe you can do it more simply :

xvalue = 1000;
avalues = Range[-1, 0, 0.3];
results = Table[NDSolve[{I D[v[x], x] == (0.4 + a)*v[x], v[0] == 1}, 
 v[x], {x, 0, 2000}][[1, 1, 2]] /. x -> 1000, {a, avalues}]

(* {-0.999044 + 0.0441925 I, -0.0221014 - 0.999765 I, 1. + 0. I, -0.0221014 + 0.999765 I} *)

solution

Maybe you can do it more simply :

xvalue = 1000;
avalues = Range[-1, 0, 0.3];
results = Table[NDSolve[{I D[v[x], x] == (0.4 + a)*v[x], v[0] == 1}, 
 v[x], {x, 0, 2000}][[1, 1, 2]] /. x -> xvalue, {a, avalues}]

(* {-0.999044 + 0.0441925 I, -0.0221014 - 0.999765 I, 1. + 0. I, -0.0221014 + 0.999765 I} *)

solution

Source Link

Maybe you can do it more simply :

xvalue = 1000;
avalues = Range[-1, 0, 0.3];
results = Table[NDSolve[{I D[v[x], x] == (0.4 + a)*v[x], v[0] == 1}, 
 v[x], {x, 0, 2000}][[1, 1, 2]] /. x -> 1000, {a, avalues}]

(* {-0.999044 + 0.0441925 I, -0.0221014 - 0.999765 I, 1. + 0. I, -0.0221014 + 0.999765 I} *)

solution