Re: Solving Equation with Ezunits Problem
Robert Dodier <[email protected]> Thu, 4 Jun 2026 08:56:55 -0700
| Newsgroups | gmane.comp.mathematics.maxima.general |
|---|---|
| Message-ID | <CAAsY_sSsXVaaf5ibSS5_9EMyC=D2_mVhP8O75hL-j=XzNb2roA@mail.gmail.com> |
Mateusz, thanks a lot for the bug report; I've pushed commit 6f96481 to fix it. The example you gave is now in rtest_ezunits_mroz_examples.mac and the result, with the current version of Maxima from Git, is: foo2 : dimensionally(solve(expr, V_2))[1]; => V_2 = -((300 ` Ohm*mA+3 ` kOhm*mA+(-20) ` V)/2) rhs(foo2) `` V; => 167/20 ` V as expected. Thanks for your continued interest -- as I mentioned before I'm glad to hear you find it useful. Robert On Mon, Jun 1, 2026 at 10:08 AM Mateusz M. <[email protected]> wrote: > > Hello everyone > > I ran into a strange issue related to solving equations using the ezunits package, and I was able to reproduce it with this very simple example: > > R_1: 1 `kOhm; > R_2: 100 `Ohm; > V_1: 10 `V; > I: 3/2 `mA; > expr: V_1 = (R_1 + R_2) * I + V_2; > > (expr) 10 ` V=V_2+(3/2 ` mA)*(100 ` Ohm+1 ` kOhm) > > solve(expr, V_2)[1]; > rhs(%) ``V; > > V_2=10 ` V+-(3/2) ` kOhm*mA+-150 ` Ohm*mA > 167/20 ` V > > dimensionally(solve(expr, V_2))[1]; > rhs(%) ``V; > > V_2=-(((300 ` Ohm+3 ` kOhm) ` mA+-20 ` V)/2) > (((-(300 ` Ohm)-3 ` kOhm)*A^2*s^3)/(2000*kg*m^2)+10) ` V > > It seems that "dimensionally" caused an error somehow. When the expression “(R_1 + R_2)” is replaced with simply “R_1”, the results match. > This particular problem can be solved without using "dimensionally", but in most situations, that is not the case. > Is this the expected behavior? > > Best regards, > Mateusz Mróz > _______________________________________________ > Maxima-discuss mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/maxima-discuss _______________________________________________ Maxima-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/maxima-discuss