Delta Banner

Mathematics & Science Learning Center
Computer Laboratory

 

Solving "Impossible" Differential Equations with Mathematica

Let's consider the initial value problem:

dy/dx = 1 - xy1/2,  y(0) = 1.

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...


Compass If you're lost, impatient, want an overview of this laboratory assignment, or maybe even all three, you can click on the compass button on the left to go to the table of contents for this laboratory assignment.
 
 

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