0

This question is related to a previous question that I recently posted: Differential equations and creating slope field plot.

I am new to LaTeX and attempting to plot a slope field based on the following description. I desperately need to do this for homework.

The slope field of $\dfrac{dx}{dt} = x^2 - t^2$ along with three solution curves. The top curve is the solution that goes through $(t, x) = (0, 1)$. The middle curve is the solution that goes through the curve $(t, x) = (0, 0)$. The bottom curve is the solution that goes through the curve $(t, x) = (0, -1)$.

The user AlexG posted a highly rated answer in the following thread: Differential Equation direction plot with pgfplots.

However, since I am new to LaTeX, I am having significant difficulty in implementing his code. I am attempting to copy and paste it, and use it as a template to plot the slope field described above.

I would greatly appreciate it if someone could guide me through how to do this. For instance, copying and pasting the parts of AlexG's code that I should be using, and outlining the sections I need to alter to plot the described slope field above. I would greatly appreciate guidance. Thanks.

  • 1
    It would be easier to help you if you posted what you have tried so far. A MWE lets us at least try to compile and see what errors (if any) you are getting. – Emma Oct 14 '16 at 03:29
  • @Emma Thanks for the response. I've copied and pasted AlexG's code from http://tex.stackexchange.com/questions/139114/differential-equation-direction-plot-with-pgfplots, but I cannot make any of it compile. There seems to be two sets of code but neither of them compile when copy and pasted. I simply get errors during compilation. I'd greatly appreciate it if someone could give me some direction on how to make these plots work. Unfortunately, I have never had to deal with plots that are this complex. – The Pointer Oct 14 '16 at 05:12
  • 1
    It compiles for me. What errors do you get? – Emma Oct 14 '16 at 13:20
  • I also compile with no problem. Note that second code block provided by AleXG needs pdflatex to be called with --shell-escape, also see Jake's answer to the same question seems to be a much simpler solution. – Guilherme Zanotelli Oct 14 '16 at 13:24
  • Please don't keep posting the same question. You can always edit your question to provide additional information. This isn't 'related' to the other one. It is just the same question, as far as I can tell. – cfr Oct 14 '16 at 21:41
  • @GuilhermeZ.Santos Thanks for the help. How do I 'call" --shell-escape? I'm not sure what this means. – The Pointer Oct 14 '16 at 22:57
  • Is a bit editor dependent but there are several questions regarding this matter in TeX.SX, like this http://tex.stackexchange.com/questions/99475/how-to-invoke-latex-with-the-shell-escape-flag-in-texmakerx – Guilherme Zanotelli Oct 15 '16 at 07:28

0 Answers0