FORUMFORUM
 
Welcome, Guest. Please login or register.

Login with username, password and session length
News: SMF - Just Installed!
 
Pages: [1]
  Print  
Author Topic: How to define and graph new functions  (Read 722 times)
Gilles
Newbie
*
Posts: 1


View Profile
« on: April 04, 2009, 11:14:49 pm »

Hello,

I am trying to define functions and see how I can graph them.

I know I can do it by typing the function directly into the graph command itself (for example: graph{2x|x∈[-10;10]} ) but that's not what I want to do.

I want to be able to define in the function in the stack, for example I typed: f(x)=2x

That seemed to work ok, but then when I try to display the function it does not work...

graph{f(x)|x ∈[-10;10]}

It is accepted as a command but nothing is being displayed...

Any idea of what I am doing wrong?

Thanks for your help.

Regards,

Gilles.
Logged
logel
Administrator
Newbie
*****
Posts: 1


View Profile
« Reply #1 on: April 08, 2009, 10:07:15 pm »

First you've to store the function in a variable.

f:=sin(x)

thereafter simple put this expression in the stack :
graph{f|x ∈ [-3;3]}

Then you can evaluate it, through the eval function.

You'll get the result you want,



Philippe.
« Last Edit: April 08, 2009, 10:12:07 pm by logel » Logged
Pages: [1]
  Print  
 
Jump to: