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 , , you would:
(Again, be sure to use == instead of = everywhere inside DSolve.)
We could graph this solution curve:
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:
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 ) and let the y0's vary from -5 to 5. There is a really cool way to do this:
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 ) and let v0 vary from -5 to 5?