Solving Initial Value Problems with Mathematica's Solver

(continued from last page...)

Your interaction should have given the following results:

DSolve[{y''[x]+y[x]==Cos[x]-Sin[2x], y[Pi/2]==0, y'[Pi/2]==0} ,y[x], x]
DE Solution

Of course, you could have chosen to use the actual π symbol in your command, rather than spelling it out as I did, but your result should have been identical. As we have noted in earlier labs, Mathematica's algorithms are always being improved, and a few versions back, this same initial value problem would have caused Mathemetica to produce some rather unseemly looking expressions involving complex numbers! (Which all canceled out after simplification.) It's nice to see the software evolving for the better!

Now that I've coached you through several examples it's time for you to try some on your own. Let's go try a few problems...

 
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.