Thank you for your quick answer, Minh.
Although it would give the correct answer, it does not satisfy my wish
to distinguish constants from parameters. In my engineering pblm, I
have a set of several constants that I use in many statements, and I
wish to keep them together nicely, and use them in only one keyword.
In your solution, I would have to repeat them every time, and this is
not convenient.
Any idea why Sage behaves as it does, and how to circument this
strange behavior while keeping the "constant" idea ?
Thanks
PC
On 25 juil, 21:43, Minh Nguyen <
nguyenmi...@gmail.com> wrote:
> Hi Pierre,
> Is the following what you're looking for?
>
> ----------------------------------------------------------------------
> | Sage Version 4.1, Release Date: 2009-07-09 |
> | Type notebook() for the GUI, and license() for information. |
> ----------------------------------------------------------------------
> sage: var("v, d, t");
> sage: equation = v == d/t
> sage: solution = solve(equation, d, solution_dict=True)
> sage: solution
> [{d: t*v}]
> sage: sol_d = solution[0][d]; sol_d
> t*v
> sage: sol_d.substitute(v=2)
> 2*t
> sage: sol_d.substitute(t=3)
> 3*v
> sage: sol_d.substitute(t=3, v=2)
> 6
> sage: sol_d
> t*v
>
> --
> Regards
> Minh Van Nguyen