Question: GetEquation command line

How do you get equation from user in middle of a procedure? I tried to use the GetEquation of Maplets[Examples] but I cannot make a function out of it. The sheet is something like:

 

restart

with(Maplets[Examples]):

f := GetEquation()

x-exp(-x)*sin(x) = 0

(1)

# Input is x-exp(-x)*sin(x)

F := lhs(f)

x-exp(-x)*sin(x)

(2)

subs(x = 0, F)

-exp(0)*sin(0)

(3)

G := proc (x) options operator, arrow; lhs(f) end proc

proc (x) options operator, arrow; lhs(f) end proc

(4)

G(0)

x-exp(-x)*sin(x)

(5)

``


It seems the GetEquation command does not do the parsing, right? what is the way here?

Download GetEquation.mw

Please Wait...