Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. eq1 = 1/5 (y[x] - 2 x y'[x]) == D[(x y'[x])/y[x] + x y[x]^3 D[D[x y'[x], x]/x, x], x]/x;
  2. bc1 = y[x] - 2 x y'[x] == 0;
  3. bc2 = y[x] + 4 x^2 y''[x] == 0;
  4.  
  5. solSeries = seriesDSolve[eq1, y, {x, 0, 5},
  6. {y[0] -> a, y'[0] -> 0, y''[0] -> b, y'''[0] -> 0}]
  7.  
  8. newbclist = Thread[(Derivative[#][y][x0] ==
  9. (D[Normal@solSeries, {x, #}] /. x -> x0) & ) /@ Range[0, 3]]
  10.  
  11. x0 = 1/10^4; xMax = 10;
  12. sol = ParametricNDSolveValue[{eq1, newbclist}, y, {x, x0, xMax}, {a, b}]
  13.  
  14. ContourPlot[{bc1, bc2} /. x -> xMax /. y -> sol[a, b] // Evaluate,
  15. {a, 0.4, 0.8}, {b, -0.05, 0.25}]
  16.  
  17. bclist = Thread[(Derivative[#][y][x0] & /@ Range[0, 3]) == {a, 0, b, 0}]
  18.  
  19. solfake = ParametricNDSolveValue[{eq1, bclist}, y, {x, x0, xMax}, {a, b}]
  20.  
  21. ContourPlot[{bc1, bc2} /. x -> xMax /. y -> solfake[a, b] // Evaluate,
  22. {a, 0.4, 0.8}, {b, -0.05, 0.25}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement