Initial value problems

Most of the time when you work with a differential equation on a computer system, you will be interested in "initial value problems", rather than just finding the general solution. This is handled very simply: you just include the initial conditions in a list with your differential equation to solve. So, to solve [Graphics:../Images/index_gr_17.gif], [Graphics:../Images/index_gr_18.gif], you would:

[Graphics:../Images/index_gr_19.gif]
[Graphics:../Images/index_gr_20.gif]
[Graphics:../Images/index_gr_21.gif]
[Graphics:../Images/index_gr_22.gif]
[Graphics:../Images/index_gr_23.gif]

(Again, be sure to use == instead of = everywhere inside DSolve.)

We could graph this solution curve:

[Graphics:../Images/index_gr_24.gif]

[Graphics:../Images/index_gr_25.gif]

[Graphics:../Images/index_gr_26.gif]

What if we wanted to graph several solution curves, for different initial conditions?  Let's examine the impact of curves with different initial y values.  To allow ourselves the most flexibility, let's use some dummy variables:

[Graphics:../Images/index_gr_27.gif]
[Graphics:../Images/index_gr_28.gif]
[Graphics:../Images/index_gr_29.gif]
[Graphics:../Images/index_gr_30.gif]

[Graphics:../Images/index_gr_31.gif]

[Graphics:../Images/index_gr_32.gif]

This says to plot ySol again, but replace all the y0's with -1 and v0's with 2.  A more interesting question would be to hold the v0's constant (say at [Graphics:../Images/index_gr_33.gif]) and let the y0's vary from -5 to 5.  There is a really cool way to do this:

[Graphics:../Images/index_gr_34.gif]
[Graphics:../Images/index_gr_35.gif]
[Graphics:../Images/index_gr_36.gif]
[Graphics:../Images/index_gr_37.gif]

[Graphics:../Images/index_gr_38.gif]

[Graphics:../Images/index_gr_39.gif]

This plots ySol for all the different values we specified for y0. (You must use the Evaluate command around ySol[x] or Mathematica won't plug in the numbers for y0 before trying to graph and it won't work.)  So, what happens if we let y0 be constant (say [Graphics:../Images/index_gr_40.gif]) and let v0 vary from -5 to 5?

[Graphics:../Images/index_gr_41.gif]
[Graphics:../Images/index_gr_42.gif]
[Graphics:../Images/index_gr_43.gif]
[Graphics:../Images/index_gr_44.gif]

[Graphics:../Images/index_gr_45.gif]

[Graphics:../Images/index_gr_46.gif]


Converted by Mathematica      July 20, 2003