C_R

3577 Reputation

21 Badges

6 years, 95 days

MaplePrimes Activity


These are replies submitted by C_R

@bmartin 

I just observered two minor (?) related details that I want to bring to your attention. The moderator can decide if this is worth branching off.

Display only probed variables displays real input (RE) and to real variables (TV) that are not probed.

Why are RE and TV displayed?

For comparision display all model variables only displays non zero RE (RE_9 is zero) variables.

If all variables means "all used variables for simulation", why is TV_11 not listed?
 

@vv 

I misinterpreted the error message "Error, (in EllipticK) numeric exception: division by zero". I thought it was the numeric integration. Printing EllpitcK shows that Maple prints the error message before any arithmetic is performed.
Using the references you provided, I found that even EllipticK can give the expected output.

restart

EllipticK(1)

Error, (in EllipticK) numeric exception: division by zero

 

NumericEventHandler(division_by_zero = proc (operator, operands, defVal) return defVal end proc)

division_by_zero = default

(1)

EllipticK(1)

infinity+undefined*I

(2)

NULL

For me it would have been better if EllipticK would output both the error message and infinity + undefined*I. This would prevent arithmetics with oo and additionally provide a symbolic result.

Download devisionbyzero_alternative_output.mw

@bmartin 

The error is not reproducible enough for me to send to support. Until I can show something, I will not pretend that it is a bug. It is not impossible that it is a use error or an unfortunate combination of model design, parameters and initial conditions. Let's leave it open.

Thanks again for the helpful information.

@bmartin 

Thank you for following up on this. Can I assume that there is an incomplete correspondence between the variables and states listed in the “computing initial values” section in the output console and the "all model variables" section in the simulation results?

This might help me find a bug that is driving me crazy. The output console is informative, but difficult to get an overview. The all variables section provides a better overview.

Any "strange" variables listed could indicate an error.

@Axel Vogt 

I did not know that an online version existed. A quick look showed that this special case cannot be looked up easily. Some calculations are required to make the connection to the Maple definitions. This is also the case with my old textbooks. Interesting in itself, but unfortunately not something I could spend too much time on. Providing quick solutions to integrals is one of the reasons I use Maple.

Now I can much better appreciate the work that has gone into Maple's integration capabilities and special functions. I hope they will continue the work.

Thanks for providing the link!

@vv 

I will suggest Maplesoft to update EllipticK to handle such special cases.

Thank you!

@TechnicalSupport 

That  helps. Suggestion: If the icon is only for removal it could be replaced by a simliar icon already used in MapleSim.

Thank you for following up!

@Carl Love 

After reading your reply, I checked help("simplify[constants]"). So constants are not automatically constants...

 

What's confusing about the help page:

I would have expected simplify(infinity(x)) to be effective only when using the "constants" option to tell Maple to treat constants as "common constants" (i.e., remove the (x)). This is not the case, and Maple simplifies directly to infinity, which to me means that Maple assumes that infinity is not a function.

But for the integral evaluated to infinity, Maple is very careful to assume that infinity is really a constant infinity.

Thanks for the context information.

 

@vv 

Int(1/(sqrt(1-x)*sqrt(-x^2+1)), x = 0 .. 1); simplify(((proc (x) options operator, arrow; x end proc) = value)(%))

Int(1/((1-x)^(1/2)*(-x^2+1)^(1/2)), x = 0 .. 1) = infinity

(1)

(Int(1/((1-x)^(1/2)*(-x^2+1)^(1/2)), x = 0 .. 1) = infinity)*(1/rhs(Int(1/((1-x)^(1/2)*(-x^2+1)^(1/2)), x = 0 .. 1) = infinity))

0 = 0

(2)

lhs(Int(1/((1-x)^(1/2)*(-x^2+1)^(1/2)), x = 0 .. 1) = infinity)/rhs(Int(1/((1-x)^(1/2)*(-x^2+1)^(1/2)), x = 0 .. 1) = infinity) = rhs(Int(1/((1-x)^(1/2)*(-x^2+1)^(1/2)), x = 0 .. 1) = infinity)*(1/rhs(Int(1/((1-x)^(1/2)*(-x^2+1)^(1/2)), x = 0 .. 1) = infinity))

0 = undefined

(3)

NULL

Download Infinity_times_something_divided_by_infinity.mw

Thanks for pointing out this last detail as well. I was just about to use the integral in quotients. I will pay more attention to quotients now.

@Anthrazit 

I had

Override high DPI scaling behavior -> System (Enhanced)

but changing it back to  Application made (as you noticed) no difference.

(Maybe with recent Windows updates there has been an improvement.)

Your observations point toward a machine depended installation issue. Did you compare

C:\Users\%USERNAME%\AppData\Roaming\Maple\2021\Maple.ini

for differences.

Could you share a Maple worksheet where you noticed the rendering issue. A screen shot scaled to 200% would be benefical to see where the differences are. That's an unscaled screen shot from a 4K Monitor with 150% font scaling in Windows

 

Recently I have observed even stronger delays when editing/correcting long text passages in MapleSim 2021, which uses the same Java platform (OpenJDK) as Maple 2021. It requires a restart and is not reproducible. Maybe this is related.

@vv 

That is not good. So far, I've been pretty impressed with what one can achieve with the right assumptions. Let’s hope for improvements. In your example Maple could even produce a hint that the exclusion of the endpoint leads to an evaluated expression.

Thank you for the big picture

@vv Thank you for the clarifications. It is a big help.

@vv 

either in the symmetry or the identity section.

The plot gave already a clue where to look...

Lesson learned: there is more than branches to watch out for!

I have tried to exclude the case you highlighted, but still get a FAIL.

Can this be fixed by better assumptions?

Thank you!
 

restart

kernelopts(version)

`Maple 2022.0, X86 64 WINDOWS, Mar 8 2022, Build ID 1599809`

(1)

arctan(y, z) = -arctan(-y, z)

arctan(y, z) = -arctan(-y, z)

(2)

`assuming`([is(arctan(y, z) = -arctan(-y, z))], [y > 0, z > 0])

true

(3)

`assuming`([is(arctan(y, z) = -arctan(-y, z))], [y >= 0, z > 0])

true

(4)

`assuming`([is(arctan(y, z) = -arctan(-y, z))], [y < 0, z < 0])

true

(5)

Inclusion of the origin

`assuming`([is(arctan(y, z) = -arctan(-y, z))], [y <= 0, z < 0])

false

(6)

`assuming`([is(arctan(y, z) = -arctan(-y, z))], [y > 0, z < 0])

true

(7)

`assuming`([is(arctan(y, z) = -arctan(-y, z))], [y::real, z < 0])

FAIL

(8)

This explains why the real assumption produces a FAIL

``

Excluding y=0

NULL

`assuming`([is(arctan(y, z) = -arctan(-y, z))], [y::real, y <> 0, z < 0])

true

(9)

`assuming`([is(arctan(y, z) = -arctan(-y, z))], [y::real, y <> 0, z >= 0])

true

(10)

`assuming`([is(arctan(y, z) = -arctan(-y, z))], [y::real, y <> 0, z::real])

FAIL

(11)

This should have worked but still produces a FAIL although z=0 is allowed

arctan(0, 0)

0

(12)

NULL


 

arctan_yz_with_new_FAIL.mw

Update:

The frist bulletpoint has been adressed in Maple 2022.

see: help("2022,V,Updates,What,New,Maple,Units")

Thank you!!!

First 63 64 65 66 67 68 69 Page 65 of 70