Solving Initial Value Problems with Mathematica's Solver
(continued fromÌýlast page...)
You should have found that the problem didn't giveÌýMathematicaÌýany trouble. In fact, your session should have looked a little like this:
DSolve[{y'[x]==2x,y[0]==5},y[x],x]
{{y[x] → 5 + x2}}
If youÌýdidn'tÌýget the the above result, it might pay you to take a look at the following:
Note: Here's a useful trick to overcome an error that plagues at least half of my student's when they first start working withÌýMathematica. It's easy to accidently use aÌýsingleÌýequals sign instead of aÌýdoubleÌýwhen entering an equation. Say you accidently typeÌýy'[2]=8Ìýwhen you should have typedÌýy'[2]==8Ìýas the initial condition for a differential equation. This is a worse problem than it might seem. You could go and change the entry, but that's not the end of it! Your earlier entry has toldÌýMathematicaÌýthatÌýy'[2]Ìýis to be replaced by 8. This means that your correction, when you enterÌýy'[x]==8, is actually read asÌý8==8, a true statement, but not a useful one. The fix, thankfully, is easy. To remove an assignment toÌýy'[2]Ìýwe simply typeÌýy'[2]=.Ìý(Yes, the period is part of the command.)
If you think thatÌýyouÌýmight have made the infamous "single equals" mistake then go back toÌýMathematicaÌýnow and fix the problem using the above hint.
Moving on...