**TI-74: Extrema of a Cubic Polynomial**

**Introduction**

The
program finds the extrema points of a cubic polynomial where the roots A, B,
and C are known. The cubic polynomial is
defined as:

y
= (x – A) * (x – B) * (x – C)

y
= x^3 – (A + B + C)*x^2 + (A*B + B*C + A*C)*x – (A*B*C)

The
extrema can be found by taking the derivative and then solving for x when
dy/dx=0.

dy/dx
= 3*x^2 – 2*(A + B + C)*x + (A*B + B*C + A*C) = 0

Solving
for x:

x
= (2*W ± √(4*W^2 – 12*V))/6

Where:

W
= A + B + C

V
= A*B + A*C + B*C

**TI-74 Program: Extrema of Cubic Polynomials**

100
PRINT “y=(x-a)(x-b)(x-c)”: PAUSE 1

110
INPUT “a: “;A

112
INPUT “b: “;B

114
INPUT “c: “;C

120
W=A+B+C

122
V=A*B+A*C+B*C

130
X1=(2*W+SQR(4*W^2-12*V))/6

132
X2=(2*W-SQR(4*W^2-12*V))/6

140
Y1=(X1-A)*(X1-B)*(X1-C)

142
Y2=(X2-A)*(X2-B)*(X2-C)

150
IMAGE “######.######, ######.######”

152
PRINT USING 150,X1,Y1: PAUSE

154
PRINT USING 150,X2,Y2: PAUSE

160
END

**Example**

A
= 0, B = 3, C = 5

Results:

4.119633,
-4.06067

1.213700,
8.20882

Eddie

This
blog is property of Edward Shore, 2018

## No comments:

## Post a Comment