C_R

3402 Reputation

21 Badges

5 years, 302 days

MaplePrimes Activity


These are replies submitted by C_R

@phil2 

MapleSim 2022.2 improved substantially on (6). I could easily figure it out myself even without updated documentation, which is a sign of good usabilty.

Congratulations for this simple and elegant solution!

@Joe Riel 

I have found a way to force the clipping on Windows 10. After a system restart:

  • Launch Maple
  • Create a new document and type in something
  • In the system settings for the display change the font scaling to a larger percentage (I did 150% -> 250%)
  • Close the document to force the clipped dialogue.

This is not the use case that occurred to me last time when I posted the question. But maybe it helps identifying the root cause.

Also: After working for a while without restart but using other applications as well, the clipping was not reproducible anymore. When changing the font scaling I got an additional system message (on a blue banner) asking if I want to keep the settings. Confirming with yes to keep the scaling seems to make the clipping disappear.

Difficult to tell without knowing the Maple input.

@zenterix 
Perhaps I have found an explanation why solve does not return a solution in your case:

I assume that solve finds a first zero at x=0 and discards it since sin(0)/0 is undefined at this point... and discards all other solutions of sin(x)/x (instead of returning another solution as one could have expected from the help page). Here are some examples in line with this assumption

NULL

sin(x)/x"(->)"

cos(x)/x"(->)"{x = (1/2)*Pi}

(sin(x)/x*(sin(x)/x))*(x+1)"(->)"{x = -1}

sin(x)"(->)"{x = 0}

An expression where solve ignores 0/0 and correctly does not return x=1 as solution

(x-1)/'(x+1)*(x-1)'"(->)"

NULL

(x-1)*(x-3)/'(x+1)*(x-1)' "(->)"{x = 3} 

(x-1)*sin(x)/'(x+1)*(x-1)'"(->)"{x = 0}

Annother expression with 0/0 where solve does not return a solution

sin(x)/tan(x)"(->)"

solve(sin(x)/tan(x), allsolutions)

sin(x)/tan(x)"(=)"cos(x)"(->)"{x = (1/2)*Pi}

``

NULL

Since other computer algebra systems provide solutions without additional options, I can agree that Maple could be more user-friendly in this case.

Download sinc02.mw

@Joe Riel 

So far, I managed to survieve with blindfolded Tab & Enter. The short cuts are much better.
Thank you!

I found a way with simplify which factors the units out of the inner integral and the warning disapears

with(Physics)

diff(x(t), `$`(t, 2)) = a(t)

diff(diff(x(t), t), t) = a(t)

(1)

dsolve(diff(diff(x(t), t), t) = a(t), arbitraryconstants = subscripted)

x(t) = Int(Int(a(t), t), t)+c__1*t+c__2

(2)

a(t) = 1.*Unit('m'/'s'^2), c__1 = 2*Unit('m'/'s'), c__2 = 3*Unit('m')

a(t) = 1.*Units:-Unit(m/s^2), c__1 = 2*Units:-Unit(m/s), c__2 = 3*Units:-Unit(m)

(3)

subs(a(t) = 1.*Units:-Unit(m/s^2), c__1 = 2*Units:-Unit(m/s), c__2 = 3*Units:-Unit(m), x(t) = Int(Int(a(t), t), t)+c__1*t+c__2)

x(t) = Int(Int(1.*Units:-Unit(m/s^2), t), t)+2*Units:-Unit(m/s)*t+3*Units:-Unit(m)

(4)

value(%)

x(t) = (1/2)*t^2*Units:-Unit(m/s^2)+2*Units:-Unit(m/s)*t+3*Units:-Unit(m)

(5)

simplify(x(t) = Int(Int(1.*Units:-Unit(m/s^2), t), t)+2*Units:-Unit(m/s)*t+3*Units:-Unit(m))

x(t) = Units:-Unit(m/s^2)*(Int(Int(1, t), t))+2*Units:-Unit(m/s)*t+3*Units:-Unit(m)

(6)

value(x(t) = Units:-Unit(m/s^2)*(Int(Int(1, t), t))+2*Units:-Unit(m/s)*t+3*Units:-Unit(m))

x(t) = (1/2)*t^2*Units:-Unit(m/s^2)+2*Units:-Unit(m/s)*t+3*Units:-Unit(m)

(7)

NULL

``


 

Download Unit_of_t-2.mw

@Jankel 

The one bellow is from a Windows installation version 2022.2 (on a 4K display at 250% scaling on a 15.6 display).

Java in combination with making Maple available on three operating systems could be a reason why rendering it not always the same in all possible combinations of hard and software. Other potential candidates to look at are, compatabilty settings (properties of Maple executable), graphics cards (type and settings) and font scaling in the operating system.

Under Windows I see other rendering issues which appear when changing displays while Maple is running (you see it bellow: + button are larger than in your screen shot and the question mark does not render well). Program restart is sometimes required and in some rare cases even a system restart. With newer Windows versions the situation has substantially improved.

On my machine it does not look like a font scaling issue (I testesd it also with 125% on a larger display) but I wanted to make you aware on other sublte changes in rendering that could give you a hint under which conditions changes in font rendering happens.

 

@zenterix 

If sinc(x)=sin(x)/x was transcendental you should have gotten at least one answer.

I have checked help(solve, detail) and I am not so sure any more about Maple retruning no Output. At least one solution should have been returned according to:

The solve command returns all solutions for polynomial equations. In general for transcendental equations, the solve command returns only one solution, but does not set _SolutionsMayBeLost to true. To force the solve command to return the entire set of solutions for all inverse transcendental functions, provide the solve option allsolutions = true or set the environment variable _EnvAllSolutions := true.

@zenterix 

I can only guess that allsolution is not needed in most cases (I don't use it by default). Take phi=arctan(y,x) as another expamle for a solution. Most users would probably prefer it instead of the general solution

There is allways room for improvement. The fact that Maple did not return anything in your example even though there are solutions is debatable. It would be nice to distinguish from a user perspective between no solution and too many when Maple produces no Output.

I have to admit: By convenience I did use the context panel (plus right click show command) to find the appropriate solve command for sin(x)/x.  This was pretty user friendly.

@Carl Love @acer

Sorry, I did not get a notification for your replies and only could check for answers today.

Physics:-Version() gives:

`The "Physics Updates" version in the MapleCloud is 1343 and is the same as the version installed in this computer, created 2022, November 2, 11:29 hours Pacific Time.`

Interestingly, a parameter set with units in a simliar example from @ecterrab on equation(6) worked

@WhiteNoise 

I thought converting your working Heaviside version to piecewise might give a clue what must be changed in the piecewise definition to make it work. As you can see it’s not working either. Converting this back to Heaviside gives an expression that does not evaluate at all because of the now appearing units in the Heaviside function.

Could you elaborate why Heaviside is not an option in the general case? I think this forum can help you with a solution that converts a general piecewise case to a Heaviside solution with dimensionless arguments.

You should contact support if no one else can help. Piecewise with units should work.  

restart

 

Definition of current functions with units

"`i__1`(t):=Heaviside(t/(⟦s⟧)-0.01)*3⟦A⟧*cos((2*Pi*t)/(T));"

proc (t) options operator, arrow, function_assign; 3*Heaviside(t/Unit('s')-0.1e-1)*Unit('A')*cos(2*Pi*t/T) end proc

(1)

convert(i__1(t), piecewise, t)

piecewise(t < 0.1e-1*Units:-Unit(s), 0, t = 0.1e-1*Units:-Unit(s), Float(undefined)*Units:-Unit(A), 0.1e-1*Units:-Unit(s) < t, 3*Units:-Unit(A)*cos(314.1592654*t/Units:-Unit(s)))

(2)

convert(piecewise(t < 0.1e-1*Units:-Unit(s), 0, t = 0.1e-1*Units:-Unit(s), Float(undefined)*Units:-Unit(A), 0.1e-1*Units:-Unit(s) < t, 3*Units:-Unit(A)*cos(314.1592654*t/Units:-Unit(s))), Heaviside)

Float(undefined)*Units:-Unit(A)*Dirac(t-0.1e-1*Units:-Unit(s))-3*Units:-Unit(A)*cos(314.1592654*t/Units:-Unit(s))*Heaviside(t-0.1e-1*Units:-Unit(s))*Dirac(t-0.1e-1*Units:-Unit(s))+3*Units:-Unit(A)*cos(314.1592654*t/Units:-Unit(s))*Heaviside(t-0.1e-1*Units:-Unit(s))

(3)

`i__11`(t):=piecewise(t < 0.01*Unit('s'), 0, t = 0.01*Unit('s'), 3*cos(314.1592654*t/Unit('s'))*Unit('A'), 0.01*Unit('s') < t, 3*cos(314.1592654*t/Unit('s'))*Unit('A'))

"i[`11`](t):={[[0,t<0.01 &lobrk;s&robrk;],[3 cos((314.1592654 t)/&lobrk;s&robrk;) &lobrk;A&robrk;,t=0.01 &lobrk;s&robrk;],[3 cos((314.1592654 t)/&lobrk;s&robrk;) &lobrk;A&robrk;,0.01 &lobrk;s&robrk;<t]]"

(4)

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

RMS__11 := sqrt((int(i__11(t)^2, t = 0 .. T))/T)

Error, (in Tools:-IntegrateExpression) units problem, can't make expression piecewise(t < .1e-1*Units:-Unit(s),0,t = .1e-1*Units:-Unit(s),3*Units:-Unit(A)*cos(314.1592654*t/Units:-Unit(s)),.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__1 := sqrt((int(i__1(t)^2, t = 0 .. T))/T)

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

(5)

NULL


 

Download UnitProblemSecondVersion-_convert_piecewise.mw

@acer 

Best: better than a sequence of two commands (or your nested version). I was hoping for a single command.

Improve in the sense to include the case sqrt(m*something)/m^-1 when combine,radical,symbolic is called (altough I try to avoid the symbolic option).

Thumbs up for including the m>0 as a relation for solve instead of adding an assumption to the command (what I tried)! This makes totally sense. I will leave the question open why the assume facilty does not do it automatically. I assume that there will be too many exceptions to deal with in the R^n space.

Many thanks!

@ecterrab 

Very nice feature! Is it possible to make it work with ODESteps?

arbconst_with_ODESteps.mw

@Carl Love 

I wrote an addendum under my reply  "No ranges or assumptions".

I hope that fixes my hasty deletion.

@Carl Love 

Thank you for clarifiying. I overlooked the extra dot. I will delete my reply. There is nothing to investigate.

First 55 56 57 58 59 60 61 Last Page 57 of 67