**Casio Prizm Color Programs**

This blog will feature two
programs: arc length and area between
curves. After the calculation is
complete, the results are displayed and plotted.

**ARCPRZ: Arc Length**

Find the Arc Length of function

**Y1**. Once the arc length is calculated, the function is plotted, and the arc length is plotted in red.
Notes:

* Functions are retrieved by
pressing [VARS], [ F4 ] (GRAPH), [ F1 ] (

**Y**).
* To get Xdot, press [ VARS ], [ F1 ] (V-WIN), [ F1 ] ( X ), [ F4 ] for
Xdot.

* Color commands are found by
pressing [SHIFT] [ 5 ] (FORMAT) and selecting Color commands.

* The derivative function (d/dx)
is not allowed as part of the integrand in the integral function (∫ dx) on Casio
calculators. (At least for the fx-5800p, fx-9750g series, fx-9860g series, and the
Prizm. I am not sure about the
Classpads). Therefore, the Simpson’s
Rule is used instead. I use 100
divisions.

* G SelOn and G SelOff I got from
the CATALOG. ([SHIFT], [ 4 ]). I am not sure what menus where these two
commands are located.

* DrawGraph is found by pressing
[SHIFT] [ VARS ] (PRGM), [ F6 ] (next page), [ F2 ] (DISPLAY), [ F2 ] (Graph)

Program:

Rad

Menu
"USE

**Y**1?","YES",1,"NO",2
Lbl
2

"

**Y**1 (NO QUOTES)"? →**Y**1
Lbl
1

"LOW"?
→ A

"HIGH"?
→ B

0→K:(B-A)÷100→S

0→T

For
A→I To B Step S

√
(1+d/dx(

**Y**1,I)^2)→U
I=A
Or I=B ⇒ T+U → T

If
K≠0 And K≠100

Then

2U+T
→ T

Frac
(K/2)≠0 =>2U+T → T

IfEnd

K+1
→ K

Next

S/3*T
→ T

"ARC
LENGTH=" ◢

T ◢

G
SelOff

G
SelOn 1

DrawGraph

For
A → I To B Step Xdot

Red
PlotOn I,

**Y**1(I)
Next

Black
Text 165,1,"ARC="

Black
Text 165,65,T

**Examples**

**Y**1 = cos(X)*e^X from X = 1 to 2. Arc Length = 4.7031139029…

**AREABTWN: Area Between Curves**

This calculates the area
between two curves,

**Y**1 and**Y**2. This program works best if you can set the graph screen to where the curves intersect at only two points. The program first searches for two intersections, one from the left side of the graph screen (Xmin) and one from the right (Xmax). After the area is calculated, both curves are graphed and the area between curves are shaded. Function and Radian modes are used.
Notes:

* F-Line is found by
pressing [SHIFT] [ F4 ] (Sketch), [ F6 ] (next page)

* Since there is no shade function on the Prizm,
a work around is needed. Thankfully,
there are FMin and FMax (function minimum and function maximum) functions that
would make the picture look nice possible.

* ViewWindow seems to only
affect the graph shown in Program mode when used as a command in program made.

* The program assumes that
Function mode is set.

* In this listing,
anything followed by double slashes (//) is a comment. Do not type these lines into the
program.

Program:

Rad

Menu
“USE

**Y**1,**Y**2?”, “YES”, 1, “NO”, 2
Lbl
2

“

**Y**1 (NO QUOTES)”? →**Y**1
“

**Y**2 (NO QUOTES)”? →**Y**2
Lbl
1

//
finding the end points

Solve(

**Y**1-**Y**2, Xmin) → A
Sovle(

**Y**1-**Y**2, Xmax) → B
If
A > B

Then

A
→ C: B → A: C → B: IfEnd

If
A = B

Then

“NO
SOLUTION”

Stop:
IfEnd

//
calculation

∫
(

**Y**1-**Y**2, A, B) → I
Abs
I → I

“AREA=”
◢

I ◢

// start graphing routine

ClrGraph

G SelOff

G SelOn 1

G SelOn 2

// setting the window

FMin(

**Y**1, A, B) → List 25
FMin(

**Y**2, A, B) → List 26
List 25[2] → U

List 26[2] → V

Min({U,V}) → E

FMax(

**Y**1, A, B) → List 25
FMax(

**Y**2, A, B) → List 26
List 25[2] → U

List 26[2] → V

Max({U,V}) → F

ViewWindow A-1,B+1,1,E-1,F+1,1

// now draw the graph

DrawGraph

// shading routine

For A → K To B Step Xdot

Green F-Line K,

**Y**1(K),K,**Y**2(K)
Next

**Examples**

The Standard Window is used. Xmin = -10, Xmax = 10, Ymin =
-10, Ymax = 10

**Y**1 = -2X^2 + 4X + 1,

**Y2**

_{ }= X^2. Area = 2.734721…

**Y1**= 1.2X + .63,

**Y2**= -X^2 + 5X + 1. Area = 10.58676675…

A nice feature of the Prizm is that you transfer program
files and screen captures from the calculator to the computer by just using the
standard mini USB cable.

Eddie

## No comments:

## Post a Comment