acer

32343 Reputation

29 Badges

19 years, 328 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

The help page for topic VectorCalculus,Curvature does not state that it computes the signed curvature in the special cases of a plane curve. What that command computes is a magnitude.

The help page for topic Definition,curvature gives two definitions. Only the first is a definition for signed curvature for a plane curve.

@Jonas F As far as I know there is no special setting of the Maple 2019.1 GUI which reverts its behavior in this regard. Explicit action (ie. Shift-F5) may be required.

Asking about it again is unlikely to alter that.

This kind of thing has been reported before, I believe.

Another workaround is to convert the Heaviside to piecewise, before integrating.

I'll note that the issue can also arise for an exact value for the variance, in your example. It therefore seems reasonable (to me) that a workaround other than recourse to up-front numeric quadrature may sometimes be useful or desirable.

restart

with(Statistics)

X := RandomVariable(Normal(1, sqrt(2.25)))

int(PDF(X, x)*convert(Heaviside(x^7-5*x^4-3*x+1), piecewise), x = -infinity .. infinity)

.5275852105

 

Having a brief look at how it may go wrong, we might compare these:

 

X := RandomVariable(Normal(1, sqrt(225*(1/100))))

`assuming`([int(PDF(X, x)*Heaviside(x^7-5*x^4-3*x+1), x = -a .. a)], [a > 10]); limit(%, a = infinity); evalf(%)

-1/2+(1/2)*erf(-(1/3)*2^(1/2)*RootOf(_Z^7-5*_Z^4-3*_Z+1, -.8961211535)+(1/3)*2^(1/2))-(1/2)*erf(-(1/3)*2^(1/2)*RootOf(_Z^7-5*_Z^4-3*_Z+1, .3166780086)+(1/3)*2^(1/2))+(1/2)*erf((1/3)*2^(1/2)*RootOf(_Z^7-5*_Z^4-3*_Z+1, 1.759427884)-(1/3)*2^(1/2))

-0.850712015e-1

`assuming`([int(PDF(X, x)*convert(Heaviside(x^7-5*x^4-3*x+1), piecewise), x = -a .. a)], [a > 10]); limit(%, a = infinity); evalf(%)

(1/2)*erf(-(1/3)*2^(1/2)*RootOf(_Z^7-5*_Z^4-3*_Z+1, index = 5)+(1/3)*2^(1/2))-(1/2)*erf(-(1/3)*2^(1/2)*RootOf(_Z^7-5*_Z^4-3*_Z+1, index = 1)+(1/3)*2^(1/2))-(1/2)*erf((1/3)*2^(1/2)*RootOf(_Z^7-5*_Z^4-3*_Z+1, index = 2)-(1/3)*2^(1/2))+1/2

.5275852105

 

Download Bug_HS_PDF.mw

@Mohamed19 Yes, your earlier claim was wrong.

Your latest claim is also wrong.

@Christian Wolinski Your first suggestion is correct.

output=':-Q'

@Stretto I realize that this is going to sound crazy, but... there are actually two different kinds of file that Maple uses on MS-Windows, both of which are named maple.ini .

One of these contains saved preferences for the Java GUI. That's the one you've described. That's not the one that you need here.

What you want is a file that contains only plaintext Maple commands (or is empty). The online help for that is indeed topic worksheet/reference/initialization, as you found. You can create this file in one of the locations listed on that help page.

I suggest that you go with choice 3). I suggest that you do not mess around with maplejava.i4j.ini and try and change any location setting. You just need a file maple.ini in the folder that Maple thinks is your "home directory". It'll be a location similar to C:\\Users\userid\maple.ini but of course userid will be different.

You can even issue the Maple command  kernelopts(homedir)  to discover what Maple thinks is your home directory.

 

 

The simplest example I have so far is:

restart;

expr := (7 + a/b)/(1 + c/d):

latex( expr );
{1 \left( 7+{\frac {a}{b}} \right)  \left( 1+{\frac {c}{d}} \right) ^{
-1}}

The problem seems to be due to weak coding in procedure `latex/latex/*`.

Specifically, line 43 is a general else fallback, without any consideration for the special case that local numShort could be equal to 1.

showstat(`latex/latex/*`,42..43);

`latex/latex/*` := proc(e)
local subexp, den, ee, ff, subee, i, k, num, texlist, `\\,`, `\\frac `, `\\sqrt `, 
  `{`, `}`, ccnt, keepcnt, ll, nlist, numTall, numShort, denTall, denShort;
global _LatexSmallFractionConstant;
       ...
  42           texlist := '`{`', '`(`', `latex/print`(numShort), '`)`', 
                 texlist, '`}`'
           else
  43           texlist := '`{`', `latex/print`(numShort), texlist, '`}`'
       ...
end proc

If I replace that else with elif numShort<>1 then the errant 1 is not present in the generated LaTeX. I will test some more examples, and try and form a FromInert/ToInert hotfix.

This would not address my other concern, that the denominator renders like (den)^(-1) instead of within \frac{...}{den} . That'd likely require a deeper rewrite of this routine.

@Mohamed19 Simply read the help page for the diff command.

@Carl Love Thanks, Carl.

I've fixed it. (It didn't change that example's generated plot -- just the name in the unevaluated name case.)

That's an interesting question.

Technically speaking, that is not a command so much as a data structure used for plotting. When printed the interface renders this plot structure using a plot driver for the current plot device.

How can we describe the rules by which the shaded regions are determined? Here's an example:

restart;
# Drag the red circle around, inside the boxed axes.
Explore(PLOT(POLYGONS([[0,0],[1,0],[2,1],[0.5,1],
                       [0.7,0.5],[2.0,0.4],[a,b]]),
             AXESSTYLE(BOX)),
        a=0.0..2.0, b=0.0..1.0,
        initialvalues=[a=0.2, b=0.3],
        showmarkercontrols=false,
        markers=[[a, b, symbol=solidcircle, color=red]]);

A description would explain how the shaded regions change as the point [a,b] moves across lines determined by the line segments formed by adjacent point pairs (in the list). Visually the behavior "makes sense", but what is the precise characterization in words?

I adjusted the unevaluated call returned in method 3).

@nm I am guessing that the latex command calls content (or somehow otherwise computes a similar thing) when it does that manipulation of the denominator, and that it fails to account for the special cases that the content is 1 ( and perhaps also -1).

I will have a look.

@tomleslie From the 5th bullet point in the Description section of the Help page for Topic convert,temperature in Maple 2019,

Expressions with a unit are represented in Maple as a product of
the expression with a function call, which can be obtained by
calling the procedure "Unit". This means that Maple cannot
represent the expression "0" with a unit: it would be represented
as, for example, "0*degC", or internally, "0 . (Unit(degC))",
but "0" multiplied by any function call immediately simplifies
to "0". This particularly comes up with temperatures sometimes,
when dealing with empirical temperatures rather than with
temperature differences. This can be a reason to use Temperature
objects instead of regular unit expressions.

For example, contrasting combinations of relative versus absolute ("empirical") temperatures,

restart;

kernelopts(version);

`Maple 2019.1, X86 64 LINUX, May 21 2019, Build ID 1399874`

0.0*Unit(Celsius) + 30.0*Unit(K);

30.0*Units:-Unit(K)

Temperature(0.0, Celsius) + Temperature(30.0, K);

_m140524845539424

combine( -1*Unit(Celsius) -1*Unit(Fahrenheit), units);

-(14/9)*Units:-Unit(K)

Temperature(-1, Celsius) + Temperature(-1, Fahrenheit);

_m140524744097920

combine( 0*Unit(Celsius) - 0*Unit(Fahrenheit), units);

0

Temperature(0, Celsius) + Temperature(0, Fahrenheit);

_m140524744070656

 

Download temperatures.mw

Your examples using the is command are not meaningful, since is doesn't know how to compare different units anyway. It would not even handle these:

is( -1*Unit(degC) = -9/5*Unit(degF) );

                false

is( -1*Unit(degC) + 9/5*Unit(degF) = 0 );

                false

Note: While this is all interesting, I suspect that the OP's point about his first two examples was simply that he expected a result in terms of Unit(degC) rather than the received Unit(K). I may have misinterpreted, and indeed I initially considered that his first point might have to do relative versus absolute/empirical temperature.

I have submitted a bug report.

@gabrielperes46 Ok, thanks for clarifying.

You might try an uninstall/re-install, assuming the downloaded Installer is itself ok.

If you continue to have these issues then I'd suggest contacting Maplesoft's Tech Support.

First 207 208 209 210 211 212 213 Last Page 209 of 592