exponential functions · MIT License
Overview
Solve logarithm and exponential equations for the exponent, the argument, or the base, solve log_b(ax+c) = d and b^x = y, and convert between log and exponential form.
- Owner-tested on a TI calculator
- Version 1.0.0
- 5609 bytes
- Uses math
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
- Logarithms use the change of base formula log_b(A) = ln(A)/ln(b).
- An answer within a hundred-millionth of a fraction with denominator up to 100 is shown as that fraction; other answers are rounded to eight decimal places.
- A base must be greater than 0 and cannot equal 1.
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 to solve logarithm and exponential equations
The idea
An exponential statement and a logarithm statement are two ways of writing the same fact. 2^3 = 8 and log_2(8) = 3 say exactly the same thing.
Every equation this program handles has three parts: a base, an exponent, and a result. Give it any two and it finds the third.
The formula
log_b(A) = x means b^x = A
x = ln(A)/ln(b) A = b^x b = A^(1/x)
b- the base: positive and not 1
A- the argument of the log, which is the result of the power
x- the exponent, which is the value of the log
Using the program
- 1 finds the exponent in log_b(A) = x. 5 does the same for an equation written as b^x = y.
- 2 finds the argument in log_b(x) = y. 3 finds the base in log_x(A) = y.
- 4 solves log_b(ax+c) = d for x.
- 6 rewrites an equation you type from log form to exponential form or back.
- Answers that are whole numbers or simple fractions are shown that way, so you see 1/2 and not 0.5.
Worked example
Solve 9^x = 3. Choose 5 and enter base 9 and result 3.
x = ln(3)/ln(9)
The program shows x = 1/2, with the log form log_ 9 and ( 3 ) = 1/2. That is correct because the square root of 9 is 3.
Find the base in log_x(8) = 3. Choose 3 and enter argument 8 and exponent 3. The program shows x = 2, because x^ 3 = 8.
To convert log_2(8) = 3 to exponential form, choose 6, then 1, and type 2, 8, and 3. The program shows EXP FORM: 8=2^3.
Tips and common mistakes
- You can type fractions: enter 1/2 for one half.
- The form converter rearranges what you type. It does not check that the equation is true.
- A base cannot be negative, 0, or 1, and you cannot take the log of 0 or a negative number.
Where this comes up
It covers the exponential and logarithmic equations unit of algebra 2, precalculus, and college algebra, where switching between the two forms is the main skill being tested.
Exact reviewed bytes
Source code
"""DuckieDai Log/Exponent Solverfor TI-84 Plus CE Python."""from math import logdef intro():print("LOG EXP SOLVER")print()print(" __")print(" ___(o )> quack!")print(" \\ <_. )")print(" `---'")print(" by DuckieDai")print()print("hiddenwordscanner.com")print("Loading...")input("Press enter ")print("\n"*6)def num(prompt):while True:try:s=input(prompt).strip()if "/" in s:a,b=s.split("/")return float(a)/float(b)return float(s)except Exception:print("Enter a number.")def fmt(x):# Whole numberif abs(x-round(x)) < 1e-9:return str(int(round(x)))# Look for a simple fractionfor d in range(2,101):n=round(x*d)if abs(x-n/d) < 1e-8:return str(n)+"/"+str(d)# Otherwise keep decimalreturn str(round(x,8))def goodbase(b):return b > 0 and b != 1intro()while True:print("LOG / EXP SOLVER")print("1 log_b(A)=x")print("2 log_b(x)=y")print("3 log_x(A)=y")print("4 log_b(ax+c)=d")print("5 b^x=y")print("6 Convert forms")print()ch=input("Choice? ")print("\n"*6)# -------------------------# 1. FIND LOG / EXPONENT# log_b(A) = x# -------------------------if ch=="1":print("log_b(A) = x")print("Find x")print()b=num("Base b? ")A=num("Argument A? ")if not goodbase(b):print("Bad base.")print("b>0 and b!=1")elif A<=0:print("Argument > 0")else:x=log(A)/log(b)print("\n"*4)print("RESULT")print("x =",fmt(x))print()print("Means:")print(fmt(b),"^",fmt(x))print("=",fmt(A))# -------------------------# 2. FIND ARGUMENT# log_b(x) = y# -------------------------elif ch=="2":print("log_b(x) = y")print("Find x")print()b=num("Base b? ")y=num("y? ")if not goodbase(b):print("Bad base.")print("b>0 and b!=1")else:x=b**yprint("\n"*4)print("RESULT")print("x =",fmt(x))print()print("Because:")print("x = b^y")# -------------------------# 3. FIND BASE# log_x(A) = y# -------------------------elif ch=="3":print("log_x(A) = y")print("Find base x")print()A=num("Argument A? ")y=num("Exponent y? ")if A<=0:print("Argument > 0")elif y==0:print("No valid base")print("for y = 0")else:x=A**(1/y)print("\n"*4)if goodbase(x):print("RESULT")print("x =",fmt(x))print()print("Because:")print("x^",fmt(y),"=",fmt(A))else:print("No valid")print("log base.")# -------------------------# 4. SOLVE ARGUMENT# log_b(ax+c) = d# -------------------------elif ch=="4":print("log_b(ax+c)=d")print("Find x")print()b=num("Base b? ")a=num("a? ")c=num("c? ")d=num("d? ")if not goodbase(b):print("Bad base.")elif a==0:print("a cannot be 0")else:value=b**dx=(value-c)/aprint("\n"*4)print("RESULT")print("x =",fmt(x))print()print("Step:")print("ax+c =",fmt(value))# -------------------------# 5. EXPONENTIAL# b^x = y# -------------------------elif ch=="5":print("b^x = y")print("Find x")print()b=num("Base b? ")y=num("Result y? ")if not goodbase(b):print("Bad base.")elif y<=0:print("y must be > 0")else:x=log(y)/log(b)print("\n"*4)print("RESULT")print("x =",fmt(x))print()print("Log form:")print("log_",fmt(b))print("(",fmt(y),") =",fmt(x))# -------------------------# 6. FORM CONVERTER# -------------------------elif ch=="6":print("FORM CONVERTER")print()print("1 Log -> Exp")print("2 Exp -> Log")print()form=input("Choice? ")print("\n"*5)if form=="1":print("log_b(A)=x")print()b=input("Base b? ")A=input("Argument A? ")x=input("Answer x? ")print("\n"*4)print("EXP FORM:")print(A+"="+b+"^"+x)elif form=="2":print("b^x=A")print()b=input("Base b? ")x=input("Exponent x? ")A=input("Result A? ")print("\n"*4)print("LOG FORM:")print("log_"+b+"("+A+")")print("="+x)else:print("Choose 1 or 2.")else:print("Choose 1-6.")print()again=input("Again? y/n: ")if again.lower()!="y":breakprint("\n"*7)print()print("DuckieDai says: done!")print("hiddenwordscanner.com")
- Filename
LOGEXS.py- Size
- 5609 bytes
- SHA-256
435ecbbf8163d02910c5c07baf5c8bfd3d45cd3b8048c9af2a26a14e27406d41
Usage
Inputs
- One menu choice from 1 to 6
- The base, argument, exponent, or coefficients for the chosen equation
- For the form converter, the three parts of the equation as typed text
Outputs
- The missing exponent, argument, or base, shown as a whole number or simple fraction when possible
- The equivalent exponential or logarithmic statement
- The same equation rewritten in the other form
Units: Pure numbers; no physical units.
Assumptions and limitations
Assumptions
- Logarithms use the change of base formula log_b(A) = ln(A)/ln(b).
- An answer within a hundred-millionth of a fraction with denominator up to 100 is shown as that fraction; other answers are rounded to eight decimal places.
Constraints
- A base must be greater than 0 and cannot equal 1.
- A logarithm's argument must be greater than 0.
- Numbers may be typed as decimals or as a fraction such as 1/2.
Known failures
- A very large exponent makes a power too large for the calculator and stops the program with an error.
- Finding a base when the exponent is 0 has no valid answer and is reported as such.
- The form converter rewrites whatever text is typed and does not check that the equation is true.
Compatibility and review
- Review status
- Owner-tested on a TI calculator
- Tested on
- Owner reports personally running this program on a TI-84 Plus CE Python calculator; the test date, OS version, and Python App version were not recorded
- What happened
- Owner reported pass on the calculator. Only the line endings were normalised for publication; the program text is unchanged. This exact file has not yet been rerun on a calculator.
- Dependencies
- math
- Suggested calculator name
LOGEXS— 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
- Confirm that your calculator is the Python-capable model named above. This release has no verified calculator OS or Python App version; treat transfer and execution as unverified until independently tested.
- Download the
.pysource above and verify its SHA-256 digest if your computer provides that option. - Use TI Connect CE to send the Python file to a compatible calculator.
LOGEXSis a suggested name; you may choose another valid, unique calculator name. - Open the Python App, select the program, and check sample inputs before relying on other results.
Read the complete installation, launch, troubleshooting, and removal guide.
Availability does not mean a teacher, school, or exam permits this program. Follow the applicable rules.
Version history
- 1.0.0 — current version, published . Download this reviewed version
Any source change requires a new immutable version and digest. Historical downloads remain available only while their review records remain valid.
Related learning
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. No entered values, source text, IP address, account, cookie, device identifier, or fingerprint is stored with these counts.