Question: Working with units and piecewise functions?

Hello,

I use Maple and Maple Flow and want to work with physical units. However, I am quickly reaching the limits of what is possible. Now the question: Would it be possible to work with units and the piecewise function? In the attached example, the integration of a defined function is no longer possible. Or should I proceed differently in principle? Many thanks for any advice

Clemens

restart

 

Definition of current functions

"`i__1`(t):={[[0&lobrk;A&robrk;,t<0.01&lobrk;s&robrk;],[3&lobrk;A&robrk;*cos((2*Pi*t)/(T)),t>=0.01&lobrk;s&robrk;]]:"

"`i__2`(t):=3&lobrk;A&robrk;*cos((2*Pi*t)/(T)):"

"`i__3`(t):={[[0,t<0.01],[3*cos((2*Pi*t)/(`T__3`)),t>=0.01]]:"

T := 0.2e-1*Unit('s')

plot([i__1(t), i__2(t)], t = 0 .. .1*Unit('s'), color = [blue, red], legend = [i__1, i__2])

 

Calculation of RMS values

RMS__1 := sqrt((int(i__1(t)^2, t = 0 .. T))/T)

Error, (in Tools:-IntegrateExpression) units problem, can't make expression piecewise(t < .1e-1*Units:-Unit(s),0,.1e-1*Units:-Unit(s) <= t,3*Units:-Unit(A)*cos(314.1592654*t/Units:-Unit(s)))^2 unit-free with units [t::Units:-Unit(s)]

 

RMS__2 := sqrt((int(i__2(t)^2, t = 0 .. T))/T)

2.121320344*(Units:-Unit(A^2*s)/Units:-Unit(s))^(1/2)

(1)

and now without Units

T__3 := 0.2e-1

RMS__3 := sqrt((int(i__3(t)^2, t = 0 .. T__3))/T__3)

1.500000000

(2)

Download UnitProblem.mw

Please Wait...