Mathematics & Science
Learning Center |
|||
Solving "Impossible" Differential Equations with MathematicaLet's consider the initial value problem: I've deliberately given you a problem that defies the usual methods you've probably covered in class by now. Go down the list of categories you know! It isn't separable, exact, homogeneous, or Bernoulli. Most importantly it is not linear. (Why not?) Anyway, say we wanted the solution regardless. We then have to "put up with" an approximate numerical solution. Go ahead and use the NDSolve command to solve the initial value problem, as follows: sol1=NDSolve[{y'[x]==1-x Sqrt[y[x]], y[0]==1}, y[x], {x,0,5}] (Notice that I've set the answer, whatever it happens to turn out to be, to be read into the variable sol1. Also, I've used the square-root function in my command, but an exponent would be just as appropriate here.) Come back here when you are done. Let's go look at what you should have gotten... |
|||
ODE Laboratories: A Sabbatical Project by Christopher A. Barker ©2017 San Joaquin Delta College, 5151 Pacific Ave., Stockton, CA 95207, USA e-mail: cbarker@deltacollege.edu |