Post Reply 
(35S) Derivative in a point, tangent line, normal line.
09-14-2022, 11:47 AM (This post was last modified: 10-31-2022 05:21 AM by Roberto Volpi.)
Post: #1
(35S) Derivative in a point, tangent line, normal line.
Hi all,

taking advantage of the vector notation and the 2-stack display of the HP35S, it is possible to make a programme that can in an easy way not just compute the derivative in a given point, but also the equation of both normal and tangent line passing through that given point.

As a double checking, this programme compute not just the forward derivative, but also the backward one, so that, in case both values are not the same, it means that the f(x) is not derivable in that point.

It assumes that there is a LBL F to be used to store the f(X) to be analysed.

LBL D
INPUT X
STO C
XEQ F001
STO F
(EQN) 1E-10
STO D
STO+X
X<>Y
XEQ F001
RCL -F
RCL /D
R up
RCL -D
STO X
R down
XEQ F 001
RCL -F
RCL /D
+/-
X<>Y
RTN
STO A
RCL xC
+/-
RCL +F
STO B
RCL A
+/-
1/X
STO E
RCL xC
R up
-
+/-
STO G
(EQN) [A,B]
STO D
(EQN) [E,G]
STO F
RCL D
RCL F
RTN

Flag 10 must be clear, as formulas must be read as values and instructions and not as text.

INSTRUCTIONS:

- Write the f(x) as formula in LBL F

Ex.
LBL F
(EQN) X^2-2xX+1
RTN

- Press XEQ D, and press ENTER
The HP35S prompt for X value

- Input the X value (ex. 3) and press R/S
The calculator gives "4" in both stacks X and Y. It means that the f(x) is derivable in that point and that the answer in the X stack is correct.
If, as an example, we input the f(x) |X|, the ABS value of X, and compute the derivative in the point X=0, the answer will be:

Y stack : -1 (backward derivative)
X stack: 1 (forward derivative)

because that f(x) is not derivable in that point.

After determining the derivative in a given point, we can obtain tangent and normal line equations by pressing XEQ D023.

Ex. after computing that the derivative of X^2-2xX+1 in X=3 is 4 (Y-stack: 4; X-stack: 4), after pressing XEQ D023, we shall see as follows:

Y-stack: [4,-8]
X-stack: [-0.25,4.75]

In the Y-stack it appears the equation of the tangent line, and in the X-stack the equation of the normal line.

As line equations have the form Y=mX+q, the vector notation express them as [m,q], so that the right answers are:

Tangent line: Y=4X-8
Normal line: Y=-X/4+19/4

It is possible to use this programme also to compute local maxima and minima of the f(x). Just input in STO A an initial guess, press FN=, D, SOLVE, X.

Please note that if the initial guess is too far from the actual value, the result could be unreliable. Note also that the result may be not very accurate after 3 or 4 significant figures, but it can help in an exam to double check our answers.

Enjoy!



Put a calculator into your life!
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




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