Solving Equation with Ezunits Problem

"Mateusz M." <[email protected]> Mon, 1 Jun 2026 19:06:46 +0200
Newsgroups gmane.comp.mathematics.maxima.general
Message-ID <CAOJ_3NFcFHRuF=X0noeqNJ-6SWuZfBjUUubxK=7DB-StOJJC0A@mail.gmail.com>
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