exponential functions · MIT License
Overview
Describe the graph of y = a*b^(x-h)+k: growth or decay, reflection, stretch, shifts, asymptote, domain, range, y-intercept, and three graph points.
- Owner-tested on a TI calculator
- Downloaded 38 times
- Version 1.0.0
- 3302 bytes
- No imports
Tried it? Did this program work on your calculator?
Before you run it
- TI-84 Plus CE Python · No calculator OS or Python App version has been verified.
- TI Connect CE .py transfer to the Python App; the owner's transfer details were not recorded
- The function is written in the form y = a*b^(x-h)+k.
- Values are shown rounded to four decimal places.
- a cannot be 0.
Try the DuckieDai calculator screen
Follow the program's prompts and result flow before downloading.
TI-84 Plus CE Python · screen preview
Learn the math
How exponential transformations work
The standard form
An exponential function can be written in the form below. The program asks for the four numbers a, b, h, and k, then describes the graph one screen at a time.
y = a*b^(x-h)+k
a- the multiplier. Bigger than 1 (ignoring its sign) stretches the graph vertically; between 0 and 1 shrinks it. A negative a flips the graph over the x-axis.
b- the base. Greater than 1 means growth; between 0 and 1 means decay. It must be positive and cannot be 1.
h- the left or right shift. A positive h moves the graph right; a negative h moves it left.
k- the up or down shift. It also sets the horizontal asymptote, y = k.
Watch the sign of h. The form uses x - h, so 3^(x+2) means h = -2, a shift 2 to the left.
What the program reports
- Behavior: growth or decay, whether the graph is flipped over the x-axis, and any vertical stretch or shrink.
- Shifts: left or right by h, up or down by k, and the horizontal asymptote y = k.
- Domain and range: the domain is always all real numbers. The range is above k when a is positive and below k when a is negative.
- Y-intercept: the value of y when x is 0.
- Three graph points at x = h - 1, h, and h + 1, which are enough to sketch the curve.
The three points always have the y-values a/b + k, a + k, and a*b + k.
Worked example
y = 2*3^(x-1)-4
Enter a = 2, b = 3, h = 1, k = -4. The program reports:
- Base: GROWTH, no x-axis flip, vertical stretch by 2.
- Right 1, Down 4, asymptote y = -4.
- Domain (-inf, inf) and range (-4, inf).
- Y-intercept (0, -3.3333).
- Graph points (0, -3.3333), (1, -2), and (2, 2).
Answers are rounded to four decimal places, so -3.3333 stands for -10/3.
Go further: Exponential Growth and Decay: Doubling Time, Half-Life, and Graphs
Exact reviewed bytes
Source code
"""DuckieDai Exponential Transform Solver 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("| hiddenwordscanner.com|")print("+----------------------+")print("Loading...")input("Press enter ")print("\n" * 7)def pause():input("\nPress enter ")print("\n" * 7)def num(prompt):while True:try:return float(input(prompt))except:print("Enter a number.")def fmt(n):if abs(n) < 0.000001:n = 0if n == int(n):return str(int(n))return str(round(n, 4))def run_solver():print("STANDARD FORM")print("")print("y = a*b^(x-h)+k")print("")print("a = multiplier")print("b = base")print("h = left/right")print("k = up/down")pause()while True:a = num("a? ")if a == 0:print("a cannot be 0.")continueb = num("b? ")if b <= 0 or b == 1:print("b must be > 0")print("and not equal 1.")continueh = num("h? ")k = num("k? ")breakprint("\n" * 7)print("BEHAVIOR")print("")if b > 1:print("Base: GROWTH")else:print("Base: DECAY")if a < 0:print("Reflect over")print("x-axis")else:print("No x-axis flip")aa = abs(a)if aa > 1:print("Vertical stretch")print("by " + fmt(aa))elif aa < 1:print("Vertical shrink")print("by " + fmt(aa))else:print("No stretch")pause()print("SHIFTS")print("")if h > 0:print("Right " + fmt(h))elif h < 0:print("Left " + fmt(abs(h)))else:print("No left/right")if k > 0:print("Up " + fmt(k))elif k < 0:print("Down " + fmt(abs(k)))else:print("No up/down")print("")print("ASYMPTOTE")print("y = " + fmt(k))pause()print("DOMAIN")print("(-inf, inf)")print("")print("RANGE")if a > 0:print("(" + fmt(k) + ", inf)")else:print("(-inf, " + fmt(k) + ")")print("")yint = a * (b ** (-h)) + kprint("Y-INTERCEPT")print("(0, " + fmt(yint) + ")")pause()print("GRAPH POINTS")print("")x1 = h - 1y1 = a * (b ** -1) + kx2 = hy2 = a + kx3 = h + 1y3 = a * b + kprint("(" + fmt(x1) + ", " + fmt(y1) + ")")print("(" + fmt(x2) + ", " + fmt(y2) + ")")print("(" + fmt(x3) + ", " + fmt(y3) + ")")print("")print("HA: y = " + fmt(k))duckiedai_intro("Exp Transform")while True:run_solver()print("")again = input("Again? y/n: ")if again.lower() != "y":breakprint("\n" * 7)print("\nDuckieDai says:")print("done!")
- Filename
EXPTRAN.py- Size
- 3302 bytes
- SHA-256
e371a928d3e55565624535284d3acb2d3bcb83dc429b709f3256b2882f20bd19
Usage
Inputs
- Multiplier a (not 0)
- Base b (positive and not 1)
- Horizontal shift h
- Vertical shift k
Outputs
- Growth or decay, x-axis reflection, and vertical stretch or shrink
- Left/right and up/down shifts with the horizontal asymptote y = k
- Domain, range, and y-intercept
- Three graph points at x = h-1, h, and h+1
Units: Function parameters; no physical units.
Assumptions and limitations
Assumptions
- The function is written in the form y = a*b^(x-h)+k.
- Values are shown rounded to four decimal places.
Constraints
- a cannot be 0.
- b must be greater than 0 and cannot equal 1.
Known failures
- A very large shift or base makes the y-intercept or a graph point too large for the calculator and stops the program with an error.
- An invalid a or b restarts entry from a.
Compatibility and review
- Review status
- Owner-tested on a TI calculator
- Tested on
- Owner reports personally using this program on a TI-84 Plus CE Python calculator for coursework; the test date, OS version, and Python App version were not recorded
- What happened
- Owner reported pass on the calculator before the website line was added to the opening screen and the line endings were normalised. The steps after the opening screen are unchanged; this exact file has not yet been rerun on a calculator.
- Dependencies
- No imports
- Suggested calculator name
EXPTRAN— 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 EXPTRAN or another name, then open the Python App and try the worked example on this page first. This release has no verified calculator OS or Python App version; treat transfer and execution as unverified until independently tested.
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.