Using the full toolkit? Read the step-by-step Polynomial Toolkit guide for quartic, cubic, and quadratic workflows, worked examples, and a reminder to keep every root you find.
algebra · MIT License
Overview
Test a proposed zero of a cubic and show the quadratic quotient when synthetic division has zero remainder.
- Tested on a TI calculator
- Downloaded 75 times
- Version 1.0.1
- 2666 bytes
- No imports
Tried it? Did this program work on your calculator?
Before you run it
- TI-84 Plus CE Python · tested on OS 5.8.3, Python App 5.8.3.0048
- TI Connect CE .py conversion to a Python AppVar in RAM; physically tested one program at a time
- Decimal remainders within 1E-7 display as zero.
- Fractions must have a nonzero denominator.
- Floating-point rounding can classify values close to zero differently than exact symbolic arithmetic.
Try the DuckieDai calculator screen
A browser implementation of the documented calculation flow. It does not execute the downloaded Python.
TI-84 Plus CE Python · screen preview
Learn the math
How testing a zero of a cubic works
The idea
A cubic can have up to three real zeros. Finding one by testing a candidate reduces the problem to a quadratic, which you already know how to solve.
The formula
ax^3 + bx^2 + cx + d = (x - r)(quadratic) when r is a zero
a, b, c, d- coefficients of the cubic
r- the candidate zero
R- the remainder after synthetic division
Using the program
- Enter the four coefficients, then the zero to test.
- If the remainder is 0 the program shows the quadratic quotient to carry into the Quadratic Solver.
Worked example
Test x = 1 on x^3 - 6x^2 + 11x - 6. Enter 1, -6, 11, -6, then 1.
The program shows R: 0 and IT IS A ZERO, with the quotient 1 x^2, -5 x, 6. Solving x^2 - 5x + 6 = 0 gives the other zeros, 2 and 3.
Doing it by hand
The program uses synthetic division, which you can do in one line of arithmetic. Write the coefficients in a row. Bring the first one down. Then repeat: multiply the number you just wrote by the candidate, add the result to the next coefficient, and write the sum.
Test x = 2 on x^3 - 6x^2 + 11x - 6. The coefficients are 1, -6, 11, -6.
1
-6 + (1 x 2) = -4
11 + (-4 x 2) = 3
-6 + (3 x 2) = 0
The last number is the remainder. It is 0, so 2 is a zero, and the numbers before it are the quotient: x^2 - 4x + 3. That factors as (x - 1)(x - 3), so the three zeros are 1, 2, and 3.
When a candidate fails, the remainder still means something. Testing x = 4 on the same cubic leaves 6, and 6 is exactly the value of the cubic at x = 4. This is the Remainder Theorem: the remainder after dividing by (x - r) is the value of the polynomial at r.
Tips and common mistakes
- Get candidates from the Rational Zero Finder.
- Enter 0 for any missing term.
- Keep every zero you find, including the first one you tested.
Where this comes up
Finding the zeros of a cubic is a standard task in the polynomial unit of algebra 2, precalculus, and college algebra, and it is the step that turns a graphing question into an exact answer.
Go further: How to Find All the Zeros of a Polynomial
Exact reviewed bytes
Source code
"""DuckieDai Cubic Zero Tester for TI-84 Plus CE Python."""def duckiedai_intro(program_name, wait=True):title = program_name[:16]empty = 16 - len(title)left = empty // 2right = empty - leftprint("+----------------------+")print("| " + " " * left + title + " " * right + " |")print("| |")print("| __ |")print("| ___(o )> quack! |")print("| \\ <_. ) |")print("| `---' |")print("| by DuckieDai |")print("| hiddenwordscanner.com|")print("+----------------------+")print("Loading...")if wait:input("Press enter to start ")print("\n" * 8)def clear_screen():print("\n" * 8)def clean_num(n):if abs(n - round(n)) < 0.0000001:return int(round(n))return round(n, 6)def number(prompt):while True:try:text = input(prompt)if "/" in text:parts = text.split("/")if len(parts) != 2:raise ValueErrortop = float(parts[0])bottom = float(parts[1])if bottom == 0:print("Cannot divide by 0")continuereturn top / bottomreturn float(text)except ValueError:print("Enter a number")print("or fraction")def run_test():clear_screen()print("ENTER CUBIC")print("ax^3+bx^2+cx+d")print("")a = number("x^3: ")b = number("x^2: ")c = number("x: ")d = number("Const: ")print("")zero = number("Test zero: ")first = asecond = b + first * zerothird = c + second * zeroremainder = d + third * zeroif abs(remainder) < 0.0000001:remainder = 0clear_screen()print("ZERO TEST")print("---------")print("Test:", clean_num(zero))print("R:", clean_num(remainder))print("")if remainder == 0:print("TRUE!")print("IT IS A ZERO")else:print("FALSE")print("NOT A ZERO")input("\nPress enter ")if remainder != 0:returnclear_screen()print("QUOTIENT")print("--------")print(clean_num(first), "x^2")print(clean_num(second), "x")print(clean_num(third))print("")print("Use these in")print("Quadratic Solver")duckiedai_intro("Cubic Zero")while True:run_test()print("")again = input("Again? y/n: ")if again.lower() != "y":breakclear_screen()print("DuckieDai says: done!")
- Filename
P3Q3.py- Size
- 2666 bytes
- SHA-256
1c4e5f3f76bea5b7721b94aa073e11441fd314c409ce04360d92e5dfe691538a
Usage
Inputs
- Cubic coefficients a, b, c, and d
- Proposed zero, as a number or fraction
Outputs
- Zero-test result and remainder
- Quadratic quotient coefficients when the remainder is zero
Units: Inputs represent a cubic polynomial a*x^3 + b*x^2 + c*x + d.
Assumptions and limitations
Assumptions
- Decimal remainders within 1E-7 display as zero.
Constraints
- Fractions must have a nonzero denominator.
Known failures
- Floating-point rounding can classify values close to zero differently than exact symbolic arithmetic.
Compatibility and review
- Review status
- Tested on a TI calculator
- Tested on
- Owner-tested TI-84 Plus CE Python calculator; exact branded .py transferred and launched individually
- What happened
- Passed: owner tested the exact 1.0.1 branded source bytes on a TI 84 Plus CE Python calculator.
- Dependencies
- No imports
- Suggested calculator name
P3Q3— you can give it another valid, unique name when you transfer it- Desktop test cases
- Not available for this interactive-only source
This exact source auto-launches an interactive calculator session, so compatibility evidence comes from the recorded physical-device review rather than an importable desktop fixture.
Transfer and launch
Download the .py file, send it to your calculator with TI Connect CE as P3Q3 or another name, then open the Python App and try the worked example on this page first.
Full installation and troubleshooting guide. Check your teacher's or exam's rules before using any program.
Version history
- 1.0.1 — current version, published . Download this reviewed version
- 1.0.0 — superseded by 1.0.1, published . Download this reviewed version
Related learning
Did a DuckieDai program help with your homework? Every program here is free. If you would like to say thanks, you can leave a tip on Cash App ($duckiedai214) or read what tips pay for.
Independent compatibility resource: Hidden Word Scanner is independent and is not affiliated with or endorsed by Texas Instruments. TI product names describe compatibility only.
Action-count privacy: Successful downloads, preview starts, and preview completions increment same-origin aggregate counters, and so does a Yes or No answer about whether the program worked. Your browser notes that you answered; that note is never sent to the site. No entered values, source text, IP address, account, cookie, device identifier, or fingerprint is stored with these counts.