To take an example from my bookshelf, Boyce and DiPrima's Differential Equations and Boundary Value Problems, 7th edition., p. However, this style is misleading and should be avoided, as the arrows generally do not point in the direction of the solution curves as they are traced out. To emulate this effect, change VectorStyle from "Segment" to "Arrow". There are some textbooks that prefer to put arrows on the line segments. Then we can plot the slope field in Mathematica as follows: can be written in the form $y'=F(x,y)$, where $F(x, y)$ is a function only of two variables $x$ and $y$. I adjust a couple of options to VectorPlot in his answer below. ![]() Only Wesley Wolfe's answer approaches this method of plotting slope fields as of this writing. To plot the slope field of a differential equation y f ( x, y) on the rectangle x b, c y d, type the following sequence of commands: The first command sets sets up a 26 by 16 grid of uniformly spaced. A slope field indicates only the slope of the solution curve at each grid point by the slope of the line segment only. Correspondingly, the main matlab command for plotting direction fields is quiver, used in conjuction with meshgrid. In the most popular contemporary undergraduate calculus textbooks, including those by Larson and Edwards, Stewart, Rogawski and Adams, and others, a slope field (also called a direction field) is a plot of short line segments at grid points all having the same length and without an arrowhead indicating direction. I'm really interested in learning about what can be done with differential equations, so I think that other equations will suffice if they serve as a better example. Solve a system of equations to return the solutions in a structure array. I'm wondering what experience in Mathematica has taught others about what can be done in Mathematica - I'm hoping someone can offer some useful tips and demonstrations. The solve function returns a structure when you specify a single output argument and multiple outputs exist. So perhaps this could make for an interesting exploration for others as well. I ran DSolve on it, and after a minute it was unable to evaluate the function. ![]() I do have an equation in mind, taken from this question from Math.SE: I'm a little more familiar with differential equations, but very far from what I'd consider to be an expert. My hope is that I will become fairly proficient at understanding plotting in Mathematica, as well as differential equations. I'm a novice, right now, when it comes to plotting in Mathematica, so I'm hoping that someone can provide a fairly easy to understand and thorough explanation. You have to specify the differential equation in a string, using Dy for y(t) and y for y(t): E.g., for the differential equation y(t) t y 2 type. ![]() I'd like to plot the graph of the direction field for a differential equation, to get a feel for it.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |