rational functions · MIT License
Overview
Classify a factored rational-function zero as a vertical asymptote, hole, or canceled factor by comparing numerator and denominator multiplicities.
- Tested on a TI calculator
- Downloaded 45 times
- Version 1.0.0
- 2310 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
- The rational function is already in factored form.
- This program does not factor a polynomial automatically.
- Negative factor-copy counts are rejected.
Try the DuckieDai calculator screen
Follow the reviewed program prompts and calculation flow before downloading.
TI-84 Plus CE Python · screen preview
Learn the math
How vertical asymptotes and holes work
The idea
A rational function misbehaves wherever its bottom is zero. Whether that spot is a vertical asymptote or a hole depends on whether the same factor also appears on top.
If the factor cancels completely, the graph has a hole. If copies remain on the bottom, it has a vertical asymptote.
The formula
more copies on the bottom: vertical asymptote at x = c
equal copies: hole at x = c
more copies on top: the factor cancels and leaves a zero
c- the value that makes the factor (x - c) zero
copies- the power on that factor, top and bottom
Using the program
- Write the function in factored form first.
- Enter the factor's zero c, how many copies are on top, and how many are on the bottom.
Worked example
In (x - 2)/((x - 2)(x + 1)) the factor (x - 2) appears once on top and once on the bottom. Enter 2, 1, and 1.
The program shows HOLE at x = 2, because the factor cancels fully.
Tips and common mistakes
- Check each factor of the bottom separately.
- A hole is a single missing point, not a break that shoots off to infinity.
- Factor both top and bottom completely before using this.
Where this comes up
Vertical asymptotes and holes are part of the rational functions unit of algebra 2, precalculus, and college algebra, and calculus revisits them as infinite limits and removable discontinuities.
Exact reviewed bytes
Source code
"""DuckieDai Vertical Asymptote Checker for TI-84 Plus CE Python."""def duckiedai_intro(program_name):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("+----------------------+")print("Loading...")input("Press enter to start ")print("\n" * 8)def clear_screen():print("\n" * 8)def number(prompt):while True:try:return float(input(prompt))except ValueError:print("Enter a number")def clean_num(value):if abs(value - round(value)) < 0.0000001:return str(int(round(value)))return str(round(value, 6))def run_checker():clear_screen()print("VERTICAL ASYMPTOTE")print("------------------")print("Use factored form.")print("Example: (x-2)^2")print("")zero = number("Factor zero c: ")top_count = int(number("Top copies: "))bottom_count = int(number("Bottom copies: "))if top_count < 0 or bottom_count < 0:print("Counts cannot be negative")returnclear_screen()print("RESULT")print("------")print("Factor: x - (" + clean_num(zero) + ")")print("")if bottom_count == 0:print("Not a denominator")print("factor.")elif bottom_count > top_count:print("VERTICAL ASYMPTOTE")print("x =", clean_num(zero))print("")print("Remaining bottom")print("power:", bottom_count - top_count)elif bottom_count == top_count:print("HOLE")print("x =", clean_num(zero))print("")print("Factor cancels fully.")else:print("NO VERTICAL")print("ASYMPTOTE")print("")print("Top factor cancels")print("the denominator.")duckiedai_intro("Vert Asymptote")while True:run_checker()print("")if input("Again? y/n: ").lower() != "y":breakclear_screen()print("DuckieDai says: done!")
- Filename
VASYM.py- Size
- 2310 bytes
- SHA-256
dff6c1252d45cc5c10e390d7d9f4539b2f78f1ee3dfee7707a1a57d5f7740438
Usage
Inputs
- Zero c from factor x minus c
- Numerator factor copies
- Denominator factor copies
Outputs
- Vertical asymptote, hole, or no vertical asymptote
- Remaining denominator multiplicity when applicable
Units: Factor roots and multiplicities; no physical units.
Assumptions and limitations
Assumptions
- The rational function is already in factored form.
Constraints
- This program does not factor a polynomial automatically.
Known failures
- Negative factor-copy counts are rejected.
Compatibility and review
- Review status
- Tested on a TI calculator
- Tested on
- Creator-owned TI-84 Plus CE Python calculator; exact .py transferred and launched individually
- What happened
- Passed: creator personally tested the corrected exact program on a TI 84 Plus CE Python calculator.
- Dependencies
- No imports
- Suggested calculator name
VASYM— 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 VASYM 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.0 — current version, 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.