-
Notifications
You must be signed in to change notification settings - Fork 175
Open
Description
I am trying to make a Quarto document to demonstrate solving simple symbolic equations.
I am getting the correct answer, but the expressions look a mess.
- The equation
eqdisplay is not latexifying correctly.
a. It is not in math font.
b. The subscripts are shown with underscores. - The solution
soldisplay shows the subscripts correctly, but ...
a.sqrtis shown as "ssqrt" with an extrasfor some reason
b. There is a1/2pulled out front that makes no sense, even when I explicitly ask forsimplify,expand, andsimplify_fractions.
# Cell 1
using Symbolics, Nemo, Latexify
@variables v_f, v_i, y_f, y_i, a
eq = v_f^2 ~ v_i^2 + 2 * a * (y_f - y_i)
latexify(eq)
# Cell 2
sol = symbolic_solve(eq, v_f)
sol = simplify.(sol[1], expand=true, simplify_fractions=true)
latexify(sol)
# Cell 3
d = Dict(
v_i => 20,
v_f => 0,
a => -32.2,
y_i => 0,
y_f => 6.2,
)
v_f_unique = substitute(sol, d)Metadata
Metadata
Assignees
Labels
No labels
