Group Abstract Group Abstract

Message Boards Message Boards

0
|
5.4K Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Using Manipulate with some integer?

Posted 10 years ago

hi alls i dont really understand why these "Manipulate" do not work :

Clear[n]
g[x_] = Series[x/Sqrt[1 - x^2], {x, 0, n}]
gg[x_] = Normal[g[x]]
Manipulate[gg[x], {n, 1, 5}]
Manipulate[Plot[gg[x], {x, -1, 1}], {n, 1, 5}]

And if i replace the first line with :

  g[x_] = Series[x/Sqrt[1 - x^2], {x, 0, n}]/.n->2

then the g[x_] works, but then n seems to remain fixed to 2 If anyone can clear me...

POSTED BY: Adrien Guyader
4 Replies
Posted 10 years ago
POSTED BY: Adrien Guyader

Series needs n to be an integer

modify your manipulate to:

Manipulate[gg[x], {n, 1, 5,1}]
Manipulate[Plot[gg[x], {x, -1, 1}], {n, 1, 5,1}]

should work!

POSTED BY: Sander Huisman

Sorry @Sander Huisman ! I did not see you answering this post ...

Regards -- Henrik

POSTED BY: Henrik Schachner
POSTED BY: Henrik Schachner
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard