Mathematics & Science
Learning Center |
|||
Solving "Impossible" Differential Equations with Mathematica(continued from last page...) Your little session with Mathematica should have gone like this: sol1/.x->0 sol1/.x->1 sol1/.x->1.5 sol1/.x->3 sol1/.x->4 sol1/.x->5 sol1/.x->6 sol1/.x->-1 The last two of the x-values generated error messages, and rightly so! In fact the error message even makes sense—after all, didn't we tell Mathematica to solve the differential equation on the interval {x,0,5} in the original NDSolve command? Anyway, what you should have realized from the previous problem is that the solution we have found using approximation is almost as good as having an actual formula for the "proper" solution. We can plug in x-values to our heart's content, and pull out the corresponding y-values. We could even do it with decimal values for x like x = 2.718281828459045 if we liked. What we cannot do is use x-values that lie outside the domain specified in the original NDSolve command. You may ask "why not make the original range huge and cover all the bases?" But think about it! The bigger the range, the more ground the approximation has to cover. We would either have to come up with an approximate solution at a huge number of points, or spread the points waaaay far apart to cover the range. Both of these actions have drawbacks. The first would be slow, and use a lot of computer memory. The second would be inaccurate since when you make large jumps between points you have a tendency to wander further away from the proper solution. Well, we have found that NDSolve gives us a solution that we can substitute values into quite nicely! What about the other requirement that we had? |
|||
ODE Laboratories: A Sabbatical Project by Christopher A. Barker ©2009 San Joaquin Delta College, 5151 Pacific Ave., Stockton, CA 95207, USA e-mail: cbarker@deltacollege.edu |