Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EL4 Check It #437

Open
AbbyANoble opened this issue Dec 1, 2024 · 2 comments · May be fixed by #438
Open

EL4 Check It #437

AbbyANoble opened this issue Dec 1, 2024 · 2 comments · May be fixed by #438

Comments

@AbbyANoble
Copy link
Contributor

The logarithmic equations in EL4 are nonstandard in their display. They include things like a adding a negative number (without parentheses) instead of subtraction. And +0 at the end of some. My guess is that the equation was defined in pieces, and the pieces were inserted in an outline that had a constant at the end.

The ones below are versions 1 and 2 from https://tbil.org/preview/precalculus/exercises/#/bank/EL4/1/.

Screenshot 2024-12-01 at 4 22 18 PM Screenshot 2024-12-01 at 4 23 38 PM

I'd prefer them to look more standard, like $-\log_2 (x) -3$ and $-\log_4 (x+2)$.

@siwelwerd
Copy link
Contributor

Yeah... here's what happens if you try and use log(x,2) for example:

image

It handles all the equation stuff nicely but just turns $\log_2 x$ into $\frac{\log x}{\log 2}$ which is not wrong, but not helpful for students here.

I can imagine a way to hack this further to look nicer, but before I do that maybe @StevenClontz has an idea on how to convince Sage to display $\log_2 x$.

@siwelwerd
Copy link
Contributor

Wonder if this is the way...

from sage.symbolic.function_factory import function_factory
logb = function_factory('logb', 1, '\\log _b')
latex(logb(x))
latex(-1*logb(x)+(-3))

image
$-\log _b\left(x\right) - 3$

@siwelwerd siwelwerd linked a pull request Dec 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants