HP Forums

Full Version: (DM42) (42S) Length of the curve of a function
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The following little program computes the length of the curve of a function using the integration function.

Application:
The function of which you want to get the curve length has to be programmed under the label "FU". I use as an example the function y=4x²-x-3. But you can replace it by any other function as long as it can be differentiated within the limits you use.

Press the integration key. Select "CLENT" as the integration program. Select "X" for the variable. Put in the area of the function for which you want to have the length of the curve using LLIM and ULIM. Put in the accuracy you want ("ACC") and press the integration key.

For example using -0.75 as LLIM and 1 as ULIM (for these x the function 4x²-x-3 is zero, but this is not necessary) and an accuracy of .0001 you get as a result 6.5177 which is the exact value within the limits of the accuracy used.

Enjoy!

Best

Raimund

{ 53-Byte Prgm }
LBL "CLENT"
MVAR "X"
RCL "X"
1E-4
-
XEQ "FU"
STO11
RCL "X"
1E-4
+
XEQ "FU"
RCL11
-
2E-4
./.

1
+
SQRT
RTN
END

{ 20-Byte Prgm }
LBL"FU"
MVAR "X"
ENTER

4
*
X<>Y
-
3
-
RTN
END
Reference URL's