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