RE: Help-directional fields
- To: mathgroup at smc.vnet.net
- Subject: [mg40325] RE: [mg40312] Help-directional fields
- From: "David Park" <djmp at earthlink.net>
- Date: Tue, 1 Apr 2003 04:52:17 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Freddy, We have dy/dx == Sin[x-y] or dy == Sin[x-y]dx. So our slope field is {dx,dy} == {dx,Sin[x-y]dx} == dx{1,Sin[x-y]}. Take dx == 1 and the vector field is... field[x_, y_] := {1, Sin[x - y]} We can then plot with... Needs["Graphics`PlotField`"] Needs["Graphics`Colors`"] PlotVectorField[field[x, y], {x, -Pi, Pi}, {y, -Pi, Pi}, Frame -> True, FrameLabel -> {x, y}, PlotLabel -> y'[x] == Sin[x - y], Axes -> True, AxesStyle -> LightBlue, Background -> Linen, ImageSize -> 500]; David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Freddy [mailto:alligatoralligator at hotmail.com] To: mathgroup at smc.vnet.net Hi, I am trying to plot a directional field plot for the DE y'=sin(x-y). The question suggests using a viewing window such as -10=x=10, -10=y=10 I have spent hours and hours trying to get this to work, but I must be doing something wrong. Can anyone please, please help me with typing the right commands?