Sascha Rissel on Thu, 02 Jun 2005 12:42:42 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
User functions and their derivatives |
Hello, I am new to this mailing list and hope, that this is the right place to post my question about Pari. I got to know Pari at university in a lecture about cryptography. Since then I got to appreciate Pari a lot, not only for its number theoretical capabilities, but also for those in 'classical' mathematics. So, besides studying computer science, I also work with pupils as a teacher for private lessons. I often use Pari in analysis concerns, like plotting (e.g. polynomial) functions, solving equations etc... It all works well, but there's one thing, that I did not figure out how it works yet. Let's say I define a function (let's choose a simple one) > f(x) = x^2 I can compute values of this function, like > f(3) and get 9 in this case as a result. Now I would like to derive this function, so I define a function f1 for the derivative of f: > f1(x) = f(x)' (or f1(x) = deriv(f(x)) The problem that occurs now is, that I am not able to use the derivative f1(x) for computation. Let's say I want to compute some values of f1: > f1(3) The result I get is always 0 and not the expected value 6 (in this example), 'cause the derivative is 2*x of course. Also plotting of f1(x) does not work. I think this is all the same problem. So what am I doing wrong? I have another small question: If I define variables or functions (like in the case above), how can I undefine these variables and functions, to be able to use the names for other concerns? Thanks a lot for your help! Sascha. ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193