1

I'm using a theoretical answer found on the official Wolfram site as a reference to ensure my code isn't faulty (even though I'm fairly confident that my original code is half decent).

sol = DSolve[y'[x] + x*y[x] == Cos[x^2], y, x]
{{y -> Function[{x}, E^(-(x^2/2)) C[1] + 1/2 E^(-(x^2/2)) Sqrt[π/10]
         (Sqrt[1 + 2 I] Erfi[Sqrt[1/2 - I] x] + Sqrt[1 - 2 I] Erfi[Sqrt[1/2 + I] x])]}}
Plot[Evaluate[y[x] /. sol /. {C[1] -> 1}], {x, -7, 7}, PlotRange -> All]

The output shown of the Wolfram site actually shows a nice looking plot. On my display all I get is -Graphics-. There is no plot.

Why is this?

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
user12289
  • 311
  • 2
  • 7
  • Are you using Mathematica from a terminal or are you using the graphical interface? If you are using the graphical interface, have you tried restarting Mathematica? Which version of Mathematica are you using? – Szabolcs Feb 10 '14 at 15:34
  • Also, go to Preferences -> Evaluation, click Reset to Defaults, restart and try again. – Szabolcs Feb 10 '14 at 15:41
  • Possibly an RPi user who started wolfram instead of mathematica??? – bobthechemist Feb 10 '14 at 16:08
  • I'm using the 9.0.1 kernel – user12289 Feb 10 '14 at 16:13
  • Can you plot anything? eg Plot[x,{x,0,1}] .. ? – george2079 Feb 10 '14 at 16:39
  • @user12289 You did not answer my question though: are you using Mathematica from the command line (terminal) or are you using its graphical interface? If you don't answer these questions then we simply can't help you. – Szabolcs Feb 10 '14 at 17:03
  • I'm assuming I'm using the terminal because there is no GUI that I see here. The software package I received from a friend just has a shortcut with the Wolfram logo. I double click on it, and I get what appears to be a sophisticated text file that allows me to do rudimentary computation. – user12289 Feb 10 '14 at 18:41
  • Could you provide a screenshot of your Mathematica session? – m_goldberg Feb 11 '14 at 01:04
  • (duplicate) You can use JavaGraphics or ASCII graphics for the terminal. See my answer here: Plotting graphics as ASCII plots – rm -rf Feb 11 '14 at 01:29

0 Answers0