A Homework Problem (continued)

Here, I want to explore the IVP in problem 2.6.4 of Brannon and Boyce numerically.  Let’s start by illustrating some of the things we’ve already determined without numerics.

g[x_]=Log[-1/(2 x)]/x;
a=Plot[{g[x],2/E},{x,-5,0},AxesOrigin->{0,0}]

b=VectorPlot[{1,2 t+E^(-y  t)}/(10Norm[{1,2  t+E^(-y  t)}]),{t,-3,1},{y,0,1},VectorScale->Automatic,VectorPoints->Fine]

c=ParametricPlot[{{t,0},{0,t}},{t,-3,3}];

Show[b,a,c]

This seems to indicate what is going on with the slope field pretty well.  Next, we find some solutions.  First the critical solution which satisfies initial condition y(-e/2) = 2/e.  It ought to go through the maximum of the graph of g and always stay above that graph otherwise:

csoln=NDSolve[{y'[t]==2 t+E^(-t y[t]),y[-E/2]==2/E},y,{t,-4,2}]

d=Plot[y[t]/.csoln,{t,-3,2},PlotStyle->{Thick,Red}]

Show[b,a,c,d]

From this, it' s clear that the solution of our IVP will fall under the critial solution at t = 0 and for all time.  It will be defined (presumably) for all time.  It will first increase from zero (maybe for t really negative), then cross the graph of g (this may be hard to see), decrease for a while, then cross the graph of g again and increase.

soln=NDSolve[{y'[t]==2 t+E^(-t y[t]),y[0]==1},y,{t,-4,2}]

e=Plot[y[t]/.soln,{t,-3,2},PlotStyle->{Thick,Green}]

Show[b,a,c,d,e]

Well, there it is, and it looks like it crosses the graph of g within our window, so let’s see if we can zoom in and see the intersection point, which will be a local max for the solution of the IVP.

Show[a,d,e,PlotRange->{{-2,-1},{.6,.8}}]

I guess that captures it pretty well.  The green curve will always stay below the red curve (by the existence and uniqueness theorem).