Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- c = Plot[y*Sin[8] + 8*Sin[y] + 8 + y == 0, {y, -2 Pi, 2 Pi}];
- cc = ContourPlot[y*Sin[x] + x*Sin[y] + x + y == 0, {x, -20, 20}, {y, -20, 20}];
- Show[c, cc]
- implicit = D[y[x]*x*Sin[x] + x*Sin[y[x]] + x + y[x] == 0, x]
- nsol = NSolve[y*Sin[8] + 8*Sin[y] + 8 + y == 0 && -20 < y < 20, y]
- (* {{y -> -5.8196}, {y -> -2.84462}, {y -> -0.891837}} *)
- pts = Thread[List[8, y /. nsol]]
- (* {{8, -5.8196}, {8, -2.84462}, {8, -0.891837}} *)
- solys = Solve[D[y[x]*Sin[x] + x*Sin[y[x]] + x + y[x] == 0, x], y'[x]]
- (* {{Derivative[1][y][x] -> (-1 - Sin[y[x]] - Cos[x] y[x])/(
- 1 + x Cos[y[x]] + Sin[x])}} *)
- yt[x_] = y'[x] /. First@solys
- grad = (yt[8] /. y[8] -> #[[2]]) & /@ pts
- (* {-0.250838, 0.198087, -0.0501247} *)
- ContourPlot[{y*Sin[x] + x*Sin[y] + x + y == 0,
- Thread[y == Plus[y /. nsol, grad (x - 8)]]} // Flatten //
- Evaluate, {x, -20, 20}, {y, -20, 20}, MaxRecursion -> 4,
- Epilog -> Point@pts]
Add Comment
Please, Sign In to add comment