# Mathematica 7.0, plotting x*sin(x), weird looking graph

• Jun 25th 2009, 05:43 AM
mathpath
Mathematica 7.0, plotting x*sin(x), weird looking graph
The command I'm using is
Code:

`Plot[{x*Sin[x]}, {x, -80 Pi, 100 Pi}]`
and I get this weird result. Look at x= approx -80 and 130.
http://img504.imageshack.us/img504/5...to100pi.th.gif

Some other similar intervals involving pi also give weird results looking almost like that. There are at least four options:

1. I'm too dumb to realize it's supposed to look like that
2. My computer is broken
3. Mathematica is broken
4. It's not a bug, it's a feature.

So my question is, does this happen to anyone else using Mathematica (v7.0.1.0)?
• Jun 25th 2009, 06:42 AM
shawsend
Quote:

Originally Posted by mathpath
The command I'm using is
Code:

`Plot[{x*Sin[x]}, {x, -80 Pi, 100 Pi}]`
and I get this weird result. Look at x= approx -80 and 130.
http://img504.imageshack.us/img504/5...to100pi.th.gif

Some other similar intervals involving pi also give weird results looking almost like that. There are at least four options:

1. I'm too dumb to realize it's supposed to look like that
2. My computer is broken
3. Mathematica is broken
4. It's not a bug, it's a feature.

So my question is, does this happen to anyone else using Mathematica (v7.0.1.0)?

need to specify more sampling points:

Code:

`Plot[{x*Sin[x]}, {x, -80 Pi, 100 Pi}, PlotPoints -> 200]`
or maybe fewer like 100 or so. Whatever it takes to get it right.
• Jun 25th 2009, 10:11 AM
mathpath
Thanks! That fixed it! :D