Saturday, March 28, 2020

TI 84 Plus CE: Building Piecewise Functions by Points

TI 84 Plus CE:  Building Piecewise Functions by Points

Introduction

The program PWISEBLD generates a parametric piecewise function in the form:

x(t) = t
y(t) = p(t)  (piecewise function)

The program allows the user to draw lines from 2 to 5 points.

Point 1:  (A, B)
Point 2:  (C, D)
Point 3:  (E, F)
Point 4:  (G, H)
Point 5:  (I, J)

p(t) =
(Kt + B - KA)(A ≤ t ≤ C) +
(LT + D - LC)(C < t ≤ E) +
(Mt + F - ME)(E < t ≤ G) +
(Nt + H - NG)(G < t ≤ I)

where the comparisons evaluate to either 0 (false) or 1 (true)

The program was typed on the TI-84 Plus CE but it should work with any of the TI-80 (?), TI-81 (?), TI-82, TI-83, and TI-84 families. 

TI-84 Plus Program PWISEBLD

"2020-02-24 EWS"
Param
FnOff
ClrHome
Disp "PIECEWISE BY POINTS", "PARAMETRIC MODE"
Lbl 0
Input "POINTS (2,3,4,5)?", O
iPart(O) → O
If O<2 o="" or="">5
Then
Disp "2,3,4 OR 5 ONLY"
Goto 0
End
"DATA"
"T" → X1T
Disp "(A,B)?"
Prompt A,B
A → Tmin
Disp "(C,D)?"
Prompt C,D
C → Tmax
(D - B) / (C - A) → K
"(KT + B - KA)(A ≤ T and T ≤ C)" → Str0
If O ≥ 3
Then
Disp "(E,F)?"
Prompt E,F
E → Tmax
(F - D) / (E - C) → L
Str0 + "+(LT+D-LC)(C
End
If O ≥ 4
Then
Disp "(G,H)?"
Prompt G,H
G → Tmax
(H - F) / (G - E) → M
Stro + "+(MT+F-ME)(E
End
If O = 5
Then
Disp "(I,J)?"
Prompt I,J
I → Tmax
(J - H) / (I - G) → N 
Str0 + "+(NT+H-NG)(G
End
Str0 → Y1T
"SET GRAPH" 
ZoomFit

Download the TI-84 Plus CE version: 
https://drive.google.com/open?id=1195hC6LBkR6uHCmCTjWAybSb07YwEPIa

You can use the parametric function Y1T(t) for analysis. 

Examples

Example 1: 
Three Points:  (3, 4), (5, 6), (8, 1)



Example 2:
Four Points:  (0, 0), (3, 4), (5, 6), (8, 1)



Example 3:
Five Points: (0, 0), (1, 1), (3, 6), (6, 10), (9, 12)




Eddie

All original content copyright, © 2011-2020.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Spotlight: Akron Brass FireCalc Pocket Computer

Spotlight: Akron Brass FireCalc Pocket Computer Welcome to a special Monday Edition of Eddie’s Math and Calculator blog. Thi...