diff() function - Printable Version +- HP Forums ( https://www.hpmuseum.org/forum)+-- Forum: HP Calculators (and very old HP Computers) ( /forum-3.html)+--- Forum: HP Prime ( /forum-5.html)+--- Thread: diff() function ( /thread-2410.html) |

diff() function - DrD - 11-09-2014 02:29 PM
A diff() problem: Example: f(x,y):+x²-2*x*y+3*y²+2*x-2*y 1.) diff(f(x,y),x) ---> 2.*x-2.*y+2. 2.) diff(f(x,y),y) ---> -2*x+6*y-2 x - direction: 3.) diff(diff(f(x,y),x)) ---> 2 4.) diff( 2.*x-2.*y+2,x) ---> 2 5.) diff(f(x,y),x$2) ---> 2 y - direction: 6.) diff(diff(f(x,y),y)) ---> -2 7.) diff(-2*x+6*y-2,y) ---> 6 8.) diff(f(x,y),y$2) ---> 6 The second derivative in the x-direction worked properly. The second derivative in the y-direction worked improperly in the red highlighted case(??) (The template key entry method worked properly for these examples.) RE: diff() function - Han - 11-09-2014 02:51 PM
Since you didn't put in a second variable of differentiation, it defaults to 'x'. So -2 is the correct answer as it is the mixed partial derivative. RE: diff() function - DrD - 11-09-2014 05:53 PM
(11-09-2014 02:29 PM)DrD Wrote: 6.) diff(diff(f(x,y),y)) ---> -2 Modifying step (6.) thus: diff(f(x,y),y,y) works. In step (8.) (given by the y$2), y is sufficiently specified as the variable to use for each following derivative? -[or]-
In the case: ∂(diff(f(x,hpdiffx),hpdiffx),y) ---> 6 The variable of differentiation is specified only once. That's a lot to remember. The user guide description for the diff() topic could be expanded for more clarity. I think that about wraps up my interest in this function. Thanks Han, for taking all the time explaining details! -Dale- |