Derivatives on HP 42S
08-24-2018, 05:52 AM (This post was last modified: 08-24-2018 05:55 AM by Thomas Klemm.)
Post: #13
 Thomas Klemm Senior Member Posts: 2,005 Joined: Dec 2013
RE: Derivatives on HP 42S
(08-24-2018 02:51 AM)lrdheat Wrote:  When trying a more complicated equation: x^(4/3) + 4(x^(1/3)), I get a correct f(x) for all values of x (x=-6, f(x)=3.63, x=-4, f(x)=0 x=0, f(x)=0 x=2, f(x)=7.56)

The function can be written as

$$y=\sqrt[3]{x}(x+4)$$

Even though you might think otherwise the domain of this function is

$$\{x\in\mathbb{R}:x\geqslant0\}$$

The problem with the cubic root of negative numbers is which value to choose as the principal value. The advantage of choosing the negative, real value is that you don't have to deal with complex numbers. That's probably the reason for this schoolbook definition.

The problem however is that this choice is not continuous: as soon as the exponent is slightly off from $$\frac{1}{3}$$ you get a complex value anyway and then the principal value jumps to the branch of the value with the smallest argument.

The HP-42S doesn't provide a cubic root function and thus we have to use $$y^x$$ with an approximation to $$\frac{1}{3}$$ which is the reason you get a complex result for a negative value.

This is the program I used to calculate the values of the function:

Function
Code:
LBL "Fx" RCL ST X 3 1/X Y↑X X<>Y 4 + * END

It returns complex values for negative real values.
Nothing can hinder us to still try to find a critical point for which I got:

x=-4.00000057735

But for $$x=-4$$ the function will return

0 i0

Which is the reason we get that result.

I haven't stressed that but there are two conditions that the function has to meet:
1. it has to be real valued
2. it must be analytical

The 2nd condition means you can't use operations like ABS or SIGN in your program to define the function. These functions aren't analytical.

For the given function the minimum is at (0, 0).

HTH
Thomas
 « Next Oldest | Next Newest »

 Messages In This Thread Derivatives on HP 42S - lrdheat - 08-20-2018, 03:03 AM RE: Derivatives on HP 42S - Thomas Klemm - 08-20-2018, 04:38 AM RE: Derivatives on HP 42S - Thomas Klemm - 08-20-2018, 07:43 AM RE: Derivatives on HP 42S - Albert Chan - 08-20-2018, 11:54 PM RE: Derivatives on HP 42S - lrdheat - 08-20-2018, 10:57 PM RE: Derivatives on HP 42S - Thomas Klemm - 08-20-2018, 11:43 PM RE: Derivatives on HP 42S - Thomas Klemm - 08-21-2018, 12:34 AM RE: Derivatives on HP 42S - Thomas Klemm - 08-21-2018, 01:35 AM RE: Derivatives on HP 42S - lrdheat - 08-21-2018, 02:24 AM RE: Derivatives on HP 42S - Thomas Klemm - 08-21-2018, 06:14 AM RE: Derivatives on HP 42S - RMollov - 08-23-2018, 12:58 PM RE: Derivatives on HP 42S - lrdheat - 08-24-2018, 02:51 AM RE: Derivatives on HP 42S - Thomas Klemm - 08-24-2018 05:52 AM RE: Derivatives on HP 42S - lrdheat - 08-25-2018, 05:19 PM RE: Derivatives on HP 42S - Albert Chan - 08-25-2018, 07:03 PM RE: Derivatives on HP 42S - Thomas Klemm - 08-25-2018, 06:05 PM RE: Derivatives on HP 42S - Thomas Klemm - 08-25-2018, 08:00 PM RE: Derivatives on HP 42S - Albert Chan - 08-25-2018, 09:20 PM RE: Derivatives on HP 42S - Thomas Klemm - 08-26-2018, 04:54 AM RE: Derivatives on HP 42S - Thomas Okken - 08-26-2018, 01:54 PM RE: Derivatives on HP 42S - lrdheat - 08-26-2018, 04:47 PM RE: Derivatives on HP 42S - Albert Chan - 08-26-2018, 08:39 PM RE: Derivatives on HP 42S - Thomas Klemm - 08-26-2018, 08:00 PM RE: Derivatives on HP 42S - Albert Chan - 08-29-2018, 01:52 PM

User(s) browsing this thread: 1 Guest(s)