I am trying to write a demonstration that plots user defined function and uses this function for further calculations. I tried the following code:

Manipulate[Plot[xx, {t, 0, 1}], {{xx, 0, "x(t)="}}]

I have two questions:

  • This code plots the graph for some functions, but when I try t² in the input field, it does not graph anything (although it graphs t*t) This is a problem, because I would like to use this mainly to ask for polynomials.
  • I would also like to use the input to define the function x(t), (for example to take and use the derivative) but I don't know enough of the mathematica language to do this.

I tried to look at tutorials, but could not find the relevant parts. Any help would be appreciated.

  • 5
    $\begingroup$ t^2 works for me as input. Can you put a screenshot of what you're trying? $\endgroup$ – Patrick Stevens Oct 27 '15 at 12:26
  • $\begingroup$ Sorry, I am not sure how to attach a screenshot, so I try to explain what is happening. On my system (Linux Mint 17.2, Mathematica 10) when I type t^2, it immediately moves the 2 in the superscript. Probably it is an operating system issue, but still, it would be good to know if there is an option to the input field to override this. Also, t^2 (with the 2 in the superscript) is not recognized by Mathematica as an expression, rather it treats it as a variable for some reason. $\endgroup$ – Ferenc Beleznay Oct 27 '15 at 17:23
  • $\begingroup$ One workaround would be to do Power[t, 2] instead of t^2. $\endgroup$ – Patrick Stevens Oct 27 '15 at 17:47
  • $\begingroup$ How do you try to input ? For me it works if I'm using t^2 or t + Ctrl + ^ + 2. It doesn't work if one is using . $\endgroup$ – Karsten 7. Nov 6 '15 at 9:11

Browse other questions tagged or ask your own question.