# Math Help - Graphing Direction Fields for Differential Equations?

1. ## Graphing Direction Fields for Differential Equations?

How on earth are you supposed to graph direction fields for these super complicated differential equations?

I kind of understood basic ones, but now we're learning equations like:

y' + 3y = t + e^(-2t)

How would you draw the direction field for that DE? (by hand)

Sorry I'm just learning this in school and I'm very lost here. Thanks for any help.

2. ## Re: Graphing Direction Fields for Differential Equations?

I would:
1. Solve for y' (simply by subtracting 3y)
2. Pick points (t, y) in the t-y plane, and calculate the right-hand-side of the equation.
3. Then for/at each point (t, y), make a little line segment with slope = y'

For example, at the point (0, 0), y ' = -3(0) + (0) + e^(-2*0) = 1
So at the point (0, 0), I would draw a little line segment (not longer than, say 1-1.5 units) with slope ~1.
At the point (0, y), the slope is -3y + 1, so that can help you with step 3, at least for the line t = 0

3. ## Re: Graphing Direction Fields for Differential Equations?

I considered doing all that, but I can only stay on the y-axis for so long. I attempted to do (1, 2) and ended up with y' = 2(2) + 3e^1 which is probably somewhere just under 28. Is it supposed to be that high? That just seems pretty weird.

And are you expected to just keep inputting points into the equation to determine the graph?

4. ## Re: Graphing Direction Fields for Differential Equations?

Originally Posted by mneox

1. I considered doing all that, but I can only stay on the y-axis for so long. I attempted to do (1, 2) and ended up with y' = 2(2) + 3e^1 which is probably somewhere just under 28.
2. Is it supposed to be that high? That just seems pretty weird.

3. And are you expected to just keep inputting points into the equation to determine the graph?
1. I just emphasized the y-axis for its simplicity. There aren't shortcuts for other lines (maybe the line y = t...)
2. 4 + e is not 28! It's around 6.7, but honestly, it's hard to tell the difference between a teeny line with slope 6 and a teeny line with slope 28 anyhow...
3. yes.

5. ## Re: Graphing Direction Fields for Differential Equations?

Whoops, I did for (2,1) not (1,2).

Okay, I shall try it then. Seems painful though. Thanks for your help!

6. ## Re: Graphing Direction Fields for Differential Equations?

Originally Posted by mneox
How on earth are you supposed to graph direction fields for these super complicated differential equations?

I kind of understood basic ones, but now we're learning equations like:

y' + 3y = t + e^(-2t)

How would you draw the direction field for that DE? (by hand)

Sorry I'm just learning this in school and I'm very lost here. Thanks for any help.
Why not just solve the DE? It's first order linear...

$\displaystyle \frac{dy}{dt} + 3y = t + e^{-2t}$

The integrating factor is $\displaystyle e^{\int{3\,dt}} = e^{3t}$, so multiplying both sides by this gives

\displaystyle \begin{align*} e^{3t}\frac{dy}{dt} + 3e^{3t}y &= t\,e^{3t} + e^t \\ \frac{d}{dt}\left(e^{3t}y\right) &= t\,e^{3t} + e^t \\ e^{3t}y &= \int{t\,e^{3t} + e^t\,dt} \\ e^{3t}y &= \frac{1}{3}t\,e^{3t} - \int{\frac{1}{3}e^{3t}\,dt} + e^t + C \\ e^{3t}y &= \frac{1}{3}t\,e^{3t} - \frac{1}{9}e^{3t} + e^t + C \\ y &= \frac{1}{3}t - \frac{1}{9} + e^{-2t} + Ce^{-3t} \end{align*}