Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mathematica Plot Functions

5 views
Skip to first unread message

TKM

unread,
Oct 10, 2008, 4:37:15 AM10/10/08
to
Hello,

I try to plot a function, but Mathematica doesn't draw my function. Can someone help me?

I provide a screenshot here: http://img407.imageshack.us/my.php?image=mathematicajw3.jpg

Thanks in advance, TKM

Jean-Marc Gulliet

unread,
Oct 11, 2008, 6:41:08 AM10/11/08
to
TKM wrote:

> I try to plot a function, but Mathematica doesn't draw my function. Can someone help me?
>
> I provide a screenshot here: http://img407.imageshack.us/my.php?image=mathematicajw3.jpg

Surely you meant x^2 rather than x2 (which is undefined variable), i.e.

Plot[Sin[x^2], {x, 0, 2 Pi}]

Or perhaps,

Plot[Sin[x2], {x2, 0, 2 Pi}]

Regards,
-- Jean-Marc

Peter Pein

unread,
Oct 11, 2008, 6:42:01 AM10/11/08
to
TKM schrieb:

How would you plot sin(x2) for x in the range 0..2*Pi without knowing the
value of x2? ^^ ^

Bob Hanlon

unread,
Oct 11, 2008, 6:44:06 AM10/11/08
to
Presumably the function to be plotted is either 2x or x^2 not x2 (a variable name)

Plot[x^2,{x,0,2Pi}]

Plot[2x, {x,0,2Pi}]


Bob Hanlon

---- TKM <temp...@hotmail.com> wrote:

=============
Hello,

I try to plot a function, but Mathematica doesn't draw my function. Can someone help me?

Thanks in advance, TKM


--

Bob Hanlon


Jens-Peer Kuska

unread,
Oct 11, 2008, 6:44:48 AM10/11/08
to
Hi,

what is x2

do you mean

Plot[Sin[x^2],{x,0,Pi}]

??

Regards
Jens

PS: Please copy/paste the InputForm of your Mathematica Input
to the math-group and not a screen shot.

sjoerd.c...@gmail.com

unread,
Oct 11, 2008, 6:46:21 AM10/11/08
to
The figure shows your instruction as Plot[x2,{x,0,2 Pi}].

I hope you realize that x2 is a variable different from x? It isn't x
squared, as that should be written as x^2.


David Park

unread,
Oct 11, 2008, 6:48:28 AM10/11/08
to
Post your code. We can't see what the problem might be without seeing it.

Just select the code, right click, Copy As Input Text, and paste into the
posting.

--
David Park
djm...@comcast.net
http://home.comcast.net/~djmpark/


"TKM" <temp...@hotmail.com> wrote in message
news:gcn47r$738$1...@smc.vnet.net...

dr DanW

unread,
Oct 11, 2008, 6:48:49 AM10/11/08
to
On Oct 10, 3:37 am, TKM <temp_t...@hotmail.com> wrote:
> Hello,
>
> I try to plot a function, but Mathematica doesn't draw my function. Can s=
omeone help me?
>
> I provide a screenshot here:http://img407.imageshack.us/my.php?image=ma=
thematicajw3.jpg
>
> Thanks in advance, TKM

What is your function? You typed x2, which Mathematica does not
interpret as a function, but as a symbol named "x2". If you meant x
squared, then type x^2. If you meant twice x, then type 2 x (notice
the space), x 2 (again, the space), or be very explicit with 2*x.

Normally for a question like this the general forum answer would be to
RTFM, but the current M is not as easy to R as it used to be. So, go
to your well-stocked public library, find any edition of The
Mathematica Book and read "Part 1. A Practical Introduction to
Mathematica" all the way through. No kidding. You will always be
frustrated by Mathematica if you don't and hugely productive with it
if you do.

At minimum, go to Help > Virtual Book and read the Getting Started
section in the Introduction.

David Bailey

unread,
Oct 12, 2008, 4:35:42 AM10/12/08
to
Your variable 'x2' is unrelated to the variable 'x'. Possibly you meant
2x, or maybe you meant x^2. Remember that Mathematica variables are not
restricted to be 1 character in length.

David Bailey
http://www.dbaileyconsultancy.co.uk

TKM

unread,
Oct 12, 2008, 4:39:09 AM10/12/08
to
Thank you for your replies, I wanted to plot 2x. And it now works. I don't know how to thank you guys.

You are great!

0 new messages