Solving the Preliminary Example
continued from听last page...)
Your session should have gone like this:
DSolve[{x'[t]== y[t]- x[t]- E^(3t),
y'[t]==3 y[t]+2 x[t]-2 E^(-t)},
{x[t],y[t]},t]
What a messy answer! A far cry from the simple pair of functions that I suggested you try to start with. But remember, this isn't just "any old solution" you have found. This is the almighty听general solution. Within this solution lie all others, including the simple one we started out the lab with! (Indeed, if you look carefully over the above solution, you should notice that multiples of our original solutions of听e-听t听补苍诲听e3t听are lurking within.)
It is worth noting here that if you were to use the听elimination method听for solving systems that you'll be seeing in the lecture part of your course, the solutions that听Mathematica听produces bear little resemblance to your answers on paper鈥攅specially at first glance. This is because听Mathematica's internal algorithms don't use the elimination method, but instead use a much more mechanical procedure better suited to coding into a computer. Unfortunately, this often results in some pretty ugly looking answers. Rest assured that the results can be shown to be equivalent, after some extensive manipulation.
For much of what we'll be using systems of differential equations for in this class, it will not be necessary to find an analytic solution, and we'll be perfectly happy to make do with a numerical one. Indeed, in many cases we will have no choice, since the systems in question can't be solved analytically anyway. So let's now听move on听and see how听Mathematica听handles numerical solutions to systems of differential equations.