Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Define Function from Solve() Results

11 views
Skip to first unread message

Thomas D. Dean

unread,
Mar 26, 2013, 7:58:18 AM3/26/13
to
f:=(x)->3*x-5;
eq:=solve(y=f(x),x);
g:=(y)->eq; g(a);

I want the result to be the same as
g:=(y)->5/3 + y/3;

How do I do this?

Tom Dean

Nasser M. Abbasi

unread,
Mar 26, 2013, 8:49:24 AM3/26/13
to
I am not sure if I understood the question well. But it
looks like you need to use unapply:

-----------------------
f := x->3*x-5;
eq := solve(y=f(x),x);
g := unapply(eq,y);

g(a);
5/3+(1/3)*a
g(5);
10/3
------------------
etc..


--Nasser


0 new messages