You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> @variables a b c
(a, b, c)
julia> par(x,y) = 1/(1/x+1/y)
par (generic function with 1 method)
julia> ex1 = par(a, par(b,c))
(a^-1 + ((b^-1 + c^-1)^-1)^-1)^-1
julia> simplify(ex1)
(a^-1 + b^-1 + c^-1)^-1
julia> par2(x,y) = x*y/(x+y)
par2 (generic function with 1 method)
julia> ex2 = par2(a, par2(b, c))
a*b*c*((a + b*c*((b + c)^-1))^-1)*((b + c)^-1)
julia> simplify(ex2)
a*b*c*((a + b*c*((b + c)^-1))^-1)*((b + c)^-1)
ex1 and ex2 can be simplified to the same expression but do not.
Also, it seems that a faster version might be ex3 = a*b*c/(a*b+a*c+b*c), so it would be nice to be able to control or direct the simplification process.
This exploration was done in consideration of more complicated expressions representing circuit impedances by phasor representation, in which for example the impedance of an inductor would be represented by im*2π*f*L. The par and par2 are two forms of the same formula for computing impedances in parallel.
ex1
andex2
can be simplified to the same expression but do not.Also, it seems that a faster version might be
ex3 = a*b*c/(a*b+a*c+b*c)
, so it would be nice to be able to control or direct the simplification process.This exploration was done in consideration of more complicated expressions representing circuit impedances by phasor representation, in which for example the impedance of an inductor would be represented by
im*2π*f*L
. Thepar
andpar2
are two forms of the same formula for computing impedances in parallel.┆Issue is synchronized with this Trello card by Unito
The text was updated successfully, but these errors were encountered: