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$. Plot on the same graph the solutions to both the nonlinear equation (first) and the linear equation (second) on the interval from t 0 to t 40, and compare the two. Because I have typed the equations in matlab, but do i have to mention these equations again in order to do plotting here are my equations: And assume N 106, alpha 0.1, beta 0.3, gamma 0.75, delta 0.9, epsilon 1.1, zeta 10000. Solve equation y + y 0 with the same initial conditions. ![]() The mass matrix can be time- or state-dependent, or it can be a constant matrix. f ( t, y), where M ( t, y) is a nonsingular mass matrix. Linearly implicit ODEs of the form M ( t, y) y. I adjust a couple of options to VectorPlot in his answer below. Numerically solve the differential equation y + sin(y) 0 using initial conditions y(0) 0, y(0) 1. The ODE solvers in MATLAB solve these types of first-order ODEs: Explicit ODEs of the form y. Only Wesley Wolfe's answer approaches this method of plotting slope fields as of this writing. A slope field indicates only the slope of the solution curve at each grid point by the slope of the line segment only. 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. 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. 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. 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. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |