[GiNaC-list] variable isolation
Richard B. Kreckel
kreckel at ginac.de
Wed Jun 12 23:33:19 CEST 2013
On 06/12/2013 04:35 PM, Andrea Monzali wrote:
> I'm new to ginac, i read the tutorial but i've a question, if I have an
> equation expression, something like
>
> symbol x("x"), y("y");
> ex eq = 2*x + 3*x*y - 5*y == 0
>
> is there a method to isolate a single variable, i.e.
>
> cout << isolate(eq, x) << endl;
> // x == 5*y*(2 + 3*y)^(-1)
> cout << isolate(eq, y) << endl;
> // y == 2*x*(5 - 3*x)^(-1)
Search the manual for 'lsolve'.
-richy.
--
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>
More information about the GiNaC-list
mailing list