C_R

3427 Reputation

21 Badges

5 years, 328 days

MaplePrimes Activity


These are replies submitted by C_R

@sursumCorda @dharr

The fact that I cannot find a trace on index=real[n] in the official documentation of Maple let me assume that this is Maples way of defining internally the n-th entry in an ordered list of the real roots. Normally the user should not see this and indeed using the explicit option (without parametric) cases in this forum I re-run with Maple 2022 provided clean analytic output without RootOf.

So I do not think this is a real bug in the sense of a wrong solution. I would rather call it an unintended output of solve for some combinations of options and assumptions.

At least I found an error on my side in introducing the extra roots: I included negative values for b which are not part of the original problem b>0. Doing it correctly:

-(_Z^6*sqrt(3) + _Z^7 + 11*_Z^5*sqrt(3) + 2*_Z^6 - 5*_Z^4*sqrt(3) - 18*_Z^5 - 144*_Z^3*sqrt(3) + 4*_Z^4 + 39*_Z^2*sqrt(3) + 251*_Z^3 + 981*_Z*sqrt(3) - 66*_Z^2 + 873*sqrt(3) - 1698*_Z - 1512)*(_Z - 1);
solve({%, 0 < _Z});

gives only one solution.

Interestingly Maple knows that index=real[4] is the only valid solution and can in some instances provide an exact answer. On the other hand there seems to be no direct way to evaluate output with a RootOf expression with index=real[]. Internal information of the solution must have been lost in the output.

@dharr 
If I understand correctly index=real[4] is unexpected. Indeed I could not find anything in the help system altough it has been mentioned in this forum (searchable with: index AND real).

Since index=positive integer did not match I tried (on the factored expression in my worksheet solve_RootOf.mw)

-(_Z^6*sqrt(3) + _Z^7 + 11*_Z^5*sqrt(3) + 2*_Z^6 - 5*_Z^4*sqrt(3) - 18*_Z^5 - 144*_Z^3*sqrt(3) + 4*_Z^4 + 39*_Z^2*sqrt(3) + 251*_Z^3 + 981*_Z*sqrt(3) - 66*_Z^2 + 873*sqrt(3) - 1698*_Z - 1512)*(_Z - 1);
RootFinding[Isolate](%);

which returned the supposedly correct solution at postion 4
[_Z = -2.437068349, _Z = -2.283792841, _Z = -0.07778113818, _Z = 1.000000000]

I tested the other 3 solutions with the inital expression expr and all evaluated expr to zero.
Can we realy assume that expr has only 6 solutions (Is there a fundamental theorem for multivariate polynomials that states the number of roots? I.e. 3+3 or 3*3 in this case of maybe 12 because there are two RootOf with index=real[4])?

Just for completeness:

(solve(expr = 0, [a, b], useassumptions, parametric) assuming (0 <~ (a, b)))

returns the same expression with the bad roots. So useassumptions in combination with allsolutions is maybe a combination of options MapleSoft want's to have a look at.

expr := 36*a^3*b^3+8*a^2*b^2*(9*(a+b+1)^2+4*(a*b+a+b))*(a+b+1)+((a-b)^2-2*(a+b)+1)^2*(a+b+1)^5+a*b*((a-b)^2-2*(a+b)+1)*(17*(a+b+1)^2+4*(a*b+a+b))*(a+b+1)^2; s1 := solve({`~`[`>=`](a, b, ` $`, 0), expr = 0}, [a, b], allsolutions); s2 := `assuming`([solve(expr = 0, [a, b], useassumptions, parametric)], [`~`[`>=`](a, b, ` $`, 0)]); is(s1 = s2)

true

(1)

NULL

Download solve_parametric.mw

@sursumCorda 

I am sorry, I can't relate https://www.mapleprimes.com/questions/235749-Better-Way-To-Remove-Entries-In-Piecewise#answer292495 to this quesion and the transformed minus sign. I also cannot spot any substantial changes in the expressions in both pdf files.

@acer Thank you for answering all my questions and the procedure that reveals the name of the procedure that issued the warning. The procedure worked well on a few examples with the exception of e^2 and du/dy warnings. My interpretation is that those warnings are not using the WARNING function.

@sursumCorda 

printing (via printpreview) or exporting your file on my machine is still fine.

I guess the print error has something to do with the print driver (assuming that everyone is using Maple 2022. There have been substantial improvements with the introduction of the print layout mode). On my machine I used the Adobe print driver

confirmed_2.pdf

I can't reproduce this with Maple 2022.2. Which version do you use?

Untitled_(16).pdf

@WhiteNoise 

the complicated formating works in almost all instances. If for some reasons the user has defined a name kOmega (which is unlikely I have to admit) the output will not be as intended.

Can you provide Maple code that crashes?

I have an open question about volume integrals that I would like to at least ask without the need of getting an answer right away:
Is it possible to compute the moment on inertia about an arbitrary oriented axis? A stopped at the point where I could not manage to define the domain of a cylinder.

Maybe such an example fits better in the “Physics Courseware Support: Mechanics”.

@Thomas Richard 

Thank you!
With AllSolutions it becomes a question of equaltiy of integrals where I am stuck:
 

expr0 := int(1/(sqrt(x__0-x)*sqrt(-x^2+1)), x = 0 .. x__0, allsolutions); `assuming`([expr0], [0 < x__0 and x__0 < 1])

 

2*EllipticF(x__0^(1/2)/(x__0+1)^(1/2), I*(x__0+1)^(1/2)/(1-x__0)^(1/2))/(1-x__0)^(1/2)

(1)

Remove the imaginery unit by hand

expr1_new := 2*EllipticF(sqrt(x__0)/sqrt(x__0+1), -sqrt(x__0+1)/sqrt(x__0-1))/sqrt(1-x__0)

2*EllipticF(x__0^(1/2)/(x__0+1)^(1/2), (x__0+1)^(1/2)/(x__0-1)^(1/2))/(1-x__0)^(1/2)

(2)

expr2 := sqrt(2)*EllipticF(sqrt(1-1/(x__0+1))*sqrt(2), (1/2)*sqrt(x__0+1)*sqrt(2))

2^(1/2)*EllipticF((1-1/(x__0+1))^(1/2)*2^(1/2), (1/2)*(x__0+1)^(1/2)*2^(1/2))

(3)

plot(expr1_new-expr2, x__0 = 0 .. 1)

 

queryequal(expr1_new, expr2)

queryequal(2*EllipticF(x__0^(1/2)/(x__0+1)^(1/2), (x__0+1)^(1/2)/(x__0-1)^(1/2))/(1-x__0)^(1/2), 2^(1/2)*EllipticF((1-1/(x__0+1))^(1/2)*2^(1/2), (1/2)*(x__0+1)^(1/2)*2^(1/2)))

(4)

difference := op(1, queryequal(2*EllipticF(x__0^(1/2)/(x__0+1)^(1/2), (x__0+1)^(1/2)/(x__0-1)^(1/2))/(1-x__0)^(1/2), 2^(1/2)*EllipticF((1-1/(x__0+1))^(1/2)*2^(1/2), (1/2)*(x__0+1)^(1/2)*2^(1/2))))-op(2, queryequal(2*EllipticF(x__0^(1/2)/(x__0+1)^(1/2), (x__0+1)^(1/2)/(x__0-1)^(1/2))/(1-x__0)^(1/2), 2^(1/2)*EllipticF((1-1/(x__0+1))^(1/2)*2^(1/2), (1/2)*(x__0+1)^(1/2)*2^(1/2))))

2*EllipticF(x__0^(1/2)/(x__0+1)^(1/2), (x__0+1)^(1/2)/(x__0-1)^(1/2))/(1-x__0)^(1/2)-2^(1/2)*EllipticF((1-1/(x__0+1))^(1/2)*2^(1/2), (1/2)*(x__0+1)^(1/2)*2^(1/2))

(5)

`assuming`([convert(difference, Int)], [0 < x__0 and x__0 < 1])

2*(Int(1/((-_alpha1^2+1)^(1/2)*(1-(x__0+1)*_alpha1^2/(x__0-1))^(1/2)), _alpha1 = 0 .. x__0^(1/2)/(x__0+1)^(1/2)))/(1-x__0)^(1/2)-2^(1/2)*(Int(2/((-_alpha1^2+1)^(1/2)*(-2*_alpha1^2*x__0-2*_alpha1^2+4)^(1/2)), _alpha1 = 0 .. (1-1/(x__0+1))^(1/2)*2^(1/2)))

(6)

`assuming`([simplify(%)], [0 < x__0 and x__0 < 1])

-2*2^(1/2)*(Int(1/((-_alpha1^2+1)^(1/2)*(4+(-2-2*x__0)*_alpha1^2)^(1/2)), _alpha1 = 0 .. x__0^(1/2)*2^(1/2)/(x__0+1)^(1/2)))+2*(Int(1/((-_alpha1^2+1)^(1/2)*((x__0+1)*_alpha1^2+1-x__0)^(1/2)), _alpha1 = 0 .. x__0^(1/2)/(x__0+1)^(1/2)))

(7)

``

 

NULL

 

Can someone help?
 

Download Equality_of_Elliptic_expressions_02.mw

What you indend to do sounds intersting.

Could you give or refer to examples of what the final result you want might look like?

I didn't find anything useful that matched the keywords in your question.

@tomleslie 

Regrettably I forgot to mention that my simplified example is an excerpt from a larger worksheet where I took care of unit inconsistency risk mitigation (Testdimension in this case).

Your answer illustrates the step that I do for the time being: substituting s by a dimensionless s (s=s*Unit(1/s)) and doing the “simplifications”.

The result is an expression which is partially dimension less. To resolve this mixture of dimensionless expressions and expression with dimension, the dimensionless s has to be replaced by s=s*Unit(s). In summary, two substitutions I am looking to make expendable.

The reason why I have to restore a transfer function with units of s in Hertz is that I want to take advantage of recent plot functionality with units (the DynanmicSystems package does not provide this).

Off course an expand option is only one way. That’s why I added some other thoughts maybe worth considering the day an enhancement of the DynamicSystems package is planned.

Thanks for taking the time to highlight potential risks.

 

@dharr 

To complete the method you have given, it might be required to delete unnecessary characters (a colon in your example).

On a 4k display the box placeholders come with addtional information. I don't know if that is the case on 2k. fo could mean "function of". The multiplication box before the integration variable is interesting because mathematically there is no multiplication. However, when you drag an drop the integral (in the ouput of q) to a new input line (2 times), the new input shows that Maple correctly interprets the expression.

int(GAMMA(s + a)*GAMMA(b - s)*z^(-s), s = c - i*infinity .. c + i*infinity)

 

Overall, with a bit of caution errors and time can be saved with your method.
Thank you!

@AmirHosein Sadeghimanesh I have no idea. I think it should work without the style option.

It would be helpful if you upload your Maple worksheet. For that use the green arrow in the menu of the editor.

First 53 54 55 56 57 58 59 Last Page 55 of 67