Guest User

Untitled

a guest
Apr 23rd, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. For[k = 5, k <= 7, k = k + 0.1,
  2. sol =
  3. ParametricNDSolve[
  4. {Y''[x] + k^2 (1 - 0.1 Conjugate[Y[x]] Y[x]) Y[x] == 0,
  5. Y[1] == N E^(I k), Y'[1] == I k N E^(I k)},
  6. Y[x], {x, 0, 1}, {N},
  7. AccuracyGoal -> Infinity, MaxSteps -> Infinity];
  8. Ns = FindRoot[(Y'[N][0] + I k Y[N][0] == 2 I k) /. sol, {N, 0}];
  9. Print[Ns]]
Add Comment
Please, Sign In to add comment